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 billing/resource-manager] [Hub Generated] Review request for Microsoft.Billing to add version preview/2018-11-01-preview #5654

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
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
from .transfer_billing_subscription_result_py3 import TransferBillingSubscriptionResult
from .transfer_billing_subscription_request_properties_py3 import TransferBillingSubscriptionRequestProperties
from .transfer_billing_subscription_request_py3 import TransferBillingSubscriptionRequest
from .validate_subscription_transfer_eligibility_error_py3 import ValidateSubscriptionTransferEligibilityError
from .validate_subscription_transfer_eligibility_result_py3 import ValidateSubscriptionTransferEligibilityResult
from .update_auto_renew_operation_summary_py3 import UpdateAutoRenewOperationSummary
from .enabled_azure_sk_us_py3 import EnabledAzureSKUs
from .billing_profile_py3 import BillingProfile
Expand Down Expand Up @@ -52,6 +54,8 @@
from .invoice_list_result_py3 import InvoiceListResult
from .product_summary_py3 import ProductSummary
from .products_list_result_py3 import ProductsListResult
from .validate_product_transfer_eligibility_error_py3 import ValidateProductTransferEligibilityError
from .validate_product_transfer_eligibility_result_py3 import ValidateProductTransferEligibilityResult
from .billing_subscription_summary_py3 import BillingSubscriptionSummary
from .billing_subscriptions_list_result_py3 import BillingSubscriptionsListResult
from .enrollment_account_context_py3 import EnrollmentAccountContext
Expand Down Expand Up @@ -88,6 +92,8 @@
from .transfer_billing_subscription_result import TransferBillingSubscriptionResult
from .transfer_billing_subscription_request_properties import TransferBillingSubscriptionRequestProperties
from .transfer_billing_subscription_request import TransferBillingSubscriptionRequest
from .validate_subscription_transfer_eligibility_error import ValidateSubscriptionTransferEligibilityError
from .validate_subscription_transfer_eligibility_result import ValidateSubscriptionTransferEligibilityResult
from .update_auto_renew_operation_summary import UpdateAutoRenewOperationSummary
from .enabled_azure_sk_us import EnabledAzureSKUs
from .billing_profile import BillingProfile
Expand Down Expand Up @@ -117,6 +123,8 @@
from .invoice_list_result import InvoiceListResult
from .product_summary import ProductSummary
from .products_list_result import ProductsListResult
from .validate_product_transfer_eligibility_error import ValidateProductTransferEligibilityError
from .validate_product_transfer_eligibility_result import ValidateProductTransferEligibilityResult
from .billing_subscription_summary import BillingSubscriptionSummary
from .billing_subscriptions_list_result import BillingSubscriptionsListResult
from .enrollment_account_context import EnrollmentAccountContext
Expand Down Expand Up @@ -152,8 +160,10 @@
TransferStatus,
ProductTransferStatus,
EligibleProductType,
SubscriptionTransferValidationErrorCode,
ProductStatusType,
BillingFrequency,
ProductTransferValidationErrorCode,
BillingSubscriptionStatusType,
TransactionTypeKind,
ReservationType,
Expand All @@ -176,6 +186,8 @@
'TransferBillingSubscriptionResult',
'TransferBillingSubscriptionRequestProperties',
'TransferBillingSubscriptionRequest',
'ValidateSubscriptionTransferEligibilityError',
'ValidateSubscriptionTransferEligibilityResult',
'UpdateAutoRenewOperationSummary',
'EnabledAzureSKUs',
'BillingProfile',
Expand Down Expand Up @@ -205,6 +217,8 @@
'InvoiceListResult',
'ProductSummary',
'ProductsListResult',
'ValidateProductTransferEligibilityError',
'ValidateProductTransferEligibilityResult',
'BillingSubscriptionSummary',
'BillingSubscriptionsListResult',
'EnrollmentAccountContext',
Expand Down Expand Up @@ -239,8 +253,10 @@
'TransferStatus',
'ProductTransferStatus',
'EligibleProductType',
'SubscriptionTransferValidationErrorCode',
'ProductStatusType',
'BillingFrequency',
'ProductTransferValidationErrorCode',
'BillingSubscriptionStatusType',
'TransactionTypeKind',
'ReservationType',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ class EligibleProductType(str, Enum):
azure_reservation = "AzureReservation"


class SubscriptionTransferValidationErrorCode(str, Enum):

invalid_source = "InvalidSource"
subscription_not_active = "SubscriptionNotActive"
insufficient_permission_on_source = "InsufficientPermissionOnSource"
insufficient_permission_on_destination = "InsufficientPermissionOnDestination"
destination_billing_profile_past_due = "DestinationBillingProfilePastDue"
subscription_type_not_supported = "SubscriptionTypeNotSupported"
cross_billing_account_not_allowed = "CrossBillingAccountNotAllowed"
not_available_for_destination_market = "NotAvailableForDestinationMarket"


class ProductStatusType(str, Enum):

active = "Active"
Expand All @@ -69,6 +81,19 @@ class BillingFrequency(str, Enum):
usage_based = "UsageBased"


class ProductTransferValidationErrorCode(str, Enum):

invalid_source = "InvalidSource"
product_not_active = "ProductNotActive"
insufficient_permission_on_source = "InsufficientPermissionOnSource"
insufficient_permission_on_destination = "InsufficientPermissionOnDestination"
destination_billing_profile_past_due = "DestinationBillingProfilePastDue"
product_type_not_supported = "ProductTypeNotSupported"
cross_billing_account_not_allowed = "CrossBillingAccountNotAllowed"
not_available_for_destination_market = "NotAvailableForDestinationMarket"
one_time_purchase_product_transfer_not_allowed = "OneTimePurchaseProductTransferNotAllowed"


class BillingSubscriptionStatusType(str, Enum):

active = "Active"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ class TransferBillingSubscriptionRequest(Model):

:param destination_invoice_section_id: The destination invoice section id.
:type destination_invoice_section_id: str
:param destination_billing_profile_id: The destination billing profile id.
:type destination_billing_profile_id: str
"""

_attribute_map = {
'destination_invoice_section_id': {'key': 'properties.destinationInvoiceSectionId', 'type': 'str'},
'destination_billing_profile_id': {'key': 'properties.destinationBillingProfileId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(TransferBillingSubscriptionRequest, self).__init__(**kwargs)
self.destination_invoice_section_id = kwargs.get('destination_invoice_section_id', None)
self.destination_billing_profile_id = kwargs.get('destination_billing_profile_id', None)
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ class TransferBillingSubscriptionRequestProperties(Model):

:param destination_invoice_section_id: The destination invoice section id.
:type destination_invoice_section_id: str
:param destination_billing_profile_id: The destination billing profile id.
:type destination_billing_profile_id: str
"""

_attribute_map = {
'destination_invoice_section_id': {'key': 'destinationInvoiceSectionId', 'type': 'str'},
'destination_billing_profile_id': {'key': 'destinationBillingProfileId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(TransferBillingSubscriptionRequestProperties, self).__init__(**kwargs)
self.destination_invoice_section_id = kwargs.get('destination_invoice_section_id', None)
self.destination_billing_profile_id = kwargs.get('destination_billing_profile_id', None)
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ class TransferBillingSubscriptionRequestProperties(Model):

:param destination_invoice_section_id: The destination invoice section id.
:type destination_invoice_section_id: str
:param destination_billing_profile_id: The destination billing profile id.
:type destination_billing_profile_id: str
"""

_attribute_map = {
'destination_invoice_section_id': {'key': 'destinationInvoiceSectionId', 'type': 'str'},
'destination_billing_profile_id': {'key': 'destinationBillingProfileId', 'type': 'str'},
}

def __init__(self, *, destination_invoice_section_id: str=None, **kwargs) -> None:
def __init__(self, *, destination_invoice_section_id: str=None, destination_billing_profile_id: str=None, **kwargs) -> None:
super(TransferBillingSubscriptionRequestProperties, self).__init__(**kwargs)
self.destination_invoice_section_id = destination_invoice_section_id
self.destination_billing_profile_id = destination_billing_profile_id
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ class TransferBillingSubscriptionRequest(Model):

:param destination_invoice_section_id: The destination invoice section id.
:type destination_invoice_section_id: str
:param destination_billing_profile_id: The destination billing profile id.
:type destination_billing_profile_id: str
"""

_attribute_map = {
'destination_invoice_section_id': {'key': 'properties.destinationInvoiceSectionId', 'type': 'str'},
'destination_billing_profile_id': {'key': 'properties.destinationBillingProfileId', 'type': 'str'},
}

def __init__(self, *, destination_invoice_section_id: str=None, **kwargs) -> None:
def __init__(self, *, destination_invoice_section_id: str=None, destination_billing_profile_id: str=None, **kwargs) -> None:
super(TransferBillingSubscriptionRequest, self).__init__(**kwargs)
self.destination_invoice_section_id = destination_invoice_section_id
self.destination_billing_profile_id = destination_billing_profile_id
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@
class TransferProductRequestProperties(Model):
"""The properties of the product to initiate a transfer.

:param destination_invoice_section_id: Destination invoice section id.
:param destination_invoice_section_id: The destination invoice section id.
:type destination_invoice_section_id: str
:param destination_billing_profile_id: The destination billing profile id.
:type destination_billing_profile_id: str
"""

_attribute_map = {
'destination_invoice_section_id': {'key': 'destinationInvoiceSectionId', 'type': 'str'},
'destination_billing_profile_id': {'key': 'destinationBillingProfileId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(TransferProductRequestProperties, self).__init__(**kwargs)
self.destination_invoice_section_id = kwargs.get('destination_invoice_section_id', None)
self.destination_billing_profile_id = kwargs.get('destination_billing_profile_id', None)
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@
class TransferProductRequestProperties(Model):
"""The properties of the product to initiate a transfer.

:param destination_invoice_section_id: Destination invoice section id.
:param destination_invoice_section_id: The destination invoice section id.
:type destination_invoice_section_id: str
:param destination_billing_profile_id: The destination billing profile id.
:type destination_billing_profile_id: str
"""

_attribute_map = {
'destination_invoice_section_id': {'key': 'destinationInvoiceSectionId', 'type': 'str'},
'destination_billing_profile_id': {'key': 'destinationBillingProfileId', 'type': 'str'},
}

def __init__(self, *, destination_invoice_section_id: str=None, **kwargs) -> None:
def __init__(self, *, destination_invoice_section_id: str=None, destination_billing_profile_id: str=None, **kwargs) -> None:
super(TransferProductRequestProperties, self).__init__(**kwargs)
self.destination_invoice_section_id = destination_invoice_section_id
self.destination_billing_profile_id = destination_billing_profile_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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 ValidateProductTransferEligibilityError(Model):
"""Error details of the product transfer eligibility validation.

:param code: Error code for the product transfer validation. Possible
values include: 'InvalidSource', 'ProductNotActive',
'InsufficientPermissionOnSource', 'InsufficientPermissionOnDestination',
'DestinationBillingProfilePastDue', 'ProductTypeNotSupported',
'CrossBillingAccountNotAllowed', 'NotAvailableForDestinationMarket',
'OneTimePurchaseProductTransferNotAllowed'
:type code: str or
~azure.mgmt.billing.models.ProductTransferValidationErrorCode
:param message: The error message.
:type message: str
:param details: Detailed error message explaining the error.
:type details: str
"""

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'details': {'key': 'details', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ValidateProductTransferEligibilityError, self).__init__(**kwargs)
self.code = kwargs.get('code', None)
self.message = kwargs.get('message', None)
self.details = kwargs.get('details', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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 ValidateProductTransferEligibilityError(Model):
"""Error details of the product transfer eligibility validation.

:param code: Error code for the product transfer validation. Possible
values include: 'InvalidSource', 'ProductNotActive',
'InsufficientPermissionOnSource', 'InsufficientPermissionOnDestination',
'DestinationBillingProfilePastDue', 'ProductTypeNotSupported',
'CrossBillingAccountNotAllowed', 'NotAvailableForDestinationMarket',
'OneTimePurchaseProductTransferNotAllowed'
:type code: str or
~azure.mgmt.billing.models.ProductTransferValidationErrorCode
:param message: The error message.
:type message: str
:param details: Detailed error message explaining the error.
:type details: str
"""

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'details': {'key': 'details', 'type': 'str'},
}

def __init__(self, *, code=None, message: str=None, details: str=None, **kwargs) -> None:
super(ValidateProductTransferEligibilityError, self).__init__(**kwargs)
self.code = code
self.message = message
self.details = details
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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 ValidateProductTransferEligibilityResult(Model):
"""Result of the product transfer eligibility validation.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar is_transfer_eligible: Specifies whether the transfer is eligible or
not.
:vartype is_transfer_eligible: bool
:param error_details: Validation error details.
:type error_details:
~azure.mgmt.billing.models.ValidateProductTransferEligibilityError
"""

_validation = {
'is_transfer_eligible': {'readonly': True},
}

_attribute_map = {
'is_transfer_eligible': {'key': 'isTransferEligible', 'type': 'bool'},
'error_details': {'key': 'errorDetails', 'type': 'ValidateProductTransferEligibilityError'},
}

def __init__(self, **kwargs):
super(ValidateProductTransferEligibilityResult, self).__init__(**kwargs)
self.is_transfer_eligible = None
self.error_details = kwargs.get('error_details', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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 ValidateProductTransferEligibilityResult(Model):
"""Result of the product transfer eligibility validation.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar is_transfer_eligible: Specifies whether the transfer is eligible or
not.
:vartype is_transfer_eligible: bool
:param error_details: Validation error details.
:type error_details:
~azure.mgmt.billing.models.ValidateProductTransferEligibilityError
"""

_validation = {
'is_transfer_eligible': {'readonly': True},
}

_attribute_map = {
'is_transfer_eligible': {'key': 'isTransferEligible', 'type': 'bool'},
'error_details': {'key': 'errorDetails', 'type': 'ValidateProductTransferEligibilityError'},
}

def __init__(self, *, error_details=None, **kwargs) -> None:
super(ValidateProductTransferEligibilityResult, self).__init__(**kwargs)
self.is_transfer_eligible = None
self.error_details = error_details
Loading