Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR consumption/resource-manager] [Hub Generated] Review request for Microsoft.Consumption to add version preview/2019-04-01-preview #4832

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,19 @@
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.usage_details_operations import UsageDetailsOperations
from .operations.marketplaces_operations import MarketplacesOperations
from .operations.budgets_operations import BudgetsOperations
from .operations.tags_operations import TagsOperations
from .operations.charges_operations import ChargesOperations
from .operations.balances_operations import BalancesOperations
from .operations.reservations_summaries_operations import ReservationsSummariesOperations
from .operations.reservations_details_operations import ReservationsDetailsOperations
from .operations.reservation_recommendations_operations import ReservationRecommendationsOperations
from .operations.price_sheet_operations import PriceSheetOperations
from .operations.forecasts_operations import ForecastsOperations
from .operations.operations import Operations
from .operations.credit_summary_by_billing_profile_operations import CreditSummaryByBillingProfileOperations
from .operations.events_by_billing_profile_operations import EventsByBillingProfileOperations
from .operations.lots_by_billing_profile_operations import LotsByBillingProfileOperations
from .operations.invoice_pricesheet_operations import InvoicePricesheetOperations
from .operations.billing_profile_pricesheet_operations import BillingProfilePricesheetOperations
from .operations.charges_by_billing_account_operations import ChargesByBillingAccountOperations
from .operations.charges_by_billing_profile_operations import ChargesByBillingProfileOperations
from .operations.charges_by_invoice_section_operations import ChargesByInvoiceSectionOperations
from .operations.aggregated_cost_operations import AggregatedCostOperations
from . import models


Expand All @@ -33,14 +37,18 @@ class ConsumptionManagementClientConfiguration(AzureConfiguration):
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Azure Subscription ID.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, base_url=None):
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

Expand All @@ -50,6 +58,7 @@ def __init__(
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id


class ConsumptionManagementClient(SDKClient):
Expand All @@ -58,57 +67,75 @@ class ConsumptionManagementClient(SDKClient):
:ivar config: Configuration for client.
:vartype config: ConsumptionManagementClientConfiguration

:ivar usage_details: UsageDetails operations
:vartype usage_details: azure.mgmt.consumption.operations.UsageDetailsOperations
:ivar marketplaces: Marketplaces operations
:vartype marketplaces: azure.mgmt.consumption.operations.MarketplacesOperations
:ivar budgets: Budgets operations
:vartype budgets: azure.mgmt.consumption.operations.BudgetsOperations
:ivar tags: Tags operations
:vartype tags: azure.mgmt.consumption.operations.TagsOperations
:ivar charges: Charges operations
:vartype charges: azure.mgmt.consumption.operations.ChargesOperations
:ivar balances: Balances operations
:vartype balances: azure.mgmt.consumption.operations.BalancesOperations
:ivar reservations_summaries: ReservationsSummaries operations
:vartype reservations_summaries: azure.mgmt.consumption.operations.ReservationsSummariesOperations
:ivar reservations_details: ReservationsDetails operations
:vartype reservations_details: azure.mgmt.consumption.operations.ReservationsDetailsOperations
:ivar reservation_recommendations: ReservationRecommendations operations
:vartype reservation_recommendations: azure.mgmt.consumption.operations.ReservationRecommendationsOperations
:ivar price_sheet: PriceSheet operations
:vartype price_sheet: azure.mgmt.consumption.operations.PriceSheetOperations
:ivar forecasts: Forecasts operations
:vartype forecasts: azure.mgmt.consumption.operations.ForecastsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.consumption.operations.Operations
:ivar credit_summary_by_billing_profile: CreditSummaryByBillingProfile operations
:vartype credit_summary_by_billing_profile: azure.mgmt.consumption.operations.CreditSummaryByBillingProfileOperations
:ivar events_by_billing_profile: EventsByBillingProfile operations
:vartype events_by_billing_profile: azure.mgmt.consumption.operations.EventsByBillingProfileOperations
:ivar lots_by_billing_profile: LotsByBillingProfile operations
:vartype lots_by_billing_profile: azure.mgmt.consumption.operations.LotsByBillingProfileOperations
:ivar invoice_pricesheet: InvoicePricesheet operations
:vartype invoice_pricesheet: azure.mgmt.consumption.operations.InvoicePricesheetOperations
:ivar billing_profile_pricesheet: BillingProfilePricesheet operations
:vartype billing_profile_pricesheet: azure.mgmt.consumption.operations.BillingProfilePricesheetOperations
:ivar charges_by_billing_account: ChargesByBillingAccount operations
:vartype charges_by_billing_account: azure.mgmt.consumption.operations.ChargesByBillingAccountOperations
:ivar charges_by_billing_profile: ChargesByBillingProfile operations
:vartype charges_by_billing_profile: azure.mgmt.consumption.operations.ChargesByBillingProfileOperations
:ivar charges_by_invoice_section: ChargesByInvoiceSection operations
:vartype charges_by_invoice_section: azure.mgmt.consumption.operations.ChargesByInvoiceSectionOperations
:ivar aggregated_cost: AggregatedCost operations
:vartype aggregated_cost: azure.mgmt.consumption.operations.AggregatedCostOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Azure Subscription ID.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, base_url=None):
self, credentials, subscription_id, base_url=None):

self.config = ConsumptionManagementClientConfiguration(credentials, base_url)
self.config = ConsumptionManagementClientConfiguration(credentials, subscription_id, base_url)
super(ConsumptionManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2018-11-01-preview'
self.api_version = '2019-04-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.operations = Operations(
self.usage_details = UsageDetailsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.marketplaces = MarketplacesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.budgets = BudgetsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.credit_summary_by_billing_profile = CreditSummaryByBillingProfileOperations(
self.tags = TagsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.events_by_billing_profile = EventsByBillingProfileOperations(
self.charges = ChargesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.lots_by_billing_profile = LotsByBillingProfileOperations(
self.balances = BalancesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.invoice_pricesheet = InvoicePricesheetOperations(
self.reservations_summaries = ReservationsSummariesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.billing_profile_pricesheet = BillingProfilePricesheetOperations(
self.reservations_details = ReservationsDetailsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.charges_by_billing_account = ChargesByBillingAccountOperations(
self.reservation_recommendations = ReservationRecommendationsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.charges_by_billing_profile = ChargesByBillingProfileOperations(
self.price_sheet = PriceSheetOperations(
self._client, self.config, self._serialize, self._deserialize)
self.forecasts = ForecastsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.charges_by_invoice_section = ChargesByInvoiceSectionOperations(
self.aggregated_cost = AggregatedCostOperations(
self._client, self.config, self._serialize, self._deserialize)
198 changes: 119 additions & 79 deletions azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,99 +10,139 @@
# --------------------------------------------------------------------------

try:
from .enrollment_policies_py3 import EnrollmentPolicies
from .enrollment_py3 import Enrollment
from .department_py3 import Department
from .enrollment_account_py3 import EnrollmentAccount
from .address_py3 import Address
from .billing_profile_py3 import BillingProfile
from .invoice_section_py3 import InvoiceSection
from .billing_account_py3 import BillingAccount
from .amount_py3 import Amount
from .pricesheet_download_response_py3 import PricesheetDownloadResponse
from .credit_balance_summary_py3 import CreditBalanceSummary
from .credit_summary_py3 import CreditSummary
from .event_summary_py3 import EventSummary
from .events_py3 import Events
from .lot_summary_py3 import LotSummary
from .lots_py3 import Lots
from .charge_summary_by_billing_account_py3 import ChargeSummaryByBillingAccount
from .charges_list_by_billing_account_py3 import ChargesListByBillingAccount
from .charge_summary_by_billing_profile_py3 import ChargeSummaryByBillingProfile
from .charges_list_by_billing_profile_py3 import ChargesListByBillingProfile
from .charge_summary_by_invoice_section_py3 import ChargeSummaryByInvoiceSection
from .charges_list_by_invoice_section_py3 import ChargesListByInvoiceSection
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .meter_details_py3 import MeterDetails
from .meter_details_response_py3 import MeterDetailsResponse
from .usage_detail_py3 import UsageDetail
from .usage_details_download_response_py3 import UsageDetailsDownloadResponse
from .marketplace_py3 import Marketplace
from .balance_properties_new_purchases_details_item_py3 import BalancePropertiesNewPurchasesDetailsItem
from .balance_properties_adjustment_details_item_py3 import BalancePropertiesAdjustmentDetailsItem
from .balance_py3 import Balance
from .reservation_summary_py3 import ReservationSummary
from .reservation_detail_py3 import ReservationDetail
from .reservation_recommendation_py3 import ReservationRecommendation
from .tag_py3 import Tag
from .tags_result_py3 import TagsResult
from .budget_time_period_py3 import BudgetTimePeriod
from .filters_py3 import Filters
from .current_spend_py3 import CurrentSpend
from .notification_py3 import Notification
from .budget_py3 import Budget
from .price_sheet_properties_py3 import PriceSheetProperties
from .price_sheet_result_py3 import PriceSheetResult
from .forecast_properties_confidence_levels_item_py3 import ForecastPropertiesConfidenceLevelsItem
from .forecast_py3 import Forecast
from .management_group_aggregated_cost_result_py3 import ManagementGroupAggregatedCostResult
from .charge_summary_py3 import ChargeSummary
from .charges_list_result_py3 import ChargesListResult
from .error_details_py3 import ErrorDetails
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .proxy_resource_py3 import ProxyResource
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .resource_py3 import Resource
from .resource_attributes_py3 import ResourceAttributes
from .proxy_resource_py3 import ProxyResource
except (SyntaxError, ImportError):
from .enrollment_policies import EnrollmentPolicies
from .enrollment import Enrollment
from .department import Department
from .enrollment_account import EnrollmentAccount
from .address import Address
from .billing_profile import BillingProfile
from .invoice_section import InvoiceSection
from .billing_account import BillingAccount
from .amount import Amount
from .pricesheet_download_response import PricesheetDownloadResponse
from .credit_balance_summary import CreditBalanceSummary
from .credit_summary import CreditSummary
from .event_summary import EventSummary
from .events import Events
from .lot_summary import LotSummary
from .lots import Lots
from .charge_summary_by_billing_account import ChargeSummaryByBillingAccount
from .charges_list_by_billing_account import ChargesListByBillingAccount
from .charge_summary_by_billing_profile import ChargeSummaryByBillingProfile
from .charges_list_by_billing_profile import ChargesListByBillingProfile
from .charge_summary_by_invoice_section import ChargeSummaryByInvoiceSection
from .charges_list_by_invoice_section import ChargesListByInvoiceSection
from .operation_display import OperationDisplay
from .operation import Operation
from .meter_details import MeterDetails
from .meter_details_response import MeterDetailsResponse
from .usage_detail import UsageDetail
from .usage_details_download_response import UsageDetailsDownloadResponse
from .marketplace import Marketplace
from .balance_properties_new_purchases_details_item import BalancePropertiesNewPurchasesDetailsItem
from .balance_properties_adjustment_details_item import BalancePropertiesAdjustmentDetailsItem
from .balance import Balance
from .reservation_summary import ReservationSummary
from .reservation_detail import ReservationDetail
from .reservation_recommendation import ReservationRecommendation
from .tag import Tag
from .tags_result import TagsResult
from .budget_time_period import BudgetTimePeriod
from .filters import Filters
from .current_spend import CurrentSpend
from .notification import Notification
from .budget import Budget
from .price_sheet_properties import PriceSheetProperties
from .price_sheet_result import PriceSheetResult
from .forecast_properties_confidence_levels_item import ForecastPropertiesConfidenceLevelsItem
from .forecast import Forecast
from .management_group_aggregated_cost_result import ManagementGroupAggregatedCostResult
from .charge_summary import ChargeSummary
from .charges_list_result import ChargesListResult
from .error_details import ErrorDetails
from .error_response import ErrorResponse, ErrorResponseException
from .proxy_resource import ProxyResource
from .operation_display import OperationDisplay
from .operation import Operation
from .resource import Resource
from .resource_attributes import ResourceAttributes
from .proxy_resource import ProxyResource
from .usage_detail_paged import UsageDetailPaged
from .marketplace_paged import MarketplacePaged
from .budget_paged import BudgetPaged
from .reservation_summary_paged import ReservationSummaryPaged
from .reservation_detail_paged import ReservationDetailPaged
from .reservation_recommendation_paged import ReservationRecommendationPaged
from .forecast_paged import ForecastPaged
from .operation_paged import OperationPaged
from .consumption_management_client_enums import (
EventType,
LotSource,
BillingFrequency,
CategoryType,
TimeGrainType,
OperatorType,
Grain,
ChargeType,
Bound,
Datagrain,
Metrictype,
)

__all__ = [
'EnrollmentPolicies',
'Enrollment',
'Department',
'EnrollmentAccount',
'Address',
'BillingProfile',
'InvoiceSection',
'BillingAccount',
'Amount',
'PricesheetDownloadResponse',
'CreditBalanceSummary',
'CreditSummary',
'EventSummary',
'Events',
'LotSummary',
'Lots',
'ChargeSummaryByBillingAccount',
'ChargesListByBillingAccount',
'ChargeSummaryByBillingProfile',
'ChargesListByBillingProfile',
'ChargeSummaryByInvoiceSection',
'ChargesListByInvoiceSection',
'OperationDisplay',
'Operation',
'MeterDetails',
'MeterDetailsResponse',
'UsageDetail',
'UsageDetailsDownloadResponse',
'Marketplace',
'BalancePropertiesNewPurchasesDetailsItem',
'BalancePropertiesAdjustmentDetailsItem',
'Balance',
'ReservationSummary',
'ReservationDetail',
'ReservationRecommendation',
'Tag',
'TagsResult',
'BudgetTimePeriod',
'Filters',
'CurrentSpend',
'Notification',
'Budget',
'PriceSheetProperties',
'PriceSheetResult',
'ForecastPropertiesConfidenceLevelsItem',
'Forecast',
'ManagementGroupAggregatedCostResult',
'ChargeSummary',
'ChargesListResult',
'ErrorDetails',
'ErrorResponse', 'ErrorResponseException',
'ProxyResource',
'OperationDisplay',
'Operation',
'Resource',
'ResourceAttributes',
'ProxyResource',
'UsageDetailPaged',
'MarketplacePaged',
'BudgetPaged',
'ReservationSummaryPaged',
'ReservationDetailPaged',
'ReservationRecommendationPaged',
'ForecastPaged',
'OperationPaged',
'EventType',
'LotSource',
'BillingFrequency',
'CategoryType',
'TimeGrainType',
'OperatorType',
'Grain',
'ChargeType',
'Bound',
'Datagrain',
'Metrictype',
]
Loading