Skip to content

Commit

Permalink
[AutoPR reservations/resource-manager] [Hub Generated] Review request…
Browse files Browse the repository at this point in the history
… for Microsoft.Capacity to add version 2019-04-01 (#4590)

* Generated from 7dc9733827a5e8f86614319c9b6756ec8aa11dc8

long running operation

* Packaging update of azure-mgmt-reservations

* Generated from 286d851c9a3c7101d44152f7fa706369b31299d6

update api version

* Generated from 4908a3829756b457cb0b7a0261a04dbd2598c7a2

fix ref

* Generated from 78a2d4b2c9d236f784254c1d5dcb9ff1e3033bda

change parameter name

* Generated from 6afc6414e898ac8b2ae326f70ca82f5fc865bd34

descriptions

* Generated from 71c3c06d880ad26fdf9bd0fb512096e110b897b7

updated description

* Generated from b95fb24f7cf665582d599709c431aedbe20e824f

minor description update

* Packaging update of azure-mgmt-reservations
  • Loading branch information
AutorestCI authored Apr 5, 2019
1 parent 62d9426 commit 9db8bf0
Show file tree
Hide file tree
Showing 28 changed files with 699 additions and 47 deletions.
1 change: 1 addition & 0 deletions azure-mgmt-reservations/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py
Expand Down
19 changes: 0 additions & 19 deletions azure-mgmt-reservations/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell
pip freeze
If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell
pip uninstall azure
Usage
=====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __init__(
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 = '2018-06-01'
self.api_version = '2019-04-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down
18 changes: 18 additions & 0 deletions azure-mgmt-reservations/azure/mgmt/reservations/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@
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
Expand All @@ -40,7 +46,13 @@
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
Expand Down Expand Up @@ -72,7 +84,13 @@
'ReservationProperties',
'ReservationResponse',
'ReservationOrderResponse',
'CalculatePriceResponsePropertiesBillingCurrencyTotal',
'CalculatePriceResponsePropertiesPricingCurrencyTotal',
'CalculatePriceResponseProperties',
'CalculatePriceResponse',
'PurchaseRequestPropertiesReservedResourceProperties',
'MergeRequest',
'PurchaseRequest',
'Patch',
'SplitRequest',
'ExtendedErrorInfo',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,12 @@ class ReservedResourceType(str, Enum):
sql_databases = "SqlDatabases"
suse_linux = "SuseLinux"
cosmos_db = "CosmosDb"
red_hat = "RedHat"


class InstanceFlexibility(str, Enum):

on = "On"
off = "Off"
not_supported = "NotSupported"
true = "true"
false = "false"


class AppliedScopeType(str, Enum):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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)
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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
Loading

0 comments on commit 9db8bf0

Please sign in to comment.