Skip to content

Commit 015ffd6

Browse files
SDKAutoBraden Watkins
SDKAuto
and
Braden Watkins
committed
CodeGen from PR 12275 in Azure/azure-rest-api-specs
Added move validation enum values & fix S360 linting issues (Azure#12275) * Added new move product validation error codes * Added integer formats to fix S360 swagger lint validation * Fixed ModelValidation errors for v2018-11-01-preview Co-authored-by: Braden Watkins <[email protected]>
1 parent 98988d2 commit 015ffd6

File tree

4 files changed

+49
-25
lines changed

4 files changed

+49
-25
lines changed

sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_billing_management_client_enums.py

+17-5
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,26 @@ class AddressValidationStatus(str, Enum):
2020

2121
class SubscriptionTransferValidationErrorCode(str, Enum):
2222

23+
billing_account_inactive = "BillingAccountInactive"
24+
cross_billing_account_not_allowed = "CrossBillingAccountNotAllowed"
25+
destination_billing_profile_inactive = "DestinationBillingProfileInactive"
26+
destination_billing_profile_not_found = "DestinationBillingProfileNotFound"
27+
destination_billing_profile_past_due = "DestinationBillingProfilePastDue"
28+
destination_invoice_section_inactive = "DestinationInvoiceSectionInactive"
29+
destination_invoice_section_not_found = "DestinationInvoiceSectionNotFound"
30+
insufficient_permission_on_destination = "InsufficientPermissionOnDestination"
31+
insufficient_permission_on_source = "InsufficientPermissionOnSource"
32+
invalid_destination = "InvalidDestination"
2333
invalid_source = "InvalidSource"
34+
marketplace_not_enabled_on_destination = "MarketplaceNotEnabledOnDestination"
35+
not_available_for_destination_market = "NotAvailableForDestinationMarket"
36+
product_inactive = "ProductInactive"
37+
product_not_found = "ProductNotFound"
38+
product_type_not_supported = "ProductTypeNotSupported"
39+
source_billing_profile_past_due = "SourceBillingProfilePastDue"
40+
source_invoice_section_inactive = "SourceInvoiceSectionInactive"
2441
subscription_not_active = "SubscriptionNotActive"
25-
insufficient_permission_on_source = "InsufficientPermissionOnSource"
26-
insufficient_permission_on_destination = "InsufficientPermissionOnDestination"
27-
destination_billing_profile_past_due = "DestinationBillingProfilePastDue"
2842
subscription_type_not_supported = "SubscriptionTypeNotSupported"
29-
cross_billing_account_not_allowed = "CrossBillingAccountNotAllowed"
30-
not_available_for_destination_market = "NotAvailableForDestinationMarket"
3143

3244

3345
class AgreementType(str, Enum):

sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_models.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -2828,10 +2828,16 @@ class ValidateSubscriptionTransferEligibilityError(Model):
28282828
"""Error details of the transfer eligibility validation.
28292829
28302830
:param code: Error code for the product transfer validation. Possible
2831-
values include: 'InvalidSource', 'SubscriptionNotActive',
2832-
'InsufficientPermissionOnSource', 'InsufficientPermissionOnDestination',
2833-
'DestinationBillingProfilePastDue', 'SubscriptionTypeNotSupported',
2834-
'CrossBillingAccountNotAllowed', 'NotAvailableForDestinationMarket'
2831+
values include: 'BillingAccountInactive', 'CrossBillingAccountNotAllowed',
2832+
'DestinationBillingProfileInactive', 'DestinationBillingProfileNotFound',
2833+
'DestinationBillingProfilePastDue', 'DestinationInvoiceSectionInactive',
2834+
'DestinationInvoiceSectionNotFound',
2835+
'InsufficientPermissionOnDestination', 'InsufficientPermissionOnSource',
2836+
'InvalidDestination', 'InvalidSource',
2837+
'MarketplaceNotEnabledOnDestination', 'NotAvailableForDestinationMarket',
2838+
'ProductInactive', 'ProductNotFound', 'ProductTypeNotSupported',
2839+
'SourceBillingProfilePastDue', 'SourceInvoiceSectionInactive',
2840+
'SubscriptionNotActive', 'SubscriptionTypeNotSupported'
28352841
:type code: str or
28362842
~azure.mgmt.billing.models.SubscriptionTransferValidationErrorCode
28372843
:param message: The error message.

sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_models_py3.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -2828,10 +2828,16 @@ class ValidateSubscriptionTransferEligibilityError(Model):
28282828
"""Error details of the transfer eligibility validation.
28292829
28302830
:param code: Error code for the product transfer validation. Possible
2831-
values include: 'InvalidSource', 'SubscriptionNotActive',
2832-
'InsufficientPermissionOnSource', 'InsufficientPermissionOnDestination',
2833-
'DestinationBillingProfilePastDue', 'SubscriptionTypeNotSupported',
2834-
'CrossBillingAccountNotAllowed', 'NotAvailableForDestinationMarket'
2831+
values include: 'BillingAccountInactive', 'CrossBillingAccountNotAllowed',
2832+
'DestinationBillingProfileInactive', 'DestinationBillingProfileNotFound',
2833+
'DestinationBillingProfilePastDue', 'DestinationInvoiceSectionInactive',
2834+
'DestinationInvoiceSectionNotFound',
2835+
'InsufficientPermissionOnDestination', 'InsufficientPermissionOnSource',
2836+
'InvalidDestination', 'InvalidSource',
2837+
'MarketplaceNotEnabledOnDestination', 'NotAvailableForDestinationMarket',
2838+
'ProductInactive', 'ProductNotFound', 'ProductTypeNotSupported',
2839+
'SourceBillingProfilePastDue', 'SourceInvoiceSectionInactive',
2840+
'SubscriptionNotActive', 'SubscriptionTypeNotSupported'
28352841
:type code: str or
28362842
~azure.mgmt.billing.models.SubscriptionTransferValidationErrorCode
28372843
:param message: The error message.

sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_invoices_operations.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -431,10 +431,10 @@ def get_long_running_output(response):
431431
download_invoice.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download'}
432432

433433

434-
def _download_multiple_modern_invoice_initial(
434+
def _download_multiple_billing_profile_invoices_initial(
435435
self, billing_account_name, download_urls, custom_headers=None, raw=False, **operation_config):
436436
# Construct URL
437-
url = self.download_multiple_modern_invoice.metadata['url']
437+
url = self.download_multiple_billing_profile_invoices.metadata['url']
438438
path_format_arguments = {
439439
'billingAccountName': self._serialize.url("billing_account_name", billing_account_name, 'str')
440440
}
@@ -482,9 +482,9 @@ def _download_multiple_modern_invoice_initial(
482482

483483
return deserialized
484484

485-
def download_multiple_modern_invoice(
485+
def download_multiple_billing_profile_invoices(
486486
self, billing_account_name, download_urls, custom_headers=None, raw=False, polling=True, **operation_config):
487-
"""Gets a URL to download an multiple invoices documents (invoice pdf, tax
487+
"""Gets a URL to download multiple invoice documents (invoice pdf, tax
488488
receipts, credit notes) as a zip file. The operation is supported for
489489
billing accounts with agreement type Microsoft Partner Agreement or
490490
Microsoft Customer Agreement.
@@ -509,7 +509,7 @@ def download_multiple_modern_invoice(
509509
:raises:
510510
:class:`ErrorResponseException<azure.mgmt.billing.models.ErrorResponseException>`
511511
"""
512-
raw_result = self._download_multiple_modern_invoice_initial(
512+
raw_result = self._download_multiple_billing_profile_invoices_initial(
513513
billing_account_name=billing_account_name,
514514
download_urls=download_urls,
515515
custom_headers=custom_headers,
@@ -538,7 +538,7 @@ def get_long_running_output(response):
538538
elif polling is False: polling_method = NoPolling()
539539
else: polling_method = polling
540540
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
541-
download_multiple_modern_invoice.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/downloadDocuments'}
541+
download_multiple_billing_profile_invoices.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/downloadDocuments'}
542542

543543
def list_by_billing_subscription(
544544
self, period_start_date, period_end_date, custom_headers=None, raw=False, **operation_config):
@@ -773,10 +773,10 @@ def get_long_running_output(response):
773773
download_billing_subscription_invoice.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}/download'}
774774

775775

776-
def _download_multiple_billing_subscription_invoice_initial(
776+
def _download_multiple_billing_subscription_invoices_initial(
777777
self, download_urls, custom_headers=None, raw=False, **operation_config):
778778
# Construct URL
779-
url = self.download_multiple_billing_subscription_invoice.metadata['url']
779+
url = self.download_multiple_billing_subscription_invoices.metadata['url']
780780
path_format_arguments = {
781781
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
782782
}
@@ -824,9 +824,9 @@ def _download_multiple_billing_subscription_invoice_initial(
824824

825825
return deserialized
826826

827-
def download_multiple_billing_subscription_invoice(
827+
def download_multiple_billing_subscription_invoices(
828828
self, download_urls, custom_headers=None, raw=False, polling=True, **operation_config):
829-
"""Gets a URL to download multiple invoices documents (invoice pdf, tax
829+
"""Gets a URL to download multiple invoice documents (invoice pdf, tax
830830
receipts, credit notes) as a zip file.
831831
832832
:param download_urls: An array of download urls for individual
@@ -846,7 +846,7 @@ def download_multiple_billing_subscription_invoice(
846846
:raises:
847847
:class:`ErrorResponseException<azure.mgmt.billing.models.ErrorResponseException>`
848848
"""
849-
raw_result = self._download_multiple_billing_subscription_invoice_initial(
849+
raw_result = self._download_multiple_billing_subscription_invoices_initial(
850850
download_urls=download_urls,
851851
custom_headers=custom_headers,
852852
raw=True,
@@ -874,4 +874,4 @@ def get_long_running_output(response):
874874
elif polling is False: polling_method = NoPolling()
875875
else: polling_method = polling
876876
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
877-
download_multiple_billing_subscription_invoice.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/downloadDocuments'}
877+
download_multiple_billing_subscription_invoices.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/downloadDocuments'}

0 commit comments

Comments
 (0)