From b2c02417e2fd6d7b5be36f4b60d698b5498ffb70 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 15 Apr 2021 22:39:13 +0000 Subject: [PATCH] CodeGen from PR 13968 in Azure/azure-rest-api-specs Merge fafa5c84a424f1ed79af746e7948c2cc39ee2f66 into 3112400a973ae3ff181fb23bd2b1f7b23c48c770 --- .../CHANGELOG.md | 3 +- .../README.md | 4 +- .../azure-resourcemanager-consumption/pom.xml | 2 +- .../consumption/fluent/CreditsClient.java | 18 +-- .../fluent/EventsOperationsClient.java | 20 +-- .../fluent/LotsOperationsClient.java | 18 +-- .../consumption/fluent/PriceSheetsClient.java | 10 +- ...eservationRecommendationDetailsClient.java | 14 +- .../fluent/models/CreditSummaryInner.java | 49 ------ .../fluent/models/EventSummaryInner.java | 140 ------------------ .../fluent/models/LotSummaryInner.java | 86 ----------- .../fluent/models/MarketplaceInner.java | 2 +- .../ConsumptionManagementClientImpl.java | 2 +- .../implementation/CreditSummaryImpl.java | 13 -- .../implementation/CreditsClientImpl.java | 97 +++++++----- .../implementation/CreditsImpl.java | 9 +- .../implementation/EventSummaryImpl.java | 34 ----- .../EventsOperationsClientImpl.java | 110 +++++++------- .../implementation/EventsOperationsImpl.java | 12 +- .../implementation/LotSummaryImpl.java | 22 --- .../LotsOperationsClientImpl.java | 109 ++++++++------ .../implementation/LotsOperationsImpl.java | 8 +- .../implementation/PriceSheetsClientImpl.java | 30 ++-- ...vationRecommendationDetailsClientImpl.java | 62 ++++---- .../ReservationRecommendationDetailsImpl.java | 10 +- .../consumption/models/Amount.java | 2 +- .../models/AmountWithExchangeRate.java | 57 ------- .../models/CreditBalanceSummary.java | 36 ----- .../consumption/models/CreditSummary.java | 21 --- .../consumption/models/Credits.java | 18 +-- .../consumption/models/CultureCode.java | 91 ------------ .../consumption/models/EventSummary.java | 56 ------- .../consumption/models/EventsOperations.java | 20 +-- .../consumption/models/LegacyUsageDetail.java | 12 +- .../consumption/models/LotSummary.java | 35 ----- .../consumption/models/LotsOperations.java | 18 +-- .../consumption/models/ModernUsageDetail.java | 13 +- .../consumption/models/Notification.java | 26 ---- .../consumption/models/PriceSheets.java | 10 +- .../consumption/models/Reseller.java | 54 ------- .../ReservationRecommendationDetails.java | 14 +- 41 files changed, 325 insertions(+), 1042 deletions(-) delete mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/AmountWithExchangeRate.java delete mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CultureCode.java delete mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Reseller.java diff --git a/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md b/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md index fb83033bcc4e..ae9a0dba4a1a 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md +++ b/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2021-04-15) +- Azure Resource Manager Consumption client library for Java. This package contains Microsoft Azure SDK for Consumption Management SDK. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2019-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.1 (2021-04-13) diff --git a/sdk/consumption/azure-resourcemanager-consumption/README.md b/sdk/consumption/azure-resourcemanager-consumption/README.md index 24e10b59cf86..00191929a8f9 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/README.md +++ b/sdk/consumption/azure-resourcemanager-consumption/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Consumption client library for Java. -This package contains Microsoft Azure SDK for Consumption Management SDK. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2019-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Consumption Management SDK. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2019-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-consumption - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/consumption/azure-resourcemanager-consumption/pom.xml b/sdk/consumption/azure-resourcemanager-consumption/pom.xml index 66416f697d02..6380e4c201fa 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/pom.xml +++ b/sdk/consumption/azure-resourcemanager-consumption/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for Consumption Management - This package contains Microsoft Azure SDK for Consumption Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2019-10. + This package contains Microsoft Azure SDK for Consumption Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2019-11. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java index 641cd0d201da..4a9bba8b64c6 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java @@ -15,27 +15,21 @@ public interface CreditsClient { /** * The credit summary by billingAccountId and billingProfileId. * - * @param scope The scope associated with credits operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a credit summary resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - CreditSummaryInner get(String scope); + CreditSummaryInner get(String billingAccountId, String billingProfileId); /** * The credit summary by billingAccountId and billingProfileId. * - * @param scope The scope associated with credits operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -43,5 +37,5 @@ public interface CreditsClient { * @return a credit summary resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String scope, Context context); + Response getWithResponse(String billingAccountId, String billingProfileId, Context context); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java index 288eba9cff34..f1b00fdb33b4 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java @@ -15,31 +15,26 @@ public interface EventsOperationsClient { /** * Lists the events by billingAccountId and billingProfileId for given start and end date. * + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param startDate Start date. * @param endDate End date. - * @param scope The scope associated with events operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of listing event summary. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String startDate, String endDate, String scope); + PagedIterable list( + String billingAccountId, String billingProfileId, String startDate, String endDate); /** * Lists the events by billingAccountId and billingProfileId for given start and end date. * + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param startDate Start date. * @param endDate End date. - * @param scope The scope associated with events operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -47,5 +42,6 @@ public interface EventsOperationsClient { * @return result of listing event summary. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String startDate, String endDate, String scope, Context context); + PagedIterable list( + String billingAccountId, String billingProfileId, String startDate, String endDate, Context context); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java index f168f2b33170..bb01b16c4143 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java @@ -15,27 +15,21 @@ public interface LotsOperationsClient { /** * Lists the lots by billingAccountId and billingProfileId. * - * @param scope The scope associated with Lots operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of listing lot summary. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String scope); + PagedIterable list(String billingAccountId, String billingProfileId); /** * Lists the lots by billingAccountId and billingProfileId. * - * @param scope The scope associated with Lots operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -43,5 +37,5 @@ public interface LotsOperationsClient { * @return result of listing lot summary. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String scope, Context context); + PagedIterable list(String billingAccountId, String billingProfileId, Context context); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java index 840cb18b61d4..083b16f7e65c 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java @@ -13,19 +13,17 @@ /** An instance of this class provides access to all the operations defined in PriceSheetsClient. */ public interface PriceSheetsClient { /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or - * later. + * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a scope by subscriptionId. + * @return the price sheet for a subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) PriceSheetResultInner get(); /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or - * later. + * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later. * * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields * are not included when returning price sheet. @@ -37,7 +35,7 @@ public interface PriceSheetsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a scope by subscriptionId. + * @return the price sheet for a subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String expand, String skiptoken, Integer top, Context context); diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java index a9742765369c..99f9b7299835 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java @@ -20,13 +20,13 @@ public interface ReservationRecommendationDetailsClient { /** * Details of a reservation recommendation for what-if analysis of reserved instances. * - * @param billingScope The scope associated with reservation recommendation details operations. This includes + * @param scope The scope associated with reservation recommendation details operations. This includes * '/subscriptions/{subscriptionId}/' for subscription scope, * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for * billingProfile scope. - * @param scope Scope of the reservation. + * @param scope1 Scope of the reservation. * @param region Used to select the region the recommendation should be generated for. * @param term Specify length of reservation recommendation term. * @param lookBackPeriod Filter the time period on which reservation recommendation results are based. @@ -39,18 +39,18 @@ public interface ReservationRecommendationDetailsClient { */ @ServiceMethod(returns = ReturnType.SINGLE) ReservationRecommendationDetailsModelInner get( - String billingScope, Scope scope, String region, Term term, LookBackPeriod lookBackPeriod, String product); + String scope, Scope scope1, String region, Term term, LookBackPeriod lookBackPeriod, String product); /** * Details of a reservation recommendation for what-if analysis of reserved instances. * - * @param billingScope The scope associated with reservation recommendation details operations. This includes + * @param scope The scope associated with reservation recommendation details operations. This includes * '/subscriptions/{subscriptionId}/' for subscription scope, * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for * billingProfile scope. - * @param scope Scope of the reservation. + * @param scope1 Scope of the reservation. * @param region Used to select the region the recommendation should be generated for. * @param term Specify length of reservation recommendation term. * @param lookBackPeriod Filter the time period on which reservation recommendation results are based. @@ -64,8 +64,8 @@ ReservationRecommendationDetailsModelInner get( */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( - String billingScope, - Scope scope, + String scope, + Scope scope1, String region, Term term, LookBackPeriod lookBackPeriod, diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java index c97cdbff92b4..e80385b7787f 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java @@ -10,7 +10,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.models.Amount; import com.azure.resourcemanager.consumption.models.CreditBalanceSummary; -import com.azure.resourcemanager.consumption.models.Reseller; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -21,18 +20,6 @@ public class CreditSummaryInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(CreditSummaryInner.class); - /* - * Credit Currency - */ - @JsonProperty(value = "properties.creditCurrency", access = JsonProperty.Access.WRITE_ONLY) - private String creditCurrency; - - /* - * Billing Currency. - */ - @JsonProperty(value = "properties.billingCurrency", access = JsonProperty.Access.WRITE_ONLY) - private String billingCurrency; - /* * Summary of balances associated with this credit summary. */ @@ -57,12 +44,6 @@ public class CreditSummaryInner extends ProxyResource { @JsonProperty(value = "properties.pendingEligibleCharges", access = JsonProperty.Access.WRITE_ONLY) private Amount pendingEligibleCharges; - /* - * Reseller details. - */ - @JsonProperty(value = "properties.reseller", access = JsonProperty.Access.WRITE_ONLY) - private Reseller reseller; - /* * Resource etag. */ @@ -75,24 +56,6 @@ public class CreditSummaryInner extends ProxyResource { @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY) private Map tags; - /** - * Get the creditCurrency property: Credit Currency. - * - * @return the creditCurrency value. - */ - public String creditCurrency() { - return this.creditCurrency; - } - - /** - * Get the billingCurrency property: Billing Currency. - * - * @return the billingCurrency value. - */ - public String billingCurrency() { - return this.billingCurrency; - } - /** * Get the balanceSummary property: Summary of balances associated with this credit summary. * @@ -129,15 +92,6 @@ public Amount pendingEligibleCharges() { return this.pendingEligibleCharges; } - /** - * Get the reseller property: Reseller details. - * - * @return the reseller value. - */ - public Reseller reseller() { - return this.reseller; - } - /** * Get the etag property: Resource etag. * @@ -174,8 +128,5 @@ public void validate() { if (pendingEligibleCharges() != null) { pendingEligibleCharges().validate(); } - if (reseller() != null) { - reseller().validate(); - } } } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventSummaryInner.java index 61d57e52f495..f1757eb9e7da 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventSummaryInner.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventSummaryInner.java @@ -9,9 +9,7 @@ import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.models.Amount; -import com.azure.resourcemanager.consumption.models.AmountWithExchangeRate; import com.azure.resourcemanager.consumption.models.EventType; -import com.azure.resourcemanager.consumption.models.Reseller; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; @@ -23,18 +21,6 @@ public class EventSummaryInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(EventSummaryInner.class); - /* - * Credit Currency - */ - @JsonProperty(value = "properties.creditCurrency", access = JsonProperty.Access.WRITE_ONLY) - private String creditCurrency; - - /* - * Billing Currency. - */ - @JsonProperty(value = "properties.billingCurrency", access = JsonProperty.Access.WRITE_ONLY) - private String billingCurrency; - /* * Transaction date. */ @@ -53,60 +39,30 @@ public class EventSummaryInner extends ProxyResource { @JsonProperty(value = "properties.newCredit", access = JsonProperty.Access.WRITE_ONLY) private Amount newCredit; - /* - * Current balance. - */ - @JsonProperty(value = "properties.newCreditInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY) - private AmountWithExchangeRate newCreditInBillingCurrency; - /* * Adjustments amount. */ @JsonProperty(value = "properties.adjustments", access = JsonProperty.Access.WRITE_ONLY) private Amount adjustments; - /* - * Current balance. - */ - @JsonProperty(value = "properties.adjustmentsInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY) - private AmountWithExchangeRate adjustmentsInBillingCurrency; - /* * Credit expired. */ @JsonProperty(value = "properties.creditExpired", access = JsonProperty.Access.WRITE_ONLY) private Amount creditExpired; - /* - * Current balance. - */ - @JsonProperty(value = "properties.creditExpiredInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY) - private AmountWithExchangeRate creditExpiredInBillingCurrency; - /* * Charges amount. */ @JsonProperty(value = "properties.charges", access = JsonProperty.Access.WRITE_ONLY) private Amount charges; - /* - * Current balance. - */ - @JsonProperty(value = "properties.chargesInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY) - private AmountWithExchangeRate chargesInBillingCurrency; - /* * Closed balance. */ @JsonProperty(value = "properties.closedBalance", access = JsonProperty.Access.WRITE_ONLY) private Amount closedBalance; - /* - * Current balance. - */ - @JsonProperty(value = "properties.closedBalanceInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY) - private AmountWithExchangeRate closedBalanceInBillingCurrency; - /* * The type of event. */ @@ -119,12 +75,6 @@ public class EventSummaryInner extends ProxyResource { @JsonProperty(value = "properties.invoiceNumber", access = JsonProperty.Access.WRITE_ONLY) private String invoiceNumber; - /* - * Reseller details. - */ - @JsonProperty(value = "properties.reseller", access = JsonProperty.Access.WRITE_ONLY) - private Reseller reseller; - /* * Resource etag. */ @@ -137,24 +87,6 @@ public class EventSummaryInner extends ProxyResource { @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY) private Map tags; - /** - * Get the creditCurrency property: Credit Currency. - * - * @return the creditCurrency value. - */ - public String creditCurrency() { - return this.creditCurrency; - } - - /** - * Get the billingCurrency property: Billing Currency. - * - * @return the billingCurrency value. - */ - public String billingCurrency() { - return this.billingCurrency; - } - /** * Get the transactionDate property: Transaction date. * @@ -182,15 +114,6 @@ public Amount newCredit() { return this.newCredit; } - /** - * Get the newCreditInBillingCurrency property: Current balance. - * - * @return the newCreditInBillingCurrency value. - */ - public AmountWithExchangeRate newCreditInBillingCurrency() { - return this.newCreditInBillingCurrency; - } - /** * Get the adjustments property: Adjustments amount. * @@ -200,15 +123,6 @@ public Amount adjustments() { return this.adjustments; } - /** - * Get the adjustmentsInBillingCurrency property: Current balance. - * - * @return the adjustmentsInBillingCurrency value. - */ - public AmountWithExchangeRate adjustmentsInBillingCurrency() { - return this.adjustmentsInBillingCurrency; - } - /** * Get the creditExpired property: Credit expired. * @@ -218,15 +132,6 @@ public Amount creditExpired() { return this.creditExpired; } - /** - * Get the creditExpiredInBillingCurrency property: Current balance. - * - * @return the creditExpiredInBillingCurrency value. - */ - public AmountWithExchangeRate creditExpiredInBillingCurrency() { - return this.creditExpiredInBillingCurrency; - } - /** * Get the charges property: Charges amount. * @@ -236,15 +141,6 @@ public Amount charges() { return this.charges; } - /** - * Get the chargesInBillingCurrency property: Current balance. - * - * @return the chargesInBillingCurrency value. - */ - public AmountWithExchangeRate chargesInBillingCurrency() { - return this.chargesInBillingCurrency; - } - /** * Get the closedBalance property: Closed balance. * @@ -254,15 +150,6 @@ public Amount closedBalance() { return this.closedBalance; } - /** - * Get the closedBalanceInBillingCurrency property: Current balance. - * - * @return the closedBalanceInBillingCurrency value. - */ - public AmountWithExchangeRate closedBalanceInBillingCurrency() { - return this.closedBalanceInBillingCurrency; - } - /** * Get the eventType property: The type of event. * @@ -292,15 +179,6 @@ public String invoiceNumber() { return this.invoiceNumber; } - /** - * Get the reseller property: Reseller details. - * - * @return the reseller value. - */ - public Reseller reseller() { - return this.reseller; - } - /** * Get the etag property: Resource etag. * @@ -328,35 +206,17 @@ public void validate() { if (newCredit() != null) { newCredit().validate(); } - if (newCreditInBillingCurrency() != null) { - newCreditInBillingCurrency().validate(); - } if (adjustments() != null) { adjustments().validate(); } - if (adjustmentsInBillingCurrency() != null) { - adjustmentsInBillingCurrency().validate(); - } if (creditExpired() != null) { creditExpired().validate(); } - if (creditExpiredInBillingCurrency() != null) { - creditExpiredInBillingCurrency().validate(); - } if (charges() != null) { charges().validate(); } - if (chargesInBillingCurrency() != null) { - chargesInBillingCurrency().validate(); - } if (closedBalance() != null) { closedBalance().validate(); } - if (closedBalanceInBillingCurrency() != null) { - closedBalanceInBillingCurrency().validate(); - } - if (reseller() != null) { - reseller().validate(); - } } } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotSummaryInner.java index a0ebd141f5a4..667d56733066 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotSummaryInner.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotSummaryInner.java @@ -9,9 +9,7 @@ import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.models.Amount; -import com.azure.resourcemanager.consumption.models.AmountWithExchangeRate; import com.azure.resourcemanager.consumption.models.LotSource; -import com.azure.resourcemanager.consumption.models.Reseller; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; @@ -23,42 +21,18 @@ public class LotSummaryInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(LotSummaryInner.class); - /* - * Credit Currency - */ - @JsonProperty(value = "properties.creditCurrency", access = JsonProperty.Access.WRITE_ONLY) - private String creditCurrency; - - /* - * Billing Currency. - */ - @JsonProperty(value = "properties.billingCurrency", access = JsonProperty.Access.WRITE_ONLY) - private String billingCurrency; - /* * Original amount. */ @JsonProperty(value = "properties.originalAmount", access = JsonProperty.Access.WRITE_ONLY) private Amount originalAmount; - /* - * Current balance. - */ - @JsonProperty(value = "properties.originalAmountInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY) - private AmountWithExchangeRate originalAmountInBillingCurrency; - /* * Closed balance. */ @JsonProperty(value = "properties.closedBalance", access = JsonProperty.Access.WRITE_ONLY) private Amount closedBalance; - /* - * Current balance. - */ - @JsonProperty(value = "properties.closedBalanceInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY) - private AmountWithExchangeRate closedBalanceInBillingCurrency; - /* * Lot source. */ @@ -83,12 +57,6 @@ public class LotSummaryInner extends ProxyResource { @JsonProperty(value = "properties.poNumber", access = JsonProperty.Access.WRITE_ONLY) private String poNumber; - /* - * Reseller details. - */ - @JsonProperty(value = "properties.reseller", access = JsonProperty.Access.WRITE_ONLY) - private Reseller reseller; - /* * Resource etag. */ @@ -101,24 +69,6 @@ public class LotSummaryInner extends ProxyResource { @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY) private Map tags; - /** - * Get the creditCurrency property: Credit Currency. - * - * @return the creditCurrency value. - */ - public String creditCurrency() { - return this.creditCurrency; - } - - /** - * Get the billingCurrency property: Billing Currency. - * - * @return the billingCurrency value. - */ - public String billingCurrency() { - return this.billingCurrency; - } - /** * Get the originalAmount property: Original amount. * @@ -128,15 +78,6 @@ public Amount originalAmount() { return this.originalAmount; } - /** - * Get the originalAmountInBillingCurrency property: Current balance. - * - * @return the originalAmountInBillingCurrency value. - */ - public AmountWithExchangeRate originalAmountInBillingCurrency() { - return this.originalAmountInBillingCurrency; - } - /** * Get the closedBalance property: Closed balance. * @@ -146,15 +87,6 @@ public Amount closedBalance() { return this.closedBalance; } - /** - * Get the closedBalanceInBillingCurrency property: Current balance. - * - * @return the closedBalanceInBillingCurrency value. - */ - public AmountWithExchangeRate closedBalanceInBillingCurrency() { - return this.closedBalanceInBillingCurrency; - } - /** * Get the source property: Lot source. * @@ -191,15 +123,6 @@ public String poNumber() { return this.poNumber; } - /** - * Get the reseller property: Reseller details. - * - * @return the reseller value. - */ - public Reseller reseller() { - return this.reseller; - } - /** * Get the etag property: Resource etag. * @@ -227,17 +150,8 @@ public void validate() { if (originalAmount() != null) { originalAmount().validate(); } - if (originalAmountInBillingCurrency() != null) { - originalAmountInBillingCurrency().validate(); - } if (closedBalance() != null) { closedBalance().validate(); } - if (closedBalanceInBillingCurrency() != null) { - closedBalanceInBillingCurrency().validate(); - } - if (reseller() != null) { - reseller().validate(); - } } } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceInner.java index 7c7981342d4e..ededf75648e0 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceInner.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceInner.java @@ -15,7 +15,7 @@ import java.util.Map; import java.util.UUID; -/** An marketplace resource. */ +/** A marketplace resource. */ @JsonFlatten @Immutable public class MarketplaceInner extends ProxyResource { diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientImpl.java index 051fbfcaf5ff..e4fa1ed39ab8 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientImpl.java @@ -365,7 +365,7 @@ public CreditsClient getCredits() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2019-10-01"; + this.apiVersion = "2019-11-01"; this.usageDetails = new UsageDetailsClientImpl(this); this.marketplaces = new MarketplacesClientImpl(this); this.budgets = new BudgetsClientImpl(this); diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditSummaryImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditSummaryImpl.java index cbb44865671d..e29060b527df 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditSummaryImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditSummaryImpl.java @@ -8,7 +8,6 @@ import com.azure.resourcemanager.consumption.models.Amount; import com.azure.resourcemanager.consumption.models.CreditBalanceSummary; import com.azure.resourcemanager.consumption.models.CreditSummary; -import com.azure.resourcemanager.consumption.models.Reseller; import java.util.Collections; import java.util.Map; @@ -35,14 +34,6 @@ public String type() { return this.innerModel().type(); } - public String creditCurrency() { - return this.innerModel().creditCurrency(); - } - - public String billingCurrency() { - return this.innerModel().billingCurrency(); - } - public CreditBalanceSummary balanceSummary() { return this.innerModel().balanceSummary(); } @@ -59,10 +50,6 @@ public Amount pendingEligibleCharges() { return this.innerModel().pendingEligibleCharges(); } - public Reseller reseller() { - return this.innerModel().reseller(); - } - public String etag() { return this.innerModel().etag(); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditsClientImpl.java index 8b07b5f2a405..7cd64a9b3bc2 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditsClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditsClientImpl.java @@ -54,13 +54,16 @@ public final class CreditsClientImpl implements CreditsClient { @ServiceInterface(name = "ConsumptionManagemen") private interface CreditsService { @Headers({"Content-Type: application/json"}) - @Get("/{scope}/providers/Microsoft.Consumption/credits/balanceSummary") + @Get( + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}" + + "/providers/Microsoft.Consumption/credits/balanceSummary") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @HostParam("$host") String endpoint, + @PathParam("billingAccountId") String billingAccountId, + @PathParam("billingProfileId") String billingProfileId, @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, @HeaderParam("Accept") String accept, Context context); } @@ -68,42 +71,49 @@ Mono> get( /** * The credit summary by billingAccountId and billingProfileId. * - * @param scope The scope associated with credits operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a credit summary resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String scope) { + private Mono> getWithResponseAsync(String billingAccountId, String billingProfileId) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); + if (billingAccountId == null) { + return Mono + .error(new IllegalArgumentException("Parameter billingAccountId is required and cannot be null.")); + } + if (billingProfileId == null) { + return Mono + .error(new IllegalArgumentException("Parameter billingProfileId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), scope, accept, context)) + context -> + service + .get( + this.client.getEndpoint(), + billingAccountId, + billingProfileId, + this.client.getApiVersion(), + accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The credit summary by billingAccountId and billingProfileId. * - * @param scope The scope associated with credits operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -111,37 +121,47 @@ private Mono> getWithResponseAsync(String scope) { * @return a credit summary resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String scope, Context context) { + private Mono> getWithResponseAsync( + String billingAccountId, String billingProfileId, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); + if (billingAccountId == null) { + return Mono + .error(new IllegalArgumentException("Parameter billingAccountId is required and cannot be null.")); + } + if (billingProfileId == null) { + return Mono + .error(new IllegalArgumentException("Parameter billingProfileId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), scope, accept, context); + return service + .get( + this.client.getEndpoint(), + billingAccountId, + billingProfileId, + this.client.getApiVersion(), + accept, + context); } /** * The credit summary by billingAccountId and billingProfileId. * - * @param scope The scope associated with credits operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a credit summary resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String scope) { - return getWithResponseAsync(scope) + private Mono getAsync(String billingAccountId, String billingProfileId) { + return getWithResponseAsync(billingAccountId, billingProfileId) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -155,29 +175,23 @@ private Mono getAsync(String scope) { /** * The credit summary by billingAccountId and billingProfileId. * - * @param scope The scope associated with credits operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a credit summary resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CreditSummaryInner get(String scope) { - return getAsync(scope).block(); + public CreditSummaryInner get(String billingAccountId, String billingProfileId) { + return getAsync(billingAccountId, billingProfileId).block(); } /** * The credit summary by billingAccountId and billingProfileId. * - * @param scope The scope associated with credits operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -185,7 +199,8 @@ public CreditSummaryInner get(String scope) { * @return a credit summary resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String scope, Context context) { - return getWithResponseAsync(scope, context).block(); + public Response getWithResponse( + String billingAccountId, String billingProfileId, Context context) { + return getWithResponseAsync(billingAccountId, billingProfileId, context).block(); } } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditsImpl.java index 4c8225371d27..0a36ba8d42d2 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditsImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditsImpl.java @@ -27,8 +27,8 @@ public CreditsImpl( this.serviceManager = serviceManager; } - public CreditSummary get(String scope) { - CreditSummaryInner inner = this.serviceClient().get(scope); + public CreditSummary get(String billingAccountId, String billingProfileId) { + CreditSummaryInner inner = this.serviceClient().get(billingAccountId, billingProfileId); if (inner != null) { return new CreditSummaryImpl(inner, this.manager()); } else { @@ -36,8 +36,9 @@ public CreditSummary get(String scope) { } } - public Response getWithResponse(String scope, Context context) { - Response inner = this.serviceClient().getWithResponse(scope, context); + public Response getWithResponse(String billingAccountId, String billingProfileId, Context context) { + Response inner = + this.serviceClient().getWithResponse(billingAccountId, billingProfileId, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventSummaryImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventSummaryImpl.java index 5c83cf6e85e6..ff28cabde826 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventSummaryImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventSummaryImpl.java @@ -6,10 +6,8 @@ import com.azure.resourcemanager.consumption.fluent.models.EventSummaryInner; import com.azure.resourcemanager.consumption.models.Amount; -import com.azure.resourcemanager.consumption.models.AmountWithExchangeRate; import com.azure.resourcemanager.consumption.models.EventSummary; import com.azure.resourcemanager.consumption.models.EventType; -import com.azure.resourcemanager.consumption.models.Reseller; import java.time.OffsetDateTime; import java.util.Collections; import java.util.Map; @@ -37,14 +35,6 @@ public String type() { return this.innerModel().type(); } - public String creditCurrency() { - return this.innerModel().creditCurrency(); - } - - public String billingCurrency() { - return this.innerModel().billingCurrency(); - } - public OffsetDateTime transactionDate() { return this.innerModel().transactionDate(); } @@ -57,42 +47,22 @@ public Amount newCredit() { return this.innerModel().newCredit(); } - public AmountWithExchangeRate newCreditInBillingCurrency() { - return this.innerModel().newCreditInBillingCurrency(); - } - public Amount adjustments() { return this.innerModel().adjustments(); } - public AmountWithExchangeRate adjustmentsInBillingCurrency() { - return this.innerModel().adjustmentsInBillingCurrency(); - } - public Amount creditExpired() { return this.innerModel().creditExpired(); } - public AmountWithExchangeRate creditExpiredInBillingCurrency() { - return this.innerModel().creditExpiredInBillingCurrency(); - } - public Amount charges() { return this.innerModel().charges(); } - public AmountWithExchangeRate chargesInBillingCurrency() { - return this.innerModel().chargesInBillingCurrency(); - } - public Amount closedBalance() { return this.innerModel().closedBalance(); } - public AmountWithExchangeRate closedBalanceInBillingCurrency() { - return this.innerModel().closedBalanceInBillingCurrency(); - } - public EventType eventType() { return this.innerModel().eventType(); } @@ -101,10 +71,6 @@ public String invoiceNumber() { return this.innerModel().invoiceNumber(); } - public Reseller reseller() { - return this.innerModel().reseller(); - } - public String etag() { return this.innerModel().etag(); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventsOperationsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventsOperationsClientImpl.java index 651c111d20c9..3cdf1686426e 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventsOperationsClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventsOperationsClientImpl.java @@ -60,15 +60,18 @@ public final class EventsOperationsClientImpl implements EventsOperationsClient @ServiceInterface(name = "ConsumptionManagemen") private interface EventsOperationsService { @Headers({"Content-Type: application/json"}) - @Get("/{scope}/providers/Microsoft.Consumption/events") + @Get( + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}" + + "/providers/Microsoft.Consumption/events") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @HostParam("$host") String endpoint, + @PathParam("billingAccountId") String billingAccountId, + @PathParam("billingProfileId") String billingProfileId, @QueryParam("api-version") String apiVersion, @QueryParam("startDate") String startDate, @QueryParam("endDate") String endDate, - @PathParam(value = "scope", encoded = true) String scope, @HeaderParam("Accept") String accept, Context context); @@ -86,35 +89,38 @@ Mono> listNext( /** * Lists the events by billingAccountId and billingProfileId for given start and end date. * + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param startDate Start date. * @param endDate End date. - * @param scope The scope associated with events operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of listing event summary. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String startDate, String endDate, String scope) { + private Mono> listSinglePageAsync( + String billingAccountId, String billingProfileId, String startDate, String endDate) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (billingAccountId == null) { + return Mono + .error(new IllegalArgumentException("Parameter billingAccountId is required and cannot be null.")); + } + if (billingProfileId == null) { + return Mono + .error(new IllegalArgumentException("Parameter billingProfileId is required and cannot be null.")); + } if (startDate == null) { return Mono.error(new IllegalArgumentException("Parameter startDate is required and cannot be null.")); } if (endDate == null) { return Mono.error(new IllegalArgumentException("Parameter endDate is required and cannot be null.")); } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -122,10 +128,11 @@ private Mono> listSinglePageAsync(String startD service .list( this.client.getEndpoint(), + billingAccountId, + billingProfileId, this.client.getApiVersion(), startDate, endDate, - scope, accept, context)) .>map( @@ -143,13 +150,10 @@ private Mono> listSinglePageAsync(String startD /** * Lists the events by billingAccountId and billingProfileId for given start and end date. * + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param startDate Start date. * @param endDate End date. - * @param scope The scope associated with events operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -158,26 +162,39 @@ private Mono> listSinglePageAsync(String startD */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String startDate, String endDate, String scope, Context context) { + String billingAccountId, String billingProfileId, String startDate, String endDate, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (billingAccountId == null) { + return Mono + .error(new IllegalArgumentException("Parameter billingAccountId is required and cannot be null.")); + } + if (billingProfileId == null) { + return Mono + .error(new IllegalArgumentException("Parameter billingProfileId is required and cannot be null.")); + } if (startDate == null) { return Mono.error(new IllegalArgumentException("Parameter startDate is required and cannot be null.")); } if (endDate == null) { return Mono.error(new IllegalArgumentException("Parameter endDate is required and cannot be null.")); } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), startDate, endDate, scope, accept, context) + .list( + this.client.getEndpoint(), + billingAccountId, + billingProfileId, + this.client.getApiVersion(), + startDate, + endDate, + accept, + context) .map( res -> new PagedResponseBase<>( @@ -192,34 +209,30 @@ private Mono> listSinglePageAsync( /** * Lists the events by billingAccountId and billingProfileId for given start and end date. * + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param startDate Start date. * @param endDate End date. - * @param scope The scope associated with events operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of listing event summary. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String startDate, String endDate, String scope) { + private PagedFlux listAsync( + String billingAccountId, String billingProfileId, String startDate, String endDate) { return new PagedFlux<>( - () -> listSinglePageAsync(startDate, endDate, scope), nextLink -> listNextSinglePageAsync(nextLink)); + () -> listSinglePageAsync(billingAccountId, billingProfileId, startDate, endDate), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Lists the events by billingAccountId and billingProfileId for given start and end date. * + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param startDate Start date. * @param endDate End date. - * @param scope The scope associated with events operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -227,42 +240,38 @@ private PagedFlux listAsync(String startDate, String endDate, * @return result of listing event summary. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String startDate, String endDate, String scope, Context context) { + private PagedFlux listAsync( + String billingAccountId, String billingProfileId, String startDate, String endDate, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(startDate, endDate, scope, context), + () -> listSinglePageAsync(billingAccountId, billingProfileId, startDate, endDate, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists the events by billingAccountId and billingProfileId for given start and end date. * + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param startDate Start date. * @param endDate End date. - * @param scope The scope associated with events operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of listing event summary. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String startDate, String endDate, String scope) { - return new PagedIterable<>(listAsync(startDate, endDate, scope)); + public PagedIterable list( + String billingAccountId, String billingProfileId, String startDate, String endDate) { + return new PagedIterable<>(listAsync(billingAccountId, billingProfileId, startDate, endDate)); } /** * Lists the events by billingAccountId and billingProfileId for given start and end date. * + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param startDate Start date. * @param endDate End date. - * @param scope The scope associated with events operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -270,8 +279,9 @@ public PagedIterable list(String startDate, String endDate, S * @return result of listing event summary. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String startDate, String endDate, String scope, Context context) { - return new PagedIterable<>(listAsync(startDate, endDate, scope, context)); + public PagedIterable list( + String billingAccountId, String billingProfileId, String startDate, String endDate, Context context) { + return new PagedIterable<>(listAsync(billingAccountId, billingProfileId, startDate, endDate, context)); } /** diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventsOperationsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventsOperationsImpl.java index 994c73b9cf0e..a63837cf9286 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventsOperationsImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventsOperationsImpl.java @@ -26,13 +26,17 @@ public EventsOperationsImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String startDate, String endDate, String scope) { - PagedIterable inner = this.serviceClient().list(startDate, endDate, scope); + public PagedIterable list( + String billingAccountId, String billingProfileId, String startDate, String endDate) { + PagedIterable inner = + this.serviceClient().list(billingAccountId, billingProfileId, startDate, endDate); return Utils.mapPage(inner, inner1 -> new EventSummaryImpl(inner1, this.manager())); } - public PagedIterable list(String startDate, String endDate, String scope, Context context) { - PagedIterable inner = this.serviceClient().list(startDate, endDate, scope, context); + public PagedIterable list( + String billingAccountId, String billingProfileId, String startDate, String endDate, Context context) { + PagedIterable inner = + this.serviceClient().list(billingAccountId, billingProfileId, startDate, endDate, context); return Utils.mapPage(inner, inner1 -> new EventSummaryImpl(inner1, this.manager())); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotSummaryImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotSummaryImpl.java index 0c55e93f5bfd..92c7031286c0 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotSummaryImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotSummaryImpl.java @@ -6,10 +6,8 @@ import com.azure.resourcemanager.consumption.fluent.models.LotSummaryInner; import com.azure.resourcemanager.consumption.models.Amount; -import com.azure.resourcemanager.consumption.models.AmountWithExchangeRate; import com.azure.resourcemanager.consumption.models.LotSource; import com.azure.resourcemanager.consumption.models.LotSummary; -import com.azure.resourcemanager.consumption.models.Reseller; import java.time.OffsetDateTime; import java.util.Collections; import java.util.Map; @@ -37,30 +35,14 @@ public String type() { return this.innerModel().type(); } - public String creditCurrency() { - return this.innerModel().creditCurrency(); - } - - public String billingCurrency() { - return this.innerModel().billingCurrency(); - } - public Amount originalAmount() { return this.innerModel().originalAmount(); } - public AmountWithExchangeRate originalAmountInBillingCurrency() { - return this.innerModel().originalAmountInBillingCurrency(); - } - public Amount closedBalance() { return this.innerModel().closedBalance(); } - public AmountWithExchangeRate closedBalanceInBillingCurrency() { - return this.innerModel().closedBalanceInBillingCurrency(); - } - public LotSource source() { return this.innerModel().source(); } @@ -77,10 +59,6 @@ public String poNumber() { return this.innerModel().poNumber(); } - public Reseller reseller() { - return this.innerModel().reseller(); - } - public String etag() { return this.innerModel().etag(); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotsOperationsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotsOperationsClientImpl.java index dedeaeaec1b9..8b9bad656d47 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotsOperationsClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotsOperationsClientImpl.java @@ -60,12 +60,15 @@ public final class LotsOperationsClientImpl implements LotsOperationsClient { @ServiceInterface(name = "ConsumptionManagemen") private interface LotsOperationsService { @Headers({"Content-Type: application/json"}) - @Get("/{scope}/providers/Microsoft.Consumption/lots") + @Get( + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}" + + "/providers/Microsoft.Consumption/lots") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @HostParam("$host") String endpoint, - @PathParam(value = "scope", encoded = true) String scope, + @PathParam("billingAccountId") String billingAccountId, + @PathParam("billingProfileId") String billingProfileId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @@ -84,31 +87,41 @@ Mono> listNext( /** * Lists the lots by billingAccountId and billingProfileId. * - * @param scope The scope associated with Lots operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of listing lot summary. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String scope) { + private Mono> listSinglePageAsync(String billingAccountId, String billingProfileId) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); + if (billingAccountId == null) { + return Mono + .error(new IllegalArgumentException("Parameter billingAccountId is required and cannot be null.")); + } + if (billingProfileId == null) { + return Mono + .error(new IllegalArgumentException("Parameter billingProfileId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.list(this.client.getEndpoint(), scope, this.client.getApiVersion(), accept, context)) + context -> + service + .list( + this.client.getEndpoint(), + billingAccountId, + billingProfileId, + this.client.getApiVersion(), + accept, + context)) .>map( res -> new PagedResponseBase<>( @@ -124,11 +137,8 @@ private Mono> listSinglePageAsync(String scope) { /** * Lists the lots by billingAccountId and billingProfileId. * - * @param scope The scope associated with Lots operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -136,20 +146,32 @@ private Mono> listSinglePageAsync(String scope) { * @return result of listing lot summary. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String scope, Context context) { + private Mono> listSinglePageAsync( + String billingAccountId, String billingProfileId, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); + if (billingAccountId == null) { + return Mono + .error(new IllegalArgumentException("Parameter billingAccountId is required and cannot be null.")); + } + if (billingProfileId == null) { + return Mono + .error(new IllegalArgumentException("Parameter billingProfileId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list(this.client.getEndpoint(), scope, this.client.getApiVersion(), accept, context) + .list( + this.client.getEndpoint(), + billingAccountId, + billingProfileId, + this.client.getApiVersion(), + accept, + context) .map( res -> new PagedResponseBase<>( @@ -164,29 +186,25 @@ private Mono> listSinglePageAsync(String scope, C /** * Lists the lots by billingAccountId and billingProfileId. * - * @param scope The scope associated with Lots operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of listing lot summary. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String scope) { - return new PagedFlux<>(() -> listSinglePageAsync(scope), nextLink -> listNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String billingAccountId, String billingProfileId) { + return new PagedFlux<>( + () -> listSinglePageAsync(billingAccountId, billingProfileId), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Lists the lots by billingAccountId and billingProfileId. * - * @param scope The scope associated with Lots operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -194,37 +212,32 @@ private PagedFlux listAsync(String scope) { * @return result of listing lot summary. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String scope, Context context) { + private PagedFlux listAsync(String billingAccountId, String billingProfileId, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(scope, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + () -> listSinglePageAsync(billingAccountId, billingProfileId, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists the lots by billingAccountId and billingProfileId. * - * @param scope The scope associated with Lots operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of listing lot summary. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String scope) { - return new PagedIterable<>(listAsync(scope)); + public PagedIterable list(String billingAccountId, String billingProfileId) { + return new PagedIterable<>(listAsync(billingAccountId, billingProfileId)); } /** * Lists the lots by billingAccountId and billingProfileId. * - * @param scope The scope associated with Lots operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -232,8 +245,8 @@ public PagedIterable list(String scope) { * @return result of listing lot summary. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String scope, Context context) { - return new PagedIterable<>(listAsync(scope, context)); + public PagedIterable list(String billingAccountId, String billingProfileId, Context context) { + return new PagedIterable<>(listAsync(billingAccountId, billingProfileId, context)); } /** diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotsOperationsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotsOperationsImpl.java index 6f5608863259..480a4265b836 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotsOperationsImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotsOperationsImpl.java @@ -26,13 +26,13 @@ public LotsOperationsImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String scope) { - PagedIterable inner = this.serviceClient().list(scope); + public PagedIterable list(String billingAccountId, String billingProfileId) { + PagedIterable inner = this.serviceClient().list(billingAccountId, billingProfileId); return Utils.mapPage(inner, inner1 -> new LotSummaryImpl(inner1, this.manager())); } - public PagedIterable list(String scope, Context context) { - PagedIterable inner = this.serviceClient().list(scope, context); + public PagedIterable list(String billingAccountId, String billingProfileId, Context context) { + PagedIterable inner = this.serviceClient().list(billingAccountId, billingProfileId, context); return Utils.mapPage(inner, inner1 -> new LotSummaryImpl(inner1, this.manager())); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/PriceSheetsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/PriceSheetsClientImpl.java index 8cb5b5a5053a..e01c7433932a 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/PriceSheetsClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/PriceSheetsClientImpl.java @@ -87,8 +87,7 @@ Mono> getByBillingPeriod( } /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or - * later. + * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later. * * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields * are not included when returning price sheet. @@ -99,7 +98,7 @@ Mono> getByBillingPeriod( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a scope by subscriptionId. + * @return the price sheet for a subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String expand, String skiptoken, Integer top) { @@ -133,8 +132,7 @@ private Mono> getWithResponseAsync(String expand } /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or - * later. + * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later. * * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields * are not included when returning price sheet. @@ -146,7 +144,7 @@ private Mono> getWithResponseAsync(String expand * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a scope by subscriptionId. + * @return the price sheet for a subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -178,8 +176,7 @@ private Mono> getWithResponseAsync( } /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or - * later. + * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later. * * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields * are not included when returning price sheet. @@ -190,7 +187,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a scope by subscriptionId. + * @return the price sheet for a subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String expand, String skiptoken, Integer top) { @@ -206,12 +203,11 @@ private Mono getAsync(String expand, String skiptoken, In } /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or - * later. + * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a scope by subscriptionId. + * @return the price sheet for a subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync() { @@ -230,12 +226,11 @@ private Mono getAsync() { } /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or - * later. + * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a scope by subscriptionId. + * @return the price sheet for a subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) public PriceSheetResultInner get() { @@ -246,8 +241,7 @@ public PriceSheetResultInner get() { } /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or - * later. + * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later. * * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields * are not included when returning price sheet. @@ -259,7 +253,7 @@ public PriceSheetResultInner get() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a scope by subscriptionId. + * @return the price sheet for a subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationDetailsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationDetailsClientImpl.java index 57dcfac6d6fa..3b71df5b0c47 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationDetailsClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationDetailsClientImpl.java @@ -64,14 +64,14 @@ public final class ReservationRecommendationDetailsClientImpl implements Reserva @ServiceInterface(name = "ConsumptionManagemen") private interface ReservationRecommendationDetailsService { @Headers({"Content-Type: application/json"}) - @Get("/{billingScope}/providers/Microsoft.Consumption/reservationRecommendationDetails") + @Get("/{scope}/providers/Microsoft.Consumption/reservationRecommendationDetails") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam(value = "billingScope", encoded = true) String billingScope, - @QueryParam("scope") Scope scope, + @PathParam(value = "scope", encoded = true) String scope, + @QueryParam("scope") Scope scope1, @QueryParam("region") String region, @QueryParam("term") Term term, @QueryParam("lookBackPeriod") LookBackPeriod lookBackPeriod, @@ -83,13 +83,13 @@ Mono> get( /** * Details of a reservation recommendation for what-if analysis of reserved instances. * - * @param billingScope The scope associated with reservation recommendation details operations. This includes + * @param scope The scope associated with reservation recommendation details operations. This includes * '/subscriptions/{subscriptionId}/' for subscription scope, * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for * billingProfile scope. - * @param scope Scope of the reservation. + * @param scope1 Scope of the reservation. * @param region Used to select the region the recommendation should be generated for. * @param term Specify length of reservation recommendation term. * @param lookBackPeriod Filter the time period on which reservation recommendation results are based. @@ -102,19 +102,19 @@ Mono> get( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( - String billingScope, Scope scope, String region, Term term, LookBackPeriod lookBackPeriod, String product) { + String scope, Scope scope1, String region, Term term, LookBackPeriod lookBackPeriod, String product) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (billingScope == null) { - return Mono.error(new IllegalArgumentException("Parameter billingScope is required and cannot be null.")); - } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); } + if (scope1 == null) { + return Mono.error(new IllegalArgumentException("Parameter scope1 is required and cannot be null.")); + } if (region == null) { return Mono.error(new IllegalArgumentException("Parameter region is required and cannot be null.")); } @@ -135,8 +135,8 @@ private Mono> getWithRespon .get( this.client.getEndpoint(), this.client.getApiVersion(), - billingScope, scope, + scope1, region, term, lookBackPeriod, @@ -149,13 +149,13 @@ private Mono> getWithRespon /** * Details of a reservation recommendation for what-if analysis of reserved instances. * - * @param billingScope The scope associated with reservation recommendation details operations. This includes + * @param scope The scope associated with reservation recommendation details operations. This includes * '/subscriptions/{subscriptionId}/' for subscription scope, * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for * billingProfile scope. - * @param scope Scope of the reservation. + * @param scope1 Scope of the reservation. * @param region Used to select the region the recommendation should be generated for. * @param term Specify length of reservation recommendation term. * @param lookBackPeriod Filter the time period on which reservation recommendation results are based. @@ -169,8 +169,8 @@ private Mono> getWithRespon */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( - String billingScope, - Scope scope, + String scope, + Scope scope1, String region, Term term, LookBackPeriod lookBackPeriod, @@ -182,12 +182,12 @@ private Mono> getWithRespon new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (billingScope == null) { - return Mono.error(new IllegalArgumentException("Parameter billingScope is required and cannot be null.")); - } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); } + if (scope1 == null) { + return Mono.error(new IllegalArgumentException("Parameter scope1 is required and cannot be null.")); + } if (region == null) { return Mono.error(new IllegalArgumentException("Parameter region is required and cannot be null.")); } @@ -206,8 +206,8 @@ private Mono> getWithRespon .get( this.client.getEndpoint(), this.client.getApiVersion(), - billingScope, scope, + scope1, region, term, lookBackPeriod, @@ -219,13 +219,13 @@ private Mono> getWithRespon /** * Details of a reservation recommendation for what-if analysis of reserved instances. * - * @param billingScope The scope associated with reservation recommendation details operations. This includes + * @param scope The scope associated with reservation recommendation details operations. This includes * '/subscriptions/{subscriptionId}/' for subscription scope, * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for * billingProfile scope. - * @param scope Scope of the reservation. + * @param scope1 Scope of the reservation. * @param region Used to select the region the recommendation should be generated for. * @param term Specify length of reservation recommendation term. * @param lookBackPeriod Filter the time period on which reservation recommendation results are based. @@ -238,8 +238,8 @@ private Mono> getWithRespon */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( - String billingScope, Scope scope, String region, Term term, LookBackPeriod lookBackPeriod, String product) { - return getWithResponseAsync(billingScope, scope, region, term, lookBackPeriod, product) + String scope, Scope scope1, String region, Term term, LookBackPeriod lookBackPeriod, String product) { + return getWithResponseAsync(scope, scope1, region, term, lookBackPeriod, product) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -253,13 +253,13 @@ private Mono getAsync( /** * Details of a reservation recommendation for what-if analysis of reserved instances. * - * @param billingScope The scope associated with reservation recommendation details operations. This includes + * @param scope The scope associated with reservation recommendation details operations. This includes * '/subscriptions/{subscriptionId}/' for subscription scope, * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for * billingProfile scope. - * @param scope Scope of the reservation. + * @param scope1 Scope of the reservation. * @param region Used to select the region the recommendation should be generated for. * @param term Specify length of reservation recommendation term. * @param lookBackPeriod Filter the time period on which reservation recommendation results are based. @@ -272,20 +272,20 @@ private Mono getAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public ReservationRecommendationDetailsModelInner get( - String billingScope, Scope scope, String region, Term term, LookBackPeriod lookBackPeriod, String product) { - return getAsync(billingScope, scope, region, term, lookBackPeriod, product).block(); + String scope, Scope scope1, String region, Term term, LookBackPeriod lookBackPeriod, String product) { + return getAsync(scope, scope1, region, term, lookBackPeriod, product).block(); } /** * Details of a reservation recommendation for what-if analysis of reserved instances. * - * @param billingScope The scope associated with reservation recommendation details operations. This includes + * @param scope The scope associated with reservation recommendation details operations. This includes * '/subscriptions/{subscriptionId}/' for subscription scope, * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for * billingProfile scope. - * @param scope Scope of the reservation. + * @param scope1 Scope of the reservation. * @param region Used to select the region the recommendation should be generated for. * @param term Specify length of reservation recommendation term. * @param lookBackPeriod Filter the time period on which reservation recommendation results are based. @@ -299,13 +299,13 @@ public ReservationRecommendationDetailsModelInner get( */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( - String billingScope, - Scope scope, + String scope, + Scope scope1, String region, Term term, LookBackPeriod lookBackPeriod, String product, Context context) { - return getWithResponseAsync(billingScope, scope, region, term, lookBackPeriod, product, context).block(); + return getWithResponseAsync(scope, scope1, region, term, lookBackPeriod, product, context).block(); } } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationDetailsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationDetailsImpl.java index 941057acdb82..286c11dddcad 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationDetailsImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationDetailsImpl.java @@ -32,9 +32,9 @@ public ReservationRecommendationDetailsImpl( } public ReservationRecommendationDetailsModel get( - String billingScope, Scope scope, String region, Term term, LookBackPeriod lookBackPeriod, String product) { + String scope, Scope scope1, String region, Term term, LookBackPeriod lookBackPeriod, String product) { ReservationRecommendationDetailsModelInner inner = - this.serviceClient().get(billingScope, scope, region, term, lookBackPeriod, product); + this.serviceClient().get(scope, scope1, region, term, lookBackPeriod, product); if (inner != null) { return new ReservationRecommendationDetailsModelImpl(inner, this.manager()); } else { @@ -43,15 +43,15 @@ public ReservationRecommendationDetailsModel get( } public Response getWithResponse( - String billingScope, - Scope scope, + String scope, + Scope scope1, String region, Term term, LookBackPeriod lookBackPeriod, String product, Context context) { Response inner = - this.serviceClient().getWithResponse(billingScope, scope, region, term, lookBackPeriod, product, context); + this.serviceClient().getWithResponse(scope, scope1, region, term, lookBackPeriod, product, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Amount.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Amount.java index ee8a60d5cd91..60524468cafc 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Amount.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Amount.java @@ -12,7 +12,7 @@ /** The amount plus currency . */ @Immutable -public class Amount { +public final class Amount { @JsonIgnore private final ClientLogger logger = new ClientLogger(Amount.class); /* diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/AmountWithExchangeRate.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/AmountWithExchangeRate.java deleted file mode 100644 index 494127f9432c..000000000000 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/AmountWithExchangeRate.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.consumption.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.math.BigDecimal; - -/** Reseller details. */ -@Immutable -public final class AmountWithExchangeRate extends Amount { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AmountWithExchangeRate.class); - - /* - * Exchange Rate. - */ - @JsonProperty(value = "exchangeRate", access = JsonProperty.Access.WRITE_ONLY) - private BigDecimal exchangeRate; - - /* - * Exchange rate month. - */ - @JsonProperty(value = "exchangeRateMonth", access = JsonProperty.Access.WRITE_ONLY) - private Float exchangeRateMonth; - - /** - * Get the exchangeRate property: Exchange Rate. - * - * @return the exchangeRate value. - */ - public BigDecimal exchangeRate() { - return this.exchangeRate; - } - - /** - * Get the exchangeRateMonth property: Exchange rate month. - * - * @return the exchangeRateMonth value. - */ - public Float exchangeRateMonth() { - return this.exchangeRateMonth; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CreditBalanceSummary.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CreditBalanceSummary.java index b6ccd59fe9f5..75c919a8929b 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CreditBalanceSummary.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CreditBalanceSummary.java @@ -26,18 +26,6 @@ public final class CreditBalanceSummary { @JsonProperty(value = "currentBalance", access = JsonProperty.Access.WRITE_ONLY) private Amount currentBalance; - /* - * Current balance. - */ - @JsonProperty(value = "estimatedBalanceInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY) - private AmountWithExchangeRate estimatedBalanceInBillingCurrency; - - /* - * Current balance. - */ - @JsonProperty(value = "currentBalanceInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY) - private AmountWithExchangeRate currentBalanceInBillingCurrency; - /** * Get the estimatedBalance property: Estimated balance. * @@ -56,24 +44,6 @@ public Amount currentBalance() { return this.currentBalance; } - /** - * Get the estimatedBalanceInBillingCurrency property: Current balance. - * - * @return the estimatedBalanceInBillingCurrency value. - */ - public AmountWithExchangeRate estimatedBalanceInBillingCurrency() { - return this.estimatedBalanceInBillingCurrency; - } - - /** - * Get the currentBalanceInBillingCurrency property: Current balance. - * - * @return the currentBalanceInBillingCurrency value. - */ - public AmountWithExchangeRate currentBalanceInBillingCurrency() { - return this.currentBalanceInBillingCurrency; - } - /** * Validates the instance. * @@ -86,11 +56,5 @@ public void validate() { if (currentBalance() != null) { currentBalance().validate(); } - if (estimatedBalanceInBillingCurrency() != null) { - estimatedBalanceInBillingCurrency().validate(); - } - if (currentBalanceInBillingCurrency() != null) { - currentBalanceInBillingCurrency().validate(); - } } } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CreditSummary.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CreditSummary.java index e29dc637c1ff..69f0f0831d61 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CreditSummary.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CreditSummary.java @@ -30,20 +30,6 @@ public interface CreditSummary { */ String type(); - /** - * Gets the creditCurrency property: Credit Currency. - * - * @return the creditCurrency value. - */ - String creditCurrency(); - - /** - * Gets the billingCurrency property: Billing Currency. - * - * @return the billingCurrency value. - */ - String billingCurrency(); - /** * Gets the balanceSummary property: Summary of balances associated with this credit summary. * @@ -72,13 +58,6 @@ public interface CreditSummary { */ Amount pendingEligibleCharges(); - /** - * Gets the reseller property: Reseller details. - * - * @return the reseller value. - */ - Reseller reseller(); - /** * Gets the etag property: Resource etag. * diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Credits.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Credits.java index f88f521d3f0b..c81237f13f37 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Credits.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Credits.java @@ -12,31 +12,25 @@ public interface Credits { /** * The credit summary by billingAccountId and billingProfileId. * - * @param scope The scope associated with credits operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a credit summary resource. */ - CreditSummary get(String scope); + CreditSummary get(String billingAccountId, String billingProfileId); /** * The credit summary by billingAccountId and billingProfileId. * - * @param scope The scope associated with credits operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a credit summary resource. */ - Response getWithResponse(String scope, Context context); + Response getWithResponse(String billingAccountId, String billingProfileId, Context context); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CultureCode.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CultureCode.java deleted file mode 100644 index a6e0879dd012..000000000000 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CultureCode.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.consumption.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for CultureCode. */ -public final class CultureCode extends ExpandableStringEnum { - /** Static value en-us for CultureCode. */ - public static final CultureCode EN_US = fromString("en-us"); - - /** Static value ja-jp for CultureCode. */ - public static final CultureCode JA_JP = fromString("ja-jp"); - - /** Static value zh-cn for CultureCode. */ - public static final CultureCode ZH_CN = fromString("zh-cn"); - - /** Static value de-de for CultureCode. */ - public static final CultureCode DE_DE = fromString("de-de"); - - /** Static value es-es for CultureCode. */ - public static final CultureCode ES_ES = fromString("es-es"); - - /** Static value fr-fr for CultureCode. */ - public static final CultureCode FR_FR = fromString("fr-fr"); - - /** Static value it-it for CultureCode. */ - public static final CultureCode IT_IT = fromString("it-it"); - - /** Static value ko-kr for CultureCode. */ - public static final CultureCode KO_KR = fromString("ko-kr"); - - /** Static value pt-br for CultureCode. */ - public static final CultureCode PT_BR = fromString("pt-br"); - - /** Static value ru-ru for CultureCode. */ - public static final CultureCode RU_RU = fromString("ru-ru"); - - /** Static value zh-tw for CultureCode. */ - public static final CultureCode ZH_TW = fromString("zh-tw"); - - /** Static value cs-cz for CultureCode. */ - public static final CultureCode CS_CZ = fromString("cs-cz"); - - /** Static value pl-pl for CultureCode. */ - public static final CultureCode PL_PL = fromString("pl-pl"); - - /** Static value tr-tr for CultureCode. */ - public static final CultureCode TR_TR = fromString("tr-tr"); - - /** Static value da-dk for CultureCode. */ - public static final CultureCode DA_DK = fromString("da-dk"); - - /** Static value en-gb for CultureCode. */ - public static final CultureCode EN_GB = fromString("en-gb"); - - /** Static value hu-hu for CultureCode. */ - public static final CultureCode HU_HU = fromString("hu-hu"); - - /** Static value nb-no for CultureCode. */ - public static final CultureCode NB_NO = fromString("nb-no"); - - /** Static value nl-nl for CultureCode. */ - public static final CultureCode NL_NL = fromString("nl-nl"); - - /** Static value pt-pt for CultureCode. */ - public static final CultureCode PT_PT = fromString("pt-pt"); - - /** Static value sv-se for CultureCode. */ - public static final CultureCode SV_SE = fromString("sv-se"); - - /** - * Creates or finds a CultureCode from its string representation. - * - * @param name a name to look for. - * @return the corresponding CultureCode. - */ - @JsonCreator - public static CultureCode fromString(String name) { - return fromString(name, CultureCode.class); - } - - /** @return known CultureCode values. */ - public static Collection values() { - return values(CultureCode.class); - } -} diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/EventSummary.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/EventSummary.java index 17b27dd0407b..756428b96255 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/EventSummary.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/EventSummary.java @@ -31,20 +31,6 @@ public interface EventSummary { */ String type(); - /** - * Gets the creditCurrency property: Credit Currency. - * - * @return the creditCurrency value. - */ - String creditCurrency(); - - /** - * Gets the billingCurrency property: Billing Currency. - * - * @return the billingCurrency value. - */ - String billingCurrency(); - /** * Gets the transactionDate property: Transaction date. * @@ -66,13 +52,6 @@ public interface EventSummary { */ Amount newCredit(); - /** - * Gets the newCreditInBillingCurrency property: Current balance. - * - * @return the newCreditInBillingCurrency value. - */ - AmountWithExchangeRate newCreditInBillingCurrency(); - /** * Gets the adjustments property: Adjustments amount. * @@ -80,13 +59,6 @@ public interface EventSummary { */ Amount adjustments(); - /** - * Gets the adjustmentsInBillingCurrency property: Current balance. - * - * @return the adjustmentsInBillingCurrency value. - */ - AmountWithExchangeRate adjustmentsInBillingCurrency(); - /** * Gets the creditExpired property: Credit expired. * @@ -94,13 +66,6 @@ public interface EventSummary { */ Amount creditExpired(); - /** - * Gets the creditExpiredInBillingCurrency property: Current balance. - * - * @return the creditExpiredInBillingCurrency value. - */ - AmountWithExchangeRate creditExpiredInBillingCurrency(); - /** * Gets the charges property: Charges amount. * @@ -108,13 +73,6 @@ public interface EventSummary { */ Amount charges(); - /** - * Gets the chargesInBillingCurrency property: Current balance. - * - * @return the chargesInBillingCurrency value. - */ - AmountWithExchangeRate chargesInBillingCurrency(); - /** * Gets the closedBalance property: Closed balance. * @@ -122,13 +80,6 @@ public interface EventSummary { */ Amount closedBalance(); - /** - * Gets the closedBalanceInBillingCurrency property: Current balance. - * - * @return the closedBalanceInBillingCurrency value. - */ - AmountWithExchangeRate closedBalanceInBillingCurrency(); - /** * Gets the eventType property: The type of event. * @@ -143,13 +94,6 @@ public interface EventSummary { */ String invoiceNumber(); - /** - * Gets the reseller property: Reseller details. - * - * @return the reseller value. - */ - Reseller reseller(); - /** * Gets the etag property: Resource etag. * diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/EventsOperations.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/EventsOperations.java index 4cb4871b3b5a..2c6648415451 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/EventsOperations.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/EventsOperations.java @@ -12,35 +12,31 @@ public interface EventsOperations { /** * Lists the events by billingAccountId and billingProfileId for given start and end date. * + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param startDate Start date. * @param endDate End date. - * @param scope The scope associated with events operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of listing event summary. */ - PagedIterable list(String startDate, String endDate, String scope); + PagedIterable list( + String billingAccountId, String billingProfileId, String startDate, String endDate); /** * Lists the events by billingAccountId and billingProfileId for given start and end date. * + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param startDate Start date. * @param endDate End date. - * @param scope The scope associated with events operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of listing event summary. */ - PagedIterable list(String startDate, String endDate, String scope, Context context); + PagedIterable list( + String billingAccountId, String billingProfileId, String startDate, String endDate, Context context); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyUsageDetail.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyUsageDetail.java index ebddba41eaa8..31596934dddb 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyUsageDetail.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyUsageDetail.java @@ -166,7 +166,7 @@ public class LegacyUsageDetail extends UsageDetailInner { private String consumedService; /* - * Azure resource manager resource identifier. + * Unique identifier of the Azure Resource Manager usage detail resource. */ @JsonProperty(value = "properties.resourceId", access = JsonProperty.Access.WRITE_ONLY) private String resourceId; @@ -178,13 +178,13 @@ public class LegacyUsageDetail extends UsageDetailInner { private String resourceName; /* - * Service Info 1. + * Service-specific metadata. */ @JsonProperty(value = "properties.serviceInfo1", access = JsonProperty.Access.WRITE_ONLY) private String serviceInfo1; /* - * Service Info 2. + * Legacy field with optional service-specific metadata. */ @JsonProperty(value = "properties.serviceInfo2", access = JsonProperty.Access.WRITE_ONLY) private String serviceInfo2; @@ -500,7 +500,7 @@ public String consumedService() { } /** - * Get the resourceId property: Azure resource manager resource identifier. + * Get the resourceId property: Unique identifier of the Azure Resource Manager usage detail resource. * * @return the resourceId value. */ @@ -518,7 +518,7 @@ public String resourceName() { } /** - * Get the serviceInfo1 property: Service Info 1. + * Get the serviceInfo1 property: Service-specific metadata. * * @return the serviceInfo1 value. */ @@ -527,7 +527,7 @@ public String serviceInfo1() { } /** - * Get the serviceInfo2 property: Service Info 2. + * Get the serviceInfo2 property: Legacy field with optional service-specific metadata. * * @return the serviceInfo2 value. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LotSummary.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LotSummary.java index 86797bdbd258..4dfc5e9e878e 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LotSummary.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LotSummary.java @@ -31,20 +31,6 @@ public interface LotSummary { */ String type(); - /** - * Gets the creditCurrency property: Credit Currency. - * - * @return the creditCurrency value. - */ - String creditCurrency(); - - /** - * Gets the billingCurrency property: Billing Currency. - * - * @return the billingCurrency value. - */ - String billingCurrency(); - /** * Gets the originalAmount property: Original amount. * @@ -52,13 +38,6 @@ public interface LotSummary { */ Amount originalAmount(); - /** - * Gets the originalAmountInBillingCurrency property: Current balance. - * - * @return the originalAmountInBillingCurrency value. - */ - AmountWithExchangeRate originalAmountInBillingCurrency(); - /** * Gets the closedBalance property: Closed balance. * @@ -66,13 +45,6 @@ public interface LotSummary { */ Amount closedBalance(); - /** - * Gets the closedBalanceInBillingCurrency property: Current balance. - * - * @return the closedBalanceInBillingCurrency value. - */ - AmountWithExchangeRate closedBalanceInBillingCurrency(); - /** * Gets the source property: Lot source. * @@ -101,13 +73,6 @@ public interface LotSummary { */ String poNumber(); - /** - * Gets the reseller property: Reseller details. - * - * @return the reseller value. - */ - Reseller reseller(); - /** * Gets the etag property: Resource etag. * diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LotsOperations.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LotsOperations.java index bd0c75f7c8c5..4f5f68a511f9 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LotsOperations.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LotsOperations.java @@ -12,31 +12,25 @@ public interface LotsOperations { /** * Lists the lots by billingAccountId and billingProfileId. * - * @param scope The scope associated with Lots operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of listing lot summary. */ - PagedIterable list(String scope); + PagedIterable list(String billingAccountId, String billingProfileId); /** * Lists the lots by billingAccountId and billingProfileId. * - * @param scope The scope associated with Lots operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for - * Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * @param billingAccountId BillingAccount ID. + * @param billingProfileId Azure Billing Profile ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of listing lot summary. */ - PagedIterable list(String scope, Context context); + PagedIterable list(String billingAccountId, String billingProfileId, Context context); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernUsageDetail.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernUsageDetail.java index b08b6916d865..11612cf4a7ad 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernUsageDetail.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernUsageDetail.java @@ -14,6 +14,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.math.BigDecimal; import java.time.OffsetDateTime; +import java.util.UUID; /** Modern usage detail. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @@ -97,7 +98,7 @@ public class ModernUsageDetail extends UsageDetailInner { * see productOrderName. */ @JsonProperty(value = "properties.meterId", access = JsonProperty.Access.WRITE_ONLY) - private String meterId; + private UUID meterId; /* * Identifies the name of the meter against which consumption is measured. @@ -186,13 +187,13 @@ public class ModernUsageDetail extends UsageDetailInner { private String consumedService; /* - * Service Info 1. + * Service-specific metadata. */ @JsonProperty(value = "properties.serviceInfo1", access = JsonProperty.Access.WRITE_ONLY) private String serviceInfo1; /* - * Service Info 2. + * Legacy field with optional service-specific metadata. */ @JsonProperty(value = "properties.serviceInfo2", access = JsonProperty.Access.WRITE_ONLY) private String serviceInfo2; @@ -569,7 +570,7 @@ public String product() { * * @return the meterId value. */ - public String meterId() { + public UUID meterId() { return this.meterId; } @@ -696,7 +697,7 @@ public String consumedService() { } /** - * Get the serviceInfo1 property: Service Info 1. + * Get the serviceInfo1 property: Service-specific metadata. * * @return the serviceInfo1 value. */ @@ -705,7 +706,7 @@ public String serviceInfo1() { } /** - * Get the serviceInfo2 property: Service Info 2. + * Get the serviceInfo2 property: Legacy field with optional service-specific metadata. * * @return the serviceInfo2 value. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Notification.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Notification.java index ac6302aac9a7..e1ff302f134e 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Notification.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Notification.java @@ -66,12 +66,6 @@ public final class Notification { @JsonProperty(value = "thresholdType") private ThresholdType thresholdType; - /* - * Language in which the recipient will receive the notification - */ - @JsonProperty(value = "locale") - private CultureCode locale; - /** * Get the enabled property: The notification is enabled or not. * @@ -220,26 +214,6 @@ public Notification withThresholdType(ThresholdType thresholdType) { return this; } - /** - * Get the locale property: Language in which the recipient will receive the notification. - * - * @return the locale value. - */ - public CultureCode locale() { - return this.locale; - } - - /** - * Set the locale property: Language in which the recipient will receive the notification. - * - * @param locale the locale value to set. - * @return the Notification object itself. - */ - public Notification withLocale(CultureCode locale) { - this.locale = locale; - return this; - } - /** * Validates the instance. * diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/PriceSheets.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/PriceSheets.java index 90f922a28aa4..13bfc45db8b9 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/PriceSheets.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/PriceSheets.java @@ -10,18 +10,16 @@ /** Resource collection API of PriceSheets. */ public interface PriceSheets { /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or - * later. + * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a scope by subscriptionId. + * @return the price sheet for a subscription. */ PriceSheetResult get(); /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or - * later. + * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later. * * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields * are not included when returning price sheet. @@ -33,7 +31,7 @@ public interface PriceSheets { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a scope by subscriptionId. + * @return the price sheet for a subscription. */ Response getWithResponse(String expand, String skiptoken, Integer top, Context context); diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Reseller.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Reseller.java deleted file mode 100644 index 1be58a1561cf..000000000000 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Reseller.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.consumption.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Reseller details. */ -@Immutable -public final class Reseller { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Reseller.class); - - /* - * Reseller id. - */ - @JsonProperty(value = "resellerId", access = JsonProperty.Access.WRITE_ONLY) - private String resellerId; - - /* - * Reseller Description. - */ - @JsonProperty(value = "resellerDescription", access = JsonProperty.Access.WRITE_ONLY) - private String resellerDescription; - - /** - * Get the resellerId property: Reseller id. - * - * @return the resellerId value. - */ - public String resellerId() { - return this.resellerId; - } - - /** - * Get the resellerDescription property: Reseller Description. - * - * @return the resellerDescription value. - */ - public String resellerDescription() { - return this.resellerDescription; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetails.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetails.java index c7454899d831..f129d984809e 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetails.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetails.java @@ -12,13 +12,13 @@ public interface ReservationRecommendationDetails { /** * Details of a reservation recommendation for what-if analysis of reserved instances. * - * @param billingScope The scope associated with reservation recommendation details operations. This includes + * @param scope The scope associated with reservation recommendation details operations. This includes * '/subscriptions/{subscriptionId}/' for subscription scope, * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for * billingProfile scope. - * @param scope Scope of the reservation. + * @param scope1 Scope of the reservation. * @param region Used to select the region the recommendation should be generated for. * @param term Specify length of reservation recommendation term. * @param lookBackPeriod Filter the time period on which reservation recommendation results are based. @@ -30,18 +30,18 @@ public interface ReservationRecommendationDetails { * @return reservation recommendation details. */ ReservationRecommendationDetailsModel get( - String billingScope, Scope scope, String region, Term term, LookBackPeriod lookBackPeriod, String product); + String scope, Scope scope1, String region, Term term, LookBackPeriod lookBackPeriod, String product); /** * Details of a reservation recommendation for what-if analysis of reserved instances. * - * @param billingScope The scope associated with reservation recommendation details operations. This includes + * @param scope The scope associated with reservation recommendation details operations. This includes * '/subscriptions/{subscriptionId}/' for subscription scope, * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for * billingProfile scope. - * @param scope Scope of the reservation. + * @param scope1 Scope of the reservation. * @param region Used to select the region the recommendation should be generated for. * @param term Specify length of reservation recommendation term. * @param lookBackPeriod Filter the time period on which reservation recommendation results are based. @@ -54,8 +54,8 @@ ReservationRecommendationDetailsModel get( * @return reservation recommendation details. */ Response getWithResponse( - String billingScope, - Scope scope, + String scope, + Scope scope1, String region, Term term, LookBackPeriod lookBackPeriod,