Skip to content

Commit 4d68955

Browse files
author
SDKAuto
committed
CodeGen from PR 30459 in Azure/azure-rest-api-specs
Merge 60d481f0ccaa47103dd5bcfa8508f9b16aff065d into 4e5b64a647cccbddbfac5c4a9635f751def8feb0
1 parent 6c63611 commit 4d68955

22 files changed

+183
-228
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb",
2+
"commit": "6a3a5dcf7d798b30084455dd380d9150bf679b52",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
66
"@autorest/[email protected]",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/billing/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/billing/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/billing/resource-manager/readme.md"
1111
}

sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "7.0.0"
9+
VERSION = "0.3.0"

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@
117117
from ._models_py3 import InvoicePropertiesBilledAmount
118118
from ._models_py3 import InvoicePropertiesCreditAmount
119119
from ._models_py3 import InvoicePropertiesFreeAzureCreditApplied
120-
from ._models_py3 import InvoicePropertiesRebillDetails
121120
from ._models_py3 import InvoicePropertiesRefundDetails
122121
from ._models_py3 import InvoicePropertiesSubTotal
123122
from ._models_py3 import InvoicePropertiesTaxAmount
@@ -445,7 +444,6 @@
445444
"InvoicePropertiesBilledAmount",
446445
"InvoicePropertiesCreditAmount",
447446
"InvoicePropertiesFreeAzureCreditApplied",
448-
"InvoicePropertiesRebillDetails",
449447
"InvoicePropertiesRefundDetails",
450448
"InvoicePropertiesSubTotal",
451449
"InvoicePropertiesTaxAmount",

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

Lines changed: 54 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -5189,7 +5189,7 @@ class BillingSubscriptionListResult(_serialization.Model):
51895189
:ivar next_link: The link (url) to the next page of results.
51905190
:vartype next_link: str
51915191
:ivar total_count: Total number of records.
5192-
:vartype total_count: int
5192+
:vartype total_count: float
51935193
:ivar value: The list of resources.
51945194
:vartype value: list[~azure.mgmt.billing.models.BillingSubscription]
51955195
"""
@@ -5202,7 +5202,7 @@ class BillingSubscriptionListResult(_serialization.Model):
52025202

52035203
_attribute_map = {
52045204
"next_link": {"key": "nextLink", "type": "str"},
5205-
"total_count": {"key": "totalCount", "type": "int"},
5205+
"total_count": {"key": "totalCount", "type": "float"},
52065206
"value": {"key": "value", "type": "[BillingSubscription]"},
52075207
}
52085208

@@ -7140,7 +7140,7 @@ class InvoiceProperties(_serialization.Model): # pylint: disable=too-many-insta
71407140
:ivar purchase_order_number: An optional purchase order number for the invoice.
71417141
:vartype purchase_order_number: str
71427142
:ivar rebill_details: Rebill details for an invoice.
7143-
:vartype rebill_details: ~azure.mgmt.billing.models.InvoicePropertiesRebillDetails
7143+
:vartype rebill_details: ~azure.mgmt.billing.models.RebillDetails
71447144
:ivar status: The current status of the invoice. Known values are: "Other", "Due", "OverDue",
71457145
"Paid", "Void", and "Locked".
71467146
:vartype status: str or ~azure.mgmt.billing.models.InvoiceStatus
@@ -7182,6 +7182,7 @@ class InvoiceProperties(_serialization.Model): # pylint: disable=too-many-insta
71827182
"is_monthly_invoice": {"readonly": True},
71837183
"payments": {"readonly": True},
71847184
"purchase_order_number": {"readonly": True},
7185+
"rebill_details": {"readonly": True},
71857186
"status": {"readonly": True},
71867187
"subscription_display_name": {"readonly": True},
71877188
"subscription_id": {"readonly": True},
@@ -7215,7 +7216,7 @@ class InvoiceProperties(_serialization.Model): # pylint: disable=too-many-insta
72157216
"is_monthly_invoice": {"key": "isMonthlyInvoice", "type": "bool"},
72167217
"payments": {"key": "payments", "type": "[Payment]"},
72177218
"purchase_order_number": {"key": "purchaseOrderNumber", "type": "str"},
7218-
"rebill_details": {"key": "rebillDetails", "type": "InvoicePropertiesRebillDetails"},
7219+
"rebill_details": {"key": "rebillDetails", "type": "RebillDetails"},
72197220
"status": {"key": "status", "type": "str"},
72207221
"subscription_display_name": {"key": "subscriptionDisplayName", "type": "str"},
72217222
"subscription_id": {"key": "subscriptionId", "type": "str"},
@@ -7234,7 +7235,6 @@ def __init__( # pylint: disable=too-many-locals
72347235
billed_amount: Optional["_models.InvoicePropertiesBilledAmount"] = None,
72357236
credit_amount: Optional["_models.InvoicePropertiesCreditAmount"] = None,
72367237
free_azure_credit_applied: Optional["_models.InvoicePropertiesFreeAzureCreditApplied"] = None,
7237-
rebill_details: Optional["_models.InvoicePropertiesRebillDetails"] = None,
72387238
sub_total: Optional["_models.InvoicePropertiesSubTotal"] = None,
72397239
tax_amount: Optional["_models.InvoicePropertiesTaxAmount"] = None,
72407240
total_amount: Optional["_models.InvoicePropertiesTotalAmount"] = None,
@@ -7258,8 +7258,6 @@ def __init__( # pylint: disable=too-many-locals
72587258
This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.
72597259
:paramtype free_azure_credit_applied:
72607260
~azure.mgmt.billing.models.InvoicePropertiesFreeAzureCreditApplied
7261-
:keyword rebill_details: Rebill details for an invoice.
7262-
:paramtype rebill_details: ~azure.mgmt.billing.models.InvoicePropertiesRebillDetails
72637261
:keyword sub_total: The pre-tax amount due. This field is applicable to billing accounts with
72647262
agreement type Microsoft Customer Agreement.
72657263
:paramtype sub_total: ~azure.mgmt.billing.models.InvoicePropertiesSubTotal
@@ -7293,7 +7291,7 @@ def __init__( # pylint: disable=too-many-locals
72937291
self.is_monthly_invoice = None
72947292
self.payments = None
72957293
self.purchase_order_number = None
7296-
self.rebill_details = rebill_details
7294+
self.rebill_details = None
72977295
self.status = None
72987296
self.subscription_display_name = None
72997297
self.subscription_id = None
@@ -7372,53 +7370,6 @@ class InvoicePropertiesFreeAzureCreditApplied(Amount):
73727370
"""
73737371

73747372

7375-
class RebillDetails(_serialization.Model):
7376-
"""The rebill details of an invoice.
7377-
7378-
Variables are only populated by the server, and will be ignored when sending a request.
7379-
7380-
:ivar invoice_document_id: The ID of invoice.
7381-
:vartype invoice_document_id: str
7382-
:ivar credit_note_document_id: The ID of credit note.
7383-
:vartype credit_note_document_id: str
7384-
:ivar rebill_details: The rebill details of an invoice.
7385-
:vartype rebill_details: ~azure.mgmt.billing.models.RebillDetails
7386-
"""
7387-
7388-
_validation = {
7389-
"invoice_document_id": {"readonly": True},
7390-
"credit_note_document_id": {"readonly": True},
7391-
"rebill_details": {"readonly": True},
7392-
}
7393-
7394-
_attribute_map = {
7395-
"invoice_document_id": {"key": "invoiceDocumentId", "type": "str"},
7396-
"credit_note_document_id": {"key": "creditNoteDocumentId", "type": "str"},
7397-
"rebill_details": {"key": "rebillDetails", "type": "RebillDetails"},
7398-
}
7399-
7400-
def __init__(self, **kwargs: Any) -> None:
7401-
""" """
7402-
super().__init__(**kwargs)
7403-
self.invoice_document_id = None
7404-
self.credit_note_document_id = None
7405-
self.rebill_details = None
7406-
7407-
7408-
class InvoicePropertiesRebillDetails(RebillDetails):
7409-
"""Rebill details for an invoice.
7410-
7411-
Variables are only populated by the server, and will be ignored when sending a request.
7412-
7413-
:ivar invoice_document_id: The ID of invoice.
7414-
:vartype invoice_document_id: str
7415-
:ivar credit_note_document_id: The ID of credit note.
7416-
:vartype credit_note_document_id: str
7417-
:ivar rebill_details: The rebill details of an invoice.
7418-
:vartype rebill_details: ~azure.mgmt.billing.models.RebillDetails
7419-
"""
7420-
7421-
74227373
class RefundDetailsSummary(_serialization.Model):
74237374
"""The details of refund request.
74247375

@@ -9679,6 +9630,39 @@ def __init__(
96799630
self.applied_scope_properties = applied_scope_properties
96809631

96819632

9633+
class RebillDetails(_serialization.Model):
9634+
"""The rebill details of an invoice.
9635+
9636+
Variables are only populated by the server, and will be ignored when sending a request.
9637+
9638+
:ivar invoice_document_id: The ID of invoice.
9639+
:vartype invoice_document_id: str
9640+
:ivar credit_note_document_id: The ID of credit note.
9641+
:vartype credit_note_document_id: str
9642+
:ivar rebill_details: The rebill details of an invoice.
9643+
:vartype rebill_details: ~azure.mgmt.billing.models.RebillDetails
9644+
"""
9645+
9646+
_validation = {
9647+
"invoice_document_id": {"readonly": True},
9648+
"credit_note_document_id": {"readonly": True},
9649+
"rebill_details": {"readonly": True},
9650+
}
9651+
9652+
_attribute_map = {
9653+
"invoice_document_id": {"key": "invoiceDocumentId", "type": "str"},
9654+
"credit_note_document_id": {"key": "creditNoteDocumentId", "type": "str"},
9655+
"rebill_details": {"key": "rebillDetails", "type": "RebillDetails"},
9656+
}
9657+
9658+
def __init__(self, **kwargs: Any) -> None:
9659+
""" """
9660+
super().__init__(**kwargs)
9661+
self.invoice_document_id = None
9662+
self.credit_note_document_id = None
9663+
self.rebill_details = None
9664+
9665+
96829666
class RecipientTransferDetails(ProxyResourceWithTags): # pylint: disable=too-many-instance-attributes
96839667
"""Details of the transfer.
96849668

@@ -10901,19 +10885,13 @@ class ReservationPurchaseRequest(_serialization.Model): # pylint: disable=too-m
1090110885
:ivar renew: Setting this to true will automatically purchase a new benefit on the expiration
1090210886
date time.
1090310887
:vartype renew: bool
10904-
:ivar instance_flexibility_properties_instance_flexibility: Allows reservation discount to be
10905-
applied across skus within the same auto fit group. Not all skus support instance size
10906-
flexibility. Known values are: "On" and "Off".
10907-
:vartype instance_flexibility_properties_instance_flexibility: str or
10908-
~azure.mgmt.billing.models.InstanceFlexibility
1090910888
:ivar review_date_time: This is the date-time when the Azure hybrid benefit needs to be
1091010889
reviewed.
1091110890
:vartype review_date_time: ~datetime.datetime
10912-
:ivar instance_flexibility_properties_reserved_resource_properties_instance_flexibility:
10913-
Turning this on will apply the reservation discount to other VMs in the same VM size group.
10914-
Only specify for VirtualMachines reserved resource type. Known values are: "On" and "Off".
10915-
:vartype instance_flexibility_properties_reserved_resource_properties_instance_flexibility: str
10916-
or ~azure.mgmt.billing.models.InstanceFlexibility
10891+
:ivar instance_flexibility: Turning this on will apply the reservation discount to other VMs in
10892+
the same VM size group. Only specify for VirtualMachines reserved resource type. Known values
10893+
are: "On" and "Off".
10894+
:vartype instance_flexibility: str or ~azure.mgmt.billing.models.InstanceFlexibility
1091710895
"""
1091810896

1091910897
_validation = {
@@ -10938,15 +10916,8 @@ class ReservationPurchaseRequest(_serialization.Model): # pylint: disable=too-m
1093810916
"type": "ReservationAppliedScopeProperties",
1093910917
},
1094010918
"renew": {"key": "properties.renew", "type": "bool"},
10941-
"instance_flexibility_properties_instance_flexibility": {
10942-
"key": "properties.instanceFlexibility",
10943-
"type": "str",
10944-
},
1094510919
"review_date_time": {"key": "properties.reviewDateTime", "type": "iso-8601"},
10946-
"instance_flexibility_properties_reserved_resource_properties_instance_flexibility": {
10947-
"key": "properties.reservedResourceProperties.instanceFlexibility",
10948-
"type": "str",
10949-
},
10920+
"instance_flexibility": {"key": "properties.reservedResourceProperties.instanceFlexibility", "type": "str"},
1095010921
}
1095110922

1095210923
def __init__(
@@ -10961,13 +10932,8 @@ def __init__(
1096110932
applied_scopes: Optional[List[str]] = None,
1096210933
applied_scope_properties: Optional["_models.ReservationAppliedScopeProperties"] = None,
1096310934
renew: bool = False,
10964-
instance_flexibility_properties_instance_flexibility: Optional[
10965-
Union[str, "_models.InstanceFlexibility"]
10966-
] = None,
1096710935
review_date_time: Optional[datetime.datetime] = None,
10968-
instance_flexibility_properties_reserved_resource_properties_instance_flexibility: Optional[
10969-
Union[str, "_models.InstanceFlexibility"]
10970-
] = None,
10936+
instance_flexibility: Optional[Union[str, "_models.InstanceFlexibility"]] = None,
1097110937
**kwargs: Any
1097210938
) -> None:
1097310939
"""
@@ -10996,19 +10962,13 @@ def __init__(
1099610962
:keyword renew: Setting this to true will automatically purchase a new benefit on the
1099710963
expiration date time.
1099810964
:paramtype renew: bool
10999-
:keyword instance_flexibility_properties_instance_flexibility: Allows reservation discount to
11000-
be applied across skus within the same auto fit group. Not all skus support instance size
11001-
flexibility. Known values are: "On" and "Off".
11002-
:paramtype instance_flexibility_properties_instance_flexibility: str or
11003-
~azure.mgmt.billing.models.InstanceFlexibility
1100410965
:keyword review_date_time: This is the date-time when the Azure hybrid benefit needs to be
1100510966
reviewed.
1100610967
:paramtype review_date_time: ~datetime.datetime
11007-
:keyword instance_flexibility_properties_reserved_resource_properties_instance_flexibility:
11008-
Turning this on will apply the reservation discount to other VMs in the same VM size group.
11009-
Only specify for VirtualMachines reserved resource type. Known values are: "On" and "Off".
11010-
:paramtype instance_flexibility_properties_reserved_resource_properties_instance_flexibility:
11011-
str or ~azure.mgmt.billing.models.InstanceFlexibility
10968+
:keyword instance_flexibility: Turning this on will apply the reservation discount to other VMs
10969+
in the same VM size group. Only specify for VirtualMachines reserved resource type. Known
10970+
values are: "On" and "Off".
10971+
:paramtype instance_flexibility: str or ~azure.mgmt.billing.models.InstanceFlexibility
1101210972
"""
1101310973
super().__init__(**kwargs)
1101410974
self.sku = sku
@@ -11023,11 +10983,8 @@ def __init__(
1102310983
self.applied_scopes = applied_scopes
1102410984
self.applied_scope_properties = applied_scope_properties
1102510985
self.renew = renew
11026-
self.instance_flexibility_properties_instance_flexibility = instance_flexibility_properties_instance_flexibility
1102710986
self.review_date_time = review_date_time
11028-
self.instance_flexibility_properties_reserved_resource_properties_instance_flexibility = (
11029-
instance_flexibility_properties_reserved_resource_properties_instance_flexibility
11030-
)
10987+
self.instance_flexibility = instance_flexibility
1103110988

1103210989

1103310990
class ReservationSkuProperty(_serialization.Model):
@@ -12455,7 +12412,7 @@ class TransactionProperties(_serialization.Model): # pylint: disable=too-many-i
1245512412
:ivar billing_currency: The ISO 4217 code for the currency in which this transaction is billed.
1245612413
:vartype billing_currency: str
1245712414
:ivar billing_profile_display_name: The name of the billing profile.
12458-
:vartype billing_profile_display_name: any
12415+
:vartype billing_profile_display_name: str
1245912416
:ivar billing_profile_id: The fully qualified ID that uniquely identifies a billing profile.
1246012417
:vartype billing_profile_id: str
1246112418
:ivar consumption_commitment_decremented: The amount of Microsoft Azure Consumption
@@ -12547,7 +12504,7 @@ class TransactionProperties(_serialization.Model): # pylint: disable=too-many-i
1254712504
"azure_credit_applied": {"key": "azureCreditApplied", "type": "TransactionPropertiesAzureCreditApplied"},
1254812505
"azure_plan": {"key": "azurePlan", "type": "str"},
1254912506
"billing_currency": {"key": "billingCurrency", "type": "str"},
12550-
"billing_profile_display_name": {"key": "billingProfileDisplayName", "type": "object"},
12507+
"billing_profile_display_name": {"key": "billingProfileDisplayName", "type": "str"},
1255112508
"billing_profile_id": {"key": "billingProfileId", "type": "str"},
1255212509
"consumption_commitment_decremented": {
1255312510
"key": "consumptionCommitmentDecremented",
@@ -12597,7 +12554,7 @@ def __init__( # pylint: disable=too-many-locals
1259712554
azure_credit_applied: Optional["_models.TransactionPropertiesAzureCreditApplied"] = None,
1259812555
azure_plan: Optional[str] = None,
1259912556
billing_currency: Optional[str] = None,
12600-
billing_profile_display_name: Optional[Any] = None,
12557+
billing_profile_display_name: Optional[str] = None,
1260112558
billing_profile_id: Optional[str] = None,
1260212559
consumption_commitment_decremented: Optional[
1260312560
"_models.TransactionPropertiesConsumptionCommitmentDecremented"
@@ -12648,7 +12605,7 @@ def __init__( # pylint: disable=too-many-locals
1264812605
billed.
1264912606
:paramtype billing_currency: str
1265012607
:keyword billing_profile_display_name: The name of the billing profile.
12651-
:paramtype billing_profile_display_name: any
12608+
:paramtype billing_profile_display_name: str
1265212609
:keyword billing_profile_id: The fully qualified ID that uniquely identifies a billing profile.
1265312610
:paramtype billing_profile_id: str
1265412611
:keyword consumption_commitment_decremented: The amount of Microsoft Azure Consumption

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def build_get_by_billing_profile_request(
9090
pattern=r"^([0-9]+|([Pp][Cc][Nn]\.[A-Za-z0-9]+)|[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}(:[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}_[0-9]{4}(-[0-9]{2}){2})?)$",
9191
),
9292
"billingProfileName": _SERIALIZER.url(
93-
"billing_profile_name", billing_profile_name, "str", pattern=r"^[a-zA-Z\d-_]{1,128}$"
93+
"billing_profile_name", billing_profile_name, "str", pattern=r"^[a-zA-Z0-9-_]{1,128}$"
9494
),
9595
}
9696

0 commit comments

Comments
 (0)