diff --git a/sdk/billing/Azure.ResourceManager.Billing/api/Azure.ResourceManager.Billing.netstandard2.0.cs b/sdk/billing/Azure.ResourceManager.Billing/api/Azure.ResourceManager.Billing.netstandard2.0.cs index 1e9b558efbe6..99659f828678 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/api/Azure.ResourceManager.Billing.netstandard2.0.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/api/Azure.ResourceManager.Billing.netstandard2.0.cs @@ -142,6 +142,7 @@ public BillingSubscriptionAliasData() { } public string ConsumptionCostCenter { get { throw null; } set { } } public string CustomerDisplayName { get { throw null; } } public string CustomerId { get { throw null; } set { } } + public string CustomerName { get { throw null; } } public string DisplayName { get { throw null; } set { } } public string EnrollmentAccountDisplayName { get { throw null; } } public string EnrollmentAccountId { get { throw null; } } @@ -208,6 +209,7 @@ public BillingSubscriptionData() { } public string ConsumptionCostCenter { get { throw null; } set { } } public string CustomerDisplayName { get { throw null; } } public string CustomerId { get { throw null; } set { } } + public string CustomerName { get { throw null; } } public string DisplayName { get { throw null; } set { } } public string EnrollmentAccountDisplayName { get { throw null; } } public string EnrollmentAccountId { get { throw null; } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSubscriptionAliasData.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSubscriptionAliasData.cs index 562ce1bf865b..82860e106abd 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSubscriptionAliasData.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSubscriptionAliasData.cs @@ -41,6 +41,7 @@ public BillingSubscriptionAliasData() /// The cost center applied to the subscription. This field is only available for consumption subscriptions of Microsoft Customer Agreement Type billing accounts. /// The ID of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner Agreement billing accounts. /// The name of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner Agreement billing accounts. + /// The name of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner Agreement billing accounts. /// The name of the subscription. /// The enrollment Account ID associated with the subscription. This field is available only for the Enterprise Agreement billing accounts. /// The enrollment Account name associated with the subscription. This field is available only for the Enterprise Agreement billing accounts. @@ -69,7 +70,7 @@ public BillingSubscriptionAliasData() /// The current enrollment account status of the subscription. This field is available only for the Enterprise Agreement billing accounts. /// The enrollment Account and the subscription association start date. This field is available only for the Enterprise Agreement billing accounts. /// The ID of the billing subscription with the subscription alias. - internal BillingSubscriptionAliasData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BillingSubscriptionAutoRenewState? autoRenew, string beneficiaryTenantId, string billingFrequency, ResourceIdentifier billingProfileId, IReadOnlyDictionary billingPolicies, string billingProfileDisplayName, string billingProfileName, string consumptionCostCenter, string customerId, string customerDisplayName, string displayName, string enrollmentAccountId, string enrollmentAccountDisplayName, ResourceIdentifier invoiceSectionId, string invoiceSectionDisplayName, string invoiceSectionName, BillingAmount lastMonthCharges, BillingAmount monthToDateCharges, NextBillingCycleDetails nextBillingCycleDetails, string offerId, string productCategory, string productType, string productTypeId, DateTimeOffset? purchaseOn, long? quantity, CreatedSubscriptionReseller reseller, SubscriptionRenewalTermDetails renewalTermDetails, string skuDescription, string skuId, BillingSubscriptionStatus? status, string subscriptionId, IReadOnlyList suspensionReasons, TimeSpan? termDuration, DateTimeOffset? termStartOn, DateTimeOffset? termEndOn, SubscriptionEnrollmentAccountStatus? subscriptionEnrollmentAccountStatus, DateTimeOffset? enrollmentAccountStartOn, ResourceIdentifier billingSubscriptionId) : base(id, name, resourceType, systemData) + internal BillingSubscriptionAliasData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BillingSubscriptionAutoRenewState? autoRenew, string beneficiaryTenantId, string billingFrequency, ResourceIdentifier billingProfileId, IReadOnlyDictionary billingPolicies, string billingProfileDisplayName, string billingProfileName, string consumptionCostCenter, string customerId, string customerDisplayName, string customerName, string displayName, string enrollmentAccountId, string enrollmentAccountDisplayName, ResourceIdentifier invoiceSectionId, string invoiceSectionDisplayName, string invoiceSectionName, BillingAmount lastMonthCharges, BillingAmount monthToDateCharges, NextBillingCycleDetails nextBillingCycleDetails, string offerId, string productCategory, string productType, string productTypeId, DateTimeOffset? purchaseOn, long? quantity, CreatedSubscriptionReseller reseller, SubscriptionRenewalTermDetails renewalTermDetails, string skuDescription, string skuId, BillingSubscriptionStatus? status, string subscriptionId, IReadOnlyList suspensionReasons, TimeSpan? termDuration, DateTimeOffset? termStartOn, DateTimeOffset? termEndOn, SubscriptionEnrollmentAccountStatus? subscriptionEnrollmentAccountStatus, DateTimeOffset? enrollmentAccountStartOn, ResourceIdentifier billingSubscriptionId) : base(id, name, resourceType, systemData) { AutoRenew = autoRenew; BeneficiaryTenantId = beneficiaryTenantId; @@ -81,6 +82,7 @@ internal BillingSubscriptionAliasData(ResourceIdentifier id, string name, Resour ConsumptionCostCenter = consumptionCostCenter; CustomerId = customerId; CustomerDisplayName = customerDisplayName; + CustomerName = customerName; DisplayName = displayName; EnrollmentAccountId = enrollmentAccountId; EnrollmentAccountDisplayName = enrollmentAccountDisplayName; @@ -131,6 +133,8 @@ internal BillingSubscriptionAliasData(ResourceIdentifier id, string name, Resour public string CustomerId { get; set; } /// The name of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner Agreement billing accounts. public string CustomerDisplayName { get; } + /// The name of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner Agreement billing accounts. + public string CustomerName { get; } /// The name of the subscription. public string DisplayName { get; set; } /// The enrollment Account ID associated with the subscription. This field is available only for the Enterprise Agreement billing accounts. diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSubscriptionData.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSubscriptionData.cs index d8735674a962..f2fc17932d9d 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSubscriptionData.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSubscriptionData.cs @@ -41,6 +41,7 @@ public BillingSubscriptionData() /// The cost center applied to the subscription. This field is only available for consumption subscriptions of Microsoft Customer Agreement Type billing accounts. /// The ID of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner Agreement billing accounts. /// The name of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner Agreement billing accounts. + /// The name of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner Agreement billing accounts. /// The name of the subscription. /// The enrollment Account ID associated with the subscription. This field is available only for the Enterprise Agreement billing accounts. /// The enrollment Account name associated with the subscription. This field is available only for the Enterprise Agreement billing accounts. @@ -68,7 +69,7 @@ public BillingSubscriptionData() /// The end date of the term in UTC time. /// The current enrollment account status of the subscription. This field is available only for the Enterprise Agreement billing accounts. /// The enrollment Account and the subscription association start date. This field is available only for the Enterprise Agreement billing accounts. - internal BillingSubscriptionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BillingSubscriptionAutoRenewState? autoRenew, string beneficiaryTenantId, string billingFrequency, ResourceIdentifier billingProfileId, IReadOnlyDictionary billingPolicies, string billingProfileDisplayName, string billingProfileName, string consumptionCostCenter, string customerId, string customerDisplayName, string displayName, string enrollmentAccountId, string enrollmentAccountDisplayName, ResourceIdentifier invoiceSectionId, string invoiceSectionDisplayName, string invoiceSectionName, BillingAmount lastMonthCharges, BillingAmount monthToDateCharges, NextBillingCycleDetails nextBillingCycleDetails, string offerId, string productCategory, string productType, string productTypeId, DateTimeOffset? purchaseOn, long? quantity, CreatedSubscriptionReseller reseller, SubscriptionRenewalTermDetails renewalTermDetails, string skuDescription, string skuId, BillingSubscriptionStatus? status, string subscriptionId, IReadOnlyList suspensionReasons, TimeSpan? termDuration, DateTimeOffset? termStartOn, DateTimeOffset? termEndOn, SubscriptionEnrollmentAccountStatus? subscriptionEnrollmentAccountStatus, DateTimeOffset? enrollmentAccountStartOn) : base(id, name, resourceType, systemData) + internal BillingSubscriptionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BillingSubscriptionAutoRenewState? autoRenew, string beneficiaryTenantId, string billingFrequency, ResourceIdentifier billingProfileId, IReadOnlyDictionary billingPolicies, string billingProfileDisplayName, string billingProfileName, string consumptionCostCenter, string customerId, string customerDisplayName, string customerName, string displayName, string enrollmentAccountId, string enrollmentAccountDisplayName, ResourceIdentifier invoiceSectionId, string invoiceSectionDisplayName, string invoiceSectionName, BillingAmount lastMonthCharges, BillingAmount monthToDateCharges, NextBillingCycleDetails nextBillingCycleDetails, string offerId, string productCategory, string productType, string productTypeId, DateTimeOffset? purchaseOn, long? quantity, CreatedSubscriptionReseller reseller, SubscriptionRenewalTermDetails renewalTermDetails, string skuDescription, string skuId, BillingSubscriptionStatus? status, string subscriptionId, IReadOnlyList suspensionReasons, TimeSpan? termDuration, DateTimeOffset? termStartOn, DateTimeOffset? termEndOn, SubscriptionEnrollmentAccountStatus? subscriptionEnrollmentAccountStatus, DateTimeOffset? enrollmentAccountStartOn) : base(id, name, resourceType, systemData) { AutoRenew = autoRenew; BeneficiaryTenantId = beneficiaryTenantId; @@ -80,6 +81,7 @@ internal BillingSubscriptionData(ResourceIdentifier id, string name, ResourceTyp ConsumptionCostCenter = consumptionCostCenter; CustomerId = customerId; CustomerDisplayName = customerDisplayName; + CustomerName = customerName; DisplayName = displayName; EnrollmentAccountId = enrollmentAccountId; EnrollmentAccountDisplayName = enrollmentAccountDisplayName; @@ -129,6 +131,8 @@ internal BillingSubscriptionData(ResourceIdentifier id, string name, ResourceTyp public string CustomerId { get; set; } /// The name of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner Agreement billing accounts. public string CustomerDisplayName { get; } + /// The name of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner Agreement billing accounts. + public string CustomerName { get; } /// The name of the subscription. public string DisplayName { get; set; } /// The enrollment Account ID associated with the subscription. This field is available only for the Enterprise Agreement billing accounts. diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/Models/BillingSubscriptionAliasData.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/Models/BillingSubscriptionAliasData.Serialization.cs index 4a4f9ed99600..e016d84e1358 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/Models/BillingSubscriptionAliasData.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/Models/BillingSubscriptionAliasData.Serialization.cs @@ -108,6 +108,7 @@ internal static BillingSubscriptionAliasData DeserializeBillingSubscriptionAlias Optional consumptionCostCenter = default; Optional customerId = default; Optional customerDisplayName = default; + Optional customerName = default; Optional displayName = default; Optional enrollmentAccountId = default; Optional enrollmentAccountDisplayName = default; @@ -238,6 +239,11 @@ internal static BillingSubscriptionAliasData DeserializeBillingSubscriptionAlias customerDisplayName = property0.Value.GetString(); continue; } + if (property0.NameEquals("customerName"u8)) + { + customerName = property0.Value.GetString(); + continue; + } if (property0.NameEquals("displayName"u8)) { displayName = property0.Value.GetString(); @@ -463,7 +469,7 @@ internal static BillingSubscriptionAliasData DeserializeBillingSubscriptionAlias continue; } } - return new BillingSubscriptionAliasData(id, name, type, systemData.Value, Optional.ToNullable(autoRenew), beneficiaryTenantId.Value, billingFrequency.Value, billingProfileId.Value, Optional.ToDictionary(billingPolicies), billingProfileDisplayName.Value, billingProfileName.Value, consumptionCostCenter.Value, customerId.Value, customerDisplayName.Value, displayName.Value, enrollmentAccountId.Value, enrollmentAccountDisplayName.Value, invoiceSectionId.Value, invoiceSectionDisplayName.Value, invoiceSectionName.Value, lastMonthCharges.Value, monthToDateCharges.Value, nextBillingCycleDetails.Value, offerId.Value, productCategory.Value, productType.Value, productTypeId.Value, Optional.ToNullable(purchaseDate), Optional.ToNullable(quantity), reseller.Value, renewalTermDetails.Value, skuDescription.Value, skuId.Value, Optional.ToNullable(status), subscriptionId.Value, Optional.ToList(suspensionReasons), Optional.ToNullable(termDuration), Optional.ToNullable(termStartDate), Optional.ToNullable(termEndDate), Optional.ToNullable(subscriptionEnrollmentAccountStatus), Optional.ToNullable(enrollmentAccountStartDate), billingSubscriptionId.Value); + return new BillingSubscriptionAliasData(id, name, type, systemData.Value, Optional.ToNullable(autoRenew), beneficiaryTenantId.Value, billingFrequency.Value, billingProfileId.Value, Optional.ToDictionary(billingPolicies), billingProfileDisplayName.Value, billingProfileName.Value, consumptionCostCenter.Value, customerId.Value, customerDisplayName.Value, customerName.Value, displayName.Value, enrollmentAccountId.Value, enrollmentAccountDisplayName.Value, invoiceSectionId.Value, invoiceSectionDisplayName.Value, invoiceSectionName.Value, lastMonthCharges.Value, monthToDateCharges.Value, nextBillingCycleDetails.Value, offerId.Value, productCategory.Value, productType.Value, productTypeId.Value, Optional.ToNullable(purchaseDate), Optional.ToNullable(quantity), reseller.Value, renewalTermDetails.Value, skuDescription.Value, skuId.Value, Optional.ToNullable(status), subscriptionId.Value, Optional.ToList(suspensionReasons), Optional.ToNullable(termDuration), Optional.ToNullable(termStartDate), Optional.ToNullable(termEndDate), Optional.ToNullable(subscriptionEnrollmentAccountStatus), Optional.ToNullable(enrollmentAccountStartDate), billingSubscriptionId.Value); } } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/Models/BillingSubscriptionData.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/Models/BillingSubscriptionData.Serialization.cs index b5995a8b8b2d..c3a358714301 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/Models/BillingSubscriptionData.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/Models/BillingSubscriptionData.Serialization.cs @@ -108,6 +108,7 @@ internal static BillingSubscriptionData DeserializeBillingSubscriptionData(JsonE Optional consumptionCostCenter = default; Optional customerId = default; Optional customerDisplayName = default; + Optional customerName = default; Optional displayName = default; Optional enrollmentAccountId = default; Optional enrollmentAccountDisplayName = default; @@ -237,6 +238,11 @@ internal static BillingSubscriptionData DeserializeBillingSubscriptionData(JsonE customerDisplayName = property0.Value.GetString(); continue; } + if (property0.NameEquals("customerName"u8)) + { + customerName = property0.Value.GetString(); + continue; + } if (property0.NameEquals("displayName"u8)) { displayName = property0.Value.GetString(); @@ -453,7 +459,7 @@ internal static BillingSubscriptionData DeserializeBillingSubscriptionData(JsonE continue; } } - return new BillingSubscriptionData(id, name, type, systemData.Value, Optional.ToNullable(autoRenew), beneficiaryTenantId.Value, billingFrequency.Value, billingProfileId.Value, Optional.ToDictionary(billingPolicies), billingProfileDisplayName.Value, billingProfileName.Value, consumptionCostCenter.Value, customerId.Value, customerDisplayName.Value, displayName.Value, enrollmentAccountId.Value, enrollmentAccountDisplayName.Value, invoiceSectionId.Value, invoiceSectionDisplayName.Value, invoiceSectionName.Value, lastMonthCharges.Value, monthToDateCharges.Value, nextBillingCycleDetails.Value, offerId.Value, productCategory.Value, productType.Value, productTypeId.Value, Optional.ToNullable(purchaseDate), Optional.ToNullable(quantity), reseller.Value, renewalTermDetails.Value, skuDescription.Value, skuId.Value, Optional.ToNullable(status), subscriptionId.Value, Optional.ToList(suspensionReasons), Optional.ToNullable(termDuration), Optional.ToNullable(termStartDate), Optional.ToNullable(termEndDate), Optional.ToNullable(subscriptionEnrollmentAccountStatus), Optional.ToNullable(enrollmentAccountStartDate)); + return new BillingSubscriptionData(id, name, type, systemData.Value, Optional.ToNullable(autoRenew), beneficiaryTenantId.Value, billingFrequency.Value, billingProfileId.Value, Optional.ToDictionary(billingPolicies), billingProfileDisplayName.Value, billingProfileName.Value, consumptionCostCenter.Value, customerId.Value, customerDisplayName.Value, customerName.Value, displayName.Value, enrollmentAccountId.Value, enrollmentAccountDisplayName.Value, invoiceSectionId.Value, invoiceSectionDisplayName.Value, invoiceSectionName.Value, lastMonthCharges.Value, monthToDateCharges.Value, nextBillingCycleDetails.Value, offerId.Value, productCategory.Value, productType.Value, productTypeId.Value, Optional.ToNullable(purchaseDate), Optional.ToNullable(quantity), reseller.Value, renewalTermDetails.Value, skuDescription.Value, skuId.Value, Optional.ToNullable(status), subscriptionId.Value, Optional.ToList(suspensionReasons), Optional.ToNullable(termDuration), Optional.ToNullable(termStartDate), Optional.ToNullable(termEndDate), Optional.ToNullable(subscriptionEnrollmentAccountStatus), Optional.ToNullable(enrollmentAccountStartDate)); } } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/Models/BillingSubscriptionsListResult.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/Models/BillingSubscriptionsListResult.Serialization.cs index 6d614f400211..c921274104db 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/Models/BillingSubscriptionsListResult.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/Models/BillingSubscriptionsListResult.Serialization.cs @@ -21,6 +21,7 @@ internal static BillingSubscriptionsListResult DeserializeBillingSubscriptionsLi return null; } Optional> value = default; + Optional totalCount = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -38,13 +39,22 @@ internal static BillingSubscriptionsListResult DeserializeBillingSubscriptionsLi value = array; continue; } + if (property.NameEquals("totalCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + totalCount = property.Value.GetInt32(); + continue; + } if (property.NameEquals("nextLink"u8)) { nextLink = property.Value.GetString(); continue; } } - return new BillingSubscriptionsListResult(Optional.ToList(value), nextLink.Value); + return new BillingSubscriptionsListResult(Optional.ToList(value), Optional.ToNullable(totalCount), nextLink.Value); } } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/Models/BillingSubscriptionsListResult.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/Models/BillingSubscriptionsListResult.cs index 0b5a95bb008b..5f00ca05dee8 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/Models/BillingSubscriptionsListResult.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/Models/BillingSubscriptionsListResult.cs @@ -22,15 +22,19 @@ internal BillingSubscriptionsListResult() /// Initializes a new instance of BillingSubscriptionsListResult. /// The list of billing subscriptions. + /// Total number of records. /// The link (url) to the next page of results. - internal BillingSubscriptionsListResult(IReadOnlyList value, string nextLink) + internal BillingSubscriptionsListResult(IReadOnlyList value, int? totalCount, string nextLink) { Value = value; + TotalCount = totalCount; NextLink = nextLink; } /// The list of billing subscriptions. public IReadOnlyList Value { get; } + /// Total number of records. + public int? TotalCount { get; } /// The link (url) to the next page of results. public string NextLink { get; } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/autorest.md b/sdk/billing/Azure.ResourceManager.Billing/src/autorest.md index cf0ef8246d28..a1fd67a6c40d 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/autorest.md +++ b/sdk/billing/Azure.ResourceManager.Billing/src/autorest.md @@ -9,7 +9,7 @@ generate-model-factory: false csharp: true library-name: Billing namespace: Azure.ResourceManager.Billing -require: https://github.com/Azure/azure-rest-api-specs/blob/6b08774c89877269e73e11ac3ecbd1bd4e14f5a0/specification/billing/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/billing/resource-manager/readme.md tag: package-2021-10 output-folder: $(this-folder)/Generated clear-output-folder: true