Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[AutoPR reservations/resource-manager] [Hub Generated] Review request for Microsoft.Capacity to add version preview/2019-04-01 #4916

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions azure-mgmt-reservations/azure/mgmt/reservations/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@
from .extended_status_info_py3 import ExtendedStatusInfo
from .reservation_split_properties_py3 import ReservationSplitProperties
from .reservation_merge_properties_py3 import ReservationMergeProperties
from .purchase_request_properties_reserved_resource_properties_py3 import PurchaseRequestPropertiesReservedResourceProperties
from .purchase_request_py3 import PurchaseRequest
from .renew_properties_response_locked_price_total_py3 import RenewPropertiesResponseLockedPriceTotal
from .renew_properties_response_links_py3 import RenewPropertiesResponseLinks
from .renew_properties_response_py3 import RenewPropertiesResponse
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 @@ -43,16 +46,19 @@
from .extended_status_info import ExtendedStatusInfo
from .reservation_split_properties import ReservationSplitProperties
from .reservation_merge_properties import ReservationMergeProperties
from .purchase_request_properties_reserved_resource_properties import PurchaseRequestPropertiesReservedResourceProperties
from .purchase_request import PurchaseRequest
from .renew_properties_response_locked_price_total import RenewPropertiesResponseLockedPriceTotal
from .renew_properties_response_links import RenewPropertiesResponseLinks
from .renew_properties_response import RenewPropertiesResponse
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 @@ -81,16 +87,19 @@
'ExtendedStatusInfo',
'ReservationSplitProperties',
'ReservationMergeProperties',
'PurchaseRequestPropertiesReservedResourceProperties',
'PurchaseRequest',
'RenewPropertiesResponseLockedPriceTotal',
'RenewPropertiesResponseLinks',
'RenewPropertiesResponse',
'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 @@ -20,6 +20,10 @@ class Patch(Model):
~azure.mgmt.reservations.models.AppliedScopeType
:param applied_scopes:
:type applied_scopes: list[str]
:param renew:
:type renew: bool
:param renew_properties:
:type renew_properties: ~azure.mgmt.reservations.models.PurchaseRequest
:param instance_flexibility: Possible values include: 'On', 'Off'
:type instance_flexibility: str or
~azure.mgmt.reservations.models.InstanceFlexibility
Expand All @@ -30,6 +34,8 @@ class Patch(Model):
_attribute_map = {
'applied_scope_type': {'key': 'properties.appliedScopeType', 'type': 'str'},
'applied_scopes': {'key': 'properties.appliedScopes', 'type': '[str]'},
'renew': {'key': 'properties.renew', 'type': 'bool'},
'renew_properties': {'key': 'properties.renewProperties', 'type': 'PurchaseRequest'},
'instance_flexibility': {'key': 'properties.instanceFlexibility', 'type': 'str'},
'name': {'key': 'properties.name', 'type': 'str'},
}
Expand All @@ -38,5 +44,7 @@ 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.renew = kwargs.get('renew', None)
self.renew_properties = kwargs.get('renew_properties', None)
self.instance_flexibility = kwargs.get('instance_flexibility', None)
self.name = kwargs.get('name', None)
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ class Patch(Model):
~azure.mgmt.reservations.models.AppliedScopeType
:param applied_scopes:
:type applied_scopes: list[str]
:param renew:
:type renew: bool
:param renew_properties:
:type renew_properties: ~azure.mgmt.reservations.models.PurchaseRequest
:param instance_flexibility: Possible values include: 'On', 'Off'
:type instance_flexibility: str or
~azure.mgmt.reservations.models.InstanceFlexibility
Expand All @@ -30,13 +34,17 @@ class Patch(Model):
_attribute_map = {
'applied_scope_type': {'key': 'properties.appliedScopeType', 'type': 'str'},
'applied_scopes': {'key': 'properties.appliedScopes', 'type': '[str]'},
'renew': {'key': 'properties.renew', 'type': 'bool'},
'renew_properties': {'key': 'properties.renewProperties', 'type': 'PurchaseRequest'},
'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:
def __init__(self, *, applied_scope_type=None, applied_scopes=None, renew: bool=None, renew_properties=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.renew = renew
self.renew_properties = renew_properties
self.instance_flexibility = instance_flexibility
self.name = name
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class PurchaseRequest(Model):
~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:
Expand All @@ -52,6 +54,7 @@ class PurchaseRequest(Model):
'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'},
}

Expand All @@ -66,4 +69,5 @@ def __init__(self, **kwargs):
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)
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class PurchaseRequest(Model):
~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:
Expand All @@ -52,10 +54,11 @@ class PurchaseRequest(Model):
'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, reserved_resource_properties=None, **kwargs) -> None:
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
Expand All @@ -66,4 +69,5 @@ def __init__(self, *, sku=None, location: str=None, reserved_resource_type=None,
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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 RenewPropertiesResponse(Model):
"""RenewPropertiesResponse.

:param purchase_properties:
:type purchase_properties: ~azure.mgmt.reservations.models.PurchaseRequest
:param locked_price_total: Locked currency & amount for new reservation
purchase at the time of renewal. Price is locked 30 days before expiry
date time if renew is true.
:type locked_price_total:
~azure.mgmt.reservations.models.RenewPropertiesResponseLockedPriceTotal
:param links: Contains prev and next reservation Ids' because of renewal.
:type links: ~azure.mgmt.reservations.models.RenewPropertiesResponseLinks
"""

_attribute_map = {
'purchase_properties': {'key': 'purchaseProperties', 'type': 'PurchaseRequest'},
'locked_price_total': {'key': 'lockedPriceTotal', 'type': 'RenewPropertiesResponseLockedPriceTotal'},
'links': {'key': 'links', 'type': 'RenewPropertiesResponseLinks'},
}

def __init__(self, **kwargs):
super(RenewPropertiesResponse, self).__init__(**kwargs)
self.purchase_properties = kwargs.get('purchase_properties', None)
self.locked_price_total = kwargs.get('locked_price_total', None)
self.links = kwargs.get('links', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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 RenewPropertiesResponseLinks(Model):
"""Contains prev and next reservation Ids' because of renewal.

: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
"""

_attribute_map = {
'renew_source': {'key': 'renewSource', 'type': 'str'},
'renew_destination': {'key': 'renewDestination', 'type': 'str'},
}

def __init__(self, **kwargs):
super(RenewPropertiesResponseLinks, self).__init__(**kwargs)
self.renew_source = kwargs.get('renew_source', None)
self.renew_destination = kwargs.get('renew_destination', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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 RenewPropertiesResponseLinks(Model):
"""Contains prev and next reservation Ids' because of renewal.

: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
"""

_attribute_map = {
'renew_source': {'key': 'renewSource', 'type': 'str'},
'renew_destination': {'key': 'renewDestination', 'type': 'str'},
}

def __init__(self, *, renew_source: str=None, renew_destination: str=None, **kwargs) -> None:
super(RenewPropertiesResponseLinks, self).__init__(**kwargs)
self.renew_source = renew_source
self.renew_destination = renew_destination
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 RenewPropertiesResponseLockedPriceTotal(Model):
"""Locked currency & amount for new reservation purchase at the time of
renewal. Price is locked 30 days before expiry date time if renew is true.

:param currency_code:
:type currency_code: str
:param amount:
:type amount: str
"""

_attribute_map = {
'currency_code': {'key': 'currencyCode', 'type': 'str'},
'amount': {'key': 'amount', 'type': 'str'},
}

def __init__(self, **kwargs):
super(RenewPropertiesResponseLockedPriceTotal, 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 RenewPropertiesResponseLockedPriceTotal(Model):
"""Locked currency & amount for new reservation purchase at the time of
renewal. Price is locked 30 days before expiry date time if renew is true.

:param currency_code:
:type currency_code: str
:param amount:
:type amount: str
"""

_attribute_map = {
'currency_code': {'key': 'currencyCode', 'type': 'str'},
'amount': {'key': 'amount', 'type': 'str'},
}

def __init__(self, *, currency_code: str=None, amount: str=None, **kwargs) -> None:
super(RenewPropertiesResponseLockedPriceTotal, self).__init__(**kwargs)
self.currency_code = currency_code
self.amount = amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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 RenewPropertiesResponse(Model):
"""RenewPropertiesResponse.

:param purchase_properties:
:type purchase_properties: ~azure.mgmt.reservations.models.PurchaseRequest
:param locked_price_total: Locked currency & amount for new reservation
purchase at the time of renewal. Price is locked 30 days before expiry
date time if renew is true.
:type locked_price_total:
~azure.mgmt.reservations.models.RenewPropertiesResponseLockedPriceTotal
:param links: Contains prev and next reservation Ids' because of renewal.
:type links: ~azure.mgmt.reservations.models.RenewPropertiesResponseLinks
"""

_attribute_map = {
'purchase_properties': {'key': 'purchaseProperties', 'type': 'PurchaseRequest'},
'locked_price_total': {'key': 'lockedPriceTotal', 'type': 'RenewPropertiesResponseLockedPriceTotal'},
'links': {'key': 'links', 'type': 'RenewPropertiesResponseLinks'},
}

def __init__(self, *, purchase_properties=None, locked_price_total=None, links=None, **kwargs) -> None:
super(RenewPropertiesResponse, self).__init__(**kwargs)
self.purchase_properties = purchase_properties
self.locked_price_total = locked_price_total
self.links = links
Loading