diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/__init__.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/__init__.py index a2ff086dcdca..0619d1a2c77b 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/__init__.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .azure_reservation_api import AzureReservationAPI -from .version import VERSION +from ._configuration import AzureReservationAPIConfiguration +from ._azure_reservation_api import AzureReservationAPI +__all__ = ['AzureReservationAPI', 'AzureReservationAPIConfiguration'] -__all__ = ['AzureReservationAPI'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_azure_reservation_api.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_azure_reservation_api.py new file mode 100644 index 000000000000..2690f14925a4 --- /dev/null +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_azure_reservation_api.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import AzureReservationAPIConfiguration +from .operations import AzureReservationAPIOperationsMixin +from .operations import ReservationOrderOperations +from .operations import ReservationOperations +from .operations import OperationOperations +from . import models + + +class AzureReservationAPI(AzureReservationAPIOperationsMixin, SDKClient): + """This API describe Azure Reservation + + :ivar config: Configuration for client. + :vartype config: AzureReservationAPIConfiguration + + :ivar reservation_order: ReservationOrder operations + :vartype reservation_order: azure.mgmt.reservations.operations.ReservationOrderOperations + :ivar reservation: Reservation operations + :vartype reservation: azure.mgmt.reservations.operations.ReservationOperations + :ivar operation: Operation operations + :vartype operation: azure.mgmt.reservations.operations.OperationOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + self.config = AzureReservationAPIConfiguration(credentials, base_url) + super(AzureReservationAPI, 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 = '2019-04-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.reservation_order = ReservationOrderOperations( + self._client, self.config, self._serialize, self._deserialize) + self.reservation = ReservationOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operation = OperationOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_configuration.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_configuration.py new file mode 100644 index 000000000000..e4b776b26d84 --- /dev/null +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_configuration.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class AzureReservationAPIConfiguration(AzureConfiguration): + """Configuration for AzureReservationAPI + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(AzureReservationAPIConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-reservations/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/__init__.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/__init__.py index c8647aeb9744..b39117a29eca 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/__init__.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/__init__.py @@ -10,61 +10,69 @@ # -------------------------------------------------------------------------- try: - from .sku_name_py3 import SkuName - from .sku_property_py3 import SkuProperty - from .sku_restriction_py3 import SkuRestriction - from .catalog_py3 import Catalog - from .extended_status_info_py3 import ExtendedStatusInfo - from .reservation_split_properties_py3 import ReservationSplitProperties - from .reservation_merge_properties_py3 import ReservationMergeProperties - from .reservation_properties_py3 import ReservationProperties - from .reservation_response_py3 import ReservationResponse - from .reservation_order_response_py3 import ReservationOrderResponse - from .calculate_price_response_properties_billing_currency_total_py3 import CalculatePriceResponsePropertiesBillingCurrencyTotal - from .calculate_price_response_properties_pricing_currency_total_py3 import CalculatePriceResponsePropertiesPricingCurrencyTotal - from .calculate_price_response_properties_py3 import CalculatePriceResponseProperties - from .calculate_price_response_py3 import CalculatePriceResponse - from .purchase_request_properties_reserved_resource_properties_py3 import PurchaseRequestPropertiesReservedResourceProperties - from .merge_request_py3 import MergeRequest - from .purchase_request_py3 import PurchaseRequest - from .patch_py3 import Patch - from .split_request_py3 import SplitRequest - from .extended_error_info_py3 import ExtendedErrorInfo - from .error_py3 import Error, ErrorException - from .applied_reservation_list_py3 import AppliedReservationList - from .applied_reservations_py3 import AppliedReservations - from .operation_display_py3 import OperationDisplay - from .operation_response_py3 import OperationResponse + from ._models_py3 import AppliedReservationList + from ._models_py3 import AppliedReservations + from ._models_py3 import CalculatePriceResponse + from ._models_py3 import CalculatePriceResponseProperties + from ._models_py3 import CalculatePriceResponsePropertiesBillingCurrencyTotal + from ._models_py3 import CalculatePriceResponsePropertiesPricingCurrencyTotal + from ._models_py3 import Catalog + from ._models_py3 import Error, ErrorException + from ._models_py3 import ExtendedErrorInfo + from ._models_py3 import ExtendedStatusInfo + from ._models_py3 import MergeRequest + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationResponse + from ._models_py3 import Patch + from ._models_py3 import PatchPropertiesRenewProperties + from ._models_py3 import PurchaseRequest + from ._models_py3 import PurchaseRequestPropertiesReservedResourceProperties + from ._models_py3 import RenewPropertiesResponse + from ._models_py3 import RenewPropertiesResponseBillingCurrencyTotal + from ._models_py3 import RenewPropertiesResponsePricingCurrencyTotal + from ._models_py3 import ReservationMergeProperties + from ._models_py3 import ReservationOrderResponse + from ._models_py3 import ReservationProperties + from ._models_py3 import ReservationResponse + from ._models_py3 import ReservationSplitProperties + from ._models_py3 import SkuName + from ._models_py3 import SkuProperty + from ._models_py3 import SkuRestriction + from ._models_py3 import SplitRequest except (SyntaxError, ImportError): - from .sku_name import SkuName - from .sku_property import SkuProperty - from .sku_restriction import SkuRestriction - from .catalog import Catalog - from .extended_status_info import ExtendedStatusInfo - from .reservation_split_properties import ReservationSplitProperties - from .reservation_merge_properties import ReservationMergeProperties - from .reservation_properties import ReservationProperties - from .reservation_response import ReservationResponse - from .reservation_order_response import ReservationOrderResponse - from .calculate_price_response_properties_billing_currency_total import CalculatePriceResponsePropertiesBillingCurrencyTotal - from .calculate_price_response_properties_pricing_currency_total import CalculatePriceResponsePropertiesPricingCurrencyTotal - from .calculate_price_response_properties import CalculatePriceResponseProperties - from .calculate_price_response import CalculatePriceResponse - from .purchase_request_properties_reserved_resource_properties import PurchaseRequestPropertiesReservedResourceProperties - from .merge_request import MergeRequest - from .purchase_request import PurchaseRequest - from .patch import Patch - from .split_request import SplitRequest - from .extended_error_info import ExtendedErrorInfo - from .error import Error, ErrorException - from .applied_reservation_list import AppliedReservationList - from .applied_reservations import AppliedReservations - from .operation_display import OperationDisplay - from .operation_response import OperationResponse -from .reservation_order_response_paged import ReservationOrderResponsePaged -from .reservation_response_paged import ReservationResponsePaged -from .operation_response_paged import OperationResponsePaged -from .azure_reservation_api_enums import ( + from ._models import AppliedReservationList + from ._models import AppliedReservations + from ._models import CalculatePriceResponse + from ._models import CalculatePriceResponseProperties + from ._models import CalculatePriceResponsePropertiesBillingCurrencyTotal + from ._models import CalculatePriceResponsePropertiesPricingCurrencyTotal + from ._models import Catalog + from ._models import Error, ErrorException + from ._models import ExtendedErrorInfo + from ._models import ExtendedStatusInfo + from ._models import MergeRequest + from ._models import OperationDisplay + from ._models import OperationResponse + from ._models import Patch + from ._models import PatchPropertiesRenewProperties + from ._models import PurchaseRequest + from ._models import PurchaseRequestPropertiesReservedResourceProperties + from ._models import RenewPropertiesResponse + from ._models import RenewPropertiesResponseBillingCurrencyTotal + from ._models import RenewPropertiesResponsePricingCurrencyTotal + from ._models import ReservationMergeProperties + from ._models import ReservationOrderResponse + from ._models import ReservationProperties + from ._models import ReservationResponse + from ._models import ReservationSplitProperties + from ._models import SkuName + from ._models import SkuProperty + from ._models import SkuRestriction + from ._models import SplitRequest +from ._paged_models import OperationResponsePaged +from ._paged_models import ReservationOrderResponsePaged +from ._paged_models import ReservationResponsePaged +from ._azure_reservation_api_enums import ( ReservationStatusCode, ErrorResponseCode, ReservationTerm, @@ -74,31 +82,35 @@ ) __all__ = [ - 'SkuName', - 'SkuProperty', - 'SkuRestriction', + 'AppliedReservationList', + 'AppliedReservations', + 'CalculatePriceResponse', + 'CalculatePriceResponseProperties', + 'CalculatePriceResponsePropertiesBillingCurrencyTotal', + 'CalculatePriceResponsePropertiesPricingCurrencyTotal', 'Catalog', + 'Error', 'ErrorException', + 'ExtendedErrorInfo', 'ExtendedStatusInfo', - 'ReservationSplitProperties', + 'MergeRequest', + 'OperationDisplay', + 'OperationResponse', + 'Patch', + 'PatchPropertiesRenewProperties', + 'PurchaseRequest', + 'PurchaseRequestPropertiesReservedResourceProperties', + 'RenewPropertiesResponse', + 'RenewPropertiesResponseBillingCurrencyTotal', + 'RenewPropertiesResponsePricingCurrencyTotal', 'ReservationMergeProperties', + 'ReservationOrderResponse', 'ReservationProperties', 'ReservationResponse', - 'ReservationOrderResponse', - 'CalculatePriceResponsePropertiesBillingCurrencyTotal', - 'CalculatePriceResponsePropertiesPricingCurrencyTotal', - 'CalculatePriceResponseProperties', - 'CalculatePriceResponse', - 'PurchaseRequestPropertiesReservedResourceProperties', - 'MergeRequest', - 'PurchaseRequest', - 'Patch', + 'ReservationSplitProperties', + 'SkuName', + 'SkuProperty', + 'SkuRestriction', 'SplitRequest', - 'ExtendedErrorInfo', - 'Error', 'ErrorException', - 'AppliedReservationList', - 'AppliedReservations', - 'OperationDisplay', - 'OperationResponse', 'ReservationOrderResponsePaged', 'ReservationResponsePaged', 'OperationResponsePaged', diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/azure_reservation_api_enums.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_azure_reservation_api_enums.py similarity index 96% rename from sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/azure_reservation_api_enums.py rename to sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_azure_reservation_api_enums.py index 1f458b07c465..90602e0ba6df 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/azure_reservation_api_enums.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_azure_reservation_api_enums.py @@ -96,6 +96,10 @@ class ReservedResourceType(str, Enum): sql_databases = "SqlDatabases" suse_linux = "SuseLinux" cosmos_db = "CosmosDb" + red_hat = "RedHat" + sql_data_warehouse = "SqlDataWarehouse" + vmware_cloud_simple = "VMwareCloudSimple" + red_hat_osa = "RedHatOsa" class InstanceFlexibility(str, Enum): diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models.py new file mode 100644 index 000000000000..321ebf061f69 --- /dev/null +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models.py @@ -0,0 +1,972 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AppliedReservationList(Model): + """AppliedReservationList. + + :param value: + :type value: list[str] + :param next_link: Url to get the next page of reservations + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[str]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AppliedReservationList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class AppliedReservations(Model): + """AppliedReservations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Identifier of the applied reservations + :vartype id: str + :ivar name: Name of resource + :vartype name: str + :ivar type: Type of resource. "Microsoft.Capacity/AppliedReservations" + :vartype type: str + :param reservation_order_ids: + :type reservation_order_ids: + ~azure.mgmt.reservations.models.AppliedReservationList + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'reservation_order_ids': {'key': 'properties.reservationOrderIds', 'type': 'AppliedReservationList'}, + } + + def __init__(self, **kwargs): + super(AppliedReservations, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.reservation_order_ids = kwargs.get('reservation_order_ids', None) + + +class CalculatePriceResponse(Model): + """CalculatePriceResponse. + + :param properties: + :type properties: + ~azure.mgmt.reservations.models.CalculatePriceResponseProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'CalculatePriceResponseProperties'}, + } + + def __init__(self, **kwargs): + super(CalculatePriceResponse, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class CalculatePriceResponseProperties(Model): + """CalculatePriceResponseProperties. + + :param billing_currency_total: Currency and amount that customer will be + charged in customer's local currency. Tax is not included. + :type billing_currency_total: + ~azure.mgmt.reservations.models.CalculatePriceResponsePropertiesBillingCurrencyTotal + :param is_billing_partner_managed: True if billing is managed by Microsoft + Partner. Used only for CSP accounts. + :type is_billing_partner_managed: bool + :param reservation_order_id: GUID that represents reservation order that + can be placed after calculating price. + :type reservation_order_id: str + :param sku_title: Title of SKU that is being purchased. + :type sku_title: str + :param sku_description: Description of SKU that is being purchased. + :type sku_description: str + :param pricing_currency_total: Amount that Microsoft uses for record. Used + during refund for calculating refund limit. Tax is not included. + :type pricing_currency_total: + ~azure.mgmt.reservations.models.CalculatePriceResponsePropertiesPricingCurrencyTotal + """ + + _attribute_map = { + 'billing_currency_total': {'key': 'billingCurrencyTotal', 'type': 'CalculatePriceResponsePropertiesBillingCurrencyTotal'}, + 'is_billing_partner_managed': {'key': 'isBillingPartnerManaged', 'type': 'bool'}, + 'reservation_order_id': {'key': 'reservationOrderId', 'type': 'str'}, + 'sku_title': {'key': 'skuTitle', 'type': 'str'}, + 'sku_description': {'key': 'skuDescription', 'type': 'str'}, + 'pricing_currency_total': {'key': 'pricingCurrencyTotal', 'type': 'CalculatePriceResponsePropertiesPricingCurrencyTotal'}, + } + + def __init__(self, **kwargs): + super(CalculatePriceResponseProperties, self).__init__(**kwargs) + self.billing_currency_total = kwargs.get('billing_currency_total', None) + self.is_billing_partner_managed = kwargs.get('is_billing_partner_managed', None) + self.reservation_order_id = kwargs.get('reservation_order_id', None) + self.sku_title = kwargs.get('sku_title', None) + self.sku_description = kwargs.get('sku_description', None) + self.pricing_currency_total = kwargs.get('pricing_currency_total', None) + + +class CalculatePriceResponsePropertiesBillingCurrencyTotal(Model): + """Currency and amount that customer will be charged in customer's local + currency. Tax is not included. + + :param currency_code: + :type currency_code: str + :param amount: + :type amount: float + """ + + _attribute_map = { + 'currency_code': {'key': 'currencyCode', 'type': 'str'}, + 'amount': {'key': 'amount', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(CalculatePriceResponsePropertiesBillingCurrencyTotal, self).__init__(**kwargs) + self.currency_code = kwargs.get('currency_code', None) + self.amount = kwargs.get('amount', None) + + +class CalculatePriceResponsePropertiesPricingCurrencyTotal(Model): + """Amount that Microsoft uses for record. Used during refund for calculating + refund limit. Tax is not included. + + :param currency_code: + :type currency_code: str + :param amount: + :type amount: float + """ + + _attribute_map = { + 'currency_code': {'key': 'currencyCode', 'type': 'str'}, + 'amount': {'key': 'amount', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(CalculatePriceResponsePropertiesPricingCurrencyTotal, self).__init__(**kwargs) + self.currency_code = kwargs.get('currency_code', None) + self.amount = kwargs.get('amount', None) + + +class Catalog(Model): + """Catalog. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU + :vartype name: str + :ivar terms: Available reservation terms for this resource + :vartype terms: list[str or + ~azure.mgmt.reservations.models.ReservationTerm] + :ivar locations: + :vartype locations: list[str] + :ivar sku_properties: + :vartype sku_properties: list[~azure.mgmt.reservations.models.SkuProperty] + :ivar restrictions: + :vartype restrictions: + list[~azure.mgmt.reservations.models.SkuRestriction] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'terms': {'readonly': True}, + 'locations': {'readonly': True}, + 'sku_properties': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'terms': {'key': 'terms', 'type': '[str]'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'sku_properties': {'key': 'skuProperties', 'type': '[SkuProperty]'}, + 'restrictions': {'key': 'restrictions', 'type': '[SkuRestriction]'}, + } + + def __init__(self, **kwargs): + super(Catalog, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.terms = None + self.locations = None + self.sku_properties = None + self.restrictions = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Error(Model): + """Error. + + :param error: + :type error: ~azure.mgmt.reservations.models.ExtendedErrorInfo + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ExtendedErrorInfo'}, + } + + def __init__(self, **kwargs): + super(Error, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorException(HttpOperationError): + """Server responsed with exception of type: 'Error'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorException, self).__init__(deserialize, response, 'Error', *args) + + +class ExtendedErrorInfo(Model): + """ExtendedErrorInfo. + + :param code: Possible values include: 'NotSpecified', + 'InternalServerError', 'ServerTimeout', 'AuthorizationFailed', + 'BadRequest', 'ClientCertificateThumbprintNotSet', + 'InvalidRequestContent', 'OperationFailed', 'HttpMethodNotSupported', + 'InvalidRequestUri', 'MissingTenantId', 'InvalidTenantId', + 'InvalidReservationOrderId', 'InvalidReservationId', + 'ReservationIdNotInReservationOrder', 'ReservationOrderNotFound', + 'InvalidSubscriptionId', 'InvalidAccessToken', 'InvalidLocationId', + 'UnauthenticatedRequestsThrottled', 'InvalidHealthCheckType', 'Forbidden', + 'BillingScopeIdCannotBeChanged', + 'AppliedScopesNotAssociatedWithCommerceAccount', + 'PatchValuesSameAsExisting', 'RoleAssignmentCreationFailed', + 'ReservationOrderCreationFailed', 'ReservationOrderNotEnabled', + 'CapacityUpdateScopesFailed', 'UnsupportedReservationTerm', + 'ReservationOrderIdAlreadyExists', 'RiskCheckFailed', 'CreateQuoteFailed', + 'ActivateQuoteFailed', 'NonsupportedAccountId', + 'PaymentInstrumentNotFound', 'MissingAppliedScopesForSingle', + 'NoValidReservationsToReRate', 'ReRateOnlyAllowedForEA', + 'OperationCannotBePerformedInCurrentState', + 'InvalidSingleAppliedScopesCount', 'InvalidFulfillmentRequestParameters', + 'NotSupportedCountry', 'InvalidRefundQuantity', 'PurchaseError', + 'BillingCustomerInputError', 'BillingPaymentInstrumentSoftError', + 'BillingPaymentInstrumentHardError', 'BillingTransientError', + 'BillingError', 'FulfillmentConfigurationError', + 'FulfillmentOutOfStockError', 'FulfillmentTransientError', + 'FulfillmentError', 'CalculatePriceFailed' + :type code: str or ~azure.mgmt.reservations.models.ErrorResponseCode + :param message: + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExtendedErrorInfo, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ExtendedStatusInfo(Model): + """ExtendedStatusInfo. + + :param status_code: Possible values include: 'None', 'Pending', 'Active', + 'PurchaseError', 'PaymentInstrumentError', 'Split', 'Merged', 'Expired', + 'Succeeded' + :type status_code: str or + ~azure.mgmt.reservations.models.ReservationStatusCode + :param message: The message giving detailed information about the status + code. + :type message: str + """ + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExtendedStatusInfo, self).__init__(**kwargs) + self.status_code = kwargs.get('status_code', None) + self.message = kwargs.get('message', None) + + +class MergeRequest(Model): + """MergeRequest. + + :param sources: Format of the resource id should be + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} + :type sources: list[str] + """ + + _attribute_map = { + 'sources': {'key': 'properties.sources', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(MergeRequest, self).__init__(**kwargs) + self.sources = kwargs.get('sources', None) + + +class OperationDisplay(Model): + """OperationDisplay. + + :param provider: + :type provider: str + :param resource: + :type resource: str + :param operation: + :type operation: str + :param description: + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationResponse(Model): + """OperationResponse. + + :param name: + :type name: str + :param display: + :type display: ~azure.mgmt.reservations.models.OperationDisplay + :param origin: + :type origin: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationResponse, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + + +class Patch(Model): + """Patch. + + :param applied_scope_type: Possible values include: 'Single', 'Shared' + :type applied_scope_type: str or + ~azure.mgmt.reservations.models.AppliedScopeType + :param applied_scopes: + :type applied_scopes: list[str] + :param instance_flexibility: Possible values include: 'On', 'Off' + :type instance_flexibility: str or + ~azure.mgmt.reservations.models.InstanceFlexibility + :param name: Name of the Reservation + :type name: str + :param renew: + :type renew: bool + :param renew_properties: + :type renew_properties: + ~azure.mgmt.reservations.models.PatchPropertiesRenewProperties + """ + + _attribute_map = { + 'applied_scope_type': {'key': 'properties.appliedScopeType', 'type': 'str'}, + 'applied_scopes': {'key': 'properties.appliedScopes', 'type': '[str]'}, + 'instance_flexibility': {'key': 'properties.instanceFlexibility', 'type': 'str'}, + 'name': {'key': 'properties.name', 'type': 'str'}, + 'renew': {'key': 'properties.renew', 'type': 'bool'}, + 'renew_properties': {'key': 'properties.renewProperties', 'type': 'PatchPropertiesRenewProperties'}, + } + + def __init__(self, **kwargs): + super(Patch, self).__init__(**kwargs) + self.applied_scope_type = kwargs.get('applied_scope_type', None) + self.applied_scopes = kwargs.get('applied_scopes', None) + self.instance_flexibility = kwargs.get('instance_flexibility', None) + self.name = kwargs.get('name', None) + self.renew = kwargs.get('renew', None) + self.renew_properties = kwargs.get('renew_properties', None) + + +class PatchPropertiesRenewProperties(Model): + """PatchPropertiesRenewProperties. + + :param purchase_properties: + :type purchase_properties: ~azure.mgmt.reservations.models.PurchaseRequest + """ + + _attribute_map = { + 'purchase_properties': {'key': 'purchaseProperties', 'type': 'PurchaseRequest'}, + } + + def __init__(self, **kwargs): + super(PatchPropertiesRenewProperties, self).__init__(**kwargs) + self.purchase_properties = kwargs.get('purchase_properties', None) + + +class PurchaseRequest(Model): + """PurchaseRequest. + + :param sku: + :type sku: ~azure.mgmt.reservations.models.SkuName + :param location: The Azure Region where the reserved resource lives. + :type location: str + :param reserved_resource_type: Possible values include: 'VirtualMachines', + 'SqlDatabases', 'SuseLinux', 'CosmosDb', 'RedHat', 'SqlDataWarehouse', + 'VMwareCloudSimple', 'RedHatOsa' + :type reserved_resource_type: str or + ~azure.mgmt.reservations.models.ReservedResourceType + :param billing_scope_id: + :type billing_scope_id: str + :param term: Possible values include: 'P1Y', 'P3Y' + :type term: str or ~azure.mgmt.reservations.models.ReservationTerm + :param quantity: + :type quantity: int + :param display_name: Friendly name of the Reservation + :type display_name: str + :param applied_scope_type: Possible values include: 'Single', 'Shared' + :type applied_scope_type: str or + ~azure.mgmt.reservations.models.AppliedScopeType + :param applied_scopes: + :type applied_scopes: list[str] + :param renew: + :type renew: bool + :param reserved_resource_properties: Properties specific to each reserved + resource type. Not required if not applicable. + :type reserved_resource_properties: + ~azure.mgmt.reservations.models.PurchaseRequestPropertiesReservedResourceProperties + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'SkuName'}, + 'location': {'key': 'location', 'type': 'str'}, + 'reserved_resource_type': {'key': 'properties.reservedResourceType', 'type': 'str'}, + 'billing_scope_id': {'key': 'properties.billingScopeId', 'type': 'str'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'quantity': {'key': 'properties.quantity', 'type': 'int'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'applied_scope_type': {'key': 'properties.appliedScopeType', 'type': 'str'}, + 'applied_scopes': {'key': 'properties.appliedScopes', 'type': '[str]'}, + 'renew': {'key': 'properties.renew', 'type': 'bool'}, + 'reserved_resource_properties': {'key': 'properties.reservedResourceProperties', 'type': 'PurchaseRequestPropertiesReservedResourceProperties'}, + } + + def __init__(self, **kwargs): + super(PurchaseRequest, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.location = kwargs.get('location', None) + self.reserved_resource_type = kwargs.get('reserved_resource_type', None) + self.billing_scope_id = kwargs.get('billing_scope_id', None) + self.term = kwargs.get('term', None) + self.quantity = kwargs.get('quantity', None) + self.display_name = kwargs.get('display_name', None) + self.applied_scope_type = kwargs.get('applied_scope_type', None) + self.applied_scopes = kwargs.get('applied_scopes', None) + self.renew = kwargs.get('renew', None) + self.reserved_resource_properties = kwargs.get('reserved_resource_properties', None) + + +class PurchaseRequestPropertiesReservedResourceProperties(Model): + """Properties specific to each reserved resource type. Not required if not + applicable. + + :param instance_flexibility: Possible values include: 'On', 'Off' + :type instance_flexibility: str or + ~azure.mgmt.reservations.models.InstanceFlexibility + """ + + _attribute_map = { + 'instance_flexibility': {'key': 'instanceFlexibility', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PurchaseRequestPropertiesReservedResourceProperties, self).__init__(**kwargs) + self.instance_flexibility = kwargs.get('instance_flexibility', None) + + +class RenewPropertiesResponse(Model): + """RenewPropertiesResponse. + + :param purchase_properties: + :type purchase_properties: ~azure.mgmt.reservations.models.PurchaseRequest + :param pricing_currency_total: Amount that Microsoft uses for record. Used + during refund for calculating refund limit. Tax is not included. This is + locked price 30 days before expiry. + :type pricing_currency_total: + ~azure.mgmt.reservations.models.RenewPropertiesResponsePricingCurrencyTotal + :param billing_currency_total: Currency and amount that customer will be + charged in customer's local currency for renewal purchase. Tax is not + included. + :type billing_currency_total: + ~azure.mgmt.reservations.models.RenewPropertiesResponseBillingCurrencyTotal + """ + + _attribute_map = { + 'purchase_properties': {'key': 'purchaseProperties', 'type': 'PurchaseRequest'}, + 'pricing_currency_total': {'key': 'pricingCurrencyTotal', 'type': 'RenewPropertiesResponsePricingCurrencyTotal'}, + 'billing_currency_total': {'key': 'billingCurrencyTotal', 'type': 'RenewPropertiesResponseBillingCurrencyTotal'}, + } + + def __init__(self, **kwargs): + super(RenewPropertiesResponse, self).__init__(**kwargs) + self.purchase_properties = kwargs.get('purchase_properties', None) + self.pricing_currency_total = kwargs.get('pricing_currency_total', None) + self.billing_currency_total = kwargs.get('billing_currency_total', None) + + +class RenewPropertiesResponseBillingCurrencyTotal(Model): + """Currency and amount that customer will be charged in customer's local + currency for renewal purchase. Tax is not included. + + :param currency_code: + :type currency_code: str + :param amount: + :type amount: float + """ + + _attribute_map = { + 'currency_code': {'key': 'currencyCode', 'type': 'str'}, + 'amount': {'key': 'amount', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(RenewPropertiesResponseBillingCurrencyTotal, self).__init__(**kwargs) + self.currency_code = kwargs.get('currency_code', None) + self.amount = kwargs.get('amount', None) + + +class RenewPropertiesResponsePricingCurrencyTotal(Model): + """Amount that Microsoft uses for record. Used during refund for calculating + refund limit. Tax is not included. This is locked price 30 days before + expiry. + + :param currency_code: + :type currency_code: str + :param amount: + :type amount: float + """ + + _attribute_map = { + 'currency_code': {'key': 'currencyCode', 'type': 'str'}, + 'amount': {'key': 'amount', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(RenewPropertiesResponsePricingCurrencyTotal, self).__init__(**kwargs) + self.currency_code = kwargs.get('currency_code', None) + self.amount = kwargs.get('amount', None) + + +class ReservationMergeProperties(Model): + """ReservationMergeProperties. + + :param merge_destination: Reservation Resource Id Created due to the + merge. Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} + :type merge_destination: str + :param merge_sources: Resource Ids of the Source Reservation's merged to + form this Reservation. Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} + :type merge_sources: list[str] + """ + + _attribute_map = { + 'merge_destination': {'key': 'mergeDestination', 'type': 'str'}, + 'merge_sources': {'key': 'mergeSources', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ReservationMergeProperties, self).__init__(**kwargs) + self.merge_destination = kwargs.get('merge_destination', None) + self.merge_sources = kwargs.get('merge_sources', None) + + +class ReservationOrderResponse(Model): + """ReservationOrderResponse. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param etag: + :type etag: int + :ivar id: Identifier of the reservation + :vartype id: str + :ivar name: Name of the reservation + :vartype name: str + :param display_name: Friendly name for user to easily identified the + reservation. + :type display_name: str + :param request_date_time: This is the DateTime when the reservation was + initially requested for purchase. + :type request_date_time: datetime + :param created_date_time: This is the DateTime when the reservation was + created. + :type created_date_time: datetime + :param expiry_date: This is the date when the Reservation will expire. + :type expiry_date: date + :param original_quantity: + :type original_quantity: int + :param term: Possible values include: 'P1Y', 'P3Y' + :type term: str or ~azure.mgmt.reservations.models.ReservationTerm + :param provisioning_state: Current state of the reservation. + :type provisioning_state: str + :param reservations: + :type reservations: + list[~azure.mgmt.reservations.models.ReservationResponse] + :ivar type: Type of resource. "Microsoft.Capacity/reservations" + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'etag': {'key': 'etag', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'request_date_time': {'key': 'properties.requestDateTime', 'type': 'iso-8601'}, + 'created_date_time': {'key': 'properties.createdDateTime', 'type': 'iso-8601'}, + 'expiry_date': {'key': 'properties.expiryDate', 'type': 'date'}, + 'original_quantity': {'key': 'properties.originalQuantity', 'type': 'int'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'reservations': {'key': 'properties.reservations', 'type': '[ReservationResponse]'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ReservationOrderResponse, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.id = None + self.name = None + self.display_name = kwargs.get('display_name', None) + self.request_date_time = kwargs.get('request_date_time', None) + self.created_date_time = kwargs.get('created_date_time', None) + self.expiry_date = kwargs.get('expiry_date', None) + self.original_quantity = kwargs.get('original_quantity', None) + self.term = kwargs.get('term', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.reservations = kwargs.get('reservations', None) + self.type = None + + +class ReservationProperties(Model): + """ReservationProperties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param reserved_resource_type: Possible values include: 'VirtualMachines', + 'SqlDatabases', 'SuseLinux', 'CosmosDb', 'RedHat', 'SqlDataWarehouse', + 'VMwareCloudSimple', 'RedHatOsa' + :type reserved_resource_type: str or + ~azure.mgmt.reservations.models.ReservedResourceType + :param instance_flexibility: Possible values include: 'On', 'Off' + :type instance_flexibility: str or + ~azure.mgmt.reservations.models.InstanceFlexibility + :param display_name: Friendly name for user to easily identify the + reservation + :type display_name: str + :param applied_scopes: + :type applied_scopes: list[str] + :param applied_scope_type: Possible values include: 'Single', 'Shared' + :type applied_scope_type: str or + ~azure.mgmt.reservations.models.AppliedScopeType + :param quantity: + :type quantity: int + :param provisioning_state: Current state of the reservation. + :type provisioning_state: str + :param effective_date_time: DateTime of the Reservation starting when this + version is effective from. + :type effective_date_time: datetime + :ivar last_updated_date_time: DateTime of the last time the Reservation + was updated. + :vartype last_updated_date_time: datetime + :param expiry_date: This is the date when the Reservation will expire. + :type expiry_date: date + :param sku_description: Description of the SKU in english. + :type sku_description: str + :param extended_status_info: + :type extended_status_info: + ~azure.mgmt.reservations.models.ExtendedStatusInfo + :param split_properties: + :type split_properties: + ~azure.mgmt.reservations.models.ReservationSplitProperties + :param merge_properties: + :type merge_properties: + ~azure.mgmt.reservations.models.ReservationMergeProperties + :param billing_scope_id: + :type billing_scope_id: str + :param renew: + :type renew: bool + :param renew_source: Reservation Id of the reservation from which this + reservation is renewed. Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :type renew_source: str + :param renew_destination: Reservation Id of the reservation which is + purchased because of renew. Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :type renew_destination: str + :param renew_properties: + :type renew_properties: + ~azure.mgmt.reservations.models.RenewPropertiesResponse + """ + + _validation = { + 'last_updated_date_time': {'readonly': True}, + } + + _attribute_map = { + 'reserved_resource_type': {'key': 'reservedResourceType', 'type': 'str'}, + 'instance_flexibility': {'key': 'instanceFlexibility', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'applied_scopes': {'key': 'appliedScopes', 'type': '[str]'}, + 'applied_scope_type': {'key': 'appliedScopeType', 'type': 'str'}, + 'quantity': {'key': 'quantity', 'type': 'int'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'effective_date_time': {'key': 'effectiveDateTime', 'type': 'iso-8601'}, + 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, + 'expiry_date': {'key': 'expiryDate', 'type': 'date'}, + 'sku_description': {'key': 'skuDescription', 'type': 'str'}, + 'extended_status_info': {'key': 'extendedStatusInfo', 'type': 'ExtendedStatusInfo'}, + 'split_properties': {'key': 'splitProperties', 'type': 'ReservationSplitProperties'}, + 'merge_properties': {'key': 'mergeProperties', 'type': 'ReservationMergeProperties'}, + 'billing_scope_id': {'key': 'billingScopeId', 'type': 'str'}, + 'renew': {'key': 'renew', 'type': 'bool'}, + 'renew_source': {'key': 'renewSource', 'type': 'str'}, + 'renew_destination': {'key': 'renewDestination', 'type': 'str'}, + 'renew_properties': {'key': 'renewProperties', 'type': 'RenewPropertiesResponse'}, + } + + def __init__(self, **kwargs): + super(ReservationProperties, self).__init__(**kwargs) + self.reserved_resource_type = kwargs.get('reserved_resource_type', None) + self.instance_flexibility = kwargs.get('instance_flexibility', None) + self.display_name = kwargs.get('display_name', None) + self.applied_scopes = kwargs.get('applied_scopes', None) + self.applied_scope_type = kwargs.get('applied_scope_type', None) + self.quantity = kwargs.get('quantity', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.effective_date_time = kwargs.get('effective_date_time', None) + self.last_updated_date_time = None + self.expiry_date = kwargs.get('expiry_date', None) + self.sku_description = kwargs.get('sku_description', None) + self.extended_status_info = kwargs.get('extended_status_info', None) + self.split_properties = kwargs.get('split_properties', None) + self.merge_properties = kwargs.get('merge_properties', None) + self.billing_scope_id = kwargs.get('billing_scope_id', None) + self.renew = kwargs.get('renew', None) + self.renew_source = kwargs.get('renew_source', None) + self.renew_destination = kwargs.get('renew_destination', None) + self.renew_properties = kwargs.get('renew_properties', None) + + +class ReservationResponse(Model): + """ReservationResponse. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: The Azure Region where the reserved resource lives. + :vartype location: str + :param etag: + :type etag: int + :ivar id: Identifier of the reservation + :vartype id: str + :ivar name: Name of the reservation + :vartype name: str + :param sku: + :type sku: ~azure.mgmt.reservations.models.SkuName + :param properties: + :type properties: ~azure.mgmt.reservations.models.ReservationProperties + :ivar type: Type of resource. + "Microsoft.Capacity/reservationOrders/reservations" + :vartype type: str + """ + + _validation = { + 'location': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'SkuName'}, + 'properties': {'key': 'properties', 'type': 'ReservationProperties'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ReservationResponse, self).__init__(**kwargs) + self.location = None + self.etag = kwargs.get('etag', None) + self.id = None + self.name = None + self.sku = kwargs.get('sku', None) + self.properties = kwargs.get('properties', None) + self.type = None + + +class ReservationSplitProperties(Model): + """ReservationSplitProperties. + + :param split_destinations: List of destination Resource Id that are + created due to split. Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} + :type split_destinations: list[str] + :param split_source: Resource Id of the Reservation from which this is + split. Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} + :type split_source: str + """ + + _attribute_map = { + 'split_destinations': {'key': 'splitDestinations', 'type': '[str]'}, + 'split_source': {'key': 'splitSource', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ReservationSplitProperties, self).__init__(**kwargs) + self.split_destinations = kwargs.get('split_destinations', None) + self.split_source = kwargs.get('split_source', None) + + +class SkuName(Model): + """SkuName. + + :param name: + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SkuName, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class SkuProperty(Model): + """SkuProperty. + + :param name: An invariant to describe the feature. + :type name: str + :param value: An invariant if the feature is measured by quantity. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SkuProperty, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class SkuRestriction(Model): + """SkuRestriction. + + :param type: The type of restrictions. + :type type: str + :param values: The value of restrictions. If the restriction type is set + to location. This would be different locations where the SKU is + restricted. + :type values: list[str] + :param reason_code: The reason for restriction. + :type reason_code: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SkuRestriction, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.values = kwargs.get('values', None) + self.reason_code = kwargs.get('reason_code', None) + + +class SplitRequest(Model): + """SplitRequest. + + :param quantities: List of the quantities in the new reservations to + create. + :type quantities: list[int] + :param reservation_id: Resource id of the reservation to be split. Format + of the resource id should be + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} + :type reservation_id: str + """ + + _attribute_map = { + 'quantities': {'key': 'properties.quantities', 'type': '[int]'}, + 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SplitRequest, self).__init__(**kwargs) + self.quantities = kwargs.get('quantities', None) + self.reservation_id = kwargs.get('reservation_id', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models_py3.py new file mode 100644 index 000000000000..b4833ee028f6 --- /dev/null +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models_py3.py @@ -0,0 +1,972 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AppliedReservationList(Model): + """AppliedReservationList. + + :param value: + :type value: list[str] + :param next_link: Url to get the next page of reservations + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[str]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(AppliedReservationList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class AppliedReservations(Model): + """AppliedReservations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Identifier of the applied reservations + :vartype id: str + :ivar name: Name of resource + :vartype name: str + :ivar type: Type of resource. "Microsoft.Capacity/AppliedReservations" + :vartype type: str + :param reservation_order_ids: + :type reservation_order_ids: + ~azure.mgmt.reservations.models.AppliedReservationList + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'reservation_order_ids': {'key': 'properties.reservationOrderIds', 'type': 'AppliedReservationList'}, + } + + def __init__(self, *, reservation_order_ids=None, **kwargs) -> None: + super(AppliedReservations, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.reservation_order_ids = reservation_order_ids + + +class CalculatePriceResponse(Model): + """CalculatePriceResponse. + + :param properties: + :type properties: + ~azure.mgmt.reservations.models.CalculatePriceResponseProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'CalculatePriceResponseProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(CalculatePriceResponse, self).__init__(**kwargs) + self.properties = properties + + +class CalculatePriceResponseProperties(Model): + """CalculatePriceResponseProperties. + + :param billing_currency_total: Currency and amount that customer will be + charged in customer's local currency. Tax is not included. + :type billing_currency_total: + ~azure.mgmt.reservations.models.CalculatePriceResponsePropertiesBillingCurrencyTotal + :param is_billing_partner_managed: True if billing is managed by Microsoft + Partner. Used only for CSP accounts. + :type is_billing_partner_managed: bool + :param reservation_order_id: GUID that represents reservation order that + can be placed after calculating price. + :type reservation_order_id: str + :param sku_title: Title of SKU that is being purchased. + :type sku_title: str + :param sku_description: Description of SKU that is being purchased. + :type sku_description: str + :param pricing_currency_total: Amount that Microsoft uses for record. Used + during refund for calculating refund limit. Tax is not included. + :type pricing_currency_total: + ~azure.mgmt.reservations.models.CalculatePriceResponsePropertiesPricingCurrencyTotal + """ + + _attribute_map = { + 'billing_currency_total': {'key': 'billingCurrencyTotal', 'type': 'CalculatePriceResponsePropertiesBillingCurrencyTotal'}, + 'is_billing_partner_managed': {'key': 'isBillingPartnerManaged', 'type': 'bool'}, + 'reservation_order_id': {'key': 'reservationOrderId', 'type': 'str'}, + 'sku_title': {'key': 'skuTitle', 'type': 'str'}, + 'sku_description': {'key': 'skuDescription', 'type': 'str'}, + 'pricing_currency_total': {'key': 'pricingCurrencyTotal', 'type': 'CalculatePriceResponsePropertiesPricingCurrencyTotal'}, + } + + def __init__(self, *, billing_currency_total=None, is_billing_partner_managed: bool=None, reservation_order_id: str=None, sku_title: str=None, sku_description: str=None, pricing_currency_total=None, **kwargs) -> None: + super(CalculatePriceResponseProperties, self).__init__(**kwargs) + self.billing_currency_total = billing_currency_total + self.is_billing_partner_managed = is_billing_partner_managed + self.reservation_order_id = reservation_order_id + self.sku_title = sku_title + self.sku_description = sku_description + self.pricing_currency_total = pricing_currency_total + + +class CalculatePriceResponsePropertiesBillingCurrencyTotal(Model): + """Currency and amount that customer will be charged in customer's local + currency. Tax is not included. + + :param currency_code: + :type currency_code: str + :param amount: + :type amount: float + """ + + _attribute_map = { + 'currency_code': {'key': 'currencyCode', 'type': 'str'}, + 'amount': {'key': 'amount', 'type': 'float'}, + } + + def __init__(self, *, currency_code: str=None, amount: float=None, **kwargs) -> None: + super(CalculatePriceResponsePropertiesBillingCurrencyTotal, self).__init__(**kwargs) + self.currency_code = currency_code + self.amount = amount + + +class CalculatePriceResponsePropertiesPricingCurrencyTotal(Model): + """Amount that Microsoft uses for record. Used during refund for calculating + refund limit. Tax is not included. + + :param currency_code: + :type currency_code: str + :param amount: + :type amount: float + """ + + _attribute_map = { + 'currency_code': {'key': 'currencyCode', 'type': 'str'}, + 'amount': {'key': 'amount', 'type': 'float'}, + } + + def __init__(self, *, currency_code: str=None, amount: float=None, **kwargs) -> None: + super(CalculatePriceResponsePropertiesPricingCurrencyTotal, self).__init__(**kwargs) + self.currency_code = currency_code + self.amount = amount + + +class Catalog(Model): + """Catalog. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU + :vartype name: str + :ivar terms: Available reservation terms for this resource + :vartype terms: list[str or + ~azure.mgmt.reservations.models.ReservationTerm] + :ivar locations: + :vartype locations: list[str] + :ivar sku_properties: + :vartype sku_properties: list[~azure.mgmt.reservations.models.SkuProperty] + :ivar restrictions: + :vartype restrictions: + list[~azure.mgmt.reservations.models.SkuRestriction] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'terms': {'readonly': True}, + 'locations': {'readonly': True}, + 'sku_properties': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'terms': {'key': 'terms', 'type': '[str]'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'sku_properties': {'key': 'skuProperties', 'type': '[SkuProperty]'}, + 'restrictions': {'key': 'restrictions', 'type': '[SkuRestriction]'}, + } + + def __init__(self, **kwargs) -> None: + super(Catalog, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.terms = None + self.locations = None + self.sku_properties = None + self.restrictions = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Error(Model): + """Error. + + :param error: + :type error: ~azure.mgmt.reservations.models.ExtendedErrorInfo + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ExtendedErrorInfo'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(Error, self).__init__(**kwargs) + self.error = error + + +class ErrorException(HttpOperationError): + """Server responsed with exception of type: 'Error'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorException, self).__init__(deserialize, response, 'Error', *args) + + +class ExtendedErrorInfo(Model): + """ExtendedErrorInfo. + + :param code: Possible values include: 'NotSpecified', + 'InternalServerError', 'ServerTimeout', 'AuthorizationFailed', + 'BadRequest', 'ClientCertificateThumbprintNotSet', + 'InvalidRequestContent', 'OperationFailed', 'HttpMethodNotSupported', + 'InvalidRequestUri', 'MissingTenantId', 'InvalidTenantId', + 'InvalidReservationOrderId', 'InvalidReservationId', + 'ReservationIdNotInReservationOrder', 'ReservationOrderNotFound', + 'InvalidSubscriptionId', 'InvalidAccessToken', 'InvalidLocationId', + 'UnauthenticatedRequestsThrottled', 'InvalidHealthCheckType', 'Forbidden', + 'BillingScopeIdCannotBeChanged', + 'AppliedScopesNotAssociatedWithCommerceAccount', + 'PatchValuesSameAsExisting', 'RoleAssignmentCreationFailed', + 'ReservationOrderCreationFailed', 'ReservationOrderNotEnabled', + 'CapacityUpdateScopesFailed', 'UnsupportedReservationTerm', + 'ReservationOrderIdAlreadyExists', 'RiskCheckFailed', 'CreateQuoteFailed', + 'ActivateQuoteFailed', 'NonsupportedAccountId', + 'PaymentInstrumentNotFound', 'MissingAppliedScopesForSingle', + 'NoValidReservationsToReRate', 'ReRateOnlyAllowedForEA', + 'OperationCannotBePerformedInCurrentState', + 'InvalidSingleAppliedScopesCount', 'InvalidFulfillmentRequestParameters', + 'NotSupportedCountry', 'InvalidRefundQuantity', 'PurchaseError', + 'BillingCustomerInputError', 'BillingPaymentInstrumentSoftError', + 'BillingPaymentInstrumentHardError', 'BillingTransientError', + 'BillingError', 'FulfillmentConfigurationError', + 'FulfillmentOutOfStockError', 'FulfillmentTransientError', + 'FulfillmentError', 'CalculatePriceFailed' + :type code: str or ~azure.mgmt.reservations.models.ErrorResponseCode + :param message: + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code=None, message: str=None, **kwargs) -> None: + super(ExtendedErrorInfo, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ExtendedStatusInfo(Model): + """ExtendedStatusInfo. + + :param status_code: Possible values include: 'None', 'Pending', 'Active', + 'PurchaseError', 'PaymentInstrumentError', 'Split', 'Merged', 'Expired', + 'Succeeded' + :type status_code: str or + ~azure.mgmt.reservations.models.ReservationStatusCode + :param message: The message giving detailed information about the status + code. + :type message: str + """ + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, status_code=None, message: str=None, **kwargs) -> None: + super(ExtendedStatusInfo, self).__init__(**kwargs) + self.status_code = status_code + self.message = message + + +class MergeRequest(Model): + """MergeRequest. + + :param sources: Format of the resource id should be + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} + :type sources: list[str] + """ + + _attribute_map = { + 'sources': {'key': 'properties.sources', 'type': '[str]'}, + } + + def __init__(self, *, sources=None, **kwargs) -> None: + super(MergeRequest, self).__init__(**kwargs) + self.sources = sources + + +class OperationDisplay(Model): + """OperationDisplay. + + :param provider: + :type provider: str + :param resource: + :type resource: str + :param operation: + :type operation: str + :param description: + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationResponse(Model): + """OperationResponse. + + :param name: + :type name: str + :param display: + :type display: ~azure.mgmt.reservations.models.OperationDisplay + :param origin: + :type origin: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, **kwargs) -> None: + super(OperationResponse, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + + +class Patch(Model): + """Patch. + + :param applied_scope_type: Possible values include: 'Single', 'Shared' + :type applied_scope_type: str or + ~azure.mgmt.reservations.models.AppliedScopeType + :param applied_scopes: + :type applied_scopes: list[str] + :param instance_flexibility: Possible values include: 'On', 'Off' + :type instance_flexibility: str or + ~azure.mgmt.reservations.models.InstanceFlexibility + :param name: Name of the Reservation + :type name: str + :param renew: + :type renew: bool + :param renew_properties: + :type renew_properties: + ~azure.mgmt.reservations.models.PatchPropertiesRenewProperties + """ + + _attribute_map = { + 'applied_scope_type': {'key': 'properties.appliedScopeType', 'type': 'str'}, + 'applied_scopes': {'key': 'properties.appliedScopes', 'type': '[str]'}, + 'instance_flexibility': {'key': 'properties.instanceFlexibility', 'type': 'str'}, + 'name': {'key': 'properties.name', 'type': 'str'}, + 'renew': {'key': 'properties.renew', 'type': 'bool'}, + 'renew_properties': {'key': 'properties.renewProperties', 'type': 'PatchPropertiesRenewProperties'}, + } + + def __init__(self, *, applied_scope_type=None, applied_scopes=None, instance_flexibility=None, name: str=None, renew: bool=None, renew_properties=None, **kwargs) -> None: + super(Patch, self).__init__(**kwargs) + self.applied_scope_type = applied_scope_type + self.applied_scopes = applied_scopes + self.instance_flexibility = instance_flexibility + self.name = name + self.renew = renew + self.renew_properties = renew_properties + + +class PatchPropertiesRenewProperties(Model): + """PatchPropertiesRenewProperties. + + :param purchase_properties: + :type purchase_properties: ~azure.mgmt.reservations.models.PurchaseRequest + """ + + _attribute_map = { + 'purchase_properties': {'key': 'purchaseProperties', 'type': 'PurchaseRequest'}, + } + + def __init__(self, *, purchase_properties=None, **kwargs) -> None: + super(PatchPropertiesRenewProperties, self).__init__(**kwargs) + self.purchase_properties = purchase_properties + + +class PurchaseRequest(Model): + """PurchaseRequest. + + :param sku: + :type sku: ~azure.mgmt.reservations.models.SkuName + :param location: The Azure Region where the reserved resource lives. + :type location: str + :param reserved_resource_type: Possible values include: 'VirtualMachines', + 'SqlDatabases', 'SuseLinux', 'CosmosDb', 'RedHat', 'SqlDataWarehouse', + 'VMwareCloudSimple', 'RedHatOsa' + :type reserved_resource_type: str or + ~azure.mgmt.reservations.models.ReservedResourceType + :param billing_scope_id: + :type billing_scope_id: str + :param term: Possible values include: 'P1Y', 'P3Y' + :type term: str or ~azure.mgmt.reservations.models.ReservationTerm + :param quantity: + :type quantity: int + :param display_name: Friendly name of the Reservation + :type display_name: str + :param applied_scope_type: Possible values include: 'Single', 'Shared' + :type applied_scope_type: str or + ~azure.mgmt.reservations.models.AppliedScopeType + :param applied_scopes: + :type applied_scopes: list[str] + :param renew: + :type renew: bool + :param reserved_resource_properties: Properties specific to each reserved + resource type. Not required if not applicable. + :type reserved_resource_properties: + ~azure.mgmt.reservations.models.PurchaseRequestPropertiesReservedResourceProperties + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'SkuName'}, + 'location': {'key': 'location', 'type': 'str'}, + 'reserved_resource_type': {'key': 'properties.reservedResourceType', 'type': 'str'}, + 'billing_scope_id': {'key': 'properties.billingScopeId', 'type': 'str'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'quantity': {'key': 'properties.quantity', 'type': 'int'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'applied_scope_type': {'key': 'properties.appliedScopeType', 'type': 'str'}, + 'applied_scopes': {'key': 'properties.appliedScopes', 'type': '[str]'}, + 'renew': {'key': 'properties.renew', 'type': 'bool'}, + 'reserved_resource_properties': {'key': 'properties.reservedResourceProperties', 'type': 'PurchaseRequestPropertiesReservedResourceProperties'}, + } + + def __init__(self, *, sku=None, location: str=None, reserved_resource_type=None, billing_scope_id: str=None, term=None, quantity: int=None, display_name: str=None, applied_scope_type=None, applied_scopes=None, renew: bool=None, reserved_resource_properties=None, **kwargs) -> None: + super(PurchaseRequest, self).__init__(**kwargs) + self.sku = sku + self.location = location + self.reserved_resource_type = reserved_resource_type + self.billing_scope_id = billing_scope_id + self.term = term + self.quantity = quantity + self.display_name = display_name + self.applied_scope_type = applied_scope_type + self.applied_scopes = applied_scopes + self.renew = renew + self.reserved_resource_properties = reserved_resource_properties + + +class PurchaseRequestPropertiesReservedResourceProperties(Model): + """Properties specific to each reserved resource type. Not required if not + applicable. + + :param instance_flexibility: Possible values include: 'On', 'Off' + :type instance_flexibility: str or + ~azure.mgmt.reservations.models.InstanceFlexibility + """ + + _attribute_map = { + 'instance_flexibility': {'key': 'instanceFlexibility', 'type': 'str'}, + } + + def __init__(self, *, instance_flexibility=None, **kwargs) -> None: + super(PurchaseRequestPropertiesReservedResourceProperties, self).__init__(**kwargs) + self.instance_flexibility = instance_flexibility + + +class RenewPropertiesResponse(Model): + """RenewPropertiesResponse. + + :param purchase_properties: + :type purchase_properties: ~azure.mgmt.reservations.models.PurchaseRequest + :param pricing_currency_total: Amount that Microsoft uses for record. Used + during refund for calculating refund limit. Tax is not included. This is + locked price 30 days before expiry. + :type pricing_currency_total: + ~azure.mgmt.reservations.models.RenewPropertiesResponsePricingCurrencyTotal + :param billing_currency_total: Currency and amount that customer will be + charged in customer's local currency for renewal purchase. Tax is not + included. + :type billing_currency_total: + ~azure.mgmt.reservations.models.RenewPropertiesResponseBillingCurrencyTotal + """ + + _attribute_map = { + 'purchase_properties': {'key': 'purchaseProperties', 'type': 'PurchaseRequest'}, + 'pricing_currency_total': {'key': 'pricingCurrencyTotal', 'type': 'RenewPropertiesResponsePricingCurrencyTotal'}, + 'billing_currency_total': {'key': 'billingCurrencyTotal', 'type': 'RenewPropertiesResponseBillingCurrencyTotal'}, + } + + def __init__(self, *, purchase_properties=None, pricing_currency_total=None, billing_currency_total=None, **kwargs) -> None: + super(RenewPropertiesResponse, self).__init__(**kwargs) + self.purchase_properties = purchase_properties + self.pricing_currency_total = pricing_currency_total + self.billing_currency_total = billing_currency_total + + +class RenewPropertiesResponseBillingCurrencyTotal(Model): + """Currency and amount that customer will be charged in customer's local + currency for renewal purchase. Tax is not included. + + :param currency_code: + :type currency_code: str + :param amount: + :type amount: float + """ + + _attribute_map = { + 'currency_code': {'key': 'currencyCode', 'type': 'str'}, + 'amount': {'key': 'amount', 'type': 'float'}, + } + + def __init__(self, *, currency_code: str=None, amount: float=None, **kwargs) -> None: + super(RenewPropertiesResponseBillingCurrencyTotal, self).__init__(**kwargs) + self.currency_code = currency_code + self.amount = amount + + +class RenewPropertiesResponsePricingCurrencyTotal(Model): + """Amount that Microsoft uses for record. Used during refund for calculating + refund limit. Tax is not included. This is locked price 30 days before + expiry. + + :param currency_code: + :type currency_code: str + :param amount: + :type amount: float + """ + + _attribute_map = { + 'currency_code': {'key': 'currencyCode', 'type': 'str'}, + 'amount': {'key': 'amount', 'type': 'float'}, + } + + def __init__(self, *, currency_code: str=None, amount: float=None, **kwargs) -> None: + super(RenewPropertiesResponsePricingCurrencyTotal, self).__init__(**kwargs) + self.currency_code = currency_code + self.amount = amount + + +class ReservationMergeProperties(Model): + """ReservationMergeProperties. + + :param merge_destination: Reservation Resource Id Created due to the + merge. Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} + :type merge_destination: str + :param merge_sources: Resource Ids of the Source Reservation's merged to + form this Reservation. Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} + :type merge_sources: list[str] + """ + + _attribute_map = { + 'merge_destination': {'key': 'mergeDestination', 'type': 'str'}, + 'merge_sources': {'key': 'mergeSources', 'type': '[str]'}, + } + + def __init__(self, *, merge_destination: str=None, merge_sources=None, **kwargs) -> None: + super(ReservationMergeProperties, self).__init__(**kwargs) + self.merge_destination = merge_destination + self.merge_sources = merge_sources + + +class ReservationOrderResponse(Model): + """ReservationOrderResponse. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param etag: + :type etag: int + :ivar id: Identifier of the reservation + :vartype id: str + :ivar name: Name of the reservation + :vartype name: str + :param display_name: Friendly name for user to easily identified the + reservation. + :type display_name: str + :param request_date_time: This is the DateTime when the reservation was + initially requested for purchase. + :type request_date_time: datetime + :param created_date_time: This is the DateTime when the reservation was + created. + :type created_date_time: datetime + :param expiry_date: This is the date when the Reservation will expire. + :type expiry_date: date + :param original_quantity: + :type original_quantity: int + :param term: Possible values include: 'P1Y', 'P3Y' + :type term: str or ~azure.mgmt.reservations.models.ReservationTerm + :param provisioning_state: Current state of the reservation. + :type provisioning_state: str + :param reservations: + :type reservations: + list[~azure.mgmt.reservations.models.ReservationResponse] + :ivar type: Type of resource. "Microsoft.Capacity/reservations" + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'etag': {'key': 'etag', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'request_date_time': {'key': 'properties.requestDateTime', 'type': 'iso-8601'}, + 'created_date_time': {'key': 'properties.createdDateTime', 'type': 'iso-8601'}, + 'expiry_date': {'key': 'properties.expiryDate', 'type': 'date'}, + 'original_quantity': {'key': 'properties.originalQuantity', 'type': 'int'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'reservations': {'key': 'properties.reservations', 'type': '[ReservationResponse]'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, etag: int=None, display_name: str=None, request_date_time=None, created_date_time=None, expiry_date=None, original_quantity: int=None, term=None, provisioning_state: str=None, reservations=None, **kwargs) -> None: + super(ReservationOrderResponse, self).__init__(**kwargs) + self.etag = etag + self.id = None + self.name = None + self.display_name = display_name + self.request_date_time = request_date_time + self.created_date_time = created_date_time + self.expiry_date = expiry_date + self.original_quantity = original_quantity + self.term = term + self.provisioning_state = provisioning_state + self.reservations = reservations + self.type = None + + +class ReservationProperties(Model): + """ReservationProperties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param reserved_resource_type: Possible values include: 'VirtualMachines', + 'SqlDatabases', 'SuseLinux', 'CosmosDb', 'RedHat', 'SqlDataWarehouse', + 'VMwareCloudSimple', 'RedHatOsa' + :type reserved_resource_type: str or + ~azure.mgmt.reservations.models.ReservedResourceType + :param instance_flexibility: Possible values include: 'On', 'Off' + :type instance_flexibility: str or + ~azure.mgmt.reservations.models.InstanceFlexibility + :param display_name: Friendly name for user to easily identify the + reservation + :type display_name: str + :param applied_scopes: + :type applied_scopes: list[str] + :param applied_scope_type: Possible values include: 'Single', 'Shared' + :type applied_scope_type: str or + ~azure.mgmt.reservations.models.AppliedScopeType + :param quantity: + :type quantity: int + :param provisioning_state: Current state of the reservation. + :type provisioning_state: str + :param effective_date_time: DateTime of the Reservation starting when this + version is effective from. + :type effective_date_time: datetime + :ivar last_updated_date_time: DateTime of the last time the Reservation + was updated. + :vartype last_updated_date_time: datetime + :param expiry_date: This is the date when the Reservation will expire. + :type expiry_date: date + :param sku_description: Description of the SKU in english. + :type sku_description: str + :param extended_status_info: + :type extended_status_info: + ~azure.mgmt.reservations.models.ExtendedStatusInfo + :param split_properties: + :type split_properties: + ~azure.mgmt.reservations.models.ReservationSplitProperties + :param merge_properties: + :type merge_properties: + ~azure.mgmt.reservations.models.ReservationMergeProperties + :param billing_scope_id: + :type billing_scope_id: str + :param renew: + :type renew: bool + :param renew_source: Reservation Id of the reservation from which this + reservation is renewed. Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :type renew_source: str + :param renew_destination: Reservation Id of the reservation which is + purchased because of renew. Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + :type renew_destination: str + :param renew_properties: + :type renew_properties: + ~azure.mgmt.reservations.models.RenewPropertiesResponse + """ + + _validation = { + 'last_updated_date_time': {'readonly': True}, + } + + _attribute_map = { + 'reserved_resource_type': {'key': 'reservedResourceType', 'type': 'str'}, + 'instance_flexibility': {'key': 'instanceFlexibility', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'applied_scopes': {'key': 'appliedScopes', 'type': '[str]'}, + 'applied_scope_type': {'key': 'appliedScopeType', 'type': 'str'}, + 'quantity': {'key': 'quantity', 'type': 'int'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'effective_date_time': {'key': 'effectiveDateTime', 'type': 'iso-8601'}, + 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, + 'expiry_date': {'key': 'expiryDate', 'type': 'date'}, + 'sku_description': {'key': 'skuDescription', 'type': 'str'}, + 'extended_status_info': {'key': 'extendedStatusInfo', 'type': 'ExtendedStatusInfo'}, + 'split_properties': {'key': 'splitProperties', 'type': 'ReservationSplitProperties'}, + 'merge_properties': {'key': 'mergeProperties', 'type': 'ReservationMergeProperties'}, + 'billing_scope_id': {'key': 'billingScopeId', 'type': 'str'}, + 'renew': {'key': 'renew', 'type': 'bool'}, + 'renew_source': {'key': 'renewSource', 'type': 'str'}, + 'renew_destination': {'key': 'renewDestination', 'type': 'str'}, + 'renew_properties': {'key': 'renewProperties', 'type': 'RenewPropertiesResponse'}, + } + + def __init__(self, *, reserved_resource_type=None, instance_flexibility=None, display_name: str=None, applied_scopes=None, applied_scope_type=None, quantity: int=None, provisioning_state: str=None, effective_date_time=None, expiry_date=None, sku_description: str=None, extended_status_info=None, split_properties=None, merge_properties=None, billing_scope_id: str=None, renew: bool=None, renew_source: str=None, renew_destination: str=None, renew_properties=None, **kwargs) -> None: + super(ReservationProperties, self).__init__(**kwargs) + self.reserved_resource_type = reserved_resource_type + self.instance_flexibility = instance_flexibility + self.display_name = display_name + self.applied_scopes = applied_scopes + self.applied_scope_type = applied_scope_type + self.quantity = quantity + self.provisioning_state = provisioning_state + self.effective_date_time = effective_date_time + self.last_updated_date_time = None + self.expiry_date = expiry_date + self.sku_description = sku_description + self.extended_status_info = extended_status_info + self.split_properties = split_properties + self.merge_properties = merge_properties + self.billing_scope_id = billing_scope_id + self.renew = renew + self.renew_source = renew_source + self.renew_destination = renew_destination + self.renew_properties = renew_properties + + +class ReservationResponse(Model): + """ReservationResponse. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: The Azure Region where the reserved resource lives. + :vartype location: str + :param etag: + :type etag: int + :ivar id: Identifier of the reservation + :vartype id: str + :ivar name: Name of the reservation + :vartype name: str + :param sku: + :type sku: ~azure.mgmt.reservations.models.SkuName + :param properties: + :type properties: ~azure.mgmt.reservations.models.ReservationProperties + :ivar type: Type of resource. + "Microsoft.Capacity/reservationOrders/reservations" + :vartype type: str + """ + + _validation = { + 'location': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'SkuName'}, + 'properties': {'key': 'properties', 'type': 'ReservationProperties'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, etag: int=None, sku=None, properties=None, **kwargs) -> None: + super(ReservationResponse, self).__init__(**kwargs) + self.location = None + self.etag = etag + self.id = None + self.name = None + self.sku = sku + self.properties = properties + self.type = None + + +class ReservationSplitProperties(Model): + """ReservationSplitProperties. + + :param split_destinations: List of destination Resource Id that are + created due to split. Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} + :type split_destinations: list[str] + :param split_source: Resource Id of the Reservation from which this is + split. Format of the resource Id is + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} + :type split_source: str + """ + + _attribute_map = { + 'split_destinations': {'key': 'splitDestinations', 'type': '[str]'}, + 'split_source': {'key': 'splitSource', 'type': 'str'}, + } + + def __init__(self, *, split_destinations=None, split_source: str=None, **kwargs) -> None: + super(ReservationSplitProperties, self).__init__(**kwargs) + self.split_destinations = split_destinations + self.split_source = split_source + + +class SkuName(Model): + """SkuName. + + :param name: + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(SkuName, self).__init__(**kwargs) + self.name = name + + +class SkuProperty(Model): + """SkuProperty. + + :param name: An invariant to describe the feature. + :type name: str + :param value: An invariant if the feature is measured by quantity. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(SkuProperty, self).__init__(**kwargs) + self.name = name + self.value = value + + +class SkuRestriction(Model): + """SkuRestriction. + + :param type: The type of restrictions. + :type type: str + :param values: The value of restrictions. If the restriction type is set + to location. This would be different locations where the SKU is + restricted. + :type values: list[str] + :param reason_code: The reason for restriction. + :type reason_code: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__(self, *, type: str=None, values=None, reason_code: str=None, **kwargs) -> None: + super(SkuRestriction, self).__init__(**kwargs) + self.type = type + self.values = values + self.reason_code = reason_code + + +class SplitRequest(Model): + """SplitRequest. + + :param quantities: List of the quantities in the new reservations to + create. + :type quantities: list[int] + :param reservation_id: Resource id of the reservation to be split. Format + of the resource id should be + /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} + :type reservation_id: str + """ + + _attribute_map = { + 'quantities': {'key': 'properties.quantities', 'type': '[int]'}, + 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, + } + + def __init__(self, *, quantities=None, reservation_id: str=None, **kwargs) -> None: + super(SplitRequest, self).__init__(**kwargs) + self.quantities = quantities + self.reservation_id = reservation_id diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_order_response_paged.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_paged_models.py similarity index 51% rename from sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_order_response_paged.py rename to sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_paged_models.py index 1a72737da5d7..e9745f273406 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_order_response_paged.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_paged_models.py @@ -25,3 +25,29 @@ class ReservationOrderResponsePaged(Paged): def __init__(self, *args, **kwargs): super(ReservationOrderResponsePaged, self).__init__(*args, **kwargs) +class ReservationResponsePaged(Paged): + """ + A paging container for iterating over a list of :class:`ReservationResponse ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ReservationResponse]'} + } + + def __init__(self, *args, **kwargs): + + super(ReservationResponsePaged, self).__init__(*args, **kwargs) +class OperationResponsePaged(Paged): + """ + A paging container for iterating over a list of :class:`OperationResponse ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OperationResponse]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationResponsePaged, self).__init__(*args, **kwargs) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/applied_reservation_list.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/applied_reservation_list.py deleted file mode 100644 index bbbdf641de7b..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/applied_reservation_list.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AppliedReservationList(Model): - """AppliedReservationList. - - :param value: - :type value: list[str] - :param next_link: Url to get the next page of reservations - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[str]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AppliedReservationList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/applied_reservation_list_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/applied_reservation_list_py3.py deleted file mode 100644 index 6947ee80161a..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/applied_reservation_list_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AppliedReservationList(Model): - """AppliedReservationList. - - :param value: - :type value: list[str] - :param next_link: Url to get the next page of reservations - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[str]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: - super(AppliedReservationList, self).__init__(**kwargs) - self.value = value - self.next_link = next_link diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/applied_reservations.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/applied_reservations.py deleted file mode 100644 index 0f9c2581ef5b..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/applied_reservations.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AppliedReservations(Model): - """AppliedReservations. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Identifier of the applied reservations - :vartype id: str - :ivar name: Name of resource - :vartype name: str - :ivar type: Type of resource. "Microsoft.Capacity/AppliedReservations" - :vartype type: str - :param reservation_order_ids: - :type reservation_order_ids: - ~azure.mgmt.reservations.models.AppliedReservationList - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'reservation_order_ids': {'key': 'properties.reservationOrderIds', 'type': 'AppliedReservationList'}, - } - - def __init__(self, **kwargs): - super(AppliedReservations, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.reservation_order_ids = kwargs.get('reservation_order_ids', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/applied_reservations_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/applied_reservations_py3.py deleted file mode 100644 index 03025f54a7e6..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/applied_reservations_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AppliedReservations(Model): - """AppliedReservations. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Identifier of the applied reservations - :vartype id: str - :ivar name: Name of resource - :vartype name: str - :ivar type: Type of resource. "Microsoft.Capacity/AppliedReservations" - :vartype type: str - :param reservation_order_ids: - :type reservation_order_ids: - ~azure.mgmt.reservations.models.AppliedReservationList - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'reservation_order_ids': {'key': 'properties.reservationOrderIds', 'type': 'AppliedReservationList'}, - } - - def __init__(self, *, reservation_order_ids=None, **kwargs) -> None: - super(AppliedReservations, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.reservation_order_ids = reservation_order_ids diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response.py deleted file mode 100644 index 4a3f434dfac5..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CalculatePriceResponse(Model): - """CalculatePriceResponse. - - :param properties: - :type properties: - ~azure.mgmt.reservations.models.CalculatePriceResponseProperties - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'CalculatePriceResponseProperties'}, - } - - def __init__(self, **kwargs): - super(CalculatePriceResponse, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_properties.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_properties.py deleted file mode 100644 index 3764def995e1..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_properties.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CalculatePriceResponseProperties(Model): - """CalculatePriceResponseProperties. - - :param billing_currency_total: Currency and amount that customer will be - charged in customer's local currency. Tax is not included. - :type billing_currency_total: - ~azure.mgmt.reservations.models.CalculatePriceResponsePropertiesBillingCurrencyTotal - :param is_billing_partner_managed: True if billing is managed by Microsoft - Partner. Used only for CSP accounts. - :type is_billing_partner_managed: bool - :param reservation_order_id: GUID that represents reservation order that - can be placed after calculating price. - :type reservation_order_id: str - :param sku_title: Title of SKU that is being purchased. - :type sku_title: str - :param sku_description: Description of SKU that is being purchased. - :type sku_description: str - :param pricing_currency_total: Amount that Microsoft uses for record. Used - during refund for calculating refund limit. Tax is not included. - :type pricing_currency_total: - ~azure.mgmt.reservations.models.CalculatePriceResponsePropertiesPricingCurrencyTotal - """ - - _attribute_map = { - 'billing_currency_total': {'key': 'billingCurrencyTotal', 'type': 'CalculatePriceResponsePropertiesBillingCurrencyTotal'}, - 'is_billing_partner_managed': {'key': 'isBillingPartnerManaged', 'type': 'bool'}, - 'reservation_order_id': {'key': 'reservationOrderId', 'type': 'str'}, - 'sku_title': {'key': 'skuTitle', 'type': 'str'}, - 'sku_description': {'key': 'skuDescription', 'type': 'str'}, - 'pricing_currency_total': {'key': 'pricingCurrencyTotal', 'type': 'CalculatePriceResponsePropertiesPricingCurrencyTotal'}, - } - - def __init__(self, **kwargs): - super(CalculatePriceResponseProperties, self).__init__(**kwargs) - self.billing_currency_total = kwargs.get('billing_currency_total', None) - self.is_billing_partner_managed = kwargs.get('is_billing_partner_managed', None) - self.reservation_order_id = kwargs.get('reservation_order_id', None) - self.sku_title = kwargs.get('sku_title', None) - self.sku_description = kwargs.get('sku_description', None) - self.pricing_currency_total = kwargs.get('pricing_currency_total', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_properties_billing_currency_total.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_properties_billing_currency_total.py deleted file mode 100644 index 744b4346dcf0..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_properties_billing_currency_total.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CalculatePriceResponsePropertiesBillingCurrencyTotal(Model): - """Currency and amount that customer will be charged in customer's local - currency. Tax is not included. - - :param currency_code: - :type currency_code: str - :param amount: - :type amount: float - """ - - _attribute_map = { - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'amount': {'key': 'amount', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(CalculatePriceResponsePropertiesBillingCurrencyTotal, self).__init__(**kwargs) - self.currency_code = kwargs.get('currency_code', None) - self.amount = kwargs.get('amount', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_properties_billing_currency_total_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_properties_billing_currency_total_py3.py deleted file mode 100644 index 2c44a22a66ea..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_properties_billing_currency_total_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CalculatePriceResponsePropertiesBillingCurrencyTotal(Model): - """Currency and amount that customer will be charged in customer's local - currency. Tax is not included. - - :param currency_code: - :type currency_code: str - :param amount: - :type amount: float - """ - - _attribute_map = { - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'amount': {'key': 'amount', 'type': 'float'}, - } - - def __init__(self, *, currency_code: str=None, amount: float=None, **kwargs) -> None: - super(CalculatePriceResponsePropertiesBillingCurrencyTotal, self).__init__(**kwargs) - self.currency_code = currency_code - self.amount = amount diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_properties_pricing_currency_total.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_properties_pricing_currency_total.py deleted file mode 100644 index e134cb896760..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_properties_pricing_currency_total.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CalculatePriceResponsePropertiesPricingCurrencyTotal(Model): - """Amount that Microsoft uses for record. Used during refund for calculating - refund limit. Tax is not included. - - :param currency_code: - :type currency_code: str - :param amount: - :type amount: float - """ - - _attribute_map = { - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'amount': {'key': 'amount', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(CalculatePriceResponsePropertiesPricingCurrencyTotal, self).__init__(**kwargs) - self.currency_code = kwargs.get('currency_code', None) - self.amount = kwargs.get('amount', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_properties_pricing_currency_total_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_properties_pricing_currency_total_py3.py deleted file mode 100644 index 91d8364d14a5..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_properties_pricing_currency_total_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CalculatePriceResponsePropertiesPricingCurrencyTotal(Model): - """Amount that Microsoft uses for record. Used during refund for calculating - refund limit. Tax is not included. - - :param currency_code: - :type currency_code: str - :param amount: - :type amount: float - """ - - _attribute_map = { - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'amount': {'key': 'amount', 'type': 'float'}, - } - - def __init__(self, *, currency_code: str=None, amount: float=None, **kwargs) -> None: - super(CalculatePriceResponsePropertiesPricingCurrencyTotal, self).__init__(**kwargs) - self.currency_code = currency_code - self.amount = amount diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_properties_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_properties_py3.py deleted file mode 100644 index 0a4573d16efd..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_properties_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CalculatePriceResponseProperties(Model): - """CalculatePriceResponseProperties. - - :param billing_currency_total: Currency and amount that customer will be - charged in customer's local currency. Tax is not included. - :type billing_currency_total: - ~azure.mgmt.reservations.models.CalculatePriceResponsePropertiesBillingCurrencyTotal - :param is_billing_partner_managed: True if billing is managed by Microsoft - Partner. Used only for CSP accounts. - :type is_billing_partner_managed: bool - :param reservation_order_id: GUID that represents reservation order that - can be placed after calculating price. - :type reservation_order_id: str - :param sku_title: Title of SKU that is being purchased. - :type sku_title: str - :param sku_description: Description of SKU that is being purchased. - :type sku_description: str - :param pricing_currency_total: Amount that Microsoft uses for record. Used - during refund for calculating refund limit. Tax is not included. - :type pricing_currency_total: - ~azure.mgmt.reservations.models.CalculatePriceResponsePropertiesPricingCurrencyTotal - """ - - _attribute_map = { - 'billing_currency_total': {'key': 'billingCurrencyTotal', 'type': 'CalculatePriceResponsePropertiesBillingCurrencyTotal'}, - 'is_billing_partner_managed': {'key': 'isBillingPartnerManaged', 'type': 'bool'}, - 'reservation_order_id': {'key': 'reservationOrderId', 'type': 'str'}, - 'sku_title': {'key': 'skuTitle', 'type': 'str'}, - 'sku_description': {'key': 'skuDescription', 'type': 'str'}, - 'pricing_currency_total': {'key': 'pricingCurrencyTotal', 'type': 'CalculatePriceResponsePropertiesPricingCurrencyTotal'}, - } - - def __init__(self, *, billing_currency_total=None, is_billing_partner_managed: bool=None, reservation_order_id: str=None, sku_title: str=None, sku_description: str=None, pricing_currency_total=None, **kwargs) -> None: - super(CalculatePriceResponseProperties, self).__init__(**kwargs) - self.billing_currency_total = billing_currency_total - self.is_billing_partner_managed = is_billing_partner_managed - self.reservation_order_id = reservation_order_id - self.sku_title = sku_title - self.sku_description = sku_description - self.pricing_currency_total = pricing_currency_total diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_py3.py deleted file mode 100644 index 1aa508e1438b..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/calculate_price_response_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CalculatePriceResponse(Model): - """CalculatePriceResponse. - - :param properties: - :type properties: - ~azure.mgmt.reservations.models.CalculatePriceResponseProperties - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'CalculatePriceResponseProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(CalculatePriceResponse, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/catalog.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/catalog.py deleted file mode 100644 index 3a08ba2366c7..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/catalog.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Catalog(Model): - """Catalog. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the SKU applies to. - :vartype resource_type: str - :ivar name: The name of SKU - :vartype name: str - :ivar terms: Available reservation terms for this resource - :vartype terms: list[str or - ~azure.mgmt.reservations.models.ReservationTerm] - :ivar locations: - :vartype locations: list[str] - :ivar sku_properties: - :vartype sku_properties: list[~azure.mgmt.reservations.models.SkuProperty] - :ivar restrictions: - :vartype restrictions: - list[~azure.mgmt.reservations.models.SkuRestriction] - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'name': {'readonly': True}, - 'terms': {'readonly': True}, - 'locations': {'readonly': True}, - 'sku_properties': {'readonly': True}, - 'restrictions': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'terms': {'key': 'terms', 'type': '[str]'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'sku_properties': {'key': 'skuProperties', 'type': '[SkuProperty]'}, - 'restrictions': {'key': 'restrictions', 'type': '[SkuRestriction]'}, - } - - def __init__(self, **kwargs): - super(Catalog, self).__init__(**kwargs) - self.resource_type = None - self.name = None - self.terms = None - self.locations = None - self.sku_properties = None - self.restrictions = None diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/catalog_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/catalog_py3.py deleted file mode 100644 index b6464148163a..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/catalog_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Catalog(Model): - """Catalog. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the SKU applies to. - :vartype resource_type: str - :ivar name: The name of SKU - :vartype name: str - :ivar terms: Available reservation terms for this resource - :vartype terms: list[str or - ~azure.mgmt.reservations.models.ReservationTerm] - :ivar locations: - :vartype locations: list[str] - :ivar sku_properties: - :vartype sku_properties: list[~azure.mgmt.reservations.models.SkuProperty] - :ivar restrictions: - :vartype restrictions: - list[~azure.mgmt.reservations.models.SkuRestriction] - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'name': {'readonly': True}, - 'terms': {'readonly': True}, - 'locations': {'readonly': True}, - 'sku_properties': {'readonly': True}, - 'restrictions': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'terms': {'key': 'terms', 'type': '[str]'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'sku_properties': {'key': 'skuProperties', 'type': '[SkuProperty]'}, - 'restrictions': {'key': 'restrictions', 'type': '[SkuRestriction]'}, - } - - def __init__(self, **kwargs) -> None: - super(Catalog, self).__init__(**kwargs) - self.resource_type = None - self.name = None - self.terms = None - self.locations = None - self.sku_properties = None - self.restrictions = None diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/error.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/error.py deleted file mode 100644 index fa9805046fce..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/error.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class Error(Model): - """Error. - - :param error: - :type error: ~azure.mgmt.reservations.models.ExtendedErrorInfo - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ExtendedErrorInfo'}, - } - - def __init__(self, **kwargs): - super(Error, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class ErrorException(HttpOperationError): - """Server responsed with exception of type: 'Error'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorException, self).__init__(deserialize, response, 'Error', *args) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/error_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/error_py3.py deleted file mode 100644 index 0eb2fbecad17..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/error_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class Error(Model): - """Error. - - :param error: - :type error: ~azure.mgmt.reservations.models.ExtendedErrorInfo - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ExtendedErrorInfo'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(Error, self).__init__(**kwargs) - self.error = error - - -class ErrorException(HttpOperationError): - """Server responsed with exception of type: 'Error'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorException, self).__init__(deserialize, response, 'Error', *args) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/extended_error_info.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/extended_error_info.py deleted file mode 100644 index 1aefd531980d..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/extended_error_info.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExtendedErrorInfo(Model): - """ExtendedErrorInfo. - - :param code: Possible values include: 'NotSpecified', - 'InternalServerError', 'ServerTimeout', 'AuthorizationFailed', - 'BadRequest', 'ClientCertificateThumbprintNotSet', - 'InvalidRequestContent', 'OperationFailed', 'HttpMethodNotSupported', - 'InvalidRequestUri', 'MissingTenantId', 'InvalidTenantId', - 'InvalidReservationOrderId', 'InvalidReservationId', - 'ReservationIdNotInReservationOrder', 'ReservationOrderNotFound', - 'InvalidSubscriptionId', 'InvalidAccessToken', 'InvalidLocationId', - 'UnauthenticatedRequestsThrottled', 'InvalidHealthCheckType', 'Forbidden', - 'BillingScopeIdCannotBeChanged', - 'AppliedScopesNotAssociatedWithCommerceAccount', - 'PatchValuesSameAsExisting', 'RoleAssignmentCreationFailed', - 'ReservationOrderCreationFailed', 'ReservationOrderNotEnabled', - 'CapacityUpdateScopesFailed', 'UnsupportedReservationTerm', - 'ReservationOrderIdAlreadyExists', 'RiskCheckFailed', 'CreateQuoteFailed', - 'ActivateQuoteFailed', 'NonsupportedAccountId', - 'PaymentInstrumentNotFound', 'MissingAppliedScopesForSingle', - 'NoValidReservationsToReRate', 'ReRateOnlyAllowedForEA', - 'OperationCannotBePerformedInCurrentState', - 'InvalidSingleAppliedScopesCount', 'InvalidFulfillmentRequestParameters', - 'NotSupportedCountry', 'InvalidRefundQuantity', 'PurchaseError', - 'BillingCustomerInputError', 'BillingPaymentInstrumentSoftError', - 'BillingPaymentInstrumentHardError', 'BillingTransientError', - 'BillingError', 'FulfillmentConfigurationError', - 'FulfillmentOutOfStockError', 'FulfillmentTransientError', - 'FulfillmentError', 'CalculatePriceFailed' - :type code: str or ~azure.mgmt.reservations.models.ErrorResponseCode - :param message: - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExtendedErrorInfo, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/extended_error_info_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/extended_error_info_py3.py deleted file mode 100644 index 8d35deeaf186..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/extended_error_info_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExtendedErrorInfo(Model): - """ExtendedErrorInfo. - - :param code: Possible values include: 'NotSpecified', - 'InternalServerError', 'ServerTimeout', 'AuthorizationFailed', - 'BadRequest', 'ClientCertificateThumbprintNotSet', - 'InvalidRequestContent', 'OperationFailed', 'HttpMethodNotSupported', - 'InvalidRequestUri', 'MissingTenantId', 'InvalidTenantId', - 'InvalidReservationOrderId', 'InvalidReservationId', - 'ReservationIdNotInReservationOrder', 'ReservationOrderNotFound', - 'InvalidSubscriptionId', 'InvalidAccessToken', 'InvalidLocationId', - 'UnauthenticatedRequestsThrottled', 'InvalidHealthCheckType', 'Forbidden', - 'BillingScopeIdCannotBeChanged', - 'AppliedScopesNotAssociatedWithCommerceAccount', - 'PatchValuesSameAsExisting', 'RoleAssignmentCreationFailed', - 'ReservationOrderCreationFailed', 'ReservationOrderNotEnabled', - 'CapacityUpdateScopesFailed', 'UnsupportedReservationTerm', - 'ReservationOrderIdAlreadyExists', 'RiskCheckFailed', 'CreateQuoteFailed', - 'ActivateQuoteFailed', 'NonsupportedAccountId', - 'PaymentInstrumentNotFound', 'MissingAppliedScopesForSingle', - 'NoValidReservationsToReRate', 'ReRateOnlyAllowedForEA', - 'OperationCannotBePerformedInCurrentState', - 'InvalidSingleAppliedScopesCount', 'InvalidFulfillmentRequestParameters', - 'NotSupportedCountry', 'InvalidRefundQuantity', 'PurchaseError', - 'BillingCustomerInputError', 'BillingPaymentInstrumentSoftError', - 'BillingPaymentInstrumentHardError', 'BillingTransientError', - 'BillingError', 'FulfillmentConfigurationError', - 'FulfillmentOutOfStockError', 'FulfillmentTransientError', - 'FulfillmentError', 'CalculatePriceFailed' - :type code: str or ~azure.mgmt.reservations.models.ErrorResponseCode - :param message: - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code=None, message: str=None, **kwargs) -> None: - super(ExtendedErrorInfo, self).__init__(**kwargs) - self.code = code - self.message = message diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/extended_status_info.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/extended_status_info.py deleted file mode 100644 index 500e01feb7e7..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/extended_status_info.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExtendedStatusInfo(Model): - """ExtendedStatusInfo. - - :param status_code: Possible values include: 'None', 'Pending', 'Active', - 'PurchaseError', 'PaymentInstrumentError', 'Split', 'Merged', 'Expired', - 'Succeeded' - :type status_code: str or - ~azure.mgmt.reservations.models.ReservationStatusCode - :param message: The message giving detailed information about the status - code. - :type message: str - """ - - _attribute_map = { - 'status_code': {'key': 'statusCode', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExtendedStatusInfo, self).__init__(**kwargs) - self.status_code = kwargs.get('status_code', None) - self.message = kwargs.get('message', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/extended_status_info_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/extended_status_info_py3.py deleted file mode 100644 index 991924bd2790..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/extended_status_info_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExtendedStatusInfo(Model): - """ExtendedStatusInfo. - - :param status_code: Possible values include: 'None', 'Pending', 'Active', - 'PurchaseError', 'PaymentInstrumentError', 'Split', 'Merged', 'Expired', - 'Succeeded' - :type status_code: str or - ~azure.mgmt.reservations.models.ReservationStatusCode - :param message: The message giving detailed information about the status - code. - :type message: str - """ - - _attribute_map = { - 'status_code': {'key': 'statusCode', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, status_code=None, message: str=None, **kwargs) -> None: - super(ExtendedStatusInfo, self).__init__(**kwargs) - self.status_code = status_code - self.message = message diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/merge_request.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/merge_request.py deleted file mode 100644 index 017d8199c1be..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/merge_request.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MergeRequest(Model): - """MergeRequest. - - :param sources: Format of the resource id should be - /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} - :type sources: list[str] - """ - - _attribute_map = { - 'sources': {'key': 'properties.sources', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(MergeRequest, self).__init__(**kwargs) - self.sources = kwargs.get('sources', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/merge_request_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/merge_request_py3.py deleted file mode 100644 index cb7b41e5dcf3..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/merge_request_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MergeRequest(Model): - """MergeRequest. - - :param sources: Format of the resource id should be - /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} - :type sources: list[str] - """ - - _attribute_map = { - 'sources': {'key': 'properties.sources', 'type': '[str]'}, - } - - def __init__(self, *, sources=None, **kwargs) -> None: - super(MergeRequest, self).__init__(**kwargs) - self.sources = sources diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/operation_display.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/operation_display.py deleted file mode 100644 index 79a304da49c9..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/operation_display.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """OperationDisplay. - - :param provider: - :type provider: str - :param resource: - :type resource: str - :param operation: - :type operation: str - :param description: - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/operation_display_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/operation_display_py3.py deleted file mode 100644 index eba1e3726b41..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/operation_display_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """OperationDisplay. - - :param provider: - :type provider: str - :param resource: - :type resource: str - :param operation: - :type operation: str - :param description: - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/operation_response.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/operation_response.py deleted file mode 100644 index e3684cf97340..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/operation_response.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationResponse(Model): - """OperationResponse. - - :param name: - :type name: str - :param display: - :type display: ~azure.mgmt.reservations.models.OperationDisplay - :param origin: - :type origin: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationResponse, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) - self.origin = kwargs.get('origin', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/operation_response_paged.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/operation_response_paged.py deleted file mode 100644 index 46bc490fd198..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/operation_response_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationResponsePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationResponse ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationResponse]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationResponsePaged, self).__init__(*args, **kwargs) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/operation_response_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/operation_response_py3.py deleted file mode 100644 index ee82aa93d7d5..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/operation_response_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationResponse(Model): - """OperationResponse. - - :param name: - :type name: str - :param display: - :type display: ~azure.mgmt.reservations.models.OperationDisplay - :param origin: - :type origin: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, display=None, origin: str=None, **kwargs) -> None: - super(OperationResponse, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/patch.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/patch.py deleted file mode 100644 index 339253285ada..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/patch.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Patch(Model): - """Patch. - - :param applied_scope_type: Possible values include: 'Single', 'Shared' - :type applied_scope_type: str or - ~azure.mgmt.reservations.models.AppliedScopeType - :param applied_scopes: - :type applied_scopes: list[str] - :param instance_flexibility: Possible values include: 'On', 'Off' - :type instance_flexibility: str or - ~azure.mgmt.reservations.models.InstanceFlexibility - :param name: Name of the Reservation - :type name: str - """ - - _attribute_map = { - 'applied_scope_type': {'key': 'properties.appliedScopeType', 'type': 'str'}, - 'applied_scopes': {'key': 'properties.appliedScopes', 'type': '[str]'}, - 'instance_flexibility': {'key': 'properties.instanceFlexibility', 'type': 'str'}, - 'name': {'key': 'properties.name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Patch, self).__init__(**kwargs) - self.applied_scope_type = kwargs.get('applied_scope_type', None) - self.applied_scopes = kwargs.get('applied_scopes', None) - self.instance_flexibility = kwargs.get('instance_flexibility', None) - self.name = kwargs.get('name', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/patch_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/patch_py3.py deleted file mode 100644 index e4dd27f9735c..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/patch_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Patch(Model): - """Patch. - - :param applied_scope_type: Possible values include: 'Single', 'Shared' - :type applied_scope_type: str or - ~azure.mgmt.reservations.models.AppliedScopeType - :param applied_scopes: - :type applied_scopes: list[str] - :param instance_flexibility: Possible values include: 'On', 'Off' - :type instance_flexibility: str or - ~azure.mgmt.reservations.models.InstanceFlexibility - :param name: Name of the Reservation - :type name: str - """ - - _attribute_map = { - 'applied_scope_type': {'key': 'properties.appliedScopeType', 'type': 'str'}, - 'applied_scopes': {'key': 'properties.appliedScopes', 'type': '[str]'}, - 'instance_flexibility': {'key': 'properties.instanceFlexibility', 'type': 'str'}, - 'name': {'key': 'properties.name', 'type': 'str'}, - } - - def __init__(self, *, applied_scope_type=None, applied_scopes=None, instance_flexibility=None, name: str=None, **kwargs) -> None: - super(Patch, self).__init__(**kwargs) - self.applied_scope_type = applied_scope_type - self.applied_scopes = applied_scopes - self.instance_flexibility = instance_flexibility - self.name = name diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/purchase_request.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/purchase_request.py deleted file mode 100644 index 88be65ce3d8b..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/purchase_request.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchaseRequest(Model): - """PurchaseRequest. - - :param sku: - :type sku: ~azure.mgmt.reservations.models.SkuName - :param location: The Azure Region where the reserved resource lives. - :type location: str - :param reserved_resource_type: Possible values include: 'VirtualMachines', - 'SqlDatabases', 'SuseLinux', 'CosmosDb' - :type reserved_resource_type: str or - ~azure.mgmt.reservations.models.ReservedResourceType - :param billing_scope_id: - :type billing_scope_id: str - :param term: Possible values include: 'P1Y', 'P3Y' - :type term: str or ~azure.mgmt.reservations.models.ReservationTerm - :param quantity: - :type quantity: int - :param display_name: Friendly name of the Reservation - :type display_name: str - :param applied_scope_type: Possible values include: 'Single', 'Shared' - :type applied_scope_type: str or - ~azure.mgmt.reservations.models.AppliedScopeType - :param applied_scopes: - :type applied_scopes: list[str] - :param reserved_resource_properties: Properties specific to each reserved - resource type. Not required if not applicable. - :type reserved_resource_properties: - ~azure.mgmt.reservations.models.PurchaseRequestPropertiesReservedResourceProperties - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'SkuName'}, - 'location': {'key': 'location', 'type': 'str'}, - 'reserved_resource_type': {'key': 'properties.reservedResourceType', 'type': 'str'}, - 'billing_scope_id': {'key': 'properties.billingScopeId', 'type': 'str'}, - 'term': {'key': 'properties.term', 'type': 'str'}, - 'quantity': {'key': 'properties.quantity', 'type': 'int'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'applied_scope_type': {'key': 'properties.appliedScopeType', 'type': 'str'}, - 'applied_scopes': {'key': 'properties.appliedScopes', 'type': '[str]'}, - 'reserved_resource_properties': {'key': 'properties.reservedResourceProperties', 'type': 'PurchaseRequestPropertiesReservedResourceProperties'}, - } - - def __init__(self, **kwargs): - super(PurchaseRequest, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.location = kwargs.get('location', None) - self.reserved_resource_type = kwargs.get('reserved_resource_type', None) - self.billing_scope_id = kwargs.get('billing_scope_id', None) - self.term = kwargs.get('term', None) - self.quantity = kwargs.get('quantity', None) - self.display_name = kwargs.get('display_name', None) - self.applied_scope_type = kwargs.get('applied_scope_type', None) - self.applied_scopes = kwargs.get('applied_scopes', None) - self.reserved_resource_properties = kwargs.get('reserved_resource_properties', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/purchase_request_properties_reserved_resource_properties.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/purchase_request_properties_reserved_resource_properties.py deleted file mode 100644 index 22e90e256ddb..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/purchase_request_properties_reserved_resource_properties.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchaseRequestPropertiesReservedResourceProperties(Model): - """Properties specific to each reserved resource type. Not required if not - applicable. - - :param instance_flexibility: Possible values include: 'On', 'Off' - :type instance_flexibility: str or - ~azure.mgmt.reservations.models.InstanceFlexibility - """ - - _attribute_map = { - 'instance_flexibility': {'key': 'instanceFlexibility', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PurchaseRequestPropertiesReservedResourceProperties, self).__init__(**kwargs) - self.instance_flexibility = kwargs.get('instance_flexibility', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/purchase_request_properties_reserved_resource_properties_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/purchase_request_properties_reserved_resource_properties_py3.py deleted file mode 100644 index 91e5d6dbc17f..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/purchase_request_properties_reserved_resource_properties_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchaseRequestPropertiesReservedResourceProperties(Model): - """Properties specific to each reserved resource type. Not required if not - applicable. - - :param instance_flexibility: Possible values include: 'On', 'Off' - :type instance_flexibility: str or - ~azure.mgmt.reservations.models.InstanceFlexibility - """ - - _attribute_map = { - 'instance_flexibility': {'key': 'instanceFlexibility', 'type': 'str'}, - } - - def __init__(self, *, instance_flexibility=None, **kwargs) -> None: - super(PurchaseRequestPropertiesReservedResourceProperties, self).__init__(**kwargs) - self.instance_flexibility = instance_flexibility diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/purchase_request_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/purchase_request_py3.py deleted file mode 100644 index 6f4c95af5ec8..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/purchase_request_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PurchaseRequest(Model): - """PurchaseRequest. - - :param sku: - :type sku: ~azure.mgmt.reservations.models.SkuName - :param location: The Azure Region where the reserved resource lives. - :type location: str - :param reserved_resource_type: Possible values include: 'VirtualMachines', - 'SqlDatabases', 'SuseLinux', 'CosmosDb' - :type reserved_resource_type: str or - ~azure.mgmt.reservations.models.ReservedResourceType - :param billing_scope_id: - :type billing_scope_id: str - :param term: Possible values include: 'P1Y', 'P3Y' - :type term: str or ~azure.mgmt.reservations.models.ReservationTerm - :param quantity: - :type quantity: int - :param display_name: Friendly name of the Reservation - :type display_name: str - :param applied_scope_type: Possible values include: 'Single', 'Shared' - :type applied_scope_type: str or - ~azure.mgmt.reservations.models.AppliedScopeType - :param applied_scopes: - :type applied_scopes: list[str] - :param reserved_resource_properties: Properties specific to each reserved - resource type. Not required if not applicable. - :type reserved_resource_properties: - ~azure.mgmt.reservations.models.PurchaseRequestPropertiesReservedResourceProperties - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'SkuName'}, - 'location': {'key': 'location', 'type': 'str'}, - 'reserved_resource_type': {'key': 'properties.reservedResourceType', 'type': 'str'}, - 'billing_scope_id': {'key': 'properties.billingScopeId', 'type': 'str'}, - 'term': {'key': 'properties.term', 'type': 'str'}, - 'quantity': {'key': 'properties.quantity', 'type': 'int'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'applied_scope_type': {'key': 'properties.appliedScopeType', 'type': 'str'}, - 'applied_scopes': {'key': 'properties.appliedScopes', 'type': '[str]'}, - 'reserved_resource_properties': {'key': 'properties.reservedResourceProperties', 'type': 'PurchaseRequestPropertiesReservedResourceProperties'}, - } - - def __init__(self, *, sku=None, location: str=None, reserved_resource_type=None, billing_scope_id: str=None, term=None, quantity: int=None, display_name: str=None, applied_scope_type=None, applied_scopes=None, reserved_resource_properties=None, **kwargs) -> None: - super(PurchaseRequest, self).__init__(**kwargs) - self.sku = sku - self.location = location - self.reserved_resource_type = reserved_resource_type - self.billing_scope_id = billing_scope_id - self.term = term - self.quantity = quantity - self.display_name = display_name - self.applied_scope_type = applied_scope_type - self.applied_scopes = applied_scopes - self.reserved_resource_properties = reserved_resource_properties diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_merge_properties.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_merge_properties.py deleted file mode 100644 index 494f268981a1..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_merge_properties.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReservationMergeProperties(Model): - """ReservationMergeProperties. - - :param merge_destination: Reservation Resource Id Created due to the - merge. Format of the resource Id is - /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} - :type merge_destination: str - :param merge_sources: Resource Ids of the Source Reservation's merged to - form this Reservation. Format of the resource Id is - /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} - :type merge_sources: list[str] - """ - - _attribute_map = { - 'merge_destination': {'key': 'mergeDestination', 'type': 'str'}, - 'merge_sources': {'key': 'mergeSources', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ReservationMergeProperties, self).__init__(**kwargs) - self.merge_destination = kwargs.get('merge_destination', None) - self.merge_sources = kwargs.get('merge_sources', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_merge_properties_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_merge_properties_py3.py deleted file mode 100644 index b03bd47a1e75..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_merge_properties_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReservationMergeProperties(Model): - """ReservationMergeProperties. - - :param merge_destination: Reservation Resource Id Created due to the - merge. Format of the resource Id is - /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} - :type merge_destination: str - :param merge_sources: Resource Ids of the Source Reservation's merged to - form this Reservation. Format of the resource Id is - /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} - :type merge_sources: list[str] - """ - - _attribute_map = { - 'merge_destination': {'key': 'mergeDestination', 'type': 'str'}, - 'merge_sources': {'key': 'mergeSources', 'type': '[str]'}, - } - - def __init__(self, *, merge_destination: str=None, merge_sources=None, **kwargs) -> None: - super(ReservationMergeProperties, self).__init__(**kwargs) - self.merge_destination = merge_destination - self.merge_sources = merge_sources diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_order_response.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_order_response.py deleted file mode 100644 index 1142c821777d..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_order_response.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReservationOrderResponse(Model): - """ReservationOrderResponse. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param etag: - :type etag: int - :ivar id: Identifier of the reservation - :vartype id: str - :ivar name: Name of the reservation - :vartype name: str - :param display_name: Friendly name for user to easily identified the - reservation. - :type display_name: str - :param request_date_time: This is the DateTime when the reservation was - initially requested for purchase. - :type request_date_time: datetime - :param created_date_time: This is the DateTime when the reservation was - created. - :type created_date_time: datetime - :param expiry_date: This is the date when the Reservation will expire. - :type expiry_date: date - :param original_quantity: - :type original_quantity: int - :param term: Possible values include: 'P1Y', 'P3Y' - :type term: str or ~azure.mgmt.reservations.models.ReservationTerm - :param provisioning_state: Current state of the reservation. - :type provisioning_state: str - :param reservations: - :type reservations: - list[~azure.mgmt.reservations.models.ReservationResponse] - :ivar type: Type of resource. "Microsoft.Capacity/reservations" - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'etag': {'key': 'etag', 'type': 'int'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'request_date_time': {'key': 'properties.requestDateTime', 'type': 'iso-8601'}, - 'created_date_time': {'key': 'properties.createdDateTime', 'type': 'iso-8601'}, - 'expiry_date': {'key': 'properties.expiryDate', 'type': 'date'}, - 'original_quantity': {'key': 'properties.originalQuantity', 'type': 'int'}, - 'term': {'key': 'properties.term', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'reservations': {'key': 'properties.reservations', 'type': '[ReservationResponse]'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReservationOrderResponse, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.id = None - self.name = None - self.display_name = kwargs.get('display_name', None) - self.request_date_time = kwargs.get('request_date_time', None) - self.created_date_time = kwargs.get('created_date_time', None) - self.expiry_date = kwargs.get('expiry_date', None) - self.original_quantity = kwargs.get('original_quantity', None) - self.term = kwargs.get('term', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.reservations = kwargs.get('reservations', None) - self.type = None diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_order_response_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_order_response_py3.py deleted file mode 100644 index 0af515a06fa1..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_order_response_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReservationOrderResponse(Model): - """ReservationOrderResponse. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param etag: - :type etag: int - :ivar id: Identifier of the reservation - :vartype id: str - :ivar name: Name of the reservation - :vartype name: str - :param display_name: Friendly name for user to easily identified the - reservation. - :type display_name: str - :param request_date_time: This is the DateTime when the reservation was - initially requested for purchase. - :type request_date_time: datetime - :param created_date_time: This is the DateTime when the reservation was - created. - :type created_date_time: datetime - :param expiry_date: This is the date when the Reservation will expire. - :type expiry_date: date - :param original_quantity: - :type original_quantity: int - :param term: Possible values include: 'P1Y', 'P3Y' - :type term: str or ~azure.mgmt.reservations.models.ReservationTerm - :param provisioning_state: Current state of the reservation. - :type provisioning_state: str - :param reservations: - :type reservations: - list[~azure.mgmt.reservations.models.ReservationResponse] - :ivar type: Type of resource. "Microsoft.Capacity/reservations" - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'etag': {'key': 'etag', 'type': 'int'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'request_date_time': {'key': 'properties.requestDateTime', 'type': 'iso-8601'}, - 'created_date_time': {'key': 'properties.createdDateTime', 'type': 'iso-8601'}, - 'expiry_date': {'key': 'properties.expiryDate', 'type': 'date'}, - 'original_quantity': {'key': 'properties.originalQuantity', 'type': 'int'}, - 'term': {'key': 'properties.term', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'reservations': {'key': 'properties.reservations', 'type': '[ReservationResponse]'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, etag: int=None, display_name: str=None, request_date_time=None, created_date_time=None, expiry_date=None, original_quantity: int=None, term=None, provisioning_state: str=None, reservations=None, **kwargs) -> None: - super(ReservationOrderResponse, self).__init__(**kwargs) - self.etag = etag - self.id = None - self.name = None - self.display_name = display_name - self.request_date_time = request_date_time - self.created_date_time = created_date_time - self.expiry_date = expiry_date - self.original_quantity = original_quantity - self.term = term - self.provisioning_state = provisioning_state - self.reservations = reservations - self.type = None diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_properties.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_properties.py deleted file mode 100644 index b93304409a65..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_properties.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReservationProperties(Model): - """ReservationProperties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param reserved_resource_type: Possible values include: 'VirtualMachines', - 'SqlDatabases', 'SuseLinux', 'CosmosDb' - :type reserved_resource_type: str or - ~azure.mgmt.reservations.models.ReservedResourceType - :param instance_flexibility: Possible values include: 'On', 'Off' - :type instance_flexibility: str or - ~azure.mgmt.reservations.models.InstanceFlexibility - :param display_name: Friendly name for user to easily identify the - reservation - :type display_name: str - :param applied_scopes: - :type applied_scopes: list[str] - :param applied_scope_type: Possible values include: 'Single', 'Shared' - :type applied_scope_type: str or - ~azure.mgmt.reservations.models.AppliedScopeType - :param quantity: - :type quantity: int - :param provisioning_state: Current state of the reservation. - :type provisioning_state: str - :param effective_date_time: DateTime of the Reservation starting when this - version is effective from. - :type effective_date_time: datetime - :ivar last_updated_date_time: DateTime of the last time the Reservation - was updated. - :vartype last_updated_date_time: datetime - :param expiry_date: This is the date when the Reservation will expire. - :type expiry_date: date - :param sku_description: Description of the SKU in english. - :type sku_description: str - :param extended_status_info: - :type extended_status_info: - ~azure.mgmt.reservations.models.ExtendedStatusInfo - :param split_properties: - :type split_properties: - ~azure.mgmt.reservations.models.ReservationSplitProperties - :param merge_properties: - :type merge_properties: - ~azure.mgmt.reservations.models.ReservationMergeProperties - """ - - _validation = { - 'last_updated_date_time': {'readonly': True}, - } - - _attribute_map = { - 'reserved_resource_type': {'key': 'reservedResourceType', 'type': 'str'}, - 'instance_flexibility': {'key': 'instanceFlexibility', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'applied_scopes': {'key': 'appliedScopes', 'type': '[str]'}, - 'applied_scope_type': {'key': 'appliedScopeType', 'type': 'str'}, - 'quantity': {'key': 'quantity', 'type': 'int'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'effective_date_time': {'key': 'effectiveDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'expiry_date': {'key': 'expiryDate', 'type': 'date'}, - 'sku_description': {'key': 'skuDescription', 'type': 'str'}, - 'extended_status_info': {'key': 'extendedStatusInfo', 'type': 'ExtendedStatusInfo'}, - 'split_properties': {'key': 'splitProperties', 'type': 'ReservationSplitProperties'}, - 'merge_properties': {'key': 'mergeProperties', 'type': 'ReservationMergeProperties'}, - } - - def __init__(self, **kwargs): - super(ReservationProperties, self).__init__(**kwargs) - self.reserved_resource_type = kwargs.get('reserved_resource_type', None) - self.instance_flexibility = kwargs.get('instance_flexibility', None) - self.display_name = kwargs.get('display_name', None) - self.applied_scopes = kwargs.get('applied_scopes', None) - self.applied_scope_type = kwargs.get('applied_scope_type', None) - self.quantity = kwargs.get('quantity', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.effective_date_time = kwargs.get('effective_date_time', None) - self.last_updated_date_time = None - self.expiry_date = kwargs.get('expiry_date', None) - self.sku_description = kwargs.get('sku_description', None) - self.extended_status_info = kwargs.get('extended_status_info', None) - self.split_properties = kwargs.get('split_properties', None) - self.merge_properties = kwargs.get('merge_properties', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_properties_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_properties_py3.py deleted file mode 100644 index 5e04154ba3af..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_properties_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReservationProperties(Model): - """ReservationProperties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param reserved_resource_type: Possible values include: 'VirtualMachines', - 'SqlDatabases', 'SuseLinux', 'CosmosDb' - :type reserved_resource_type: str or - ~azure.mgmt.reservations.models.ReservedResourceType - :param instance_flexibility: Possible values include: 'On', 'Off' - :type instance_flexibility: str or - ~azure.mgmt.reservations.models.InstanceFlexibility - :param display_name: Friendly name for user to easily identify the - reservation - :type display_name: str - :param applied_scopes: - :type applied_scopes: list[str] - :param applied_scope_type: Possible values include: 'Single', 'Shared' - :type applied_scope_type: str or - ~azure.mgmt.reservations.models.AppliedScopeType - :param quantity: - :type quantity: int - :param provisioning_state: Current state of the reservation. - :type provisioning_state: str - :param effective_date_time: DateTime of the Reservation starting when this - version is effective from. - :type effective_date_time: datetime - :ivar last_updated_date_time: DateTime of the last time the Reservation - was updated. - :vartype last_updated_date_time: datetime - :param expiry_date: This is the date when the Reservation will expire. - :type expiry_date: date - :param sku_description: Description of the SKU in english. - :type sku_description: str - :param extended_status_info: - :type extended_status_info: - ~azure.mgmt.reservations.models.ExtendedStatusInfo - :param split_properties: - :type split_properties: - ~azure.mgmt.reservations.models.ReservationSplitProperties - :param merge_properties: - :type merge_properties: - ~azure.mgmt.reservations.models.ReservationMergeProperties - """ - - _validation = { - 'last_updated_date_time': {'readonly': True}, - } - - _attribute_map = { - 'reserved_resource_type': {'key': 'reservedResourceType', 'type': 'str'}, - 'instance_flexibility': {'key': 'instanceFlexibility', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'applied_scopes': {'key': 'appliedScopes', 'type': '[str]'}, - 'applied_scope_type': {'key': 'appliedScopeType', 'type': 'str'}, - 'quantity': {'key': 'quantity', 'type': 'int'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'effective_date_time': {'key': 'effectiveDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'expiry_date': {'key': 'expiryDate', 'type': 'date'}, - 'sku_description': {'key': 'skuDescription', 'type': 'str'}, - 'extended_status_info': {'key': 'extendedStatusInfo', 'type': 'ExtendedStatusInfo'}, - 'split_properties': {'key': 'splitProperties', 'type': 'ReservationSplitProperties'}, - 'merge_properties': {'key': 'mergeProperties', 'type': 'ReservationMergeProperties'}, - } - - def __init__(self, *, reserved_resource_type=None, instance_flexibility=None, display_name: str=None, applied_scopes=None, applied_scope_type=None, quantity: int=None, provisioning_state: str=None, effective_date_time=None, expiry_date=None, sku_description: str=None, extended_status_info=None, split_properties=None, merge_properties=None, **kwargs) -> None: - super(ReservationProperties, self).__init__(**kwargs) - self.reserved_resource_type = reserved_resource_type - self.instance_flexibility = instance_flexibility - self.display_name = display_name - self.applied_scopes = applied_scopes - self.applied_scope_type = applied_scope_type - self.quantity = quantity - self.provisioning_state = provisioning_state - self.effective_date_time = effective_date_time - self.last_updated_date_time = None - self.expiry_date = expiry_date - self.sku_description = sku_description - self.extended_status_info = extended_status_info - self.split_properties = split_properties - self.merge_properties = merge_properties diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_response.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_response.py deleted file mode 100644 index fc4d187fa104..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_response.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReservationResponse(Model): - """ReservationResponse. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location: The Azure Region where the reserved resource lives. - :vartype location: str - :param etag: - :type etag: int - :ivar id: Identifier of the reservation - :vartype id: str - :ivar name: Name of the reservation - :vartype name: str - :param sku: - :type sku: ~azure.mgmt.reservations.models.SkuName - :param properties: - :type properties: ~azure.mgmt.reservations.models.ReservationProperties - :ivar type: Type of resource. - "Microsoft.Capacity/reservationOrders/reservations" - :vartype type: str - """ - - _validation = { - 'location': {'readonly': True}, - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'int'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'SkuName'}, - 'properties': {'key': 'properties', 'type': 'ReservationProperties'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReservationResponse, self).__init__(**kwargs) - self.location = None - self.etag = kwargs.get('etag', None) - self.id = None - self.name = None - self.sku = kwargs.get('sku', None) - self.properties = kwargs.get('properties', None) - self.type = None diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_response_paged.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_response_paged.py deleted file mode 100644 index 96a57e713fb9..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_response_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ReservationResponsePaged(Paged): - """ - A paging container for iterating over a list of :class:`ReservationResponse ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReservationResponse]'} - } - - def __init__(self, *args, **kwargs): - - super(ReservationResponsePaged, self).__init__(*args, **kwargs) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_response_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_response_py3.py deleted file mode 100644 index b535d39329af..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_response_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReservationResponse(Model): - """ReservationResponse. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location: The Azure Region where the reserved resource lives. - :vartype location: str - :param etag: - :type etag: int - :ivar id: Identifier of the reservation - :vartype id: str - :ivar name: Name of the reservation - :vartype name: str - :param sku: - :type sku: ~azure.mgmt.reservations.models.SkuName - :param properties: - :type properties: ~azure.mgmt.reservations.models.ReservationProperties - :ivar type: Type of resource. - "Microsoft.Capacity/reservationOrders/reservations" - :vartype type: str - """ - - _validation = { - 'location': {'readonly': True}, - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'int'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'SkuName'}, - 'properties': {'key': 'properties', 'type': 'ReservationProperties'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, etag: int=None, sku=None, properties=None, **kwargs) -> None: - super(ReservationResponse, self).__init__(**kwargs) - self.location = None - self.etag = etag - self.id = None - self.name = None - self.sku = sku - self.properties = properties - self.type = None diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_split_properties.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_split_properties.py deleted file mode 100644 index bf6116d20550..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_split_properties.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReservationSplitProperties(Model): - """ReservationSplitProperties. - - :param split_destinations: List of destination Resource Id that are - created due to split. Format of the resource Id is - /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} - :type split_destinations: list[str] - :param split_source: Resource Id of the Reservation from which this is - split. Format of the resource Id is - /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} - :type split_source: str - """ - - _attribute_map = { - 'split_destinations': {'key': 'splitDestinations', 'type': '[str]'}, - 'split_source': {'key': 'splitSource', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReservationSplitProperties, self).__init__(**kwargs) - self.split_destinations = kwargs.get('split_destinations', None) - self.split_source = kwargs.get('split_source', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_split_properties_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_split_properties_py3.py deleted file mode 100644 index f3224ec7d648..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_split_properties_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReservationSplitProperties(Model): - """ReservationSplitProperties. - - :param split_destinations: List of destination Resource Id that are - created due to split. Format of the resource Id is - /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} - :type split_destinations: list[str] - :param split_source: Resource Id of the Reservation from which this is - split. Format of the resource Id is - /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} - :type split_source: str - """ - - _attribute_map = { - 'split_destinations': {'key': 'splitDestinations', 'type': '[str]'}, - 'split_source': {'key': 'splitSource', 'type': 'str'}, - } - - def __init__(self, *, split_destinations=None, split_source: str=None, **kwargs) -> None: - super(ReservationSplitProperties, self).__init__(**kwargs) - self.split_destinations = split_destinations - self.split_source = split_source diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/sku_name.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/sku_name.py deleted file mode 100644 index 7de914fa19dc..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/sku_name.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SkuName(Model): - """SkuName. - - :param name: - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SkuName, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/sku_name_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/sku_name_py3.py deleted file mode 100644 index 2eb49cb38c13..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/sku_name_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SkuName(Model): - """SkuName. - - :param name: - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(SkuName, self).__init__(**kwargs) - self.name = name diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/sku_property.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/sku_property.py deleted file mode 100644 index 623fe19202b2..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/sku_property.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SkuProperty(Model): - """SkuProperty. - - :param name: An invariant to describe the feature. - :type name: str - :param value: An invariant if the feature is measured by quantity. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SkuProperty, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/sku_property_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/sku_property_py3.py deleted file mode 100644 index bd9593bb9884..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/sku_property_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SkuProperty(Model): - """SkuProperty. - - :param name: An invariant to describe the feature. - :type name: str - :param value: An invariant if the feature is measured by quantity. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(SkuProperty, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/sku_restriction.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/sku_restriction.py deleted file mode 100644 index 4417bdb25b0f..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/sku_restriction.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SkuRestriction(Model): - """SkuRestriction. - - :param type: The type of restrictions. - :type type: str - :param values: The value of restrictions. If the restriction type is set - to location. This would be different locations where the SKU is - restricted. - :type values: list[str] - :param reason_code: The reason for restriction. - :type reason_code: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - 'reason_code': {'key': 'reasonCode', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SkuRestriction, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.values = kwargs.get('values', None) - self.reason_code = kwargs.get('reason_code', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/sku_restriction_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/sku_restriction_py3.py deleted file mode 100644 index cad7026cc099..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/sku_restriction_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SkuRestriction(Model): - """SkuRestriction. - - :param type: The type of restrictions. - :type type: str - :param values: The value of restrictions. If the restriction type is set - to location. This would be different locations where the SKU is - restricted. - :type values: list[str] - :param reason_code: The reason for restriction. - :type reason_code: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - 'reason_code': {'key': 'reasonCode', 'type': 'str'}, - } - - def __init__(self, *, type: str=None, values=None, reason_code: str=None, **kwargs) -> None: - super(SkuRestriction, self).__init__(**kwargs) - self.type = type - self.values = values - self.reason_code = reason_code diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/split_request.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/split_request.py deleted file mode 100644 index 4fc428a12cff..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/split_request.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SplitRequest(Model): - """SplitRequest. - - :param quantities: List of the quantities in the new reservations to - create. - :type quantities: list[int] - :param reservation_id: Resource id of the reservation to be split. Format - of the resource id should be - /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} - :type reservation_id: str - """ - - _attribute_map = { - 'quantities': {'key': 'properties.quantities', 'type': '[int]'}, - 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SplitRequest, self).__init__(**kwargs) - self.quantities = kwargs.get('quantities', None) - self.reservation_id = kwargs.get('reservation_id', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/split_request_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/split_request_py3.py deleted file mode 100644 index 3ccd7610f4af..000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/split_request_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SplitRequest(Model): - """SplitRequest. - - :param quantities: List of the quantities in the new reservations to - create. - :type quantities: list[int] - :param reservation_id: Resource id of the reservation to be split. Format - of the resource id should be - /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} - :type reservation_id: str - """ - - _attribute_map = { - 'quantities': {'key': 'properties.quantities', 'type': '[int]'}, - 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, - } - - def __init__(self, *, quantities=None, reservation_id: str=None, **kwargs) -> None: - super(SplitRequest, self).__init__(**kwargs) - self.quantities = quantities - self.reservation_id = reservation_id diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/__init__.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/__init__.py index ba1213ec2e29..0052075a8bfd 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/__init__.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/__init__.py @@ -9,12 +9,14 @@ # regenerated. # -------------------------------------------------------------------------- -from .reservation_order_operations import ReservationOrderOperations -from .reservation_operations import ReservationOperations -from .operation_operations import OperationOperations +from ._reservation_order_operations import ReservationOrderOperations +from ._reservation_operations import ReservationOperations +from ._operation_operations import OperationOperations +from ._azure_reservation_api_operations import AzureReservationAPIOperationsMixin __all__ = [ 'ReservationOrderOperations', 'ReservationOperations', 'OperationOperations', + 'AzureReservationAPIOperationsMixin', ] diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/azure_reservation_api.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_azure_reservation_api_operations.py similarity index 68% rename from sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/azure_reservation_api.py rename to sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_azure_reservation_api_operations.py index bbb58a7029d3..2042cafecbd2 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/azure_reservation_api.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_azure_reservation_api_operations.py @@ -9,83 +9,14 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION from msrest.pipeline import ClientRawResponse from msrest.polling import LROPoller, NoPolling from msrestazure.polling.arm_polling import ARMPolling +from .. import models import uuid -from .operations.reservation_order_operations import ReservationOrderOperations -from .operations.reservation_operations import ReservationOperations -from .operations.operation_operations import OperationOperations -from . import models -class AzureReservationAPIConfiguration(AzureConfiguration): - """Configuration for AzureReservationAPI - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param str base_url: Service URL - """ - - def __init__( - self, credentials, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(AzureReservationAPIConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-reservations/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - - -class AzureReservationAPI(SDKClient): - """This API describe Azure Reservation - - :ivar config: Configuration for client. - :vartype config: AzureReservationAPIConfiguration - - :ivar reservation_order: ReservationOrder operations - :vartype reservation_order: azure.mgmt.reservations.operations.ReservationOrderOperations - :ivar reservation: Reservation operations - :vartype reservation: azure.mgmt.reservations.operations.ReservationOperations - :ivar operation: Operation operations - :vartype operation: azure.mgmt.reservations.operations.OperationOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param str base_url: Service URL - """ - - def __init__( - self, credentials, base_url=None): - - self.config = AzureReservationAPIConfiguration(credentials, base_url) - super(AzureReservationAPI, 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 = '2019-04-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.reservation_order = ReservationOrderOperations( - self._client, self.config, self._serialize, self._deserialize) - self.reservation = ReservationOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operation = OperationOperations( - self._client, self.config, self._serialize, self._deserialize) +class AzureReservationAPIOperationsMixin(object): def get_catalog( self, subscription_id, reserved_resource_type, location=None, custom_headers=None, raw=False, **operation_config): @@ -143,7 +74,6 @@ def get_catalog( raise models.ErrorException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('[Catalog]', response) @@ -202,7 +132,6 @@ def get_applied_reservation_list( raise models.ErrorException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AppliedReservations', response) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/operation_operations.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_operation_operations.py similarity index 90% rename from sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/operation_operations.py rename to sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_operation_operations.py index b01679b60f33..ef16719e8372 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/operation_operations.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_operation_operations.py @@ -18,6 +18,8 @@ class OperationOperations(object): """OperationOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -53,8 +55,7 @@ def list( :raises: :class:`ErrorException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -79,6 +80,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -87,12 +93,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationResponsePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.Capacity/operations'} diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/reservation_operations.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_reservation_operations.py similarity index 96% rename from sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/reservation_operations.py rename to sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_reservation_operations.py index c999c29f0908..d3bafdb65aed 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/reservation_operations.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_reservation_operations.py @@ -20,6 +20,8 @@ class ReservationOperations(object): """ReservationOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -262,8 +264,7 @@ def list( :raises: :class:`ErrorException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -292,6 +293,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -300,18 +306,16 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ReservationResponsePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ReservationResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ReservationResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations'} def get( - self, reservation_id, reservation_order_id, custom_headers=None, raw=False, **operation_config): + self, reservation_id, reservation_order_id, expand=None, custom_headers=None, raw=False, **operation_config): """Get `Reservation` details. Get specific `Reservation` details. @@ -320,6 +324,8 @@ def get( :type reservation_id: str :param reservation_order_id: Order Id of the reservation :type reservation_order_id: str + :param expand: Supported value of this query is renewProperties + :type expand: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -342,6 +348,8 @@ def get( # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if expand is not None: + query_parameters['expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} @@ -361,7 +369,6 @@ def get( raise models.ErrorException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ReservationResponse', response) @@ -493,8 +500,7 @@ def list_revisions( :raises: :class:`ErrorException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_revisions.metadata['url'] @@ -524,6 +530,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -532,12 +543,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ReservationResponsePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ReservationResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ReservationResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_revisions.metadata = {'url': '/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/revisions'} diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/reservation_order_operations.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_reservation_order_operations.py similarity index 97% rename from sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/reservation_order_operations.py rename to sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_reservation_order_operations.py index 5cad1abaa67c..3d368fd4ec18 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/reservation_order_operations.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_reservation_order_operations.py @@ -20,6 +20,8 @@ class ReservationOrderOperations(object): """ReservationOrderOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -86,7 +88,6 @@ def calculate( raise models.ErrorException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CalculatePriceResponse', response) @@ -115,8 +116,7 @@ def list( :raises: :class:`ErrorException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -141,6 +141,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -149,12 +154,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ReservationOrderResponsePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ReservationOrderResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ReservationOrderResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.Capacity/reservationOrders'} @@ -307,7 +310,6 @@ def get( raise models.ErrorException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ReservationOrderResponse', response)