diff --git a/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md b/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md
index b713d35da2ba..bd966e6e1b93 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md
+++ b/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.4 (Unreleased)
+## 1.0.0-beta.1 (2022-07-13)
+
+- 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-2021-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
diff --git a/sdk/consumption/azure-resourcemanager-consumption/README.md b/sdk/consumption/azure-resourcemanager-consumption/README.md
index 4bc0fe107d50..d88d7959f2b2 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/README.md
+++ b/sdk/consumption/azure-resourcemanager-consumption/README.md
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanagerazure-resourcemanager-consumption
- 1.0.0-beta.3
+ 1.0.0-beta.4
```
[//]: # ({x-version-update-end})
diff --git a/sdk/consumption/azure-resourcemanager-consumption/SAMPLE.md b/sdk/consumption/azure-resourcemanager-consumption/SAMPLE.md
index a96cb65e9053..490f5950220b 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/SAMPLE.md
+++ b/sdk/consumption/azure-resourcemanager-consumption/SAMPLE.md
@@ -35,11 +35,16 @@
- [ListByBillingAccount](#lotsoperation_listbybillingaccount)
- [ListByBillingProfile](#lotsoperation_listbybillingprofile)
+- [ListByCustomer](#lotsoperation_listbycustomer)
## Marketplaces
- [List](#marketplaces_list)
+## Operations
+
+- [List](#operations_list)
+
## PriceSheet
- [Get](#pricesheet_get)
@@ -768,6 +773,42 @@ public final class LotsOperationListByBillingProfileSamples {
}
```
+### LotsOperation_ListByCustomer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LotsOperation ListByCustomer. */
+public final class LotsOperationListByCustomerSamples {
+ /*
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByCustomer.json
+ */
+ /**
+ * Sample code: LotsListByCustomer.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void lotsListByCustomer(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager.lotsOperations().listByCustomer("1234:5678", "1234:5678", null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByCustomerWithFilters.json
+ */
+ /**
+ * Sample code: LotsListByCustomerWithFilter.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void lotsListByCustomerWithFilter(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager
+ .lotsOperations()
+ .listByCustomer(
+ "1234:5678", "1234:5678", "status eq 'active' AND source eq 'consumptioncommitment'", Context.NONE);
+ }
+}
+```
+
### Marketplaces_List
```java
@@ -921,6 +962,27 @@ public final class MarketplacesListSamples {
}
```
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/OperationList.json
+ */
+ /**
+ * Sample code: PriceSheetForBillingPeriod.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void priceSheetForBillingPeriod(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
### PriceSheet_Get
```java
@@ -980,6 +1042,7 @@ public final class PriceSheetGetByBillingPeriodSamples {
```java
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.models.LookBackPeriod;
+import com.azure.resourcemanager.consumption.models.Scope;
import com.azure.resourcemanager.consumption.models.Term;
/** Samples for ReservationRecommendationDetails Get. */
@@ -996,7 +1059,14 @@ public final class ReservationRecommendationDetailsGetSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.reservationRecommendationDetails()
- .getWithResponse("Single", "westus", Term.P3Y, LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", Context.NONE);
+ .getWithResponse(
+ "subscriptions/00000000-0000-0000-0000-00000000",
+ Scope.SINGLE,
+ "westus",
+ Term.P3Y,
+ LookBackPeriod.LAST30DAYS,
+ "Standard_DS13_v2",
+ Context.NONE);
}
/*
@@ -1012,7 +1082,13 @@ public final class ReservationRecommendationDetailsGetSamples {
manager
.reservationRecommendationDetails()
.getWithResponse(
- "Shared", "australiaeast", Term.P1Y, LookBackPeriod.LAST7DAYS, "Standard_B2s", Context.NONE);
+ "providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-00000000:00000000-0000-0000-0000-00000000/billingProfiles/00000000-0000-0000-0000-00000000",
+ Scope.SHARED,
+ "australiaeast",
+ Term.P1Y,
+ LookBackPeriod.LAST7DAYS,
+ "Standard_B2s",
+ Context.NONE);
}
/*
@@ -1027,7 +1103,14 @@ public final class ReservationRecommendationDetailsGetSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.reservationRecommendationDetails()
- .getWithResponse("Single", "westus", Term.P3Y, LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", Context.NONE);
+ .getWithResponse(
+ "subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/testGroup",
+ Scope.SINGLE,
+ "westus",
+ Term.P3Y,
+ LookBackPeriod.LAST30DAYS,
+ "Standard_DS13_v2",
+ Context.NONE);
}
/*
@@ -1042,7 +1125,14 @@ public final class ReservationRecommendationDetailsGetSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.reservationRecommendationDetails()
- .getWithResponse("Shared", "eastus", Term.P1Y, LookBackPeriod.LAST60DAYS, "Standard_DS14_v2", Context.NONE);
+ .getWithResponse(
+ "providers/Microsoft.Billing/billingAccounts/000000",
+ Scope.SHARED,
+ "eastus",
+ Term.P1Y,
+ LookBackPeriod.LAST60DAYS,
+ "Standard_DS14_v2",
+ Context.NONE);
}
}
```
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java
index fba287434277..8812df1bfd84 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java
@@ -10,11 +10,13 @@
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
@@ -130,6 +132,19 @@ public static ConsumptionManager authenticate(TokenCredential credential, AzureP
return configure().authenticate(credential, profile);
}
+ /**
+ * Creates an instance of Consumption service API entry point.
+ *
+ * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
+ * @param profile the Azure profile for client.
+ * @return the Consumption service API instance.
+ */
+ public static ConsumptionManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return new ConsumptionManager(httpPipeline, profile, null);
+ }
+
/**
* Gets a Configurable instance that can be used to create ConsumptionManager with optional configuration.
*
@@ -141,13 +156,14 @@ public static Configurable configure() {
/** The Configurable allowing configurations to be set. */
public static final class Configurable {
- private final ClientLogger logger = new ClientLogger(Configurable.class);
+ private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -208,6 +224,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ *
This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -215,9 +244,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -239,7 +270,7 @@ public ConsumptionManager authenticate(TokenCredential credential, AzureProfile
.append("-")
.append("com.azure.resourcemanager.consumption")
.append("/")
- .append("1.0.0-beta.3");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -257,10 +288,15 @@ public ConsumptionManager authenticate(TokenCredential credential, AzureProfile
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
@@ -291,7 +327,11 @@ public ConsumptionManager authenticate(TokenCredential credential, AzureProfile
}
}
- /** @return Resource collection API of UsageDetails. */
+ /**
+ * Gets the resource collection API of UsageDetails.
+ *
+ * @return Resource collection API of UsageDetails.
+ */
public UsageDetails usageDetails() {
if (this.usageDetails == null) {
this.usageDetails = new UsageDetailsImpl(clientObject.getUsageDetails(), this);
@@ -299,7 +339,11 @@ public UsageDetails usageDetails() {
return usageDetails;
}
- /** @return Resource collection API of Marketplaces. */
+ /**
+ * Gets the resource collection API of Marketplaces.
+ *
+ * @return Resource collection API of Marketplaces.
+ */
public Marketplaces marketplaces() {
if (this.marketplaces == null) {
this.marketplaces = new MarketplacesImpl(clientObject.getMarketplaces(), this);
@@ -307,7 +351,11 @@ public Marketplaces marketplaces() {
return marketplaces;
}
- /** @return Resource collection API of Budgets. */
+ /**
+ * Gets the resource collection API of Budgets. It manages Budget.
+ *
+ * @return Resource collection API of Budgets.
+ */
public Budgets budgets() {
if (this.budgets == null) {
this.budgets = new BudgetsImpl(clientObject.getBudgets(), this);
@@ -315,7 +363,11 @@ public Budgets budgets() {
return budgets;
}
- /** @return Resource collection API of Tags. */
+ /**
+ * Gets the resource collection API of Tags.
+ *
+ * @return Resource collection API of Tags.
+ */
public Tags tags() {
if (this.tags == null) {
this.tags = new TagsImpl(clientObject.getTags(), this);
@@ -323,7 +375,11 @@ public Tags tags() {
return tags;
}
- /** @return Resource collection API of Charges. */
+ /**
+ * Gets the resource collection API of Charges.
+ *
+ * @return Resource collection API of Charges.
+ */
public Charges charges() {
if (this.charges == null) {
this.charges = new ChargesImpl(clientObject.getCharges(), this);
@@ -331,7 +387,11 @@ public Charges charges() {
return charges;
}
- /** @return Resource collection API of Balances. */
+ /**
+ * Gets the resource collection API of Balances.
+ *
+ * @return Resource collection API of Balances.
+ */
public Balances balances() {
if (this.balances == null) {
this.balances = new BalancesImpl(clientObject.getBalances(), this);
@@ -339,7 +399,11 @@ public Balances balances() {
return balances;
}
- /** @return Resource collection API of ReservationsSummaries. */
+ /**
+ * Gets the resource collection API of ReservationsSummaries.
+ *
+ * @return Resource collection API of ReservationsSummaries.
+ */
public ReservationsSummaries reservationsSummaries() {
if (this.reservationsSummaries == null) {
this.reservationsSummaries = new ReservationsSummariesImpl(clientObject.getReservationsSummaries(), this);
@@ -347,7 +411,11 @@ public ReservationsSummaries reservationsSummaries() {
return reservationsSummaries;
}
- /** @return Resource collection API of ReservationsDetails. */
+ /**
+ * Gets the resource collection API of ReservationsDetails.
+ *
+ * @return Resource collection API of ReservationsDetails.
+ */
public ReservationsDetails reservationsDetails() {
if (this.reservationsDetails == null) {
this.reservationsDetails = new ReservationsDetailsImpl(clientObject.getReservationsDetails(), this);
@@ -355,7 +423,11 @@ public ReservationsDetails reservationsDetails() {
return reservationsDetails;
}
- /** @return Resource collection API of ReservationRecommendations. */
+ /**
+ * Gets the resource collection API of ReservationRecommendations.
+ *
+ * @return Resource collection API of ReservationRecommendations.
+ */
public ReservationRecommendations reservationRecommendations() {
if (this.reservationRecommendations == null) {
this.reservationRecommendations =
@@ -364,7 +436,11 @@ public ReservationRecommendations reservationRecommendations() {
return reservationRecommendations;
}
- /** @return Resource collection API of ReservationRecommendationDetails. */
+ /**
+ * Gets the resource collection API of ReservationRecommendationDetails.
+ *
+ * @return Resource collection API of ReservationRecommendationDetails.
+ */
public ReservationRecommendationDetails reservationRecommendationDetails() {
if (this.reservationRecommendationDetails == null) {
this.reservationRecommendationDetails =
@@ -373,7 +449,11 @@ public ReservationRecommendationDetails reservationRecommendationDetails() {
return reservationRecommendationDetails;
}
- /** @return Resource collection API of ReservationTransactions. */
+ /**
+ * Gets the resource collection API of ReservationTransactions.
+ *
+ * @return Resource collection API of ReservationTransactions.
+ */
public ReservationTransactions reservationTransactions() {
if (this.reservationTransactions == null) {
this.reservationTransactions =
@@ -382,7 +462,11 @@ public ReservationTransactions reservationTransactions() {
return reservationTransactions;
}
- /** @return Resource collection API of PriceSheets. */
+ /**
+ * Gets the resource collection API of PriceSheets.
+ *
+ * @return Resource collection API of PriceSheets.
+ */
public PriceSheets priceSheets() {
if (this.priceSheets == null) {
this.priceSheets = new PriceSheetsImpl(clientObject.getPriceSheets(), this);
@@ -390,7 +474,11 @@ public PriceSheets priceSheets() {
return priceSheets;
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
@@ -398,7 +486,11 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of AggregatedCosts. */
+ /**
+ * Gets the resource collection API of AggregatedCosts.
+ *
+ * @return Resource collection API of AggregatedCosts.
+ */
public AggregatedCosts aggregatedCosts() {
if (this.aggregatedCosts == null) {
this.aggregatedCosts = new AggregatedCostsImpl(clientObject.getAggregatedCosts(), this);
@@ -406,7 +498,11 @@ public AggregatedCosts aggregatedCosts() {
return aggregatedCosts;
}
- /** @return Resource collection API of EventsOperations. */
+ /**
+ * Gets the resource collection API of EventsOperations.
+ *
+ * @return Resource collection API of EventsOperations.
+ */
public EventsOperations eventsOperations() {
if (this.eventsOperations == null) {
this.eventsOperations = new EventsOperationsImpl(clientObject.getEventsOperations(), this);
@@ -414,7 +510,11 @@ public EventsOperations eventsOperations() {
return eventsOperations;
}
- /** @return Resource collection API of LotsOperations. */
+ /**
+ * Gets the resource collection API of LotsOperations.
+ *
+ * @return Resource collection API of LotsOperations.
+ */
public LotsOperations lotsOperations() {
if (this.lotsOperations == null) {
this.lotsOperations = new LotsOperationsImpl(clientObject.getLotsOperations(), this);
@@ -422,7 +522,11 @@ public LotsOperations lotsOperations() {
return lotsOperations;
}
- /** @return Resource collection API of Credits. */
+ /**
+ * Gets the resource collection API of Credits.
+ *
+ * @return Resource collection API of Credits.
+ */
public Credits credits() {
if (this.credits == null) {
this.credits = new CreditsImpl(clientObject.getCredits(), this);
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java
index 813767044909..5226b38b9591 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java
@@ -35,7 +35,7 @@ public interface AggregatedCostsClient {
* @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 management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByManagementGroupWithResponse(
@@ -64,7 +64,7 @@ ManagementGroupAggregatedCostResultInner getForBillingPeriodByManagementGroup(
* @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 management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getForBillingPeriodByManagementGroupWithResponse(
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java
index e21a93426a85..7753615b49e7 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java
@@ -34,7 +34,7 @@ public interface BalancesClient {
* @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 balances for a scope by billingAccountId.
+ * @return the balances for a scope by billingAccountId along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByBillingAccountWithResponse(String billingAccountId, Context context);
@@ -63,7 +63,7 @@ public interface BalancesClient {
* @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 balances for a scope by billing period and billingAccountId.
+ * @return the balances for a scope by billing period and billingAccountId along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getForBillingPeriodByBillingAccountWithResponse(
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java
index 031ef9c557ca..7a254e4bebde 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java
@@ -31,7 +31,7 @@ public interface BudgetsClient {
* @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 budgets.
+ * @return result of listing budgets as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String scope);
@@ -55,7 +55,7 @@ public interface BudgetsClient {
* @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 budgets.
+ * @return result of listing budgets as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String scope, Context context);
@@ -104,7 +104,7 @@ public interface BudgetsClient {
* @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 budget for the scope by budget name.
+ * @return the budget for the scope by budget name along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(String scope, String budgetName, Context context);
@@ -159,7 +159,7 @@ public interface BudgetsClient {
* @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 budget resource.
+ * @return a budget resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -208,7 +208,7 @@ Response createOrUpdateWithResponse(
* @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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(String scope, String budgetName, Context context);
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java
index 58df00d67d60..c6f0fb6b9be3 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java
@@ -70,7 +70,7 @@ public interface ChargesClient {
* @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 charge summary.
+ * @return result of listing charge summary along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response listWithResponse(
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 4a9bba8b64c6..2cd5ce5a6372 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
@@ -34,7 +34,7 @@ public interface CreditsClient {
* @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.
+ * @return a credit summary resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
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 7591c8b7840b..b9c7f11a7a63 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
@@ -23,7 +23,7 @@ public interface EventsOperationsClient {
* @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.
+ * @return result of listing event summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingProfile(
@@ -41,7 +41,7 @@ PagedIterable listByBillingProfile(
* @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.
+ * @return result of listing event summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingProfile(
@@ -55,7 +55,7 @@ PagedIterable listByBillingProfile(
* @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.
+ * @return result of listing event summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingAccount(String billingAccountId);
@@ -72,7 +72,7 @@ PagedIterable listByBillingProfile(
* @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.
+ * @return result of listing event summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingAccount(String billingAccountId, String filter, 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 6c7db7249652..43d2f2092bcd 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
@@ -13,22 +13,22 @@
/** An instance of this class provides access to all the operations defined in LotsOperationsClient. */
public interface LotsOperationsClient {
/**
- * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile.
- * Microsoft Azure consumption commitments are only supported for the billing account scope.
+ * Lists all Azure credits for a billing account or a billing profile. The API is only supported for Microsoft
+ * Customer Agreements (MCA) billing accounts.
*
* @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.
+ * @return result of listing lot summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingProfile(String billingAccountId, String billingProfileId);
/**
- * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile.
- * Microsoft Azure consumption commitments are only supported for the billing account scope.
+ * Lists all Azure credits for a billing account or a billing profile. The API is only supported for Microsoft
+ * Customer Agreements (MCA) billing accounts.
*
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile ID.
@@ -36,28 +36,28 @@ public interface LotsOperationsClient {
* @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.
+ * @return result of listing lot summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingProfile(
String billingAccountId, String billingProfileId, Context context);
/**
- * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile.
- * Microsoft Azure consumption commitments are only supported for the billing account scope.
+ * Lists all Microsoft Azure consumption commitments for a billing account. The API is only supported for Microsoft
+ * Customer Agreements (MCA) and Direct Enterprise Agreement (EA) billing accounts.
*
* @param billingAccountId BillingAccount 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.
+ * @return result of listing lot summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingAccount(String billingAccountId);
/**
- * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile.
- * Microsoft Azure consumption commitments are only supported for the billing account scope.
+ * Lists all Microsoft Azure consumption commitments for a billing account. The API is only supported for Microsoft
+ * Customer Agreements (MCA) and Direct Enterprise Agreement (EA) billing accounts.
*
* @param billingAccountId BillingAccount ID.
* @param filter May be used to filter the lots by Status, Source etc. The filter supports 'eq', 'lt', 'gt', 'le',
@@ -67,8 +67,40 @@ PagedIterable listByBillingProfile(
* @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.
+ * @return result of listing lot summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingAccount(String billingAccountId, String filter, Context context);
+
+ /**
+ * Lists all Azure credits for a customer. The API is only supported for Microsoft Partner Agreements (MPA) billing
+ * accounts.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param customerId Customer 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 as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCustomer(String billingAccountId, String customerId);
+
+ /**
+ * Lists all Azure credits for a customer. The API is only supported for Microsoft Partner Agreements (MPA) billing
+ * accounts.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param customerId Customer ID.
+ * @param filter May be used to filter the lots by Status, Source etc. The filter supports 'eq', 'lt', 'gt', 'le',
+ * 'ge', and 'and'. Tag filter is a key value pair string where key and value is separated by a colon (:).
+ * @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 as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCustomer(
+ String billingAccountId, String customerId, String filter, Context context);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java
index 56f5b91e7340..a6a9d0d63389 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java
@@ -28,7 +28,7 @@ public interface MarketplacesClient {
* @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 marketplaces.
+ * @return result of listing marketplaces as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String scope);
@@ -57,7 +57,7 @@ public interface MarketplacesClient {
* @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 marketplaces.
+ * @return result of listing marketplaces as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String scope, String filter, Integer top, String skiptoken, Context context);
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java
index d8528c9abbd3..2572135f1224 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java
@@ -17,7 +17,7 @@ public interface OperationsClient {
*
* @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 consumption operations.
+ * @return result of listing consumption operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +29,7 @@ public interface OperationsClient {
* @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 consumption operations.
+ * @return result of listing consumption operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(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 083b16f7e65c..d10e419cb7cd 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
@@ -35,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 subscription.
+ * @return the price sheet for a subscription along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(String expand, String skiptoken, Integer top, Context context);
@@ -68,7 +68,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 and billing period.
+ * @return the price sheet for a scope by subscriptionId and billing period along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByBillingPeriodWithResponse(
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 042ad2b40fdd..6e41923b3f90 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
@@ -10,6 +10,7 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.ReservationRecommendationDetailsModelInner;
import com.azure.resourcemanager.consumption.models.LookBackPeriod;
+import com.azure.resourcemanager.consumption.models.Scope;
import com.azure.resourcemanager.consumption.models.Term;
/**
@@ -19,12 +20,13 @@ public interface ReservationRecommendationDetailsClient {
/**
* Details of a reservation recommendation for what-if analysis of reserved instances.
*
- * @param scope The scope associated with reservation recommendation details operations. This includes
+ * @param resourceScope 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 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.
@@ -37,17 +39,18 @@ public interface ReservationRecommendationDetailsClient {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ReservationRecommendationDetailsModelInner get(
- String scope, String region, Term term, LookBackPeriod lookBackPeriod, String product);
+ String resourceScope, Scope scope, String region, Term term, LookBackPeriod lookBackPeriod, String product);
/**
* Details of a reservation recommendation for what-if analysis of reserved instances.
*
- * @param scope The scope associated with reservation recommendation details operations. This includes
+ * @param resourceScope 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 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.
@@ -57,9 +60,15 @@ ReservationRecommendationDetailsModelInner get(
* @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 reservation recommendation details.
+ * @return reservation recommendation details along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
- String scope, String region, Term term, LookBackPeriod lookBackPeriod, String product, Context context);
+ String resourceScope,
+ Scope scope,
+ String region,
+ Term term,
+ LookBackPeriod lookBackPeriod,
+ String product,
+ Context context);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java
index c713f5d4d277..2cdb16d222ea 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java
@@ -15,7 +15,7 @@ public interface ReservationRecommendationsClient {
/**
* List of recommendations for purchasing reserved instances.
*
- * @param scope The scope associated with reservation recommendations operations. This includes
+ * @param resourceScope The scope associated with reservation recommendations 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
@@ -24,15 +24,15 @@ public interface ReservationRecommendationsClient {
* @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 reservation recommendations.
+ * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String scope);
+ PagedIterable list(String resourceScope);
/**
* List of recommendations for purchasing reserved instances.
*
- * @param scope The scope associated with reservation recommendations operations. This includes
+ * @param resourceScope The scope associated with reservation recommendations 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
@@ -48,8 +48,8 @@ public interface ReservationRecommendationsClient {
* @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 reservation recommendations.
+ * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String scope, String filter, Context context);
+ PagedIterable list(String resourceScope, String filter, Context context);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java
index 3d45b967b6e3..8f3b75434ff4 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java
@@ -14,58 +14,75 @@
/** An instance of this class provides access to all the operations defined in ReservationTransactionsClient. */
public interface ReservationTransactionsClient {
/**
- * List of transactions for reserved instances on billing account scope.
+ * List of transactions for reserved instances on billing account scope. Note: The refund transactions are posted
+ * along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in
+ * May 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the
+ * reservation purchase was made.
*
* @param billingAccountId BillingAccount 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 reservation recommendations.
+ * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String billingAccountId);
/**
- * List of transactions for reserved instances on billing account scope.
+ * List of transactions for reserved instances on billing account scope. Note: The refund transactions are posted
+ * along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in
+ * May 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the
+ * reservation purchase was made.
*
* @param billingAccountId BillingAccount ID.
* @param filter Filter reservation transactions by date range. The properties/EventDate for start date and end
- * date. The filter supports 'le' and 'ge'.
+ * date. The filter supports 'le' and 'ge'. Note: API returns data for the entire start date's and end date's
+ * billing month. For example, filter properties/eventDate+ge+2020-01-01+AND+properties/eventDate+le+2020-12-29
+ * will include data for the entire December 2020 month (i.e. will contain records for dates December 30 and
+ * 31).
* @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 reservation recommendations.
+ * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String billingAccountId, String filter, Context context);
/**
- * List of transactions for reserved instances on billing account scope.
+ * List of transactions for reserved instances on billing profile scope. The refund transactions are posted along
+ * with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May
+ * 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the
+ * reservation purchase was made.
*
* @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 reservation recommendations.
+ * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingProfile(
String billingAccountId, String billingProfileId);
/**
- * List of transactions for reserved instances on billing account scope.
+ * List of transactions for reserved instances on billing profile scope. The refund transactions are posted along
+ * with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May
+ * 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the
+ * reservation purchase was made.
*
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile ID.
* @param filter Filter reservation transactions by date range. The properties/EventDate for start date and end
- * date. The filter supports 'le' and 'ge'.
+ * date. The filter supports 'le' and 'ge'. Note: API returns data for the entire start date's and end date's
+ * billing month. For example, filter properties/eventDate+ge+2020-01-01+AND+properties/eventDate+le+2020-12-29
+ * will include data for entire December 2020 month (i.e. will contain records for dates December 30 and 31).
* @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 reservation recommendations.
+ * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingProfile(
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java
index 2ffbf884bf39..2ad52de33a81 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java
@@ -13,7 +13,9 @@
/** An instance of this class provides access to all the operations defined in ReservationsDetailsClient. */
public interface ReservationsDetailsClient {
/**
- * Lists the reservations details for provided date range.
+ * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
+ * callers get 502 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller
+ * date ranges.
*
* @param reservationOrderId Order Id of the reservation.
* @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The
@@ -21,13 +23,15 @@ public interface ReservationsDetailsClient {
* @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 reservation details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrder(String reservationOrderId, String filter);
/**
- * Lists the reservations details for provided date range.
+ * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
+ * callers get 502 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller
+ * date ranges.
*
* @param reservationOrderId Order Id of the reservation.
* @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The
@@ -36,14 +40,16 @@ public interface ReservationsDetailsClient {
* @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 reservation details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrder(
String reservationOrderId, String filter, Context context);
/**
- * Lists the reservations details for provided date range.
+ * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
+ * callers get 502 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller
+ * date ranges.
*
* @param reservationOrderId Order Id of the reservation.
* @param reservationId Id of the reservation.
@@ -52,14 +58,16 @@ PagedIterable listByReservationOrder(
* @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 reservation details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrderAndReservation(
String reservationOrderId, String reservationId, String filter);
/**
- * Lists the reservations details for provided date range.
+ * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
+ * callers get 502 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller
+ * date ranges.
*
* @param reservationOrderId Order Id of the reservation.
* @param reservationId Id of the reservation.
@@ -69,31 +77,35 @@ PagedIterable listByReservationOrderAndReservation(
* @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 reservation details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrderAndReservation(
String reservationOrderId, String reservationId, String filter, Context context);
/**
- * Lists the reservations details for the defined scope and provided date range.
+ * Lists the reservations details for the defined scope and provided date range. Note: ARM has a payload size limit
+ * of 12MB, so currently callers get 502 when the response size exceeds the ARM limit. In such cases, API call
+ * should be made with smaller date ranges.
*
- * @param scope The scope associated with reservations details operations. This includes
+ * @param resourceScope The scope associated with reservations details operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* BillingProfile scope (modern).
* @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 reservation details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String scope);
+ PagedIterable list(String resourceScope);
/**
- * Lists the reservations details for the defined scope and provided date range.
+ * Lists the reservations details for the defined scope and provided date range. Note: ARM has a payload size limit
+ * of 12MB, so currently callers get 502 when the response size exceeds the ARM limit. In such cases, API call
+ * should be made with smaller date ranges.
*
- * @param scope The scope associated with reservations details operations. This includes
+ * @param resourceScope The scope associated with reservations details operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* BillingProfile scope (modern).
@@ -109,11 +121,11 @@ PagedIterable listByReservationOrderAndReservation(
* @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 reservation details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
- String scope,
+ String resourceScope,
String startDate,
String endDate,
String filter,
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java
index 40be069d1339..f69a1b7eba39 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java
@@ -21,7 +21,7 @@ public interface ReservationsSummariesClient {
* @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 reservation summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrder(String reservationOrderId, Datagrain grain);
@@ -37,7 +37,7 @@ public interface ReservationsSummariesClient {
* @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 reservation summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrder(
@@ -52,7 +52,7 @@ PagedIterable listByReservationOrder(
* @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 reservation summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrderAndReservation(
@@ -70,7 +70,7 @@ PagedIterable listByReservationOrderAndReservation(
* @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 reservation summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrderAndReservation(
@@ -79,7 +79,7 @@ PagedIterable listByReservationOrderAndReservation(
/**
* Lists the reservations summaries for the defined scope daily or monthly grain.
*
- * @param scope The scope associated with reservations summaries operations. This includes
+ * @param resourceScope The scope associated with reservations summaries operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* BillingProfile scope (modern).
@@ -87,15 +87,15 @@ PagedIterable listByReservationOrderAndReservation(
* @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 reservation summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String scope, Datagrain grain);
+ PagedIterable list(String resourceScope, Datagrain grain);
/**
* Lists the reservations summaries for the defined scope daily or monthly grain.
*
- * @param scope The scope associated with reservations summaries operations. This includes
+ * @param resourceScope The scope associated with reservations summaries operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* BillingProfile scope (modern).
@@ -112,11 +112,11 @@ PagedIterable listByReservationOrderAndReservation(
* @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 reservation summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
- String scope,
+ String resourceScope,
Datagrain grain,
String startDate,
String endDate,
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java
index 2266b2caca8c..51513f3ef75c 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java
@@ -46,7 +46,7 @@ public interface TagsClient {
* @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 all available tag keys for the defined scope.
+ * @return all available tag keys for the defined scope along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(String scope, Context context);
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java
index e89c21afee28..58aad7b4521b 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java
@@ -37,7 +37,7 @@ public interface UsageDetailsClient {
* @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 usage details.
+ * @return result of listing usage details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String scope);
@@ -79,7 +79,7 @@ public interface UsageDetailsClient {
* @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 usage details.
+ * @return result of listing usage details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java
index be4d23435c3b..88cb54ce4cd7 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java
@@ -6,11 +6,9 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.BalancePropertiesAdjustmentDetailsItem;
import com.azure.resourcemanager.consumption.models.BalancePropertiesNewPurchasesDetailsItem;
import com.azure.resourcemanager.consumption.models.BillingFrequency;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
@@ -20,8 +18,6 @@
/** A balance resource. */
@Fluent
public final class BalanceInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(BalanceInner.class);
-
/*
* The properties of the balance.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java
index f0e15ad53cf2..26cc57ff30dc 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java
@@ -5,11 +5,9 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.BalancePropertiesAdjustmentDetailsItem;
import com.azure.resourcemanager.consumption.models.BalancePropertiesNewPurchasesDetailsItem;
import com.azure.resourcemanager.consumption.models.BillingFrequency;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.util.List;
@@ -17,8 +15,6 @@
/** The properties of the balance. */
@Fluent
public final class BalanceProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(BalanceProperties.class);
-
/*
* The ISO currency in which the meter is charged, for example, USD.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetInner.java
index f8fea1a4e18b..f188de9f3491 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetInner.java
@@ -6,7 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.BudgetFilter;
import com.azure.resourcemanager.consumption.models.BudgetTimePeriod;
import com.azure.resourcemanager.consumption.models.CategoryType;
@@ -14,7 +13,6 @@
import com.azure.resourcemanager.consumption.models.ForecastSpend;
import com.azure.resourcemanager.consumption.models.Notification;
import com.azure.resourcemanager.consumption.models.TimeGrainType;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.util.Map;
@@ -22,8 +20,6 @@
/** A budget resource. */
@Fluent
public final class BudgetInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(BudgetInner.class);
-
/*
* The properties of the budget.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetProperties.java
index ef8131acd287..1f2fb2ffbb64 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetProperties.java
@@ -13,7 +13,6 @@
import com.azure.resourcemanager.consumption.models.ForecastSpend;
import com.azure.resourcemanager.consumption.models.Notification;
import com.azure.resourcemanager.consumption.models.TimeGrainType;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
@@ -22,8 +21,6 @@
/** The properties of the budget. */
@Fluent
public final class BudgetProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(BudgetProperties.class);
-
/*
* The category of the budget, whether the budget tracks cost or usage.
*/
@@ -235,22 +232,22 @@ public ForecastSpend forecastSpend() {
*/
public void validate() {
if (category() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property category in model BudgetProperties"));
}
if (amount() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property amount in model BudgetProperties"));
}
if (timeGrain() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property timeGrain in model BudgetProperties"));
}
if (timePeriod() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property timePeriod in model BudgetProperties"));
} else {
@@ -276,4 +273,6 @@ public void validate() {
forecastSpend().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(BudgetProperties.class);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ChargesListResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ChargesListResultInner.java
index 4675dd79f2cb..c7810d6a49a1 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ChargesListResultInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ChargesListResultInner.java
@@ -5,17 +5,13 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.ChargeSummary;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Result of listing charge summary. */
@Immutable
public final class ChargesListResultInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ChargesListResultInner.class);
-
/*
* The list of charge summary
*/
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 0ee648db2f11..1c97e88f78a4 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
@@ -6,20 +6,14 @@
import com.azure.core.annotation.Fluent;
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.CreditBalanceSummary;
import com.azure.resourcemanager.consumption.models.Reseller;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.Map;
/** A credit summary resource. */
@Fluent
public final class CreditSummaryInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CreditSummaryInner.class);
-
/*
* The properties of the credit summary.
*/
@@ -27,18 +21,13 @@ public final class CreditSummaryInner extends ProxyResource {
private CreditSummaryProperties innerProperties;
/*
- * The etag for the resource.
+ * eTag of the resource. To handle concurrent update scenario, this field
+ * will be used to determine whether the user is updating the latest
+ * version or not.
*/
- @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ @JsonProperty(value = "eTag")
private String etag;
- /*
- * Resource tags.
- */
- @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
- private Map tags;
-
/**
* Get the innerProperties property: The properties of the credit summary.
*
@@ -49,7 +38,8 @@ private CreditSummaryProperties innerProperties() {
}
/**
- * Get the etag property: The etag for the resource.
+ * Get the etag property: eTag of the resource. To handle concurrent update scenario, this field will be used to
+ * determine whether the user is updating the latest version or not.
*
* @return the etag value.
*/
@@ -58,12 +48,15 @@ public String etag() {
}
/**
- * Get the tags property: Resource tags.
+ * Set the etag property: eTag of the resource. To handle concurrent update scenario, this field will be used to
+ * determine whether the user is updating the latest version or not.
*
- * @return the tags value.
+ * @param etag the etag value to set.
+ * @return the CreditSummaryInner object itself.
*/
- public Map tags() {
- return this.tags;
+ public CreditSummaryInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
}
/**
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryProperties.java
index cbe557ebe2bb..0aa81ffb166c 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryProperties.java
@@ -5,18 +5,14 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-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;
/** The properties of the credit summary. */
@Immutable
public final class CreditSummaryProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CreditSummaryProperties.class);
-
/*
* Summary of balances associated with this credit summary.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventProperties.java
index c431a1c9e2bf..ed783313da78 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventProperties.java
@@ -5,20 +5,16 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Fluent;
-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;
/** The event properties. */
@Fluent
public final class EventProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(EventProperties.class);
-
/*
* The date of the event.
*/
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 e031fc2d183d..5366be0f6da5 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
@@ -6,20 +6,16 @@
import com.azure.core.annotation.Fluent;
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;
/** An event summary resource. */
@Fluent
public final class EventSummaryInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(EventSummaryInner.class);
-
/*
* The event properties.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyChargeSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyChargeSummaryProperties.java
index 935660710f20..090c8198dd08 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyChargeSummaryProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyChargeSummaryProperties.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.consumption.fluent.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;
/** The properties of legacy charge summary. */
@Immutable
public final class LegacyChargeSummaryProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(LegacyChargeSummaryProperties.class);
-
/*
* The id of the billing period resource that the charge belongs to.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyReservationRecommendationProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyReservationRecommendationProperties.java
index 521171b6a9d1..d8b8a401f687 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyReservationRecommendationProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyReservationRecommendationProperties.java
@@ -5,11 +5,9 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.LegacySharedScopeReservationRecommendationProperties;
import com.azure.resourcemanager.consumption.models.LegacySingleScopeReservationRecommendationProperties;
import com.azure.resourcemanager.consumption.models.SkuProperty;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
@@ -32,8 +30,6 @@
})
@Immutable
public class LegacyReservationRecommendationProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(LegacyReservationRecommendationProperties.class);
-
/*
* The number of days of usage to look back for recommendation.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyReservationTransactionProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyReservationTransactionProperties.java
index 55ddcf621918..72f3b82ec03c 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyReservationTransactionProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyReservationTransactionProperties.java
@@ -5,8 +5,6 @@
package com.azure.resourcemanager.consumption.fluent.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;
import java.time.OffsetDateTime;
@@ -15,8 +13,6 @@
/** The properties of a legacy reservation transaction. */
@Immutable
public final class LegacyReservationTransactionProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(LegacyReservationTransactionProperties.class);
-
/*
* The date of the transaction
*/
@@ -39,7 +35,7 @@ public final class LegacyReservationTransactionProperties {
private String description;
/*
- * The type of the transaction (Purchase, Cancel, etc.)
+ * The type of the transaction (Purchase, Cancel or Refund).
*/
@JsonProperty(value = "eventType", access = JsonProperty.Access.WRITE_ONLY)
private String eventType;
@@ -190,7 +186,7 @@ public String description() {
}
/**
- * Get the eventType property: The type of the transaction (Purchase, Cancel, etc.).
+ * Get the eventType property: The type of the transaction (Purchase, Cancel or Refund).
*
* @return the eventType value.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyUsageDetailProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyUsageDetailProperties.java
index 39b1dfa8f812..561d24cd39df 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyUsageDetailProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyUsageDetailProperties.java
@@ -5,10 +5,8 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.MeterDetailsResponse;
import com.azure.resourcemanager.consumption.models.PricingModelType;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
@@ -17,8 +15,6 @@
/** The properties of the legacy usage detail. */
@Immutable
public final class LegacyUsageDetailProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(LegacyUsageDetailProperties.class);
-
/*
* Billing Account identifier.
*/
@@ -297,6 +293,18 @@ public final class LegacyUsageDetailProperties {
@JsonProperty(value = "payGPrice", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal payGPrice;
+ /*
+ * Unique identifier for the applicable benefit.
+ */
+ @JsonProperty(value = "benefitId", access = JsonProperty.Access.WRITE_ONLY)
+ private String benefitId;
+
+ /*
+ * Name of the applicable benefit.
+ */
+ @JsonProperty(value = "benefitName", access = JsonProperty.Access.WRITE_ONLY)
+ private String benefitName;
+
/*
* Identifier that indicates how the meter is priced.
*/
@@ -704,6 +712,24 @@ public BigDecimal payGPrice() {
return this.payGPrice;
}
+ /**
+ * Get the benefitId property: Unique identifier for the applicable benefit.
+ *
+ * @return the benefitId value.
+ */
+ public String benefitId() {
+ return this.benefitId;
+ }
+
+ /**
+ * Get the benefitName property: Name of the applicable benefit.
+ *
+ * @return the benefitName value.
+ */
+ public String benefitName() {
+ return this.benefitName;
+ }
+
/**
* Get the pricingModel property: Identifier that indicates how the meter is priced.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotProperties.java
index 6849ba86cdac..ce61a5d1dff2 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotProperties.java
@@ -5,21 +5,17 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-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.azure.resourcemanager.consumption.models.Status;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** The lot properties. */
@Immutable
public final class LotProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(LotProperties.class);
-
/*
* The original amount of a lot.
*/
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 66ba7de656ca..84d8fddae286 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
@@ -6,21 +6,17 @@
import com.azure.core.annotation.Fluent;
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.azure.resourcemanager.consumption.models.Status;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** A lot summary resource. */
@Fluent
public final class LotSummaryInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(LotSummaryInner.class);
-
/*
* The lot properties.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostProperties.java
index de916d475acc..5b259589cee0 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostProperties.java
@@ -5,8 +5,6 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
@@ -15,8 +13,6 @@
/** The properties of the Management Group Aggregated Cost. */
@Fluent
public final class ManagementGroupAggregatedCostProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagementGroupAggregatedCostProperties.class);
-
/*
* The id of the billing period resource that the aggregated cost belongs
* to.
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostResultInner.java
index dfe72201c6f3..534400330068 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostResultInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostResultInner.java
@@ -6,8 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
@@ -18,8 +16,6 @@
/** A management group aggregated cost resource. */
@Fluent
public final class ManagementGroupAggregatedCostResultInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagementGroupAggregatedCostResultInner.class);
-
/*
* The properties of the Management Group Aggregated Cost.
*/
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 659cbacda58b..6e0942905ab2 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
@@ -6,8 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
@@ -18,8 +16,6 @@
/** A marketplace resource. */
@Fluent
public final class MarketplaceInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(MarketplaceInner.class);
-
/*
* The properties of the marketplace usage detail.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceProperties.java
index 006420b0220a..d4cf08510b0f 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceProperties.java
@@ -5,8 +5,6 @@
package com.azure.resourcemanager.consumption.fluent.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;
import java.time.OffsetDateTime;
@@ -15,8 +13,6 @@
/** The properties of the marketplace usage detail. */
@Immutable
public final class MarketplaceProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(MarketplaceProperties.class);
-
/*
* The id of the billing period resource that the usage belongs to.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernChargeSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernChargeSummaryProperties.java
index 9a5a2f9e026a..aaa060990b24 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernChargeSummaryProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernChargeSummaryProperties.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.Amount;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The properties of modern charge summary. */
@Immutable
public final class ModernChargeSummaryProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ModernChargeSummaryProperties.class);
-
/*
* The id of the billing period resource that the charge belongs to.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationRecommendationProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationRecommendationProperties.java
index 00df5480536b..d5a7b17bd53d 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationRecommendationProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationRecommendationProperties.java
@@ -5,10 +5,8 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.Amount;
import com.azure.resourcemanager.consumption.models.SkuProperty;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
@@ -18,8 +16,6 @@
/** The properties of the reservation recommendation. */
@Immutable
public final class ModernReservationRecommendationProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ModernReservationRecommendationProperties.class);
-
/*
* Resource Location.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionInner.java
index 636c1f94bcf5..b048492d74d6 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionInner.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.ReservationTransactionResource;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
@@ -16,8 +15,6 @@
/** Modern Reservation transaction resource. */
@Fluent
public final class ModernReservationTransactionInner extends ReservationTransactionResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ModernReservationTransactionInner.class);
-
/*
* The properties of a modern reservation transaction.
*/
@@ -107,7 +104,7 @@ public OffsetDateTime eventDate() {
}
/**
- * Get the eventType property: The type of the transaction (Purchase, Cancel, etc.).
+ * Get the eventType property: The type of the transaction (Purchase, Cancel or Refund).
*
* @return the eventType value.
*/
@@ -225,7 +222,7 @@ public String term() {
public void validate() {
super.validate();
if (innerProperties() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property innerProperties in model ModernReservationTransactionInner"));
@@ -233,4 +230,6 @@ public void validate() {
innerProperties().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(ModernReservationTransactionInner.class);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionProperties.java
index fb749b85a558..93bfb358cd85 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionProperties.java
@@ -5,8 +5,6 @@
package com.azure.resourcemanager.consumption.fluent.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;
import java.time.OffsetDateTime;
@@ -15,8 +13,6 @@
/** The properties of a modern reservation transaction. */
@Immutable
public final class ModernReservationTransactionProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ModernReservationTransactionProperties.class);
-
/*
* The charge of the transaction.
*/
@@ -67,7 +63,7 @@ public final class ModernReservationTransactionProperties {
private OffsetDateTime eventDate;
/*
- * The type of the transaction (Purchase, Cancel, etc.)
+ * The type of the transaction (Purchase, Cancel or Refund).
*/
@JsonProperty(value = "eventType", access = JsonProperty.Access.WRITE_ONLY)
private String eventType;
@@ -215,7 +211,7 @@ public OffsetDateTime eventDate() {
}
/**
- * Get the eventType property: The type of the transaction (Purchase, Cancel, etc.).
+ * Get the eventType property: The type of the transaction (Purchase, Cancel or Refund).
*
* @return the eventType value.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernUsageDetailProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernUsageDetailProperties.java
index 00c64480a2cd..9ccb804dccb5 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernUsageDetailProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernUsageDetailProperties.java
@@ -5,9 +5,7 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.PricingModelType;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
@@ -16,8 +14,6 @@
/** The properties of the usage detail. */
@Immutable
public final class ModernUsageDetailProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ModernUsageDetailProperties.class);
-
/*
* Billing Account identifier.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java
index fe76c6fdfa54..f8fadb1f48ae 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.OperationDisplay;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** A Consumption REST API operation. */
@Fluent
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
* Operation Id.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetModel.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetModel.java
index 0e4aa629a411..2b2b7ec03fac 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetModel.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetModel.java
@@ -5,18 +5,14 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.MeterDetails;
import com.azure.resourcemanager.consumption.models.PriceSheetProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** price sheet result. It contains the pricesheet associated with billing period. */
@Immutable
public final class PriceSheetModel {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PriceSheetModel.class);
-
/*
* Price sheet
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultInner.java
index 7d19b3f74d32..fd426e25c823 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultInner.java
@@ -6,10 +6,8 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.MeterDetails;
import com.azure.resourcemanager.consumption.models.PriceSheetProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
@@ -18,8 +16,6 @@
/** An pricesheet resource. */
@Fluent
public final class PriceSheetResultInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PriceSheetResultInner.class);
-
/*
* price sheet result. It contains the pricesheet associated with billing
* period
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailInner.java
index ba58947769d8..49054439d9f7 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailInner.java
@@ -6,8 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
@@ -17,8 +15,6 @@
/** reservation detail resource. */
@Fluent
public final class ReservationDetailInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationDetailInner.class);
-
/*
* The properties of the reservation detail.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailProperties.java
index 99fe617af2d0..a4f42842afd9 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailProperties.java
@@ -5,8 +5,6 @@
package com.azure.resourcemanager.consumption.fluent.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;
import java.time.OffsetDateTime;
@@ -14,8 +12,6 @@
/** The properties of the reservation detail. */
@Immutable
public final class ReservationDetailProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationDetailProperties.class);
-
/*
* The reservation order ID is the identifier for a reservation purchase.
* Each reservation order ID represents a single purchase transaction. A
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsModelInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsModelInner.java
index 68e957a682f6..c652c582d9c0 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsModelInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsModelInner.java
@@ -6,11 +6,9 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsResourceProperties;
import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsSavingsProperties;
import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsUsageProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
@@ -18,8 +16,6 @@
/** Reservation recommendation details. */
@Fluent
public final class ReservationRecommendationDetailsModelInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationRecommendationDetailsModelInner.class);
-
/*
* Resource Location.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsProperties.java
index adeb2dae589c..7eb421ae6eaa 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsProperties.java
@@ -5,18 +5,14 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsResourceProperties;
import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsSavingsProperties;
import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsUsageProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The properties of the reservation recommendation. */
@Immutable
public final class ReservationRecommendationDetailsProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationRecommendationDetailsProperties.class);
-
/*
* An ISO 4217 currency code identifier for the costs and savings
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationInner.java
index 45566e5e4012..279fbf43e982 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationInner.java
@@ -6,10 +6,8 @@
import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.LegacyReservationRecommendation;
import com.azure.resourcemanager.consumption.models.ModernReservationRecommendation;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
@@ -30,8 +28,6 @@
})
@Immutable
public class ReservationRecommendationInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationRecommendationInner.class);
-
/*
* The etag for the resource.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java
index 7b913e6e0ac3..7c7b6e9339df 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java
@@ -6,8 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
@@ -17,8 +15,6 @@
/** reservation summary resource. */
@Fluent
public final class ReservationSummaryInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationSummaryInner.class);
-
/*
* The properties of the reservation summary.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryProperties.java
index 2bd838de647e..cc94045dbe4f 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryProperties.java
@@ -5,8 +5,6 @@
package com.azure.resourcemanager.consumption.fluent.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;
import java.time.OffsetDateTime;
@@ -14,8 +12,6 @@
/** The properties of the reservation summary. */
@Immutable
public final class ReservationSummaryProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationSummaryProperties.class);
-
/*
* The reservation order ID is the identifier for a reservation purchase.
* Each reservation order ID represents a single purchase transaction. A
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationTransactionInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationTransactionInner.java
index f09a430c58bf..6b73f7540d18 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationTransactionInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationTransactionInner.java
@@ -5,9 +5,7 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.ReservationTransactionResource;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
@@ -16,8 +14,6 @@
/** Reservation transaction resource. */
@Fluent
public class ReservationTransactionInner extends ReservationTransactionResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationTransactionInner.class);
-
/*
* The properties of a legacy reservation transaction.
*/
@@ -63,7 +59,7 @@ public String description() {
}
/**
- * Get the eventType property: The type of the transaction (Purchase, Cancel, etc.).
+ * Get the eventType property: The type of the transaction (Purchase, Cancel or Refund).
*
* @return the eventType value.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagProperties.java
index c38afadca36c..445cc9f94d6c 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagProperties.java
@@ -5,17 +5,13 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.Tag;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** The properties of the tag. */
@Fluent
public final class TagProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(TagProperties.class);
-
/*
* A list of Tag.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java
index 2cd3f869d8e8..b7b9e0234e6d 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java
@@ -6,17 +6,13 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.Tag;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** A resource listing all tags. */
@Fluent
public final class TagsResultInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(TagsResultInner.class);
-
/*
* The properties of the tag.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/UsageDetailInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/UsageDetailInner.java
index 97647be02c10..80a9fc31484a 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/UsageDetailInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/UsageDetailInner.java
@@ -6,10 +6,8 @@
import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.LegacyUsageDetail;
import com.azure.resourcemanager.consumption.models.ModernUsageDetail;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
@@ -30,8 +28,6 @@
})
@Immutable
public class UsageDetailInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageDetailInner.class);
-
/*
* The etag for the resource.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsClientImpl.java
index c241892a5f74..86252a896c06 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsClientImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsClientImpl.java
@@ -21,15 +21,12 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.fluent.AggregatedCostsClient;
import com.azure.resourcemanager.consumption.fluent.models.ManagementGroupAggregatedCostResultInner;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in AggregatedCostsClient. */
public final class AggregatedCostsClientImpl implements AggregatedCostsClient {
- private final ClientLogger logger = new ClientLogger(AggregatedCostsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final AggregatedCostsService service;
@@ -93,7 +90,8 @@ Mono> getForBillingPeriodByMa
* @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 management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByManagementGroupWithResponseAsync(
@@ -134,7 +132,8 @@ private Mono> getByManagement
* @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 management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByManagementGroupWithResponseAsync(
@@ -166,20 +165,13 @@ private Mono> getByManagement
* @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 management group aggregated cost resource.
+ * @return a management group aggregated cost resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByManagementGroupAsync(
String managementGroupId, String filter) {
return getByManagementGroupWithResponseAsync(managementGroupId, filter)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -189,20 +181,13 @@ private Mono getByManagementGroupAsync
* @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 management group aggregated cost resource.
+ * @return a management group aggregated cost resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByManagementGroupAsync(String managementGroupId) {
final String filter = null;
return getByManagementGroupWithResponseAsync(managementGroupId, filter)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -231,7 +216,7 @@ public ManagementGroupAggregatedCostResultInner getByManagementGroup(String mana
* @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 management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getByManagementGroupWithResponse(
@@ -247,7 +232,8 @@ public Response getByManagementGroupWi
* @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 management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>
@@ -290,7 +276,8 @@ public Response getByManagementGroupWi
* @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 management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>
@@ -330,20 +317,13 @@ public Response getByManagementGroupWi
* @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 management group aggregated cost resource.
+ * @return a management group aggregated cost resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getForBillingPeriodByManagementGroupAsync(
String managementGroupId, String billingPeriodName) {
return getForBillingPeriodByManagementGroupWithResponseAsync(managementGroupId, billingPeriodName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -371,7 +351,7 @@ public ManagementGroupAggregatedCostResultInner getForBillingPeriodByManagementG
* @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 management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getForBillingPeriodByManagementGroupWithResponse(
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsImpl.java
index 946543806553..6f17012a44fb 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsImpl.java
@@ -12,10 +12,9 @@
import com.azure.resourcemanager.consumption.fluent.models.ManagementGroupAggregatedCostResultInner;
import com.azure.resourcemanager.consumption.models.AggregatedCosts;
import com.azure.resourcemanager.consumption.models.ManagementGroupAggregatedCostResult;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class AggregatedCostsImpl implements AggregatedCosts {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AggregatedCostsImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(AggregatedCostsImpl.class);
private final AggregatedCostsClient innerClient;
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesClientImpl.java
index 142543f3d1a7..78a5f500e843 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesClientImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesClientImpl.java
@@ -21,15 +21,12 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.fluent.BalancesClient;
import com.azure.resourcemanager.consumption.fluent.models.BalanceInner;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in BalancesClient. */
public final class BalancesClientImpl implements BalancesClient {
- private final ClientLogger logger = new ClientLogger(BalancesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final BalancesService service;
@@ -87,7 +84,8 @@ Mono> getForBillingPeriodByBillingAccount(
* @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 balances for a scope by billingAccountId.
+ * @return the balances for a scope by billingAccountId along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByBillingAccountWithResponseAsync(String billingAccountId) {
@@ -120,7 +118,8 @@ private Mono> getByBillingAccountWithResponseAsync(String
* @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 balances for a scope by billingAccountId.
+ * @return the balances for a scope by billingAccountId along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByBillingAccountWithResponseAsync(
@@ -150,19 +149,11 @@ private Mono> getByBillingAccountWithResponseAsync(
* @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 balances for a scope by billingAccountId.
+ * @return the balances for a scope by billingAccountId on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByBillingAccountAsync(String billingAccountId) {
- return getByBillingAccountWithResponseAsync(billingAccountId)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ return getByBillingAccountWithResponseAsync(billingAccountId).flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -189,7 +180,7 @@ public BalanceInner getByBillingAccount(String billingAccountId) {
* @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 balances for a scope by billingAccountId.
+ * @return the balances for a scope by billingAccountId along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getByBillingAccountWithResponse(String billingAccountId, Context context) {
@@ -205,7 +196,8 @@ public Response getByBillingAccountWithResponse(String billingAcco
* @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 balances for a scope by billing period and billingAccountId.
+ * @return the balances for a scope by billing period and billingAccountId along with {@link Response} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getForBillingPeriodByBillingAccountWithResponseAsync(
@@ -249,7 +241,8 @@ private Mono> getForBillingPeriodByBillingAccountWithResp
* @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 balances for a scope by billing period and billingAccountId.
+ * @return the balances for a scope by billing period and billingAccountId along with {@link Response} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getForBillingPeriodByBillingAccountWithResponseAsync(
@@ -289,20 +282,13 @@ private Mono> getForBillingPeriodByBillingAccountWithResp
* @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 balances for a scope by billing period and billingAccountId.
+ * @return the balances for a scope by billing period and billingAccountId on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getForBillingPeriodByBillingAccountAsync(
String billingAccountId, String billingPeriodName) {
return getForBillingPeriodByBillingAccountWithResponseAsync(billingAccountId, billingPeriodName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -331,7 +317,7 @@ public BalanceInner getForBillingPeriodByBillingAccount(String billingAccountId,
* @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 balances for a scope by billing period and billingAccountId.
+ * @return the balances for a scope by billing period and billingAccountId along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getForBillingPeriodByBillingAccountWithResponse(
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesImpl.java
index e1652cddc7ca..ba694a455d1a 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesImpl.java
@@ -12,10 +12,9 @@
import com.azure.resourcemanager.consumption.fluent.models.BalanceInner;
import com.azure.resourcemanager.consumption.models.Balance;
import com.azure.resourcemanager.consumption.models.Balances;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class BalancesImpl implements Balances {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(BalancesImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(BalancesImpl.class);
private final BalancesClient innerClient;
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsClientImpl.java
index d1175bb8bab1..0f798b884954 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsClientImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsClientImpl.java
@@ -28,7 +28,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.fluent.BudgetsClient;
import com.azure.resourcemanager.consumption.fluent.models.BudgetInner;
import com.azure.resourcemanager.consumption.models.BudgetsListResult;
@@ -36,8 +35,6 @@
/** An instance of this class provides access to all the operations defined in BudgetsClient. */
public final class BudgetsClientImpl implements BudgetsClient {
- private final ClientLogger logger = new ClientLogger(BudgetsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final BudgetsService service;
@@ -138,7 +135,7 @@ Mono> listNext(
* @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 budgets.
+ * @return result of listing budgets along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(String scope) {
@@ -186,7 +183,7 @@ private Mono> listSinglePageAsync(String scope) {
* @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 budgets.
+ * @return result of listing budgets along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(String scope, Context context) {
@@ -232,7 +229,7 @@ private Mono> listSinglePageAsync(String scope, Conte
* @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 budgets.
+ * @return result of listing budgets as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String scope) {
@@ -258,7 +255,7 @@ private PagedFlux listAsync(String scope) {
* @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 budgets.
+ * @return result of listing budgets as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String scope, Context context) {
@@ -284,7 +281,7 @@ private PagedFlux listAsync(String scope, Context context) {
* @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 budgets.
+ * @return result of listing budgets as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String scope) {
@@ -310,7 +307,7 @@ public PagedIterable list(String scope) {
* @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 budgets.
+ * @return result of listing budgets as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String scope, Context context) {
@@ -336,7 +333,8 @@ public PagedIterable list(String scope, Context context) {
* @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 budget for the scope by budget name.
+ * @return the budget for the scope by budget name along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(String scope, String budgetName) {
@@ -382,7 +380,8 @@ private Mono> getWithResponseAsync(String scope, String bu
* @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 budget for the scope by budget name.
+ * @return the budget for the scope by budget name along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(String scope, String budgetName, Context context) {
@@ -422,19 +421,11 @@ private Mono> getWithResponseAsync(String scope, String bu
* @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 budget for the scope by budget name.
+ * @return the budget for the scope by budget name on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getAsync(String scope, String budgetName) {
- return getWithResponseAsync(scope, budgetName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ return getWithResponseAsync(scope, budgetName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -483,7 +474,7 @@ public BudgetInner get(String scope, String budgetName) {
* @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 budget for the scope by budget name.
+ * @return the budget for the scope by budget name along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(String scope, String budgetName, Context context) {
@@ -512,7 +503,7 @@ public Response getWithResponse(String scope, String budgetName, Co
* @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 budget resource.
+ * @return a budget resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createOrUpdateWithResponseAsync(
@@ -573,7 +564,7 @@ private Mono> createOrUpdateWithResponseAsync(
* @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 budget resource.
+ * @return a budget resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createOrUpdateWithResponseAsync(
@@ -624,19 +615,12 @@ private Mono> createOrUpdateWithResponseAsync(
* @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 budget resource.
+ * @return a budget resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(String scope, String budgetName, BudgetInner parameters) {
return createOrUpdateWithResponseAsync(scope, budgetName, parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -691,7 +675,7 @@ public BudgetInner createOrUpdate(String scope, String budgetName, BudgetInner p
* @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 budget resource.
+ * @return a budget resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response createOrUpdateWithResponse(
@@ -718,7 +702,7 @@ public Response createOrUpdateWithResponse(
* @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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(String scope, String budgetName) {
@@ -764,7 +748,7 @@ private Mono> deleteWithResponseAsync(String scope, String budget
* @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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(String scope, String budgetName, Context context) {
@@ -805,11 +789,11 @@ private Mono> deleteWithResponseAsync(String scope, String budget
* @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 completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String scope, String budgetName) {
- return deleteWithResponseAsync(scope, budgetName).flatMap((Response res) -> Mono.empty());
+ return deleteWithResponseAsync(scope, budgetName).flatMap(ignored -> Mono.empty());
}
/**
@@ -857,7 +841,7 @@ public void delete(String scope, String budgetName) {
* @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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response deleteWithResponse(String scope, String budgetName, Context context) {
@@ -871,7 +855,7 @@ public Response deleteWithResponse(String scope, String budgetName, Contex
* @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 budgets.
+ * @return result of listing budgets along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -907,7 +891,7 @@ private Mono> listNextSinglePageAsync(String nextLink
* @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 budgets.
+ * @return result of listing budgets along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink, Context context) {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsImpl.java
index 533b9307c644..56ed1274fc25 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsImpl.java
@@ -13,10 +13,9 @@
import com.azure.resourcemanager.consumption.fluent.models.BudgetInner;
import com.azure.resourcemanager.consumption.models.Budget;
import com.azure.resourcemanager.consumption.models.Budgets;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class BudgetsImpl implements Budgets {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(BudgetsImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(BudgetsImpl.class);
private final BudgetsClient innerClient;
@@ -74,7 +73,7 @@ public Budget getById(String id) {
.getValueFromIdByParameterName(
id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope");
if (scope == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
@@ -84,7 +83,7 @@ public Budget getById(String id) {
.getValueFromIdByParameterName(
id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName");
if (budgetName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'budgets'.", id)));
@@ -98,7 +97,7 @@ public Response getByIdWithResponse(String id, Context context) {
.getValueFromIdByParameterName(
id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope");
if (scope == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
@@ -108,7 +107,7 @@ public Response getByIdWithResponse(String id, Context context) {
.getValueFromIdByParameterName(
id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName");
if (budgetName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'budgets'.", id)));
@@ -122,7 +121,7 @@ public void deleteById(String id) {
.getValueFromIdByParameterName(
id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope");
if (scope == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
@@ -132,7 +131,7 @@ public void deleteById(String id) {
.getValueFromIdByParameterName(
id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName");
if (budgetName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'budgets'.", id)));
@@ -146,7 +145,7 @@ public Response deleteByIdWithResponse(String id, Context context) {
.getValueFromIdByParameterName(
id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope");
if (scope == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
@@ -156,7 +155,7 @@ public Response deleteByIdWithResponse(String id, Context context) {
.getValueFromIdByParameterName(
id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName");
if (budgetName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'budgets'.", id)));
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesClientImpl.java
index 7a1bc33418ff..09d3dbab8d19 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesClientImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesClientImpl.java
@@ -21,15 +21,12 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.fluent.ChargesClient;
import com.azure.resourcemanager.consumption.fluent.models.ChargesListResultInner;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in ChargesClient. */
public final class ChargesClientImpl implements ChargesClient {
- private final ClientLogger logger = new ClientLogger(ChargesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final ChargesService service;
@@ -99,7 +96,7 @@ Mono> list(
* @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 charge summary.
+ * @return result of listing charge summary along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listWithResponseAsync(
@@ -162,7 +159,7 @@ private Mono> listWithResponseAsync(
* @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 charge summary.
+ * @return result of listing charge summary along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listWithResponseAsync(
@@ -221,20 +218,13 @@ private Mono> listWithResponseAsync(
* @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 charge summary.
+ * @return result of listing charge summary on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono listAsync(
String scope, String startDate, String endDate, String filter, String apply) {
return listWithResponseAsync(scope, startDate, endDate, filter, apply)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -259,7 +249,7 @@ private Mono listAsync(
* @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 charge summary.
+ * @return result of listing charge summary on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono listAsync(String scope) {
@@ -268,14 +258,7 @@ private Mono listAsync(String scope) {
final String filter = null;
final String apply = null;
return listWithResponseAsync(scope, startDate, endDate, filter, apply)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -342,7 +325,7 @@ public ChargesListResultInner list(String scope) {
* @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 charge summary.
+ * @return result of listing charge summary along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response listWithResponse(
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesImpl.java
index f698da520154..206ac4ed3ee8 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesImpl.java
@@ -12,10 +12,9 @@
import com.azure.resourcemanager.consumption.fluent.models.ChargesListResultInner;
import com.azure.resourcemanager.consumption.models.Charges;
import com.azure.resourcemanager.consumption.models.ChargesListResult;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class ChargesImpl implements Charges {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ChargesImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(ChargesImpl.class);
private final ChargesClient innerClient;
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientBuilder.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientBuilder.java
index efd5a406aff6..aa84fc278f85 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientBuilder.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -67,34 +66,34 @@ public ConsumptionManagementClientBuilder environment(AzureEnvironment environme
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the ConsumptionManagementClientBuilder.
*/
- public ConsumptionManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public ConsumptionManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the ConsumptionManagementClientBuilder.
*/
- public ConsumptionManagementClientBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public ConsumptionManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -126,15 +125,12 @@ public ConsumptionManagementClientImpl buildClient() {
if (environment == null) {
this.environment = AzureEnvironment.AZURE;
}
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
if (defaultPollInterval == null) {
this.defaultPollInterval = Duration.ofSeconds(30);
}
- if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
if (serializerAdapter == null) {
this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
}
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 d4a20bf01a4c..e517d0ce321e 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
@@ -15,6 +15,7 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
@@ -45,15 +46,12 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
-import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/** Initializes a new instance of the ConsumptionManagementClientImpl type. */
@ServiceClient(builder = ConsumptionManagementClientBuilder.class)
public final class ConsumptionManagementClientImpl implements ConsumptionManagementClient {
- private final ClientLogger logger = new ClientLogger(ConsumptionManagementClientImpl.class);
-
/** Azure Subscription ID. */
private final String subscriptionId;
@@ -388,10 +386,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry