diff --git a/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md b/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md index b713d35da2bad..e34dc00d535bd 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-04-05) + +- 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 4bc0fe107d500..d88d7959f2b2f 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.resourcemanager azure-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 a96cb65e90538..a55fff34f25bc 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 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 fba2874342776..fbc7e598afdc0 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 @@ -141,7 +141,7 @@ 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; @@ -215,9 +215,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 +241,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(" (") 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 813767044909a..5226b38b9591e 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 e21a93426a857..7753615b49e76 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 031ef9c557caf..7a254e4bebde2 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 58df00d67d608..c6f0fb6b9be35 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 4a9bba8b64c61..2cd5ce5a6372c 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 7591c8b7840b3..b9c7f11a7a63c 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 6c7db7249652f..327d261529098 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 @@ -21,7 +21,7 @@ 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); @@ -36,7 +36,7 @@ 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( @@ -50,7 +50,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 lot summary. + * @return result of listing lot summary as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount(String billingAccountId); @@ -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 and Microsoft Azure consumption commitments for a billing account or a billing profile + * and a customer. Microsoft Azure consumption commitments are only supported for the billing account scope. + * + * @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 and Microsoft Azure consumption commitments for a billing account or a billing profile + * and a customer. Microsoft Azure consumption commitments are only supported for the billing account scope. + * + * @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 56f5b91e7340d..a6a9d0d633892 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 d8528c9abbd37..2572135f1224c 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 083b16f7e65c5..d10e419cb7cdf 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 042ad2b40fdd1..46bd7f172b575 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 @@ -57,7 +57,7 @@ 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( 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 c713f5d4d2771..5ae6964c13ca4 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 @@ -24,7 +24,7 @@ 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); @@ -48,7 +48,7 @@ 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); 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 3d45b967b6e36..be1c69bb90d3c 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 @@ -20,7 +20,7 @@ public interface ReservationTransactionsClient { * @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); @@ -35,7 +35,7 @@ public interface ReservationTransactionsClient { * @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); @@ -48,7 +48,7 @@ public interface ReservationTransactionsClient { * @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( @@ -65,7 +65,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 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 2ffbf884bf393..9878facc34ba7 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 @@ -21,7 +21,7 @@ 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); @@ -36,7 +36,7 @@ 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( @@ -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 details. + * @return result of listing reservation details as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByReservationOrderAndReservation( @@ -69,7 +69,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 details. + * @return result of listing reservation details as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByReservationOrderAndReservation( @@ -85,7 +85,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 details. + * @return result of listing reservation details as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String scope); @@ -109,7 +109,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 details. + * @return result of listing reservation 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/ReservationsSummariesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java index 40be069d1339d..061a2931bca82 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( @@ -87,7 +87,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 list(String scope, Datagrain grain); @@ -112,7 +112,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 list( 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 2266b2caca8cc..51513f3ef75cf 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 e89c21afee289..58aad7b4521bb 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 be4d23435c3bf..88cb54ce4cd7c 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 f0e15ad53cf24..26cc57ff30dc6 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 f8fea1a4e18b1..f188de9f34911 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 ef8131acd2876..1f2fb2ffbb648 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 4675dd79f2cb1..c7810d6a49a19 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 0ee648db2f115..599f99fa2c012 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,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.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; @@ -18,8 +16,6 @@ /** 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. */ 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 cbe557ebe2bb5..0aa81ffb166cd 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 c431a1c9e2bfd..ed783313da78a 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 e031fc2d183d7..5366be0f6da59 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 935660710f205..090c8198dd085 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 521171b6a9d19..d8b8a401f6879 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 55ddcf621918a..b38556f4c8633 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 */ 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 39b1dfa8f8120..561d24cd39dff 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 6849ba86cdac2..ce61a5d1dff2c 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 66ba7de656caf..84d8fddae2866 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 de916d475acc9..5b259589cee0e 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 dfe72201c6f30..5344003300685 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 659cbacda58b6..6e0942905ab27 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 006420b0220af..d4cf08510b0f8 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 9a5a2f9e026a6..aaa060990b24b 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 00df5480536b2..d5a7b17bd53d7 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 636c1f94bcf5a..94e04d09938ae 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. */ @@ -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 fb749b85a5581..63841053fa24e 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. */ 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 00c64480a2cdc..9ccb804dccb57 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 fe76c6fdfa548..f8fadb1f48ae6 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 0e4aa629a411c..2b2b7ec03fac0 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 7d19b3f74d32d..fd426e25c823b 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 ba58947769d81..49054439d9f7a 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 99fe617af2d03..a4f42842afd9f 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 68e957a682f69..c652c582d9c08 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 adeb2dae589ca..7eb421ae6eaaf 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 45566e5e40127..279fbf43e9821 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 7b913e6e0ac36..7c7b6e9339dfe 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 2bd838de647ed..cc94045dbe4f9 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 f09a430c58bf4..18e4d5b257508 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. */ 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 c38afadca36c3..445cc9f94d6c1 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 2cd3f869d8e8a..b7b9e0234e6d2 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 97647be02c10a..80a9fc31484ae 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 c241892a5f74d..87e68f50e86ce 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,7 +165,7 @@ 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( @@ -189,7 +188,7 @@ 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) { @@ -231,7 +230,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 +246,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 +290,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,7 +331,7 @@ 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( @@ -371,7 +372,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 9465438065536..6f17012a44fbe 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 142543f3d1a72..fa0b3259e7393 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,7 +149,7 @@ 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) { @@ -189,7 +188,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 +204,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 +249,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,7 +290,7 @@ 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( @@ -331,7 +332,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 e1652cddc7cab..ba694a455d1aa 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 d1175bb8bab16..4fd56c8d8634d 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,7 +421,7 @@ 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) { @@ -483,7 +482,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 +511,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 +572,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,7 +623,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 on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String scope, String budgetName, BudgetInner parameters) { @@ -691,7 +690,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 +717,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 +763,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,7 +804,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 A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String scope, String budgetName) { @@ -857,7 +856,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 +870,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 +906,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 533b9307c6445..56ed1274fc25e 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 7a1bc33418ff3..fb47e81335fd0 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,7 +218,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 on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync( @@ -259,7 +256,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) { @@ -342,7 +339,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 f698da5201545..206ac4ed3ee82 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/ConsumptionManagementClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientImpl.java index d4a20bf01a4c4..712766e7f9502 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 @@ -52,8 +52,6 @@ /** 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; @@ -455,7 +453,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -514,4 +512,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(ConsumptionManagementClientImpl.class); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditsClientImpl.java index 0167b867175e4..0ac86ce93996d 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditsClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditsClientImpl.java @@ -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.CreditsClient; import com.azure.resourcemanager.consumption.fluent.models.CreditSummaryInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in CreditsClient. */ public final class CreditsClientImpl implements CreditsClient { - private final ClientLogger logger = new ClientLogger(CreditsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final CreditsService service; @@ -76,7 +73,7 @@ Mono> get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a credit summary resource. + * @return a credit summary resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String billingAccountId, String billingProfileId) { @@ -118,7 +115,7 @@ private Mono> getWithResponseAsync(String billingAc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a credit summary resource. + * @return a credit summary resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -157,7 +154,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a credit summary resource. + * @return a credit summary resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String billingAccountId, String billingProfileId) { @@ -196,7 +193,7 @@ public CreditSummaryInner get(String billingAccountId, String billingProfileId) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a credit summary resource. + * @return a credit summary resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditsImpl.java index 0a36ba8d42d25..7b0152353109e 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditsImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/CreditsImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.consumption.fluent.models.CreditSummaryInner; import com.azure.resourcemanager.consumption.models.CreditSummary; import com.azure.resourcemanager.consumption.models.Credits; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class CreditsImpl implements Credits { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CreditsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(CreditsImpl.class); private final CreditsClient innerClient; diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventsOperationsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventsOperationsClientImpl.java index 669bd221ad8df..c15adaa11ce42 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventsOperationsClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventsOperationsClientImpl.java @@ -25,7 +25,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.EventsOperationsClient; import com.azure.resourcemanager.consumption.fluent.models.EventSummaryInner; import com.azure.resourcemanager.consumption.models.Events; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in EventsOperationsClient. */ public final class EventsOperationsClientImpl implements EventsOperationsClient { - private final ClientLogger logger = new ClientLogger(EventsOperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final EventsOperationsService service; @@ -119,7 +116,8 @@ Mono> listByBillingAccountNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing event summary. + * @return result of listing event summary along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -182,7 +180,8 @@ private Mono> listByBillingProfileSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing event summary. + * @return result of listing event summary along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -241,7 +240,7 @@ private Mono> listByBillingProfileSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing event summary. + * @return result of listing event summary as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -263,7 +262,7 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing event summary. + * @return result of listing event summary as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -284,7 +283,7 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing event summary. + * @return result of listing event summary as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -304,7 +303,7 @@ public PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing event summary. + * @return result of listing event summary as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -324,7 +323,8 @@ public PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing event summary. + * @return result of listing event summary along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -375,7 +375,8 @@ private Mono> listByBillingAccountSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing event summary. + * @return result of listing event summary along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -417,7 +418,7 @@ private Mono> listByBillingAccountSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing event summary. + * @return result of listing event summary as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync(String billingAccountId, String filter) { @@ -434,7 +435,7 @@ private PagedFlux listByBillingAccountAsync(String billingAcc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing event summary. + * @return result of listing event summary as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync(String billingAccountId) { @@ -456,7 +457,7 @@ private PagedFlux listByBillingAccountAsync(String billingAcc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing event summary. + * @return result of listing event summary as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync( @@ -474,7 +475,7 @@ private PagedFlux listByBillingAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing event summary. + * @return result of listing event summary as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount(String billingAccountId) { @@ -494,7 +495,7 @@ public PagedIterable listByBillingAccount(String billingAccou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing event summary. + * @return result of listing event summary as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount( @@ -509,7 +510,8 @@ public PagedIterable listByBillingAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing event summary. + * @return result of listing event summary along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync(String nextLink) { @@ -546,7 +548,8 @@ private Mono> listByBillingProfileNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing event summary. + * @return result of listing event summary along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync( @@ -582,7 +585,8 @@ private Mono> listByBillingProfileNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing event summary. + * @return result of listing event summary along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync(String nextLink) { @@ -619,7 +623,8 @@ private Mono> listByBillingAccountNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing event summary. + * @return result of listing event summary along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync( diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventsOperationsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventsOperationsImpl.java index 4e5f0b2bd8f4b..51c88eed0f573 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventsOperationsImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/EventsOperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.consumption.fluent.models.EventSummaryInner; import com.azure.resourcemanager.consumption.models.EventSummary; import com.azure.resourcemanager.consumption.models.EventsOperations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class EventsOperationsImpl implements EventsOperations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EventsOperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(EventsOperationsImpl.class); private final EventsOperationsClient innerClient; diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotsOperationsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotsOperationsClientImpl.java index e17ef7138dbc8..379c68d0bbde8 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotsOperationsClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotsOperationsClientImpl.java @@ -25,7 +25,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.LotsOperationsClient; import com.azure.resourcemanager.consumption.fluent.models.LotSummaryInner; import com.azure.resourcemanager.consumption.models.Lots; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in LotsOperationsClient. */ public final class LotsOperationsClientImpl implements LotsOperationsClient { - private final ClientLogger logger = new ClientLogger(LotsOperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final LotsOperationsService service; @@ -85,6 +82,21 @@ Mono> listByBillingAccount( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Get( + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}/providers" + + "/Microsoft.Consumption/lots") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCustomer( + @HostParam("$host") String endpoint, + @PathParam("billingAccountId") String billingAccountId, + @PathParam("customerId") String customerId, + @QueryParam("api-version") String apiVersion, + @QueryParam("$filter") String filter, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -104,6 +116,16 @@ Mono> listByBillingAccountNext( @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCustomerNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); } /** @@ -115,7 +137,7 @@ Mono> listByBillingAccountNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing lot summary. + * @return result of listing lot summary along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -168,7 +190,7 @@ private Mono> listByBillingProfileSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing lot summary. + * @return result of listing lot summary along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -217,7 +239,7 @@ private Mono> listByBillingProfileSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing lot summary. + * @return result of listing lot summary as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync(String billingAccountId, String billingProfileId) { @@ -236,7 +258,7 @@ private PagedFlux listByBillingProfileAsync(String billingAccou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing lot summary. + * @return result of listing lot summary as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -255,7 +277,7 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing lot summary. + * @return result of listing lot summary as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile(String billingAccountId, String billingProfileId) { @@ -272,7 +294,7 @@ public PagedIterable listByBillingProfile(String billingAccount * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing lot summary. + * @return result of listing lot summary as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -291,7 +313,7 @@ public PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing lot summary. + * @return result of listing lot summary along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -342,7 +364,7 @@ private Mono> listByBillingAccountSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing lot summary. + * @return result of listing lot summary along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -384,7 +406,7 @@ private Mono> listByBillingAccountSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing lot summary. + * @return result of listing lot summary as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync(String billingAccountId, String filter) { @@ -401,7 +423,7 @@ private PagedFlux listByBillingAccountAsync(String billingAccou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing lot summary. + * @return result of listing lot summary as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync(String billingAccountId) { @@ -423,7 +445,7 @@ private PagedFlux listByBillingAccountAsync(String billingAccou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing lot summary. + * @return result of listing lot summary as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync( @@ -441,7 +463,7 @@ private PagedFlux listByBillingAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing lot summary. + * @return result of listing lot summary as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount(String billingAccountId) { @@ -461,7 +483,7 @@ public PagedIterable listByBillingAccount(String billingAccount * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing lot summary. + * @return result of listing lot summary as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount( @@ -469,6 +491,210 @@ public PagedIterable listByBillingAccount( return new PagedIterable<>(listByBillingAccountAsync(billingAccountId, filter, context)); } + /** + * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile + * and a customer. Microsoft Azure consumption commitments are only supported for the billing account scope. + * + * @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 (:). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of listing lot summary along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCustomerSinglePageAsync( + String billingAccountId, String customerId, String filter) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (billingAccountId == null) { + return Mono + .error(new IllegalArgumentException("Parameter billingAccountId is required and cannot be null.")); + } + if (customerId == null) { + return Mono.error(new IllegalArgumentException("Parameter customerId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByCustomer( + this.client.getEndpoint(), + billingAccountId, + customerId, + this.client.getApiVersion(), + filter, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile + * and a customer. Microsoft Azure consumption commitments are only supported for the billing account scope. + * + * @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 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 along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCustomerSinglePageAsync( + String billingAccountId, String customerId, String filter, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (billingAccountId == null) { + return Mono + .error(new IllegalArgumentException("Parameter billingAccountId is required and cannot be null.")); + } + if (customerId == null) { + return Mono.error(new IllegalArgumentException("Parameter customerId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByCustomer( + this.client.getEndpoint(), + billingAccountId, + customerId, + this.client.getApiVersion(), + filter, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile + * and a customer. Microsoft Azure consumption commitments are only supported for the billing account scope. + * + * @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 (:). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of listing lot summary as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCustomerAsync(String billingAccountId, String customerId, String filter) { + return new PagedFlux<>( + () -> listByCustomerSinglePageAsync(billingAccountId, customerId, filter), + nextLink -> listByCustomerNextSinglePageAsync(nextLink)); + } + + /** + * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile + * and a customer. Microsoft Azure consumption commitments are only supported for the billing account scope. + * + * @param billingAccountId BillingAccount ID. + * @param customerId Customer ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of listing lot summary as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCustomerAsync(String billingAccountId, String customerId) { + final String filter = null; + return new PagedFlux<>( + () -> listByCustomerSinglePageAsync(billingAccountId, customerId, filter), + nextLink -> listByCustomerNextSinglePageAsync(nextLink)); + } + + /** + * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile + * and a customer. Microsoft Azure consumption commitments are only supported for the billing account scope. + * + * @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 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 PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCustomerAsync( + String billingAccountId, String customerId, String filter, Context context) { + return new PagedFlux<>( + () -> listByCustomerSinglePageAsync(billingAccountId, customerId, filter, context), + nextLink -> listByCustomerNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile + * and a customer. Microsoft Azure consumption commitments are only supported for the billing account scope. + * + * @param billingAccountId BillingAccount ID. + * @param customerId Customer ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of listing lot summary as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCustomer(String billingAccountId, String customerId) { + final String filter = null; + return new PagedIterable<>(listByCustomerAsync(billingAccountId, customerId, filter)); + } + + /** + * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile + * and a customer. Microsoft Azure consumption commitments are only supported for the billing account scope. + * + * @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 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) + public PagedIterable listByCustomer( + String billingAccountId, String customerId, String filter, Context context) { + return new PagedIterable<>(listByCustomerAsync(billingAccountId, customerId, filter, context)); + } + /** * Get the next page of items. * @@ -476,7 +702,7 @@ public PagedIterable listByBillingAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing lot summary. + * @return result of listing lot summary along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync(String nextLink) { @@ -513,7 +739,7 @@ private Mono> listByBillingProfileNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing lot summary. + * @return result of listing lot summary along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync( @@ -549,7 +775,7 @@ private Mono> listByBillingProfileNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing lot summary. + * @return result of listing lot summary along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync(String nextLink) { @@ -586,7 +812,7 @@ private Mono> listByBillingAccountNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing lot summary. + * @return result of listing lot summary along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync( @@ -614,4 +840,75 @@ private Mono> listByBillingAccountNextSinglePageA res.getValue().nextLink(), null)); } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of listing lot summary along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCustomerNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByCustomerNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of listing lot summary along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCustomerNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByCustomerNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotsOperationsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotsOperationsImpl.java index 82f0b140a011b..11efdf49d1a48 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotsOperationsImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/LotsOperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.consumption.fluent.models.LotSummaryInner; import com.azure.resourcemanager.consumption.models.LotSummary; import com.azure.resourcemanager.consumption.models.LotsOperations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class LotsOperationsImpl implements LotsOperations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LotsOperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(LotsOperationsImpl.class); private final LotsOperationsClient innerClient; @@ -50,6 +49,18 @@ public PagedIterable listByBillingAccount(String billingAccountId, S return Utils.mapPage(inner, inner1 -> new LotSummaryImpl(inner1, this.manager())); } + public PagedIterable listByCustomer(String billingAccountId, String customerId) { + PagedIterable inner = this.serviceClient().listByCustomer(billingAccountId, customerId); + return Utils.mapPage(inner, inner1 -> new LotSummaryImpl(inner1, this.manager())); + } + + public PagedIterable listByCustomer( + String billingAccountId, String customerId, String filter, Context context) { + PagedIterable inner = + this.serviceClient().listByCustomer(billingAccountId, customerId, filter, context); + return Utils.mapPage(inner, inner1 -> new LotSummaryImpl(inner1, this.manager())); + } + private LotsOperationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/MarketplacesClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/MarketplacesClientImpl.java index 0584db96fe5a3..b8f7b0d0270f3 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/MarketplacesClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/MarketplacesClientImpl.java @@ -25,7 +25,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.MarketplacesClient; import com.azure.resourcemanager.consumption.fluent.models.MarketplaceInner; import com.azure.resourcemanager.consumption.models.MarketplacesListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in MarketplacesClient. */ public final class MarketplacesClientImpl implements MarketplacesClient { - private final ClientLogger logger = new ClientLogger(MarketplacesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final MarketplacesService service; @@ -107,7 +104,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 marketplaces. + * @return result of listing marketplaces along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -171,7 +168,7 @@ private Mono> listSinglePageAsync( * @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 marketplaces. + * @return result of listing marketplaces along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -224,7 +221,7 @@ private Mono> listSinglePageAsync( * @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 marketplaces. + * @return result of listing marketplaces as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope, String filter, Integer top, String skiptoken) { @@ -248,7 +245,7 @@ private PagedFlux listAsync(String scope, String filter, Integ * @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 marketplaces. + * @return result of listing marketplaces as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope) { @@ -283,7 +280,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 marketplaces. + * @return result of listing marketplaces as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -309,7 +306,7 @@ private PagedFlux 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 marketplaces. + * @return result of listing marketplaces as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String scope) { @@ -343,7 +340,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 marketplaces. + * @return result of listing marketplaces as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -358,7 +355,7 @@ public PagedIterable 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 marketplaces. + * @return result of listing marketplaces along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -394,7 +391,7 @@ private Mono> listNextSinglePageAsync(String nex * @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 marketplaces. + * @return result of listing marketplaces 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/MarketplacesImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/MarketplacesImpl.java index 5cab05762de79..7cc6b97013ed0 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/MarketplacesImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/MarketplacesImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.consumption.fluent.models.MarketplaceInner; import com.azure.resourcemanager.consumption.models.Marketplace; import com.azure.resourcemanager.consumption.models.Marketplaces; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class MarketplacesImpl implements Marketplaces { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MarketplacesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(MarketplacesImpl.class); private final MarketplacesClient innerClient; diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/OperationsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/OperationsClientImpl.java index 9146d37513dff..757a725f2a01c 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/OperationsClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/OperationsClientImpl.java @@ -25,7 +25,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.OperationsClient; import com.azure.resourcemanager.consumption.fluent.models.OperationInner; import com.azure.resourcemanager.consumption.models.OperationListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; @@ -85,7 +82,8 @@ Mono> listNext( * * @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 consumption operations. + * @return result of listing consumption operations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -118,7 +116,8 @@ private Mono> listSinglePageAsync() { * @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 consumption operations. + * @return result of listing consumption operations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -148,7 +147,7 @@ private Mono> listSinglePageAsync(Context context) * * @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 consumption operations. + * @return result of listing consumption operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -162,7 +161,7 @@ private PagedFlux 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 consumption operations. + * @return result of listing consumption operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -175,7 +174,7 @@ private PagedFlux listAsync(Context context) { * * @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 consumption operations. + * @return result of listing consumption operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -189,7 +188,7 @@ public PagedIterable 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 consumption operations. + * @return result of listing consumption operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -203,7 +202,8 @@ public PagedIterable list(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 consumption operations. + * @return result of listing consumption operations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -239,7 +239,8 @@ private Mono> listNextSinglePageAsync(String nextL * @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 consumption operations. + * @return result of listing consumption operations 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/OperationsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/OperationsImpl.java index d7b61340083e6..a37c89b5ed6f4 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/OperationsImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/OperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.consumption.fluent.models.OperationInner; import com.azure.resourcemanager.consumption.models.Operation; import com.azure.resourcemanager.consumption.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/PriceSheetsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/PriceSheetsClientImpl.java index e01c7433932aa..e8eb488a19092 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/PriceSheetsClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/PriceSheetsClientImpl.java @@ -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.PriceSheetsClient; import com.azure.resourcemanager.consumption.fluent.models.PriceSheetResultInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in PriceSheetsClient. */ public final class PriceSheetsClientImpl implements PriceSheetsClient { - private final ClientLogger logger = new ClientLogger(PriceSheetsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final PriceSheetsService service; @@ -98,7 +95,7 @@ Mono> getByBillingPeriod( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a subscription. + * @return the price sheet for a subscription along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String expand, String skiptoken, Integer top) { @@ -144,7 +141,7 @@ private Mono> getWithResponseAsync(String expand * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a subscription. + * @return the price sheet for a subscription along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -187,7 +184,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a subscription. + * @return the price sheet for a subscription on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String expand, String skiptoken, Integer top) { @@ -207,7 +204,7 @@ private Mono getAsync(String expand, String skiptoken, In * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a subscription. + * @return the price sheet for a subscription on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync() { @@ -253,7 +250,7 @@ public PriceSheetResultInner get() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a subscription. + * @return the price sheet for a subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -275,7 +272,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a scope by subscriptionId and billing period. + * @return the price sheet for a scope by subscriptionId and billing period along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByBillingPeriodWithResponseAsync( @@ -329,7 +327,8 @@ private Mono> getByBillingPeriodWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a scope by subscriptionId and billing period. + * @return the price sheet for a scope by subscriptionId and billing period along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByBillingPeriodWithResponseAsync( @@ -379,7 +378,8 @@ private Mono> getByBillingPeriodWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a scope by subscriptionId and billing period. + * @return the price sheet for a scope by subscriptionId and billing period on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByBillingPeriodAsync( @@ -403,7 +403,8 @@ private Mono getByBillingPeriodAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a scope by subscriptionId and billing period. + * @return the price sheet for a scope by subscriptionId and billing period on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByBillingPeriodAsync(String billingPeriodName) { @@ -454,7 +455,7 @@ public PriceSheetResultInner getByBillingPeriod(String billingPeriodName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a scope by subscriptionId and billing period. + * @return the price sheet for a scope by subscriptionId and billing period along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByBillingPeriodWithResponse( diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/PriceSheetsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/PriceSheetsImpl.java index 88be3122b0c34..199dcf1bbac0c 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/PriceSheetsImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/PriceSheetsImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.consumption.fluent.models.PriceSheetResultInner; import com.azure.resourcemanager.consumption.models.PriceSheetResult; import com.azure.resourcemanager.consumption.models.PriceSheets; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class PriceSheetsImpl implements PriceSheets { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PriceSheetsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PriceSheetsImpl.class); private final PriceSheetsClient innerClient; diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationDetailsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationDetailsClientImpl.java index 309f8e08f0036..c9d4509a55d53 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationDetailsClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationDetailsClientImpl.java @@ -21,7 +21,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.ReservationRecommendationDetailsClient; import com.azure.resourcemanager.consumption.fluent.models.ReservationRecommendationDetailsModelInner; import com.azure.resourcemanager.consumption.models.LookBackPeriod; @@ -32,8 +31,6 @@ * An instance of this class provides access to all the operations defined in ReservationRecommendationDetailsClient. */ public final class ReservationRecommendationDetailsClientImpl implements ReservationRecommendationDetailsClient { - private final ClientLogger logger = new ClientLogger(ReservationRecommendationDetailsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ReservationRecommendationDetailsService service; @@ -95,7 +92,7 @@ Mono> get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return reservation recommendation details. + * @return reservation recommendation details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -157,7 +154,7 @@ private Mono> getWithRespon * @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 reservation recommendation details. + * @return reservation recommendation details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -215,7 +212,7 @@ private Mono> getWithRespon * @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 reservation recommendation details. + * @return reservation recommendation details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -274,7 +271,7 @@ public ReservationRecommendationDetailsModelInner get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return reservation recommendation details. + * @return reservation recommendation details along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationDetailsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationDetailsImpl.java index 1116ec92642f8..8783370d6f5cf 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationDetailsImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationDetailsImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetails; import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsModel; import com.azure.resourcemanager.consumption.models.Term; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ReservationRecommendationDetailsImpl implements ReservationRecommendationDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationRecommendationDetailsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ReservationRecommendationDetailsImpl.class); private final ReservationRecommendationDetailsClient innerClient; diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationsClientImpl.java index 975c9309d1abc..338bc057192cc 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationsClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationsClientImpl.java @@ -25,7 +25,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.ReservationRecommendationsClient; import com.azure.resourcemanager.consumption.fluent.models.ReservationRecommendationInner; import com.azure.resourcemanager.consumption.models.ReservationRecommendationsListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in ReservationRecommendationsClient. */ public final class ReservationRecommendationsClientImpl implements ReservationRecommendationsClient { - private final ClientLogger logger = new ClientLogger(ReservationRecommendationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ReservationRecommendationsService service; @@ -102,7 +99,8 @@ 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 reservation recommendations. + * @return result of listing reservation recommendations along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String scope, String filter) { @@ -152,7 +150,8 @@ private Mono> listSinglePageAsync( * @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 reservation recommendations. + * @return result of listing reservation recommendations along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -199,7 +198,7 @@ private Mono> listSinglePageAsync( * @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 reservation recommendations. + * @return result of listing reservation recommendations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope, String filter) { @@ -218,7 +217,7 @@ private PagedFlux listAsync(String scope, 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 result of listing reservation recommendations. + * @return result of listing reservation recommendations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope) { @@ -245,7 +244,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 reservation recommendations. + * @return result of listing reservation recommendations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope, String filter, Context context) { @@ -265,7 +264,7 @@ private PagedFlux listAsync(String scope, 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 result of listing reservation recommendations. + * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String scope) { @@ -292,7 +291,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 reservation recommendations. + * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String scope, String filter, Context context) { @@ -306,7 +305,8 @@ public PagedIterable list(String scope, String f * @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 reservation recommendations. + * @return result of listing reservation recommendations along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -342,7 +342,8 @@ private Mono> listNextSinglePageAs * @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 reservation recommendations. + * @return result of listing reservation recommendations along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync( diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationsImpl.java index 654187b197f11..c5ed1846f2010 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationsImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationRecommendationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.consumption.fluent.models.ReservationRecommendationInner; import com.azure.resourcemanager.consumption.models.ReservationRecommendation; import com.azure.resourcemanager.consumption.models.ReservationRecommendations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ReservationRecommendationsImpl implements ReservationRecommendations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationRecommendationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ReservationRecommendationsImpl.class); private final ReservationRecommendationsClient innerClient; diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationTransactionsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationTransactionsClientImpl.java index 6db0c98bfb338..9ead7ad084625 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationTransactionsClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationTransactionsClientImpl.java @@ -25,7 +25,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.ReservationTransactionsClient; import com.azure.resourcemanager.consumption.fluent.models.ModernReservationTransactionInner; import com.azure.resourcemanager.consumption.fluent.models.ReservationTransactionInner; @@ -35,8 +34,6 @@ /** An instance of this class provides access to all the operations defined in ReservationTransactionsClient. */ public final class ReservationTransactionsClientImpl implements ReservationTransactionsClient { - private final ClientLogger logger = new ClientLogger(ReservationTransactionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ReservationTransactionsService service; @@ -121,7 +118,8 @@ Mono> listByBillingProfileNext * @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 reservation recommendations. + * @return result of listing reservation recommendations along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -170,7 +168,8 @@ private Mono> listSinglePageAsync( * @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 reservation recommendations. + * @return result of listing reservation recommendations along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -209,7 +208,7 @@ private Mono> listSinglePageAsync( * @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 reservation recommendations. + * @return result of listing reservation recommendations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String billingAccountId, String filter) { @@ -224,7 +223,7 @@ private PagedFlux listAsync(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 result of listing reservation recommendations. + * @return result of listing reservation recommendations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String billingAccountId) { @@ -243,7 +242,7 @@ private PagedFlux listAsync(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 result of listing reservation recommendations. + * @return result of listing reservation recommendations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String billingAccountId, String filter, Context context) { @@ -259,7 +258,7 @@ private PagedFlux listAsync(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 result of listing reservation recommendations. + * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String billingAccountId) { @@ -277,7 +276,7 @@ public PagedIterable list(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 result of listing reservation recommendations. + * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String billingAccountId, String filter, Context context) { @@ -294,7 +293,8 @@ public PagedIterable list(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 result of listing reservation recommendations. + * @return result of listing reservation recommendations along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -349,7 +349,8 @@ private Mono> listByBillingProf * @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 reservation recommendations. + * @return result of listing reservation recommendations along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -400,7 +401,7 @@ private Mono> listByBillingProf * @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 reservation recommendations. + * @return result of listing reservation recommendations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -418,7 +419,7 @@ private PagedFlux listByBillingProfileAsync( * @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 reservation recommendations. + * @return result of listing reservation recommendations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -440,7 +441,7 @@ private PagedFlux listByBillingProfileAsync( * @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 reservation recommendations. + * @return result of listing reservation recommendations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -458,7 +459,7 @@ private PagedFlux listByBillingProfileAsync( * @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 reservation recommendations. + * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -478,7 +479,7 @@ public PagedIterable listByBillingProfile( * @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 reservation recommendations. + * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -493,7 +494,8 @@ public PagedIterable listByBillingProfile( * @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 reservation recommendations. + * @return result of listing reservation recommendations along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -529,7 +531,8 @@ private Mono> listNextSinglePageAsync * @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 reservation recommendations. + * @return result of listing reservation recommendations along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -564,7 +567,8 @@ private Mono> listNextSinglePageAsync * @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 reservation recommendations. + * @return result of listing reservation recommendations along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync( @@ -602,7 +606,8 @@ private Mono> listByBillingProf * @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 reservation recommendations. + * @return result of listing reservation recommendations along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync( diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationTransactionsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationTransactionsImpl.java index b91b2303ad4b8..695e996742486 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationTransactionsImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationTransactionsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.consumption.models.ModernReservationTransaction; import com.azure.resourcemanager.consumption.models.ReservationTransaction; import com.azure.resourcemanager.consumption.models.ReservationTransactions; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ReservationTransactionsImpl implements ReservationTransactions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationTransactionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ReservationTransactionsImpl.class); private final ReservationTransactionsClient innerClient; diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationsDetailsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationsDetailsClientImpl.java index 4056015306802..8c9f92f569095 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationsDetailsClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationsDetailsClientImpl.java @@ -25,7 +25,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.ReservationsDetailsClient; import com.azure.resourcemanager.consumption.fluent.models.ReservationDetailInner; import com.azure.resourcemanager.consumption.models.ReservationDetailsListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in ReservationsDetailsClient. */ public final class ReservationsDetailsClientImpl implements ReservationsDetailsClient { - private final ClientLogger logger = new ClientLogger(ReservationsDetailsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ReservationsDetailsService service; @@ -144,7 +141,8 @@ 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 reservation details. + * @return result of listing reservation details along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByReservationOrderSinglePageAsync( @@ -196,7 +194,8 @@ private Mono> listByReservationOrderSingle * @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 reservation details. + * @return result of listing reservation details along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByReservationOrderSinglePageAsync( @@ -239,7 +238,7 @@ private Mono> listByReservationOrderSingle * @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 reservation details. + * @return result of listing reservation details as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByReservationOrderAsync(String reservationOrderId, String filter) { @@ -258,7 +257,7 @@ private PagedFlux listByReservationOrderAsync(String res * @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 reservation details. + * @return result of listing reservation details as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByReservationOrderAsync( @@ -277,7 +276,7 @@ private PagedFlux listByReservationOrderAsync( * @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 reservation details. + * @return result of listing reservation details as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByReservationOrder(String reservationOrderId, String filter) { @@ -294,7 +293,7 @@ public PagedIterable listByReservationOrder(String reser * @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 reservation details. + * @return result of listing reservation details as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByReservationOrder( @@ -312,7 +311,8 @@ public PagedIterable listByReservationOrder( * @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 reservation details. + * @return result of listing reservation details along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByReservationOrderAndReservationSinglePageAsync( @@ -369,7 +369,8 @@ private Mono> listByReservationOrderAndRes * @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 reservation details. + * @return result of listing reservation details along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByReservationOrderAndReservationSinglePageAsync( @@ -422,7 +423,7 @@ private Mono> listByReservationOrderAndRes * @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 reservation details. + * @return result of listing reservation details as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByReservationOrderAndReservationAsync( @@ -443,7 +444,7 @@ private PagedFlux listByReservationOrderAndReservationAs * @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 reservation details. + * @return result of listing reservation details as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByReservationOrderAndReservationAsync( @@ -464,7 +465,7 @@ private PagedFlux listByReservationOrderAndReservationAs * @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 reservation details. + * @return result of listing reservation details as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByReservationOrderAndReservation( @@ -484,7 +485,7 @@ public PagedIterable listByReservationOrderAndReservatio * @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 reservation details. + * @return result of listing reservation details as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByReservationOrderAndReservation( @@ -511,7 +512,8 @@ public PagedIterable listByReservationOrderAndReservatio * @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 reservation details. + * @return result of listing reservation details along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -577,7 +579,8 @@ private Mono> listSinglePageAsync( * @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 reservation details. + * @return result of listing reservation details along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -640,7 +643,7 @@ private Mono> listSinglePageAsync( * @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 reservation details. + * @return result of listing reservation details as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -665,7 +668,7 @@ private PagedFlux 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 reservation details. + * @return result of listing reservation details as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope) { @@ -698,7 +701,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 reservation details. + * @return result of listing reservation details as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -724,7 +727,7 @@ private PagedFlux 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 reservation details. + * @return result of listing reservation details as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String scope) { @@ -755,7 +758,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 reservation details. + * @return result of listing reservation details as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -777,7 +780,8 @@ public PagedIterable 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 reservation details. + * @return result of listing reservation details along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByReservationOrderNextSinglePageAsync(String nextLink) { @@ -814,7 +818,8 @@ private Mono> listByReservationOrderNextSi * @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 reservation details. + * @return result of listing reservation details along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByReservationOrderNextSinglePageAsync( @@ -850,7 +855,8 @@ private Mono> listByReservationOrderNextSi * @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 reservation details. + * @return result of listing reservation details along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByReservationOrderAndReservationNextSinglePageAsync( @@ -890,7 +896,8 @@ private Mono> listByReservationOrderAndRes * @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 reservation details. + * @return result of listing reservation details along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByReservationOrderAndReservationNextSinglePageAsync( @@ -926,7 +933,8 @@ private Mono> listByReservationOrderAndRes * @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 reservation details. + * @return result of listing reservation details along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -962,7 +970,8 @@ private Mono> listNextSinglePageAsync(Stri * @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 reservation details. + * @return result of listing reservation details 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/ReservationsDetailsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationsDetailsImpl.java index baf24d702654e..25347b1b0c6f1 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationsDetailsImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationsDetailsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.consumption.fluent.models.ReservationDetailInner; import com.azure.resourcemanager.consumption.models.ReservationDetail; import com.azure.resourcemanager.consumption.models.ReservationsDetails; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ReservationsDetailsImpl implements ReservationsDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationsDetailsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ReservationsDetailsImpl.class); private final ReservationsDetailsClient innerClient; diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationsSummariesClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationsSummariesClientImpl.java index 18b19328a4edb..462885ffc1eaa 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationsSummariesClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationsSummariesClientImpl.java @@ -25,7 +25,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.ReservationsSummariesClient; import com.azure.resourcemanager.consumption.fluent.models.ReservationSummaryInner; import com.azure.resourcemanager.consumption.models.Datagrain; @@ -34,8 +33,6 @@ /** An instance of this class provides access to all the operations defined in ReservationsSummariesClient. */ public final class ReservationsSummariesClientImpl implements ReservationsSummariesClient { - private final ClientLogger logger = new ClientLogger(ReservationsSummariesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ReservationsSummariesService service; @@ -150,7 +147,8 @@ 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 reservation summaries. + * @return result of listing reservation summaries along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByReservationOrderSinglePageAsync( @@ -204,7 +202,8 @@ private Mono> listByReservationOrderSingl * @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 reservation summaries. + * @return result of listing reservation summaries along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByReservationOrderSinglePageAsync( @@ -254,7 +253,7 @@ private Mono> listByReservationOrderSingl * @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 reservation summaries. + * @return result of listing reservation summaries as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByReservationOrderAsync( @@ -272,7 +271,7 @@ private PagedFlux listByReservationOrderAsync( * @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 reservation summaries. + * @return result of listing reservation summaries as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByReservationOrderAsync(String reservationOrderId, Datagrain grain) { @@ -293,7 +292,7 @@ private PagedFlux listByReservationOrderAsync(String re * @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 reservation summaries. + * @return result of listing reservation summaries as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByReservationOrderAsync( @@ -311,7 +310,7 @@ private PagedFlux listByReservationOrderAsync( * @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 reservation summaries. + * @return result of listing reservation summaries as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByReservationOrder(String reservationOrderId, Datagrain grain) { @@ -330,7 +329,7 @@ public PagedIterable listByReservationOrder(String rese * @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 reservation summaries. + * @return result of listing reservation summaries as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByReservationOrder( @@ -349,7 +348,8 @@ public PagedIterable listByReservationOrder( * @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 reservation summaries. + * @return result of listing reservation summaries along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByReservationOrderAndReservationSinglePageAsync( @@ -408,7 +408,8 @@ private Mono> listByReservationOrderAndRe * @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 reservation summaries. + * @return result of listing reservation summaries along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByReservationOrderAndReservationSinglePageAsync( @@ -463,7 +464,7 @@ private Mono> listByReservationOrderAndRe * @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 reservation summaries. + * @return result of listing reservation summaries as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByReservationOrderAndReservationAsync( @@ -482,7 +483,7 @@ private PagedFlux listByReservationOrderAndReservationA * @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 reservation summaries. + * @return result of listing reservation summaries as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByReservationOrderAndReservationAsync( @@ -505,7 +506,7 @@ private PagedFlux listByReservationOrderAndReservationA * @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 reservation summaries. + * @return result of listing reservation summaries as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByReservationOrderAndReservationAsync( @@ -526,7 +527,7 @@ private PagedFlux listByReservationOrderAndReservationA * @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 reservation summaries. + * @return result of listing reservation summaries as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByReservationOrderAndReservation( @@ -548,7 +549,7 @@ public PagedIterable listByReservationOrderAndReservati * @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 reservation summaries. + * @return result of listing reservation summaries as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByReservationOrderAndReservation( @@ -576,7 +577,8 @@ public PagedIterable listByReservationOrderAndReservati * @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 reservation summaries. + * @return result of listing reservation summaries along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -648,7 +650,8 @@ private Mono> listSinglePageAsync( * @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 reservation summaries. + * @return result of listing reservation summaries along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -717,7 +720,7 @@ private Mono> listSinglePageAsync( * @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 reservation summaries. + * @return result of listing reservation summaries as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -744,7 +747,7 @@ private PagedFlux 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 reservation summaries. + * @return result of listing reservation summaries as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope, Datagrain grain) { @@ -778,7 +781,7 @@ private PagedFlux listAsync(String scope, Datagrain gra * @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 reservation summaries. + * @return result of listing reservation summaries as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -808,7 +811,7 @@ private PagedFlux 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 reservation summaries. + * @return result of listing reservation summaries as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String scope, Datagrain grain) { @@ -841,7 +844,7 @@ public PagedIterable list(String scope, Datagrain grain * @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 reservation summaries. + * @return result of listing reservation summaries as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -864,7 +867,8 @@ public PagedIterable 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 reservation summaries. + * @return result of listing reservation summaries along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByReservationOrderNextSinglePageAsync(String nextLink) { @@ -901,7 +905,8 @@ private Mono> listByReservationOrderNextS * @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 reservation summaries. + * @return result of listing reservation summaries along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByReservationOrderNextSinglePageAsync( @@ -937,7 +942,8 @@ private Mono> listByReservationOrderNextS * @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 reservation summaries. + * @return result of listing reservation summaries along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByReservationOrderAndReservationNextSinglePageAsync( @@ -977,7 +983,8 @@ private Mono> listByReservationOrderAndRe * @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 reservation summaries. + * @return result of listing reservation summaries along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByReservationOrderAndReservationNextSinglePageAsync( @@ -1013,7 +1020,8 @@ private Mono> listByReservationOrderAndRe * @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 reservation summaries. + * @return result of listing reservation summaries along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1049,7 +1057,8 @@ private Mono> listNextSinglePageAsync(Str * @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 reservation summaries. + * @return result of listing reservation summaries 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/ReservationsSummariesImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationsSummariesImpl.java index 05a85e5bf2330..2fd407b8e523a 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationsSummariesImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationsSummariesImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.consumption.models.Datagrain; import com.azure.resourcemanager.consumption.models.ReservationSummary; import com.azure.resourcemanager.consumption.models.ReservationsSummaries; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ReservationsSummariesImpl implements ReservationsSummaries { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationsSummariesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ReservationsSummariesImpl.class); private final ReservationsSummariesClient innerClient; diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/TagsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/TagsClientImpl.java index 67df95a5b2186..63d5eb07aff8b 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/TagsClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/TagsClientImpl.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.TagsClient; import com.azure.resourcemanager.consumption.fluent.models.TagsResultInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in TagsClient. */ public final class TagsClientImpl implements TagsClient { - private final ClientLogger logger = new ClientLogger(TagsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final TagsService service; @@ -79,7 +76,8 @@ Mono> get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available tag keys for the defined scope. + * @return all available tag keys for the defined scope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String scope) { @@ -114,7 +112,8 @@ private Mono> getWithResponseAsync(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 all available tag keys for the defined scope. + * @return all available tag keys for the defined scope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String scope, Context context) { @@ -146,7 +145,7 @@ private Mono> getWithResponseAsync(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 all available tag keys for the defined scope. + * @return all available tag keys for the defined scope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String scope) { @@ -197,7 +196,7 @@ public TagsResultInner get(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 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) public Response getWithResponse(String scope, Context context) { diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/TagsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/TagsImpl.java index 66f604cb115e0..58c43c4c426f8 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/TagsImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/TagsImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.consumption.fluent.models.TagsResultInner; import com.azure.resourcemanager.consumption.models.Tags; import com.azure.resourcemanager.consumption.models.TagsResult; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class TagsImpl implements Tags { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TagsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(TagsImpl.class); private final TagsClient innerClient; diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/UsageDetailsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/UsageDetailsClientImpl.java index 44a113317cd05..a6fa5ff2bda1b 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/UsageDetailsClientImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/UsageDetailsClientImpl.java @@ -25,7 +25,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.UsageDetailsClient; import com.azure.resourcemanager.consumption.fluent.models.UsageDetailInner; import com.azure.resourcemanager.consumption.models.Metrictype; @@ -34,8 +33,6 @@ /** An instance of this class provides access to all the operations defined in UsageDetailsClient. */ public final class UsageDetailsClientImpl implements UsageDetailsClient { - private final ClientLogger logger = new ClientLogger(UsageDetailsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final UsageDetailsService service; @@ -62,7 +59,7 @@ public final class UsageDetailsClientImpl implements UsageDetailsClient { private interface UsageDetailsService { @Headers({"Content-Type: application/json"}) @Get("/{scope}/providers/Microsoft.Consumption/usageDetails") - @ExpectedResponses({200}) + @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @HostParam("$host") String endpoint, @@ -78,7 +75,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @@ -123,7 +120,8 @@ 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 usage details. + * @return result of listing usage details along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -202,7 +200,8 @@ private Mono> listSinglePageAsync( * @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 usage details. + * @return result of listing usage details along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -277,7 +276,7 @@ private Mono> listSinglePageAsync( * @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 usage details. + * @return result of listing usage details as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -311,7 +310,7 @@ private PagedFlux 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 usage details. + * @return result of listing usage details as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope) { @@ -362,7 +361,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 usage details. + * @return result of listing usage details as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -396,7 +395,7 @@ private PagedFlux 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 usage details. + * @return result of listing usage details as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String scope) { @@ -445,7 +444,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 usage details. + * @return result of listing usage details as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -460,7 +459,8 @@ public PagedIterable 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 usage details. + * @return result of listing usage details along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -496,7 +496,8 @@ private Mono> listNextSinglePageAsync(String nex * @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 usage details. + * @return result of listing usage details 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/UsageDetailsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/UsageDetailsImpl.java index 0a2f97c4b4a87..a2b45996437cb 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/UsageDetailsImpl.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/UsageDetailsImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.consumption.models.Metrictype; import com.azure.resourcemanager.consumption.models.UsageDetail; import com.azure.resourcemanager.consumption.models.UsageDetails; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class UsageDetailsImpl implements UsageDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageDetailsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(UsageDetailsImpl.class); private final UsageDetailsClient innerClient; diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/AggregatedCosts.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/AggregatedCosts.java index 4f6201d53e824..9d4eaf6779a75 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/AggregatedCosts.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/AggregatedCosts.java @@ -31,7 +31,7 @@ public interface AggregatedCosts { * @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}. */ Response getByManagementGroupWithResponse( String managementGroupId, String filter, Context context); @@ -58,7 +58,7 @@ ManagementGroupAggregatedCostResult 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}. */ Response getForBillingPeriodByManagementGroupWithResponse( String managementGroupId, String billingPeriodName, Context context); diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Amount.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Amount.java index ee8a60d5cd91c..23b8382138bac 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Amount.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Amount.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.math.BigDecimal; /** The amount plus currency . */ @Immutable public class Amount { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Amount.class); - /* * Amount currency. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/AmountWithExchangeRate.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/AmountWithExchangeRate.java index 56359257ad74a..ed9a73463cd46 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/AmountWithExchangeRate.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/AmountWithExchangeRate.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.math.BigDecimal; /** The amount with exchange rate. */ @Immutable public final class AmountWithExchangeRate extends Amount { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AmountWithExchangeRate.class); - /* * The exchange rate. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BalancePropertiesAdjustmentDetailsItem.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BalancePropertiesAdjustmentDetailsItem.java index 28b35f39200b8..22d8b8ad7b179 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BalancePropertiesAdjustmentDetailsItem.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BalancePropertiesAdjustmentDetailsItem.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.math.BigDecimal; /** The BalancePropertiesAdjustmentDetailsItem model. */ @Immutable public final class BalancePropertiesAdjustmentDetailsItem { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BalancePropertiesAdjustmentDetailsItem.class); - /* * the name of new adjustment. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BalancePropertiesNewPurchasesDetailsItem.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BalancePropertiesNewPurchasesDetailsItem.java index 88f9ac43b8b41..ef9a6ffaa2c31 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BalancePropertiesNewPurchasesDetailsItem.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BalancePropertiesNewPurchasesDetailsItem.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.math.BigDecimal; /** The BalancePropertiesNewPurchasesDetailsItem model. */ @Immutable public final class BalancePropertiesNewPurchasesDetailsItem { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BalancePropertiesNewPurchasesDetailsItem.class); - /* * the name of new purchase. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Balances.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Balances.java index 285e4cd37caa5..729e45a270e4e 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Balances.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Balances.java @@ -30,7 +30,7 @@ public interface Balances { * @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}. */ Response getByBillingAccountWithResponse(String billingAccountId, Context context); @@ -57,7 +57,7 @@ public interface Balances { * @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}. */ Response getForBillingPeriodByBillingAccountWithResponse( String billingAccountId, String billingPeriodName, Context context); diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetComparisonExpression.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetComparisonExpression.java index 6c4ec428fb0db..9dbe70000c116 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetComparisonExpression.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetComparisonExpression.java @@ -6,15 +6,12 @@ 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.util.List; /** The comparison expression to be used in the budgets. */ @Fluent public final class BudgetComparisonExpression { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BudgetComparisonExpression.class); - /* * The name of the column to use in comparison. */ @@ -100,21 +97,23 @@ public BudgetComparisonExpression withValues(List values) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model BudgetComparisonExpression")); } if (operator() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property operator in model BudgetComparisonExpression")); } if (values() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property values in model BudgetComparisonExpression")); } } + + private static final ClientLogger LOGGER = new ClientLogger(BudgetComparisonExpression.class); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetFilter.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetFilter.java index 7af3aa43443e0..b353d7cf44c4e 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetFilter.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetFilter.java @@ -5,28 +5,18 @@ package com.azure.resourcemanager.consumption.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.util.List; /** May be used to filter budgets by resource group, resource, or meter. */ @Fluent public final class BudgetFilter { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BudgetFilter.class); - /* * The logical "AND" expression. Must have at least 2 items. */ @JsonProperty(value = "and") private List and; - /* - * The logical "NOT" expression. - */ - @JsonProperty(value = "not") - private BudgetFilterProperties not; - /* * Has comparison expression for a dimension */ @@ -59,26 +49,6 @@ public BudgetFilter withAnd(List and) { return this; } - /** - * Get the not property: The logical "NOT" expression. - * - * @return the not value. - */ - public BudgetFilterProperties not() { - return this.not; - } - - /** - * Set the not property: The logical "NOT" expression. - * - * @param not the not value to set. - * @return the BudgetFilter object itself. - */ - public BudgetFilter withNot(BudgetFilterProperties not) { - this.not = not; - return this; - } - /** * Get the dimensions property: Has comparison expression for a dimension. * @@ -128,9 +98,6 @@ public void validate() { if (and() != null) { and().forEach(e -> e.validate()); } - if (not() != null) { - not().validate(); - } if (dimensions() != null) { dimensions().validate(); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetFilterProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetFilterProperties.java index 42ff353a3e6cc..ccb3582ba2e89 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetFilterProperties.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetFilterProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.consumption.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; /** The Dimensions or Tags to filter a budget by. */ @Fluent public final class BudgetFilterProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BudgetFilterProperties.class); - /* * Has comparison expression for a dimension */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetTimePeriod.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetTimePeriod.java index 05a038d2a479e..dd2b1a6e3cf9d 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetTimePeriod.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetTimePeriod.java @@ -6,15 +6,12 @@ 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.time.OffsetDateTime; /** The start and end date for a budget. */ @Fluent public final class BudgetTimePeriod { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BudgetTimePeriod.class); - /* * The start date for the budget. */ @@ -77,9 +74,11 @@ public BudgetTimePeriod withEndDate(OffsetDateTime endDate) { */ public void validate() { if (startDate() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property startDate in model BudgetTimePeriod")); } } + + private static final ClientLogger LOGGER = new ClientLogger(BudgetTimePeriod.class); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Budgets.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Budgets.java index 30473f648fac7..bd74ddb78e26a 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Budgets.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Budgets.java @@ -28,7 +28,7 @@ public interface Budgets { * @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}. */ PagedIterable list(String scope); @@ -51,7 +51,7 @@ public interface Budgets { * @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}. */ PagedIterable list(String scope, Context context); @@ -98,7 +98,7 @@ public interface Budgets { * @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}. */ Response getWithResponse(String scope, String budgetName, Context context); @@ -144,7 +144,7 @@ public interface Budgets { * @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}. */ Response deleteWithResponse(String scope, String budgetName, Context context); @@ -155,7 +155,7 @@ public interface Budgets { * @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}. */ Budget getById(String id); @@ -167,7 +167,7 @@ public interface Budgets { * @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}. */ Response getByIdWithResponse(String id, Context context); @@ -189,7 +189,7 @@ public interface Budgets { * @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}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetsListResult.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetsListResult.java index bd33a65c2a2b6..c043d1db7de53 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetsListResult.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/BudgetsListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.BudgetInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Result of listing budgets. It contains a list of available budgets in the scope provided. */ @Immutable public final class BudgetsListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BudgetsListResult.class); - /* * The list of budgets. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ChargeSummary.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ChargeSummary.java index 05d8508577baf..ce4025d03527f 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ChargeSummary.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ChargeSummary.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.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -26,8 +24,6 @@ }) @Fluent public class ChargeSummary extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ChargeSummary.class); - /* * eTag of the resource. To handle concurrent update scenario, this field * will be used to determine whether the user is updating the latest diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Charges.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Charges.java index 16f0b73abd97a..37dbc5da100f3 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Charges.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Charges.java @@ -66,7 +66,7 @@ public interface Charges { * @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}. */ Response listWithResponse( String scope, String startDate, String endDate, String filter, String apply, Context context); diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CreditBalanceSummary.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CreditBalanceSummary.java index 0610ce0df9c50..0a997823e6b7f 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CreditBalanceSummary.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CreditBalanceSummary.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Summary of credit balances. */ @Immutable public final class CreditBalanceSummary { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CreditBalanceSummary.class); - /* * Estimated balance. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Credits.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Credits.java index c81237f13f378..1812d522e8e9a 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Credits.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Credits.java @@ -30,7 +30,7 @@ public interface Credits { * @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}. */ Response getWithResponse(String billingAccountId, String billingProfileId, Context context); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CurrentSpend.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CurrentSpend.java index 7d1ef07753c7e..423bc33036b73 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CurrentSpend.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/CurrentSpend.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.math.BigDecimal; /** The current amount of cost which is being tracked for a budget. */ @Immutable public final class CurrentSpend { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CurrentSpend.class); - /* * The total amount of cost which is being tracked by the budget. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Events.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Events.java index f2c17db4b19bd..e77de5fe13584 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Events.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Events.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.EventSummaryInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Result of listing event summary. */ @Immutable public final class Events { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Events.class); - /* * The list of event summary. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/EventsOperations.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/EventsOperations.java index 8dba4861b35d8..42b94ac9340e3 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/EventsOperations.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/EventsOperations.java @@ -20,7 +20,7 @@ public interface EventsOperations { * @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}. */ PagedIterable listByBillingProfile( String billingAccountId, String billingProfileId, String startDate, String endDate); @@ -37,7 +37,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}. */ PagedIterable listByBillingProfile( String billingAccountId, String billingProfileId, String startDate, String endDate, Context context); @@ -50,7 +50,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}. */ PagedIterable listByBillingAccount(String billingAccountId); @@ -66,7 +66,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}. */ PagedIterable listByBillingAccount(String billingAccountId, String filter, Context context); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ForecastSpend.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ForecastSpend.java index 4ac1667b49b1d..5240c761e805d 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ForecastSpend.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ForecastSpend.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.math.BigDecimal; /** The forecasted cost which is being tracked for a budget. */ @Immutable public final class ForecastSpend { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ForecastSpend.class); - /* * The forecasted cost for the total time period which is being tracked by * the budget. This value is only provided if the budget contains a diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyChargeSummary.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyChargeSummary.java index 084f7dd40a584..06f1c69d8d1d0 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyChargeSummary.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyChargeSummary.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.LegacyChargeSummaryProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +17,6 @@ @JsonTypeName("legacy") @Fluent public final class LegacyChargeSummary extends ChargeSummary { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LegacyChargeSummary.class); - /* * Properties for legacy charge summary */ @@ -114,7 +111,7 @@ public String currency() { public void validate() { super.validate(); if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property innerProperties in model LegacyChargeSummary")); @@ -122,4 +119,6 @@ public void validate() { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(LegacyChargeSummary.class); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyReservationRecommendation.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyReservationRecommendation.java index 6ede5b412f975..e1133c41f2fe2 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyReservationRecommendation.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyReservationRecommendation.java @@ -8,7 +8,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.LegacyReservationRecommendationProperties; import com.azure.resourcemanager.consumption.fluent.models.ReservationRecommendationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -22,8 +21,6 @@ @JsonTypeName("legacy") @Fluent public final class LegacyReservationRecommendation extends ReservationRecommendationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LegacyReservationRecommendation.class); - /* * Properties for legacy reservation recommendation */ @@ -174,7 +171,7 @@ public List skuProperties() { public void validate() { super.validate(); if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property innerProperties in model LegacyReservationRecommendation")); @@ -182,4 +179,6 @@ public void validate() { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(LegacyReservationRecommendation.class); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyReservationTransaction.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyReservationTransaction.java index e9ebfb4c40a41..f4fe429b485af 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyReservationTransaction.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyReservationTransaction.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.ReservationTransactionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; /** Legacy Reservation transaction resource. */ @Immutable public final class LegacyReservationTransaction extends ReservationTransactionInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LegacyReservationTransaction.class); - /** * Validates the instance. * diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacySharedScopeReservationRecommendationProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacySharedScopeReservationRecommendationProperties.java index df0ec268d7751..6eda17f28065a 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacySharedScopeReservationRecommendationProperties.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacySharedScopeReservationRecommendationProperties.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.LegacyReservationRecommendationProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,9 +15,6 @@ @Immutable public final class LegacySharedScopeReservationRecommendationProperties extends LegacyReservationRecommendationProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(LegacySharedScopeReservationRecommendationProperties.class); - /** * Validates the instance. * diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacySingleScopeReservationRecommendationProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacySingleScopeReservationRecommendationProperties.java index 16fa7d307c55c..1ef7f6a3347c3 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacySingleScopeReservationRecommendationProperties.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacySingleScopeReservationRecommendationProperties.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.LegacyReservationRecommendationProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -19,9 +17,6 @@ @Immutable public final class LegacySingleScopeReservationRecommendationProperties extends LegacyReservationRecommendationProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(LegacySingleScopeReservationRecommendationProperties.class); - /* * Subscription id associated with single scoped recommendation. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyUsageDetail.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyUsageDetail.java index 3149ee7269794..e7d084f228094 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyUsageDetail.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyUsageDetail.java @@ -8,7 +8,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.LegacyUsageDetailProperties; import com.azure.resourcemanager.consumption.fluent.models.UsageDetailInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -21,8 +20,6 @@ @JsonTypeName("legacy") @Fluent public final class LegacyUsageDetail extends UsageDetailInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LegacyUsageDetail.class); - /* * Properties for legacy usage details */ @@ -439,6 +436,24 @@ public BigDecimal payGPrice() { return this.innerProperties() == null ? null : this.innerProperties().payGPrice(); } + /** + * Get the benefitId property: Unique identifier for the applicable benefit. + * + * @return the benefitId value. + */ + public String benefitId() { + return this.innerProperties() == null ? null : this.innerProperties().benefitId(); + } + + /** + * Get the benefitName property: Name of the applicable benefit. + * + * @return the benefitName value. + */ + public String benefitName() { + return this.innerProperties() == null ? null : this.innerProperties().benefitName(); + } + /** * Get the pricingModel property: Identifier that indicates how the meter is priced. * @@ -457,7 +472,7 @@ public PricingModelType pricingModel() { public void validate() { super.validate(); if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property innerProperties in model LegacyUsageDetail")); @@ -465,4 +480,6 @@ public void validate() { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(LegacyUsageDetail.class); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Lots.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Lots.java index 580dabac15b66..4293c234e5875 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Lots.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Lots.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.LotSummaryInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Result of listing lot summary. */ @Immutable public final class Lots { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Lots.class); - /* * The list of lot summary. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LotsOperations.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LotsOperations.java index bab1d91c0f170..3a6f6da12d3f0 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LotsOperations.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LotsOperations.java @@ -18,7 +18,7 @@ public interface LotsOperations { * @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}. */ PagedIterable listByBillingProfile(String billingAccountId, String billingProfileId); @@ -32,7 +32,7 @@ public interface LotsOperations { * @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}. */ PagedIterable listByBillingProfile(String billingAccountId, String billingProfileId, Context context); @@ -44,7 +44,7 @@ public interface LotsOperations { * @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}. */ PagedIterable listByBillingAccount(String billingAccountId); @@ -60,7 +60,37 @@ public interface LotsOperations { * @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}. */ PagedIterable listByBillingAccount(String billingAccountId, String filter, Context context); + + /** + * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile + * and a customer. Microsoft Azure consumption commitments are only supported for the billing account scope. + * + * @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}. + */ + PagedIterable listByCustomer(String billingAccountId, String customerId); + + /** + * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile + * and a customer. Microsoft Azure consumption commitments are only supported for the billing account scope. + * + * @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}. + */ + 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/models/Marketplaces.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Marketplaces.java index 82433cf0f8663..cd4806323bf6e 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Marketplaces.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Marketplaces.java @@ -25,7 +25,7 @@ public interface Marketplaces { * @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}. */ PagedIterable list(String scope); @@ -53,7 +53,7 @@ public interface Marketplaces { * @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}. */ 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/models/MarketplacesListResult.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/MarketplacesListResult.java index 2743240b9f0b7..719684479e0bb 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/MarketplacesListResult.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/MarketplacesListResult.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.MarketplaceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,8 +15,6 @@ */ @Immutable public final class MarketplacesListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MarketplacesListResult.class); - /* * The list of marketplaces. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/MeterDetails.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/MeterDetails.java index 26cbeec938a64..6e002b26269f3 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/MeterDetails.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/MeterDetails.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.math.BigDecimal; /** The properties of the meter detail. */ @Immutable public final class MeterDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MeterDetails.class); - /* * The name of the meter, within the given meter category */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/MeterDetailsResponse.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/MeterDetailsResponse.java index 9a2fd82709ffb..a9a668b832357 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/MeterDetailsResponse.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/MeterDetailsResponse.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties of the meter detail. */ @Immutable public final class MeterDetailsResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MeterDetailsResponse.class); - /* * The name of the meter, within the given meter category */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernChargeSummary.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernChargeSummary.java index d15dcf28111c2..097ff7c3bee22 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernChargeSummary.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernChargeSummary.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.ModernChargeSummaryProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +16,6 @@ @JsonTypeName("modern") @Fluent public final class ModernChargeSummary extends ChargeSummary { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModernChargeSummary.class); - /* * Properties for modern charge summary */ @@ -149,7 +146,7 @@ public Boolean isInvoiced() { public void validate() { super.validate(); if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property innerProperties in model ModernChargeSummary")); @@ -157,4 +154,6 @@ public void validate() { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ModernChargeSummary.class); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernReservationRecommendation.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernReservationRecommendation.java index 85f3bd155f595..3e03d155c7993 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernReservationRecommendation.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernReservationRecommendation.java @@ -8,7 +8,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.ModernReservationRecommendationProperties; import com.azure.resourcemanager.consumption.fluent.models.ReservationRecommendationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -22,8 +21,6 @@ @JsonTypeName("modern") @Fluent public final class ModernReservationRecommendation extends ReservationRecommendationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModernReservationRecommendation.class); - /* * Properties for modern reservation recommendation */ @@ -192,7 +189,7 @@ public String skuName() { public void validate() { super.validate(); if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property innerProperties in model ModernReservationRecommendation")); @@ -200,4 +197,6 @@ public void validate() { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ModernReservationRecommendation.class); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernReservationTransactionsListResult.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernReservationTransactionsListResult.java index 77b4c8422ecb4..8c42b94e68735 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernReservationTransactionsListResult.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernReservationTransactionsListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.ModernReservationTransactionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Result of listing reservation recommendations. */ @Immutable public final class ModernReservationTransactionsListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModernReservationTransactionsListResult.class); - /* * The list of reservation recommendations. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernUsageDetail.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernUsageDetail.java index 8d35112b01368..0ed16b876c63a 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernUsageDetail.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernUsageDetail.java @@ -8,7 +8,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.ModernUsageDetailProperties; import com.azure.resourcemanager.consumption.fluent.models.UsageDetailInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -21,8 +20,6 @@ @JsonTypeName("modern") @Fluent public final class ModernUsageDetail extends UsageDetailInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModernUsageDetail.class); - /* * Properties for modern usage details */ @@ -731,7 +728,7 @@ public String costAllocationRuleName() { public void validate() { super.validate(); if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property innerProperties in model ModernUsageDetail")); @@ -739,4 +736,6 @@ public void validate() { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ModernUsageDetail.class); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Notification.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Notification.java index ac6302aac9a77..ba2f2751867a3 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Notification.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Notification.java @@ -6,7 +6,6 @@ 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.util.List; @@ -14,8 +13,6 @@ /** The notification associated with a budget. */ @Fluent public final class Notification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Notification.class); - /* * The notification is enabled or not. */ @@ -247,19 +244,21 @@ public Notification withLocale(CultureCode locale) { */ public void validate() { if (operator() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property operator in model Notification")); } if (threshold() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property threshold in model Notification")); } if (contactEmails() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property contactEmails in model Notification")); } } + + private static final ClientLogger LOGGER = new ClientLogger(Notification.class); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/OperationDisplay.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/OperationDisplay.java index b8ba95d212204..d0242038c43a5 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/OperationDisplay.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/OperationDisplay.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The object that represents the operation. */ @Immutable public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - /* * Service provider: Microsoft.Consumption. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/OperationListResult.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/OperationListResult.java index 2c57455a63d5d..5b2149eaa8044 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/OperationListResult.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/OperationListResult.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,8 +15,6 @@ */ @Immutable public final class OperationListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResult.class); - /* * List of consumption operations supported by the Microsoft.Consumption * resource provider. diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Operations.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Operations.java index fb678e85b69a2..d95f6ad5ab2f7 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Operations.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Operations.java @@ -14,7 +14,7 @@ public interface Operations { * * @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}. */ PagedIterable list(); @@ -25,7 +25,7 @@ public interface Operations { * @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}. */ PagedIterable list(Context context); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/PriceSheetProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/PriceSheetProperties.java index b6643e12645f8..2ce2190fd1aaf 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/PriceSheetProperties.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/PriceSheetProperties.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.math.BigDecimal; import java.util.UUID; @@ -14,8 +12,6 @@ /** The properties of the price sheet. */ @Immutable public final class PriceSheetProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PriceSheetProperties.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/models/PriceSheets.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/PriceSheets.java index 13bfc45db8b99..1da340c09e210 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/PriceSheets.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/PriceSheets.java @@ -31,7 +31,7 @@ public interface PriceSheets { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a subscription. + * @return the price sheet for a subscription along with {@link Response}. */ Response getWithResponse(String expand, String skiptoken, Integer top, Context context); @@ -62,7 +62,7 @@ public interface PriceSheets { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a scope by subscriptionId and billing period. + * @return the price sheet for a scope by subscriptionId and billing period along with {@link Response}. */ Response getByBillingPeriodWithResponse( String billingPeriodName, String expand, String skiptoken, Integer top, Context context); diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Reseller.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Reseller.java index 029cada6fe011..87e9c7a2f1c41 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Reseller.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Reseller.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The reseller properties. */ @Immutable public final class Reseller { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Reseller.class); - /* * The reseller property ID. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationDetailsListResult.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationDetailsListResult.java index ffb854c4b8ff5..18b146d27a3e7 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationDetailsListResult.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationDetailsListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.ReservationDetailInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Result of listing reservation details. */ @Immutable public final class ReservationDetailsListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationDetailsListResult.class); - /* * The list of reservation details. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetails.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetails.java index 4c93fb135ef73..9bb7327c1990d 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetails.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetails.java @@ -49,7 +49,7 @@ ReservationRecommendationDetailsModel 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}. */ Response getWithResponse( String 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/models/ReservationRecommendationDetailsCalculatedSavingsProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetailsCalculatedSavingsProperties.java index 4810f2254a22d..64c4c3e907413 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetailsCalculatedSavingsProperties.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetailsCalculatedSavingsProperties.java @@ -5,17 +5,11 @@ package com.azure.resourcemanager.consumption.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; /** Details of estimated savings. */ @Fluent public final class ReservationRecommendationDetailsCalculatedSavingsProperties { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(ReservationRecommendationDetailsCalculatedSavingsProperties.class); - /* * The cost without reservation. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetailsResourceProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetailsResourceProperties.java index 3835bf3903d94..651efe267253b 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetailsResourceProperties.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetailsResourceProperties.java @@ -5,17 +5,12 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Details of the resource. */ @Immutable public final class ReservationRecommendationDetailsResourceProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ReservationRecommendationDetailsResourceProperties.class); - /* * List of subscriptions for which the reservation is applied. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetailsSavingsProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetailsSavingsProperties.java index 7753a58ff4e0c..44992c1b1cbb1 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetailsSavingsProperties.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetailsSavingsProperties.java @@ -5,17 +5,12 @@ package com.azure.resourcemanager.consumption.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.util.List; /** Details of the estimated savings. */ @Fluent public final class ReservationRecommendationDetailsSavingsProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ReservationRecommendationDetailsSavingsProperties.class); - /* * List of calculated savings. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetailsUsageProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetailsUsageProperties.java index 76d401214b2f0..b492aba7ed474 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetailsUsageProperties.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetailsUsageProperties.java @@ -5,17 +5,12 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Details about historical usage data that has been used for computing the recommendation. */ @Immutable public final class ReservationRecommendationDetailsUsageProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ReservationRecommendationDetailsUsageProperties.class); - /* * The first usage date used for looking back for computing the * recommendation. diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendations.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendations.java index adae056eabfe6..0f31cf939ab19 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendations.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendations.java @@ -21,7 +21,7 @@ public interface ReservationRecommendations { * @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}. */ PagedIterable list(String scope); @@ -44,7 +44,7 @@ public interface ReservationRecommendations { * @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}. */ PagedIterable list(String scope, String filter, Context context); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationsListResult.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationsListResult.java index 5de354242a737..da9c5273c456c 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationsListResult.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationsListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.ReservationRecommendationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Result of listing reservation recommendations. */ @Immutable public final class ReservationRecommendationsListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationRecommendationsListResult.class); - /* * The list of reservation recommendations. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationSummariesListResult.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationSummariesListResult.java index e355ec17c10d4..ed17b737411ee 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationSummariesListResult.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationSummariesListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.ReservationSummaryInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Result of listing reservation summaries. */ @Immutable public final class ReservationSummariesListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationSummariesListResult.class); - /* * The list of reservation summaries. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationTransactionResource.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationTransactionResource.java index 16d5361a2471b..b5f2d62b0b7c3 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationTransactionResource.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationTransactionResource.java @@ -6,16 +6,12 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The Resource model definition. */ @Immutable public class ReservationTransactionResource extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationTransactionResource.class); - /* * Resource tags. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationTransactions.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationTransactions.java index 5fc85b543a975..f63f2c9f0e8f6 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationTransactions.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationTransactions.java @@ -16,7 +16,7 @@ public interface ReservationTransactions { * @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}. */ PagedIterable list(String billingAccountId); @@ -30,7 +30,7 @@ public interface ReservationTransactions { * @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}. */ PagedIterable list(String billingAccountId, String filter, Context context); @@ -42,7 +42,7 @@ public interface ReservationTransactions { * @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}. */ PagedIterable listByBillingProfile(String billingAccountId, String billingProfileId); @@ -57,7 +57,7 @@ public interface ReservationTransactions { * @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}. */ PagedIterable listByBillingProfile( String billingAccountId, String billingProfileId, String filter, Context context); diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationTransactionsListResult.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationTransactionsListResult.java index f79c313d6d236..3c8cb4a27b757 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationTransactionsListResult.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationTransactionsListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.ReservationTransactionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Result of listing reservation recommendations. */ @Immutable public final class ReservationTransactionsListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationTransactionsListResult.class); - /* * The list of reservation recommendations. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationsDetails.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationsDetails.java index 0bc6bc3f035af..f3be544d2ac75 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationsDetails.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationsDetails.java @@ -18,7 +18,7 @@ public interface ReservationsDetails { * @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}. */ PagedIterable listByReservationOrder(String reservationOrderId, String filter); @@ -32,7 +32,7 @@ public interface ReservationsDetails { * @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}. */ PagedIterable listByReservationOrder(String reservationOrderId, String filter, Context context); @@ -46,7 +46,7 @@ public interface ReservationsDetails { * @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}. */ PagedIterable listByReservationOrderAndReservation( String reservationOrderId, String reservationId, String filter); @@ -62,7 +62,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 details. + * @return result of listing reservation details as paginated response with {@link PagedIterable}. */ PagedIterable listByReservationOrderAndReservation( String reservationOrderId, String reservationId, String filter, Context context); @@ -77,7 +77,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 details. + * @return result of listing reservation details as paginated response with {@link PagedIterable}. */ PagedIterable list(String scope); @@ -100,7 +100,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 details. + * @return result of listing reservation details as paginated response with {@link PagedIterable}. */ PagedIterable list( String scope, diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationsSummaries.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationsSummaries.java index a5c07b494c6c8..f7cf5eacc416e 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationsSummaries.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationsSummaries.java @@ -17,7 +17,7 @@ public interface ReservationsSummaries { * @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}. */ PagedIterable listByReservationOrder(String reservationOrderId, Datagrain grain); @@ -32,7 +32,7 @@ public interface ReservationsSummaries { * @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}. */ PagedIterable listByReservationOrder( String reservationOrderId, Datagrain grain, String filter, Context context); @@ -46,7 +46,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}. */ PagedIterable listByReservationOrderAndReservation( String reservationOrderId, String reservationId, Datagrain grain); @@ -63,7 +63,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}. */ PagedIterable listByReservationOrderAndReservation( String reservationOrderId, String reservationId, Datagrain grain, String filter, Context context); @@ -79,7 +79,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}. */ PagedIterable list(String scope, Datagrain grain); @@ -103,7 +103,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}. */ PagedIterable list( String scope, diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ResourceAttributes.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ResourceAttributes.java index 267f6e808f6a4..4ccd981a57b7c 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ResourceAttributes.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ResourceAttributes.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The Resource model definition. */ @Immutable public class ResourceAttributes { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceAttributes.class); - /* * Resource location */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/SkuProperty.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/SkuProperty.java index 5f4126be75357..54c2e65c04a1e 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/SkuProperty.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/SkuProperty.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The Sku property. */ @Immutable public final class SkuProperty { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuProperty.class); - /* * The name of sku property. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Tag.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Tag.java index 1c6eaf790788d..7c7ac0d1fad94 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Tag.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Tag.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.consumption.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.util.List; /** The tag resource. */ @Fluent public final class Tag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Tag.class); - /* * Tag key. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Tags.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Tags.java index 45decbb6eebb3..9e8c270fe7351 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Tags.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/Tags.java @@ -42,7 +42,7 @@ public interface Tags { * @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}. */ Response getWithResponse(String scope, Context context); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/UsageDetails.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/UsageDetails.java index 61734c007e496..5bb912048f1a4 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/UsageDetails.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/UsageDetails.java @@ -33,7 +33,7 @@ public interface UsageDetails { * @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}. */ PagedIterable list(String scope); @@ -74,7 +74,7 @@ public interface UsageDetails { * @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}. */ PagedIterable list( String scope, String expand, String filter, String skiptoken, Integer top, Metrictype metric, Context context); diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/UsageDetailsListResult.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/UsageDetailsListResult.java index 928d9f1da0c31..ba054af455a00 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/UsageDetailsListResult.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/UsageDetailsListResult.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.consumption.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.models.UsageDetailInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,8 +15,6 @@ */ @Immutable public final class UsageDetailsListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageDetailsListResult.class); - /* * The list of usage details. */ diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/samples/java/com/azure/resourcemanager/consumption/generated/LotsOperationListByCustomerSamples.java b/sdk/consumption/azure-resourcemanager-consumption/src/samples/java/com/azure/resourcemanager/consumption/generated/LotsOperationListByCustomerSamples.java new file mode 100644 index 0000000000000..2311bfabdfbb0 --- /dev/null +++ b/sdk/consumption/azure-resourcemanager-consumption/src/samples/java/com/azure/resourcemanager/consumption/generated/LotsOperationListByCustomerSamples.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.consumption.generated; + +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); + } +} diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/samples/java/com/azure/resourcemanager/consumption/generated/OperationsListSamples.java b/sdk/consumption/azure-resourcemanager-consumption/src/samples/java/com/azure/resourcemanager/consumption/generated/OperationsListSamples.java new file mode 100644 index 0000000000000..5c7eb3ace7d3d --- /dev/null +++ b/sdk/consumption/azure-resourcemanager-consumption/src/samples/java/com/azure/resourcemanager/consumption/generated/OperationsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.consumption.generated; + +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); + } +}