scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -208,6 +224,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -215,9 +244,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -239,7 +270,7 @@ public ConsumptionManager authenticate(TokenCredential credential, AzureProfile
.append("-")
.append("com.azure.resourcemanager.consumption")
.append("/")
- .append("1.0.0-beta.3");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -257,10 +288,15 @@ public ConsumptionManager authenticate(TokenCredential credential, AzureProfile
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
@@ -291,7 +327,35 @@ public ConsumptionManager authenticate(TokenCredential credential, AzureProfile
}
}
- /** @return Resource collection API of UsageDetails. */
+ /**
+ * Gets the resource collection API of PriceSheets.
+ *
+ * @return Resource collection API of PriceSheets.
+ */
+ public PriceSheets priceSheets() {
+ if (this.priceSheets == null) {
+ this.priceSheets = new PriceSheetsImpl(clientObject.getPriceSheets(), this);
+ }
+ return priceSheets;
+ }
+
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * Gets the resource collection API of UsageDetails.
+ *
+ * @return Resource collection API of UsageDetails.
+ */
public UsageDetails usageDetails() {
if (this.usageDetails == null) {
this.usageDetails = new UsageDetailsImpl(clientObject.getUsageDetails(), this);
@@ -299,7 +363,11 @@ public UsageDetails usageDetails() {
return usageDetails;
}
- /** @return Resource collection API of Marketplaces. */
+ /**
+ * Gets the resource collection API of Marketplaces.
+ *
+ * @return Resource collection API of Marketplaces.
+ */
public Marketplaces marketplaces() {
if (this.marketplaces == null) {
this.marketplaces = new MarketplacesImpl(clientObject.getMarketplaces(), this);
@@ -307,7 +375,11 @@ public Marketplaces marketplaces() {
return marketplaces;
}
- /** @return Resource collection API of Budgets. */
+ /**
+ * Gets the resource collection API of Budgets. It manages Budget.
+ *
+ * @return Resource collection API of Budgets.
+ */
public Budgets budgets() {
if (this.budgets == null) {
this.budgets = new BudgetsImpl(clientObject.getBudgets(), this);
@@ -315,7 +387,11 @@ public Budgets budgets() {
return budgets;
}
- /** @return Resource collection API of Tags. */
+ /**
+ * Gets the resource collection API of Tags.
+ *
+ * @return Resource collection API of Tags.
+ */
public Tags tags() {
if (this.tags == null) {
this.tags = new TagsImpl(clientObject.getTags(), this);
@@ -323,7 +399,11 @@ public Tags tags() {
return tags;
}
- /** @return Resource collection API of Charges. */
+ /**
+ * Gets the resource collection API of Charges.
+ *
+ * @return Resource collection API of Charges.
+ */
public Charges charges() {
if (this.charges == null) {
this.charges = new ChargesImpl(clientObject.getCharges(), this);
@@ -331,7 +411,11 @@ public Charges charges() {
return charges;
}
- /** @return Resource collection API of Balances. */
+ /**
+ * Gets the resource collection API of Balances.
+ *
+ * @return Resource collection API of Balances.
+ */
public Balances balances() {
if (this.balances == null) {
this.balances = new BalancesImpl(clientObject.getBalances(), this);
@@ -339,7 +423,11 @@ public Balances balances() {
return balances;
}
- /** @return Resource collection API of ReservationsSummaries. */
+ /**
+ * Gets the resource collection API of ReservationsSummaries.
+ *
+ * @return Resource collection API of ReservationsSummaries.
+ */
public ReservationsSummaries reservationsSummaries() {
if (this.reservationsSummaries == null) {
this.reservationsSummaries = new ReservationsSummariesImpl(clientObject.getReservationsSummaries(), this);
@@ -347,7 +435,11 @@ public ReservationsSummaries reservationsSummaries() {
return reservationsSummaries;
}
- /** @return Resource collection API of ReservationsDetails. */
+ /**
+ * Gets the resource collection API of ReservationsDetails.
+ *
+ * @return Resource collection API of ReservationsDetails.
+ */
public ReservationsDetails reservationsDetails() {
if (this.reservationsDetails == null) {
this.reservationsDetails = new ReservationsDetailsImpl(clientObject.getReservationsDetails(), this);
@@ -355,7 +447,11 @@ public ReservationsDetails reservationsDetails() {
return reservationsDetails;
}
- /** @return Resource collection API of ReservationRecommendations. */
+ /**
+ * Gets the resource collection API of ReservationRecommendations.
+ *
+ * @return Resource collection API of ReservationRecommendations.
+ */
public ReservationRecommendations reservationRecommendations() {
if (this.reservationRecommendations == null) {
this.reservationRecommendations =
@@ -364,7 +460,11 @@ public ReservationRecommendations reservationRecommendations() {
return reservationRecommendations;
}
- /** @return Resource collection API of ReservationRecommendationDetails. */
+ /**
+ * Gets the resource collection API of ReservationRecommendationDetails.
+ *
+ * @return Resource collection API of ReservationRecommendationDetails.
+ */
public ReservationRecommendationDetails reservationRecommendationDetails() {
if (this.reservationRecommendationDetails == null) {
this.reservationRecommendationDetails =
@@ -373,7 +473,11 @@ public ReservationRecommendationDetails reservationRecommendationDetails() {
return reservationRecommendationDetails;
}
- /** @return Resource collection API of ReservationTransactions. */
+ /**
+ * Gets the resource collection API of ReservationTransactions.
+ *
+ * @return Resource collection API of ReservationTransactions.
+ */
public ReservationTransactions reservationTransactions() {
if (this.reservationTransactions == null) {
this.reservationTransactions =
@@ -382,23 +486,11 @@ public ReservationTransactions reservationTransactions() {
return reservationTransactions;
}
- /** @return Resource collection API of PriceSheets. */
- public PriceSheets priceSheets() {
- if (this.priceSheets == null) {
- this.priceSheets = new PriceSheetsImpl(clientObject.getPriceSheets(), this);
- }
- return priceSheets;
- }
-
- /** @return Resource collection API of Operations. */
- public Operations operations() {
- if (this.operations == null) {
- this.operations = new OperationsImpl(clientObject.getOperations(), this);
- }
- return operations;
- }
-
- /** @return Resource collection API of AggregatedCosts. */
+ /**
+ * Gets the resource collection API of AggregatedCosts.
+ *
+ * @return Resource collection API of AggregatedCosts.
+ */
public AggregatedCosts aggregatedCosts() {
if (this.aggregatedCosts == null) {
this.aggregatedCosts = new AggregatedCostsImpl(clientObject.getAggregatedCosts(), this);
@@ -406,7 +498,11 @@ public AggregatedCosts aggregatedCosts() {
return aggregatedCosts;
}
- /** @return Resource collection API of EventsOperations. */
+ /**
+ * Gets the resource collection API of EventsOperations.
+ *
+ * @return Resource collection API of EventsOperations.
+ */
public EventsOperations eventsOperations() {
if (this.eventsOperations == null) {
this.eventsOperations = new EventsOperationsImpl(clientObject.getEventsOperations(), this);
@@ -414,7 +510,11 @@ public EventsOperations eventsOperations() {
return eventsOperations;
}
- /** @return Resource collection API of LotsOperations. */
+ /**
+ * Gets the resource collection API of LotsOperations.
+ *
+ * @return Resource collection API of LotsOperations.
+ */
public LotsOperations lotsOperations() {
if (this.lotsOperations == null) {
this.lotsOperations = new LotsOperationsImpl(clientObject.getLotsOperations(), this);
@@ -422,7 +522,11 @@ public LotsOperations lotsOperations() {
return lotsOperations;
}
- /** @return Resource collection API of Credits. */
+ /**
+ * Gets the resource collection API of Credits.
+ *
+ * @return Resource collection API of Credits.
+ */
public Credits credits() {
if (this.credits == null) {
this.credits = new CreditsImpl(clientObject.getCredits(), this);
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java
index 813767044909..30446c9fc6af 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
@@ -16,57 +16,57 @@ public interface AggregatedCostsClient {
* Provides the aggregate cost of a management group and all child management groups by current billing period.
*
* @param managementGroupId Azure Management Group ID.
+ * @param filter May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (Utc
+ * time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or',
+ * or 'not'. 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 a management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ManagementGroupAggregatedCostResultInner getByManagementGroup(String managementGroupId);
+ Response getByManagementGroupWithResponse(
+ String managementGroupId, String filter, Context context);
/**
* Provides the aggregate cost of a management group and all child management groups by current billing period.
*
* @param managementGroupId Azure Management Group ID.
- * @param filter May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (Utc
- * time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or',
- * or 'not'. 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 a management group aggregated cost resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByManagementGroupWithResponse(
- String managementGroupId, String filter, Context context);
+ ManagementGroupAggregatedCostResultInner getByManagementGroup(String managementGroupId);
/**
* Provides the aggregate cost of a management group and all child management groups by specified billing period.
*
* @param managementGroupId Azure Management Group ID.
* @param billingPeriodName Billing Period Name.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ManagementGroupAggregatedCostResultInner getForBillingPeriodByManagementGroup(
- String managementGroupId, String billingPeriodName);
+ Response getForBillingPeriodByManagementGroupWithResponse(
+ String managementGroupId, String billingPeriodName, Context context);
/**
* Provides the aggregate cost of a management group and all child management groups by specified billing period.
*
* @param managementGroupId Azure Management Group ID.
* @param billingPeriodName Billing Period Name.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a management group aggregated cost resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getForBillingPeriodByManagementGroupWithResponse(
- String managementGroupId, String billingPeriodName, Context context);
+ ManagementGroupAggregatedCostResultInner getForBillingPeriodByManagementGroup(
+ String managementGroupId, String billingPeriodName);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java
index e21a93426a85..a20eef23c506 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
@@ -17,27 +17,27 @@ public interface BalancesClient {
* later.
*
* @param billingAccountId BillingAccount ID.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the balances for a scope by billingAccountId.
+ * @return the balances for a scope by billingAccountId along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- BalanceInner getByBillingAccount(String billingAccountId);
+ Response getByBillingAccountWithResponse(String billingAccountId, Context context);
/**
* Gets the balances for a scope by billingAccountId. Balances are available via this API only for May 1, 2014 or
* later.
*
* @param billingAccountId BillingAccount ID.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the balances for a scope by billingAccountId.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByBillingAccountWithResponse(String billingAccountId, Context context);
+ BalanceInner getByBillingAccount(String billingAccountId);
/**
* Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only
@@ -45,13 +45,15 @@ public interface BalancesClient {
*
* @param billingAccountId BillingAccount ID.
* @param billingPeriodName Billing Period Name.
+ * @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 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)
- BalanceInner getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName);
+ Response getForBillingPeriodByBillingAccountWithResponse(
+ String billingAccountId, String billingPeriodName, Context context);
/**
* Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only
@@ -59,13 +61,11 @@ public interface BalancesClient {
*
* @param billingAccountId BillingAccount ID.
* @param billingPeriodName Billing Period Name.
- * @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 the balances for a scope by billing period and billingAccountId.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getForBillingPeriodByBillingAccountWithResponse(
- String billingAccountId, String billingPeriodName, Context context);
+ BalanceInner getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java
index 031ef9c557ca..696847c5fabc 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);
@@ -76,13 +76,14 @@ public interface BudgetsClient {
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
+ * @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 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)
- BudgetInner get(String scope, String budgetName);
+ Response getWithResponse(String scope, String budgetName, Context context);
/**
* Gets the budget for the scope by budget name.
@@ -100,14 +101,13 @@ public interface BudgetsClient {
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
- * @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 the budget for the scope by budget name.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String scope, String budgetName, Context context);
+ BudgetInner get(String scope, String budgetName);
/**
* The operation to create or update a budget. You can optionally provide an eTag if desired as a form of
@@ -128,13 +128,15 @@ public interface BudgetsClient {
* invoiceSection scope.
* @param budgetName Budget Name.
* @param parameters Parameters supplied to the Create Budget operation.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a budget resource.
+ * @return a budget resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- BudgetInner createOrUpdate(String scope, String budgetName, BudgetInner parameters);
+ Response createOrUpdateWithResponse(
+ String scope, String budgetName, BudgetInner parameters, Context context);
/**
* The operation to create or update a budget. You can optionally provide an eTag if desired as a form of
@@ -155,15 +157,13 @@ public interface BudgetsClient {
* invoiceSection scope.
* @param budgetName Budget Name.
* @param parameters Parameters supplied to the Create Budget operation.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a budget resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateWithResponse(
- String scope, String budgetName, BudgetInner parameters, Context context);
+ BudgetInner createOrUpdate(String scope, String budgetName, BudgetInner parameters);
/**
* The operation to delete a budget.
@@ -181,12 +181,14 @@ Response createOrUpdateWithResponse(
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
+ * @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 the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String scope, String budgetName);
+ Response deleteWithResponse(String scope, String budgetName, Context context);
/**
* The operation to delete a budget.
@@ -204,12 +206,10 @@ Response createOrUpdateWithResponse(
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
- * @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 the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteWithResponse(String scope, String budgetName, Context context);
+ void delete(String scope, String budgetName);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java
index 58df00d67d60..3ab68c620560 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
@@ -31,13 +31,23 @@ public interface ChargesClient {
* for invoiceSection scope, and
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
* partners.
+ * @param startDate Start date.
+ * @param endDate End date.
+ * @param filter May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time).
+ * The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or
+ * 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
+ * @param apply May be used to group charges for billingAccount scope by properties/billingProfileId,
+ * properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for billingProfile scope by
+ * properties/invoiceSectionId.
+ * @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 charge summary.
+ * @return result of listing charge summary along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ChargesListResultInner list(String scope);
+ Response listWithResponse(
+ String scope, String startDate, String endDate, String filter, String apply, Context context);
/**
* Lists the charges based for the defined scope.
@@ -58,21 +68,11 @@ public interface ChargesClient {
* for invoiceSection scope, and
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
* partners.
- * @param startDate Start date.
- * @param endDate End date.
- * @param filter May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time).
- * The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or
- * 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
- * @param apply May be used to group charges for billingAccount scope by properties/billingProfileId,
- * properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for billingProfile scope by
- * properties/invoiceSectionId.
- * @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 charge summary.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response listWithResponse(
- String scope, String startDate, String endDate, String filter, String apply, Context context);
+ ChargesListResultInner list(String scope);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ConsumptionManagementClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ConsumptionManagementClient.java
index d27deeac3726..e7ac19b5a8c1 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ConsumptionManagementClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ConsumptionManagementClient.java
@@ -10,7 +10,7 @@
/** The interface for ConsumptionManagementClient class. */
public interface ConsumptionManagementClient {
/**
- * Gets Azure Subscription ID.
+ * Gets The ID of the target subscription.
*
* @return the subscriptionId value.
*/
@@ -23,13 +23,6 @@ public interface ConsumptionManagementClient {
*/
String getEndpoint();
- /**
- * Gets Api Version.
- *
- * @return the apiVersion value.
- */
- String getApiVersion();
-
/**
* Gets The HTTP pipeline to send requests through.
*
@@ -44,6 +37,20 @@ public interface ConsumptionManagementClient {
*/
Duration getDefaultPollInterval();
+ /**
+ * Gets the PriceSheetsClient object to access its operations.
+ *
+ * @return the PriceSheetsClient object.
+ */
+ PriceSheetsClient getPriceSheets();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
/**
* Gets the UsageDetailsClient object to access its operations.
*
@@ -121,20 +128,6 @@ public interface ConsumptionManagementClient {
*/
ReservationTransactionsClient getReservationTransactions();
- /**
- * Gets the PriceSheetsClient object to access its operations.
- *
- * @return the PriceSheetsClient object.
- */
- PriceSheetsClient getPriceSheets();
-
- /**
- * Gets the OperationsClient object to access its operations.
- *
- * @return the OperationsClient object.
- */
- OperationsClient getOperations();
-
/**
* Gets the AggregatedCostsClient object to access its operations.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java
index 4a9bba8b64c6..1c418d6b439b 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
@@ -17,25 +17,25 @@ public interface CreditsClient {
*
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile ID.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a credit summary resource.
+ * @return a credit summary resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- CreditSummaryInner get(String billingAccountId, String billingProfileId);
+ Response getWithResponse(String billingAccountId, String billingProfileId, Context context);
/**
* The credit summary by billingAccountId and billingProfileId.
*
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile ID.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a credit summary resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String billingAccountId, String billingProfileId, Context context);
+ CreditSummaryInner get(String billingAccountId, String billingProfileId);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java
index 7591c8b7840b..b9c7f11a7a63 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java
@@ -23,7 +23,7 @@ public interface EventsOperationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing event summary.
+ * @return result of listing event summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingProfile(
@@ -41,7 +41,7 @@ PagedIterable listByBillingProfile(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing event summary.
+ * @return result of listing event summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingProfile(
@@ -55,7 +55,7 @@ PagedIterable listByBillingProfile(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing event summary.
+ * @return result of listing event summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingAccount(String billingAccountId);
@@ -72,7 +72,7 @@ PagedIterable listByBillingProfile(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing event summary.
+ * @return result of listing event summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingAccount(String billingAccountId, String filter, Context context);
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java
index 6c7db7249652..43d2f2092bcd 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java
@@ -13,22 +13,22 @@
/** An instance of this class provides access to all the operations defined in LotsOperationsClient. */
public interface LotsOperationsClient {
/**
- * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile.
- * Microsoft Azure consumption commitments are only supported for the billing account scope.
+ * Lists all Azure credits for a billing account or a billing profile. The API is only supported for Microsoft
+ * Customer Agreements (MCA) billing accounts.
*
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile ID.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing lot summary.
+ * @return result of listing lot summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingProfile(String billingAccountId, String billingProfileId);
/**
- * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile.
- * Microsoft Azure consumption commitments are only supported for the billing account scope.
+ * Lists all Azure credits for a billing account or a billing profile. The API is only supported for Microsoft
+ * Customer Agreements (MCA) billing accounts.
*
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile ID.
@@ -36,28 +36,28 @@ public interface LotsOperationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing lot summary.
+ * @return result of listing lot summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingProfile(
String billingAccountId, String billingProfileId, Context context);
/**
- * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile.
- * Microsoft Azure consumption commitments are only supported for the billing account scope.
+ * Lists all Microsoft Azure consumption commitments for a billing account. The API is only supported for Microsoft
+ * Customer Agreements (MCA) and Direct Enterprise Agreement (EA) billing accounts.
*
* @param billingAccountId BillingAccount ID.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing lot summary.
+ * @return result of listing lot summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingAccount(String billingAccountId);
/**
- * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile.
- * Microsoft Azure consumption commitments are only supported for the billing account scope.
+ * Lists all Microsoft Azure consumption commitments for a billing account. The API is only supported for Microsoft
+ * Customer Agreements (MCA) and Direct Enterprise Agreement (EA) billing accounts.
*
* @param billingAccountId BillingAccount ID.
* @param filter May be used to filter the lots by Status, Source etc. The filter supports 'eq', 'lt', 'gt', 'le',
@@ -67,8 +67,40 @@ PagedIterable listByBillingProfile(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing lot summary.
+ * @return result of listing lot summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingAccount(String billingAccountId, String filter, Context context);
+
+ /**
+ * Lists all Azure credits for a customer. The API is only supported for Microsoft Partner Agreements (MPA) billing
+ * accounts.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param customerId Customer ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing lot summary as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCustomer(String billingAccountId, String customerId);
+
+ /**
+ * Lists all Azure credits for a customer. The API is only supported for Microsoft Partner Agreements (MPA) billing
+ * accounts.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param customerId Customer ID.
+ * @param filter May be used to filter the lots by Status, Source etc. The filter supports 'eq', 'lt', 'gt', 'le',
+ * 'ge', and 'and'. Tag filter is a key value pair string where key and value is separated by a colon (:).
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing lot summary as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCustomer(
+ String billingAccountId, String customerId, String filter, Context context);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java
index 56f5b91e7340..a6a9d0d63389 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java
@@ -28,7 +28,7 @@ public interface MarketplacesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing marketplaces.
+ * @return result of listing marketplaces as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String scope);
@@ -57,7 +57,7 @@ public interface MarketplacesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing marketplaces.
+ * @return result of listing marketplaces as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String scope, String filter, Integer top, String skiptoken, Context context);
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java
index d8528c9abbd3..42a888bad76f 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,8 @@ 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 a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +30,8 @@ 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 a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java
index 083b16f7e65c..c0e81497ce39 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
@@ -8,23 +8,44 @@
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
+import com.azure.resourcemanager.consumption.fluent.models.PriceSheetResultAutoGeneratedInner;
import com.azure.resourcemanager.consumption.fluent.models.PriceSheetResultInner;
/** An instance of this class provides access to all the operations defined in PriceSheetsClient. */
public interface PriceSheetsClient {
/**
- * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later.
+ * List the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later.
*
+ * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields
+ * are not included when returning price sheet.
+ * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response
+ * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that
+ * specifies a starting point to use for subsequent calls.
+ * @param top May be used to limit the number of results to the top N results.
+ * @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 the price sheet for a subscription.
+ * @return an pricesheet resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String expand, String skiptoken, Integer top, Context context);
+
+ /**
+ * List the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an pricesheet resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
PriceSheetResultInner get();
/**
- * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later.
+ * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only
+ * for May 1, 2014 or later.
*
+ * @param billingPeriodName Billing Period Name.
* @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields
* are not included when returning price sheet.
* @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response
@@ -35,10 +56,11 @@ 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 scope by subscriptionId and billing period along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String expand, String skiptoken, Integer top, Context context);
+ Response getByBillingPeriodWithResponse(
+ String billingPeriodName, String expand, String skiptoken, Integer top, Context context);
/**
* Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only
@@ -53,6 +75,35 @@ public interface PriceSheetsClient {
@ServiceMethod(returns = ReturnType.SINGLE)
PriceSheetResultInner getByBillingPeriod(String billingPeriodName);
+ /**
+ * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later.
+ *
+ * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields
+ * are not included when returning price sheet.
+ * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response
+ * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that
+ * specifies a starting point to use for subsequent calls.
+ * @param top May be used to limit the number of results to the top N results.
+ * @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 the price sheet for a subscription along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String expand, String skiptoken, Integer top, Context context);
+
+ /**
+ * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the price sheet for a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PriceSheetResultAutoGeneratedInner get();
+
/**
* Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only
* for May 1, 2014 or later.
@@ -68,9 +119,22 @@ 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(
+ Response getByBillingPeriodWithResponse(
String billingPeriodName, String expand, String skiptoken, Integer top, Context context);
+
+ /**
+ * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only
+ * for May 1, 2014 or later.
+ *
+ * @param billingPeriodName Billing Period Name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PriceSheetResultAutoGeneratedInner getByBillingPeriod(String billingPeriodName);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java
index 042ad2b40fdd..62160049c55f 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java
@@ -10,6 +10,7 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.ReservationRecommendationDetailsModelInner;
import com.azure.resourcemanager.consumption.models.LookBackPeriod;
+import com.azure.resourcemanager.consumption.models.Scope;
import com.azure.resourcemanager.consumption.models.Term;
/**
@@ -19,47 +20,55 @@ public interface ReservationRecommendationDetailsClient {
/**
* Details of a reservation recommendation for what-if analysis of reserved instances.
*
- * @param scope The scope associated with reservation recommendation details operations. This includes
+ * @param resourceScope The scope associated with reservation recommendation details operations. This includes
* '/subscriptions/{subscriptionId}/' for subscription scope,
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,
* /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope.
+ * @param scope Scope of the reservation.
* @param region Used to select the region the recommendation should be generated for.
* @param term Specify length of reservation recommendation term.
* @param lookBackPeriod Filter the time period on which reservation recommendation results are based.
* @param product Filter the products for which reservation recommendation results are generated. Examples:
* Standard_DS1_v2 (for VM), Premium_SSD_Managed_Disks_P30 (for Managed Disks).
+ * @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 reservation recommendation details.
+ * @return reservation recommendation details along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ReservationRecommendationDetailsModelInner get(
- String scope, String region, Term term, LookBackPeriod lookBackPeriod, String product);
+ Response getWithResponse(
+ String resourceScope,
+ Scope scope,
+ String region,
+ Term term,
+ LookBackPeriod lookBackPeriod,
+ String product,
+ Context context);
/**
* Details of a reservation recommendation for what-if analysis of reserved instances.
*
- * @param scope The scope associated with reservation recommendation details operations. This includes
+ * @param resourceScope The scope associated with reservation recommendation details operations. This includes
* '/subscriptions/{subscriptionId}/' for subscription scope,
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,
* /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope.
+ * @param scope Scope of the reservation.
* @param region Used to select the region the recommendation should be generated for.
* @param term Specify length of reservation recommendation term.
* @param lookBackPeriod Filter the time period on which reservation recommendation results are based.
* @param product Filter the products for which reservation recommendation results are generated. Examples:
* Standard_DS1_v2 (for VM), Premium_SSD_Managed_Disks_P30 (for Managed Disks).
- * @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 reservation recommendation details.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
- String scope, String region, Term term, LookBackPeriod lookBackPeriod, String product, Context context);
+ ReservationRecommendationDetailsModelInner get(
+ String resourceScope, Scope scope, String region, Term term, LookBackPeriod lookBackPeriod, String product);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java
index c713f5d4d277..2cdb16d222ea 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java
@@ -15,7 +15,7 @@ public interface ReservationRecommendationsClient {
/**
* List of recommendations for purchasing reserved instances.
*
- * @param scope The scope associated with reservation recommendations operations. This includes
+ * @param resourceScope The scope associated with reservation recommendations operations. This includes
* '/subscriptions/{subscriptionId}/' for subscription scope,
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and
@@ -24,15 +24,15 @@ public interface ReservationRecommendationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation recommendations.
+ * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String scope);
+ PagedIterable list(String resourceScope);
/**
* List of recommendations for purchasing reserved instances.
*
- * @param scope The scope associated with reservation recommendations operations. This includes
+ * @param resourceScope The scope associated with reservation recommendations operations. This includes
* '/subscriptions/{subscriptionId}/' for subscription scope,
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and
@@ -48,8 +48,8 @@ public interface ReservationRecommendationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation recommendations.
+ * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String scope, String filter, Context context);
+ PagedIterable list(String resourceScope, String filter, Context context);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java
index 3d45b967b6e3..8f3b75434ff4 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java
@@ -14,58 +14,75 @@
/** An instance of this class provides access to all the operations defined in ReservationTransactionsClient. */
public interface ReservationTransactionsClient {
/**
- * List of transactions for reserved instances on billing account scope.
+ * List of transactions for reserved instances on billing account scope. Note: The refund transactions are posted
+ * along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in
+ * May 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the
+ * reservation purchase was made.
*
* @param billingAccountId BillingAccount ID.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation recommendations.
+ * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String billingAccountId);
/**
- * List of transactions for reserved instances on billing account scope.
+ * List of transactions for reserved instances on billing account scope. Note: The refund transactions are posted
+ * along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in
+ * May 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the
+ * reservation purchase was made.
*
* @param billingAccountId BillingAccount ID.
* @param filter Filter reservation transactions by date range. The properties/EventDate for start date and end
- * date. The filter supports 'le' and 'ge'.
+ * date. The filter supports 'le' and 'ge'. Note: API returns data for the entire start date's and end date's
+ * billing month. For example, filter properties/eventDate+ge+2020-01-01+AND+properties/eventDate+le+2020-12-29
+ * will include data for the entire December 2020 month (i.e. will contain records for dates December 30 and
+ * 31).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation recommendations.
+ * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String billingAccountId, String filter, Context context);
/**
- * List of transactions for reserved instances on billing account scope.
+ * List of transactions for reserved instances on billing profile scope. The refund transactions are posted along
+ * with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May
+ * 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the
+ * reservation purchase was made.
*
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile ID.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation recommendations.
+ * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingProfile(
String billingAccountId, String billingProfileId);
/**
- * List of transactions for reserved instances on billing account scope.
+ * List of transactions for reserved instances on billing profile scope. The refund transactions are posted along
+ * with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May
+ * 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the
+ * reservation purchase was made.
*
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile ID.
* @param filter Filter reservation transactions by date range. The properties/EventDate for start date and end
- * date. The filter supports 'le' and 'ge'.
+ * date. The filter supports 'le' and 'ge'. Note: API returns data for the entire start date's and end date's
+ * billing month. For example, filter properties/eventDate+ge+2020-01-01+AND+properties/eventDate+le+2020-12-29
+ * will include data for entire December 2020 month (i.e. will contain records for dates December 30 and 31).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation recommendations.
+ * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingProfile(
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java
index 2ffbf884bf39..2ad52de33a81 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java
@@ -13,7 +13,9 @@
/** An instance of this class provides access to all the operations defined in ReservationsDetailsClient. */
public interface ReservationsDetailsClient {
/**
- * Lists the reservations details for provided date range.
+ * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
+ * callers get 502 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller
+ * date ranges.
*
* @param reservationOrderId Order Id of the reservation.
* @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The
@@ -21,13 +23,15 @@ public interface ReservationsDetailsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrder(String reservationOrderId, String filter);
/**
- * Lists the reservations details for provided date range.
+ * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
+ * callers get 502 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller
+ * date ranges.
*
* @param reservationOrderId Order Id of the reservation.
* @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The
@@ -36,14 +40,16 @@ public interface ReservationsDetailsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrder(
String reservationOrderId, String filter, Context context);
/**
- * Lists the reservations details for provided date range.
+ * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
+ * callers get 502 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller
+ * date ranges.
*
* @param reservationOrderId Order Id of the reservation.
* @param reservationId Id of the reservation.
@@ -52,14 +58,16 @@ PagedIterable listByReservationOrder(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrderAndReservation(
String reservationOrderId, String reservationId, String filter);
/**
- * Lists the reservations details for provided date range.
+ * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
+ * callers get 502 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller
+ * date ranges.
*
* @param reservationOrderId Order Id of the reservation.
* @param reservationId Id of the reservation.
@@ -69,31 +77,35 @@ PagedIterable listByReservationOrderAndReservation(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrderAndReservation(
String reservationOrderId, String reservationId, String filter, Context context);
/**
- * Lists the reservations details for the defined scope and provided date range.
+ * Lists the reservations details for the defined scope and provided date range. Note: ARM has a payload size limit
+ * of 12MB, so currently callers get 502 when the response size exceeds the ARM limit. In such cases, API call
+ * should be made with smaller date ranges.
*
- * @param scope The scope associated with reservations details operations. This includes
+ * @param resourceScope The scope associated with reservations details operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* BillingProfile scope (modern).
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String scope);
+ PagedIterable list(String resourceScope);
/**
- * Lists the reservations details for the defined scope and provided date range.
+ * Lists the reservations details for the defined scope and provided date range. Note: ARM has a payload size limit
+ * of 12MB, so currently callers get 502 when the response size exceeds the ARM limit. In such cases, API call
+ * should be made with smaller date ranges.
*
- * @param scope The scope associated with reservations details operations. This includes
+ * @param resourceScope The scope associated with reservations details operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* BillingProfile scope (modern).
@@ -109,11 +121,11 @@ PagedIterable listByReservationOrderAndReservation(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
- String scope,
+ String resourceScope,
String startDate,
String endDate,
String filter,
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java
index 40be069d1339..f69a1b7eba39 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java
@@ -21,7 +21,7 @@ public interface ReservationsSummariesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrder(String reservationOrderId, Datagrain grain);
@@ -37,7 +37,7 @@ public interface ReservationsSummariesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrder(
@@ -52,7 +52,7 @@ PagedIterable listByReservationOrder(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrderAndReservation(
@@ -70,7 +70,7 @@ PagedIterable listByReservationOrderAndReservation(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrderAndReservation(
@@ -79,7 +79,7 @@ PagedIterable listByReservationOrderAndReservation(
/**
* Lists the reservations summaries for the defined scope daily or monthly grain.
*
- * @param scope The scope associated with reservations summaries operations. This includes
+ * @param resourceScope The scope associated with reservations summaries operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* BillingProfile scope (modern).
@@ -87,15 +87,15 @@ PagedIterable listByReservationOrderAndReservation(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String scope, Datagrain grain);
+ PagedIterable list(String resourceScope, Datagrain grain);
/**
* Lists the reservations summaries for the defined scope daily or monthly grain.
*
- * @param scope The scope associated with reservations summaries operations. This includes
+ * @param resourceScope The scope associated with reservations summaries operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* BillingProfile scope (modern).
@@ -112,11 +112,11 @@ PagedIterable listByReservationOrderAndReservation(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
- String scope,
+ String resourceScope,
Datagrain grain,
String startDate,
String endDate,
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java
index 2266b2caca8c..d3193b9e18aa 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
@@ -23,13 +23,14 @@ public interface TagsClient {
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
* for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
* Management Group scope..
+ * @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 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)
- TagsResultInner get(String scope);
+ Response getWithResponse(String scope, Context context);
/**
* Get all available tag keys for the defined scope.
@@ -42,12 +43,11 @@ public interface TagsClient {
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
* for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
* Management Group scope..
- * @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 all available tag keys for the defined scope.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String scope, Context context);
+ TagsResultInner get(String scope);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java
index e89c21afee28..58aad7b4521b 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java
@@ -37,7 +37,7 @@ public interface UsageDetailsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing usage details.
+ * @return result of listing usage details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String scope);
@@ -79,7 +79,7 @@ public interface UsageDetailsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing usage details.
+ * @return result of listing usage details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java
index be4d23435c3b..1fa4f31e8df0 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.
*/
@@ -41,6 +37,10 @@ public final class BalanceInner extends ProxyResource {
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
+ /** Creates an instance of BalanceInner class. */
+ public BalanceInner() {
+ }
+
/**
* Get the innerProperties property: The properties of the balance.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java
index f0e15ad53cf2..49f378bf8f8f 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.
*/
@@ -32,8 +28,7 @@ public final class BalanceProperties {
private BigDecimal beginningBalance;
/*
- * The ending balance for the billing period (for open periods this will be
- * updated daily).
+ * The ending balance for the billing period (for open periods this will be updated daily).
*/
@JsonProperty(value = "endingBalance", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal endingBalance;
@@ -110,6 +105,10 @@ public final class BalanceProperties {
@JsonProperty(value = "adjustmentDetails", access = JsonProperty.Access.WRITE_ONLY)
private List adjustmentDetails;
+ /** Creates an instance of BalanceProperties class. */
+ public BalanceProperties() {
+ }
+
/**
* Get the currency property: The ISO currency in which the meter is charged, for example, USD.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetInner.java
index f8fea1a4e18b..61217c174637 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.
*/
@@ -31,13 +27,16 @@ public final class BudgetInner extends ProxyResource {
private BudgetProperties innerProperties;
/*
- * eTag of the resource. To handle concurrent update scenario, this field
- * will be used to determine whether the user is updating the latest
- * version or not.
+ * eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the
+ * user is updating the latest version or not.
*/
@JsonProperty(value = "eTag")
private String etag;
+ /** Creates an instance of BudgetInner class. */
+ public BudgetInner() {
+ }
+
/**
* Get the innerProperties property: The properties of the budget.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetProperties.java
index ef8131acd287..198e9d2956c7 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.
*/
@@ -37,19 +34,17 @@ public final class BudgetProperties {
private BigDecimal amount;
/*
- * The time covered by a budget. Tracking of the amount will be reset based
- * on the time grain. BillingMonth, BillingQuarter, and BillingAnnual are
- * only supported by WD customers
+ * The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth,
+ * BillingQuarter, and BillingAnnual are only supported by WD customers
*/
@JsonProperty(value = "timeGrain", required = true)
private TimeGrainType timeGrain;
/*
- * Has start and end date of the budget. The start date must be first of
- * the month and should be less than the end date. Budget start date must
- * be on or after June 1, 2017. Future start date should not be more than
- * twelve months. Past start date should be selected within the timegrain
- * period. There are no restrictions on the end date.
+ * Has start and end date of the budget. The start date must be first of the month and should be less than the end
+ * date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve
+ * months. Past start date should be selected within the timegrain period. There are no restrictions on the end
+ * date.
*/
@JsonProperty(value = "timePeriod", required = true)
private BudgetTimePeriod timePeriod;
@@ -67,8 +62,7 @@ public final class BudgetProperties {
private CurrentSpend currentSpend;
/*
- * Dictionary of notifications associated with the budget. Budget can have
- * up to five notifications.
+ * Dictionary of notifications associated with the budget. Budget can have up to five notifications.
*/
@JsonProperty(value = "notifications")
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
@@ -80,6 +74,10 @@ public final class BudgetProperties {
@JsonProperty(value = "forecastSpend", access = JsonProperty.Access.WRITE_ONLY)
private ForecastSpend forecastSpend;
+ /** Creates an instance of BudgetProperties class. */
+ public BudgetProperties() {
+ }
+
/**
* Get the category property: The category of the budget, whether the budget tracks cost or usage.
*
@@ -235,22 +233,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 +274,6 @@ public void validate() {
forecastSpend().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(BudgetProperties.class);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ChargesListResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ChargesListResultInner.java
index 4675dd79f2cb..6bf524f365f6 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,23 +5,23 @@
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
*/
@JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
private List value;
+ /** Creates an instance of ChargesListResultInner class. */
+ public ChargesListResultInner() {
+ }
+
/**
* Get the value property: The list of charge summary.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java
index 0ee648db2f11..5e610a51d2a2 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java
@@ -6,20 +6,14 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.Amount;
import com.azure.resourcemanager.consumption.models.CreditBalanceSummary;
import com.azure.resourcemanager.consumption.models.Reseller;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.Map;
/** A credit summary resource. */
@Fluent
public final class CreditSummaryInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CreditSummaryInner.class);
-
/*
* The properties of the credit summary.
*/
@@ -27,17 +21,15 @@ public final class CreditSummaryInner extends ProxyResource {
private CreditSummaryProperties innerProperties;
/*
- * The etag for the resource.
+ * eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the
+ * user is updating the latest version or not.
*/
- @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ @JsonProperty(value = "eTag")
private String etag;
- /*
- * Resource tags.
- */
- @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
- private Map tags;
+ /** Creates an instance of CreditSummaryInner class. */
+ public CreditSummaryInner() {
+ }
/**
* Get the innerProperties property: The properties of the credit summary.
@@ -49,7 +41,8 @@ private CreditSummaryProperties innerProperties() {
}
/**
- * Get the etag property: The etag for the resource.
+ * Get the etag property: eTag of the resource. To handle concurrent update scenario, this field will be used to
+ * determine whether the user is updating the latest version or not.
*
* @return the etag value.
*/
@@ -58,12 +51,15 @@ public String etag() {
}
/**
- * Get the tags property: Resource tags.
+ * Set the etag property: eTag of the resource. To handle concurrent update scenario, this field will be used to
+ * determine whether the user is updating the latest version or not.
*
- * @return the tags value.
+ * @param etag the etag value to set.
+ * @return the CreditSummaryInner object itself.
*/
- public Map tags() {
- return this.tags;
+ public CreditSummaryInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
}
/**
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryProperties.java
index cbe557ebe2bb..07d83a114096 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.
*/
@@ -65,6 +61,10 @@ public final class CreditSummaryProperties {
@JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
+ /** Creates an instance of CreditSummaryProperties class. */
+ public CreditSummaryProperties() {
+ }
+
/**
* Get the balanceSummary property: Summary of balances associated with this credit summary.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventProperties.java
index c431a1c9e2bf..55dff9632b22 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.
*/
@@ -32,29 +28,25 @@ public final class EventProperties {
private String description;
/*
- * The amount of new credit or commitment for NewCredit or SettleCharges
- * event.
+ * The amount of new credit or commitment for NewCredit or SettleCharges event.
*/
@JsonProperty(value = "newCredit", access = JsonProperty.Access.WRITE_ONLY)
private Amount newCredit;
/*
- * The amount of balance adjustment. The property is not available for
- * ConsumptionCommitment lots.
+ * The amount of balance adjustment. The property is not available for ConsumptionCommitment lots.
*/
@JsonProperty(value = "adjustments", access = JsonProperty.Access.WRITE_ONLY)
private Amount adjustments;
/*
- * The amount of expired credit or commitment for NewCredit or
- * SettleCharges event.
+ * The amount of expired credit or commitment for NewCredit or SettleCharges event.
*/
@JsonProperty(value = "creditExpired", access = JsonProperty.Access.WRITE_ONLY)
private Amount creditExpired;
/*
- * The amount of charges for events of type SettleCharges and
- * PendingEligibleCharges.
+ * The amount of charges for events of type SettleCharges and PendingEligibleCharges.
*/
@JsonProperty(value = "charges", access = JsonProperty.Access.WRITE_ONLY)
private Amount charges;
@@ -72,24 +64,22 @@ public final class EventProperties {
private EventType eventType;
/*
- * The number which uniquely identifies the invoice on which the event was
- * billed. This will be empty for unbilled events.
+ * The number which uniquely identifies the invoice on which the event was billed. This will be empty for unbilled
+ * events.
*/
@JsonProperty(value = "invoiceNumber", access = JsonProperty.Access.WRITE_ONLY)
private String invoiceNumber;
/*
- * The ID that uniquely identifies the billing profile for which the event
- * happened. The property is only available for billing account of type
- * MicrosoftCustomerAgreement.
+ * The ID that uniquely identifies the billing profile for which the event happened. The property is only available
+ * for billing account of type MicrosoftCustomerAgreement.
*/
@JsonProperty(value = "billingProfileId", access = JsonProperty.Access.WRITE_ONLY)
private String billingProfileId;
/*
- * The display name of the billing profile for which the event happened.
- * The property is only available for billing account of type
- * MicrosoftCustomerAgreement.
+ * The display name of the billing profile for which the event happened. The property is only available for billing
+ * account of type MicrosoftCustomerAgreement.
*/
@JsonProperty(value = "billingProfileDisplayName", access = JsonProperty.Access.WRITE_ONLY)
private String billingProfileDisplayName;
@@ -131,15 +121,13 @@ public final class EventProperties {
private Reseller reseller;
/*
- * The amount of expired credit or commitment for NewCredit or
- * SettleCharges event in billing currency.
+ * The amount of expired credit or commitment for NewCredit or SettleCharges event in billing currency.
*/
@JsonProperty(value = "creditExpiredInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY)
private AmountWithExchangeRate creditExpiredInBillingCurrency;
/*
- * The amount of new credit or commitment for NewCredit or SettleCharges
- * event in billing currency.
+ * The amount of new credit or commitment for NewCredit or SettleCharges event in billing currency.
*/
@JsonProperty(value = "newCreditInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY)
private AmountWithExchangeRate newCreditInBillingCurrency;
@@ -151,8 +139,7 @@ public final class EventProperties {
private AmountWithExchangeRate adjustmentsInBillingCurrency;
/*
- * The amount of charges for events of type SettleCharges and
- * PendingEligibleCharges in billing currency.
+ * The amount of charges for events of type SettleCharges and PendingEligibleCharges in billing currency.
*/
@JsonProperty(value = "chargesInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY)
private AmountWithExchangeRate chargesInBillingCurrency;
@@ -169,6 +156,10 @@ public final class EventProperties {
@JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
+ /** Creates an instance of EventProperties class. */
+ public EventProperties() {
+ }
+
/**
* Get the transactionDate property: The date of the event.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventSummaryInner.java
index e031fc2d183d..10483e883255 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.
*/
@@ -27,13 +23,16 @@ public final class EventSummaryInner extends ProxyResource {
private EventProperties innerProperties;
/*
- * eTag of the resource. To handle concurrent update scenario, this field
- * will be used to determine whether the user is updating the latest
- * version or not.
+ * eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the
+ * user is updating the latest version or not.
*/
@JsonProperty(value = "eTag")
private String etag;
+ /** Creates an instance of EventSummaryInner class. */
+ public EventSummaryInner() {
+ }
+
/**
* Get the innerProperties property: The event properties.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyChargeSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyChargeSummaryProperties.java
index 935660710f20..730db0858b8b 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.
*/
@@ -48,8 +44,8 @@ public final class LegacyChargeSummaryProperties {
/*
* Marketplace Charges.
*/
- @JsonProperty(value = "marketplaceCharges", access = JsonProperty.Access.WRITE_ONLY)
- private BigDecimal marketplaceCharges;
+ @JsonProperty(value = "azureMarketplaceCharges", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal azureMarketplaceCharges;
/*
* Currency Code
@@ -57,6 +53,10 @@ public final class LegacyChargeSummaryProperties {
@JsonProperty(value = "currency", access = JsonProperty.Access.WRITE_ONLY)
private String currency;
+ /** Creates an instance of LegacyChargeSummaryProperties class. */
+ public LegacyChargeSummaryProperties() {
+ }
+
/**
* Get the billingPeriodId property: The id of the billing period resource that the charge belongs to.
*
@@ -103,12 +103,12 @@ public BigDecimal chargesBilledSeparately() {
}
/**
- * Get the marketplaceCharges property: Marketplace Charges.
+ * Get the azureMarketplaceCharges property: Marketplace Charges.
*
- * @return the marketplaceCharges value.
+ * @return the azureMarketplaceCharges value.
*/
- public BigDecimal marketplaceCharges() {
- return this.marketplaceCharges;
+ public BigDecimal azureMarketplaceCharges() {
+ return this.azureMarketplaceCharges;
}
/**
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyReservationTransactionProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyReservationTransactionProperties.java
index 55ddcf621918..151688e5e90b 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
*/
@@ -24,10 +20,9 @@ public final class LegacyReservationTransactionProperties {
private OffsetDateTime eventDate;
/*
- * The reservation order ID is the identifier for a reservation purchase.
- * Each reservation order ID represents a single purchase transaction. A
- * reservation order contains reservations. The reservation order specifies
- * the VM size and region for the reservations.
+ * The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a
+ * single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM
+ * size and region for the reservations.
*/
@JsonProperty(value = "reservationOrderId", access = JsonProperty.Access.WRITE_ONLY)
private String reservationOrderId;
@@ -39,7 +34,7 @@ public final class LegacyReservationTransactionProperties {
private String description;
/*
- * The type of the transaction (Purchase, Cancel, etc.)
+ * The type of the transaction (Purchase, Cancel or Refund).
*/
@JsonProperty(value = "eventType", access = JsonProperty.Access.WRITE_ONLY)
private String eventType;
@@ -87,8 +82,7 @@ public final class LegacyReservationTransactionProperties {
private String purchasingSubscriptionName;
/*
- * This is the ARM Sku name. It can be used to join with the serviceType
- * field in additional info in usage records.
+ * This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
*/
@JsonProperty(value = "armSkuName", access = JsonProperty.Access.WRITE_ONLY)
private String armSkuName;
@@ -124,8 +118,7 @@ public final class LegacyReservationTransactionProperties {
private String departmentName;
/*
- * The cost center of this department if it is a department and a cost
- * center is provided.
+ * The cost center of this department if it is a department and a cost center is provided.
*/
@JsonProperty(value = "costCenter", access = JsonProperty.Access.WRITE_ONLY)
private String costCenter;
@@ -160,6 +153,10 @@ public final class LegacyReservationTransactionProperties {
@JsonProperty(value = "overage", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal overage;
+ /** Creates an instance of LegacyReservationTransactionProperties class. */
+ public LegacyReservationTransactionProperties() {
+ }
+
/**
* Get the eventDate property: The date of the transaction.
*
@@ -190,7 +187,7 @@ public String description() {
}
/**
- * Get the eventType property: The type of the transaction (Purchase, Cancel, etc.).
+ * Get the eventType property: The type of the transaction (Purchase, Cancel or Refund).
*
* @return the eventType value.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyUsageDetailProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyUsageDetailProperties.java
index 39b1dfa8f812..ac9e536b5749 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.
*/
@@ -86,31 +82,27 @@ public final class LegacyUsageDetailProperties {
private OffsetDateTime date;
/*
- * Product name for the consumed service or purchase. Not available for
- * Marketplace.
+ * Product name for the consumed service or purchase. Not available for Marketplace.
*/
@JsonProperty(value = "product", access = JsonProperty.Access.WRITE_ONLY)
private String product;
/*
- * Part Number of the service used. Can be used to join with the price
- * sheet. Not available for marketplace.
+ * Part Number of the service used. Can be used to join with the price sheet. Not available for marketplace.
*/
@JsonProperty(value = "partNumber", access = JsonProperty.Access.WRITE_ONLY)
private String partNumber;
/*
- * The meter id (GUID). Not available for marketplace. For reserved
- * instance this represents the primary meter for which the reservation was
- * purchased. For the actual VM Size for which the reservation is purchased
- * see productOrderName.
+ * The meter id (GUID). Not available for marketplace. For reserved instance this represents the primary meter for
+ * which the reservation was purchased. For the actual VM Size for which the reservation is purchased see
+ * productOrderName.
*/
@JsonProperty(value = "meterId", access = JsonProperty.Access.WRITE_ONLY)
private UUID meterId;
/*
- * The details about the meter. By default this is not populated, unless
- * it's specified in $expand.
+ * The details about the meter. By default this is not populated, unless it's specified in $expand.
*/
@JsonProperty(value = "meterDetails", access = JsonProperty.Access.WRITE_ONLY)
private MeterDetailsResponse meterDetails;
@@ -134,8 +126,7 @@ public final class LegacyUsageDetailProperties {
private BigDecimal cost;
/*
- * Unit Price is the price applicable to you. (your EA or other contract
- * price).
+ * Unit Price is the price applicable to you. (your EA or other contract price).
*/
@JsonProperty(value = "unitPrice", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal unitPrice;
@@ -153,9 +144,8 @@ public final class LegacyUsageDetailProperties {
private String resourceLocation;
/*
- * Consumed service name. Name of the azure resource provider that emits
- * the usage or was purchased. This value is not provided for marketplace
- * usage.
+ * Consumed service name. Name of the azure resource provider that emits the usage or was purchased. This value is
+ * not provided for marketplace usage.
*/
@JsonProperty(value = "consumedService", access = JsonProperty.Access.WRITE_ONLY)
private String consumedService;
@@ -185,10 +175,9 @@ public final class LegacyUsageDetailProperties {
private String serviceInfo2;
/*
- * Additional details of this usage item. By default this is not populated,
- * unless it's specified in $expand. Use this field to get usage line item
- * specific details such as the actual VM Size (ServiceType) or the ratio
- * in which the reservation discount is applied.
+ * Additional details of this usage item. By default this is not populated, unless it's specified in $expand. Use
+ * this field to get usage line item specific details such as the actual VM Size (ServiceType) or the ratio in
+ * which the reservation discount is applied.
*/
@JsonProperty(value = "additionalInfo", access = JsonProperty.Access.WRITE_ONLY)
private String additionalInfo;
@@ -200,8 +189,7 @@ public final class LegacyUsageDetailProperties {
private String invoiceSection;
/*
- * The cost center of this department if it is a department and a cost
- * center is provided.
+ * The cost center of this department if it is a department and a cost center is provided.
*/
@JsonProperty(value = "costCenter", access = JsonProperty.Access.WRITE_ONLY)
private String costCenter;
@@ -213,16 +201,14 @@ public final class LegacyUsageDetailProperties {
private String resourceGroup;
/*
- * ARM resource id of the reservation. Only applies to records relevant to
- * reservations.
+ * ARM resource id of the reservation. Only applies to records relevant to reservations.
*/
@JsonProperty(value = "reservationId", access = JsonProperty.Access.WRITE_ONLY)
private String reservationId;
/*
- * User provided display name of the reservation. Last known name for a
- * particular day is populated in the daily data. Only applies to records
- * relevant to reservations.
+ * User provided display name of the reservation. Last known name for a particular day is populated in the daily
+ * data. Only applies to records relevant to reservations.
*/
@JsonProperty(value = "reservationName", access = JsonProperty.Access.WRITE_ONLY)
private String reservationName;
@@ -252,8 +238,8 @@ public final class LegacyUsageDetailProperties {
private Boolean isAzureCreditEligible;
/*
- * Term (in months). 1 month for monthly recurring purchase. 12 months for
- * a 1 year reservation. 36 months for a 3 year reservation.
+ * Term (in months). 1 month for monthly recurring purchase. 12 months for a 1 year reservation. 36 months for a 3
+ * year reservation.
*/
@JsonProperty(value = "term", access = JsonProperty.Access.WRITE_ONLY)
private String term;
@@ -277,16 +263,14 @@ public final class LegacyUsageDetailProperties {
private String planName;
/*
- * Indicates a charge represents credits, usage, a Marketplace purchase, a
- * reservation fee, or a refund.
+ * Indicates a charge represents credits, usage, a Marketplace purchase, a reservation fee, or a refund.
*/
@JsonProperty(value = "chargeType", access = JsonProperty.Access.WRITE_ONLY)
private String chargeType;
/*
- * Indicates how frequently this charge will occur. OneTime for purchases
- * which only happen once, Monthly for fees which recur every month, and
- * UsageBased for charges based on how much a service is used.
+ * Indicates how frequently this charge will occur. OneTime for purchases which only happen once, Monthly for fees
+ * which recur every month, and UsageBased for charges based on how much a service is used.
*/
@JsonProperty(value = "frequency", access = JsonProperty.Access.WRITE_ONLY)
private String frequency;
@@ -297,12 +281,28 @@ 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.
*/
@JsonProperty(value = "pricingModel", access = JsonProperty.Access.WRITE_ONLY)
private PricingModelType pricingModel;
+ /** Creates an instance of LegacyUsageDetailProperties class. */
+ public LegacyUsageDetailProperties() {
+ }
+
/**
* Get the billingAccountId property: Billing Account identifier.
*
@@ -704,6 +704,24 @@ public BigDecimal payGPrice() {
return this.payGPrice;
}
+ /**
+ * Get the benefitId property: Unique identifier for the applicable benefit.
+ *
+ * @return the benefitId value.
+ */
+ public String benefitId() {
+ return this.benefitId;
+ }
+
+ /**
+ * Get the benefitName property: Name of the applicable benefit.
+ *
+ * @return the benefitName value.
+ */
+ public String benefitName() {
+ return this.benefitName;
+ }
+
/**
* Get the pricingModel property: Identifier that indicates how the meter is priced.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotProperties.java
index 6849ba86cdac..a6c917230158 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.
*/
@@ -51,8 +47,8 @@ public final class LotProperties {
private OffsetDateTime expirationDate;
/*
- * The po number of the invoice on which the lot was added. This property
- * is not available for ConsumptionCommitment lots.
+ * The po number of the invoice on which the lot was added. This property is not available for
+ * ConsumptionCommitment lots.
*/
@JsonProperty(value = "poNumber", access = JsonProperty.Access.WRITE_ONLY)
private String poNumber;
@@ -105,6 +101,10 @@ public final class LotProperties {
@JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
+ /** Creates an instance of LotProperties class. */
+ public LotProperties() {
+ }
+
/**
* Get the originalAmount property: The original amount of a lot.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotSummaryInner.java
index 66ba7de656ca..812a4a2c9b8d 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.
*/
@@ -28,13 +24,16 @@ public final class LotSummaryInner extends ProxyResource {
private LotProperties innerProperties;
/*
- * eTag of the resource. To handle concurrent update scenario, this field
- * will be used to determine whether the user is updating the latest
- * version or not.
+ * eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the
+ * user is updating the latest version or not.
*/
@JsonProperty(value = "eTag")
private String etag;
+ /** Creates an instance of LotSummaryInner class. */
+ public LotSummaryInner() {
+ }
+
/**
* Get the innerProperties property: The lot properties.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostProperties.java
index de916d475acc..fbd40e92b7e8 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,11 +13,8 @@
/** 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.
+ * The id of the billing period resource that the aggregated cost belongs to.
*/
@JsonProperty(value = "billingPeriodId", access = JsonProperty.Access.WRITE_ONLY)
private String billingPeriodId;
@@ -67,19 +62,21 @@ public final class ManagementGroupAggregatedCostProperties {
private List children;
/*
- * List of subscription Guids included in the calculation of aggregated
- * cost
+ * List of subscription Guids included in the calculation of aggregated cost
*/
@JsonProperty(value = "includedSubscriptions")
private List includedSubscriptions;
/*
- * List of subscription Guids excluded from the calculation of aggregated
- * cost
+ * List of subscription Guids excluded from the calculation of aggregated cost
*/
@JsonProperty(value = "excludedSubscriptions")
private List excludedSubscriptions;
+ /** Creates an instance of ManagementGroupAggregatedCostProperties class. */
+ public ManagementGroupAggregatedCostProperties() {
+ }
+
/**
* Get the billingPeriodId property: The id of the billing period resource that the aggregated cost belongs to.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostResultInner.java
index dfe72201c6f3..f0a0972b22ec 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.
*/
@@ -39,6 +35,10 @@ public final class ManagementGroupAggregatedCostResultInner extends ProxyResourc
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
+ /** Creates an instance of ManagementGroupAggregatedCostResultInner class. */
+ public ManagementGroupAggregatedCostResultInner() {
+ }
+
/**
* Get the innerProperties property: The properties of the Management Group Aggregated Cost.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceInner.java
index 659cbacda58b..ab8e7318f631 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
@@ -4,10 +4,8 @@
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+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.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
@@ -16,10 +14,8 @@
import java.util.UUID;
/** A marketplace resource. */
-@Fluent
+@Immutable
public final class MarketplaceInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(MarketplaceInner.class);
-
/*
* The properties of the marketplace usage detail.
*/
@@ -39,6 +35,10 @@ public final class MarketplaceInner extends ProxyResource {
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
+ /** Creates an instance of MarketplaceInner class. */
+ public MarketplaceInner() {
+ }
+
/**
* Get the innerProperties property: The properties of the marketplace usage detail.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceProperties.java
index 006420b0220a..e775e13ae372 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.
*/
@@ -144,15 +140,13 @@ public final class MarketplaceProperties {
private String consumedService;
/*
- * The cost center of this department if it is a department and a
- * costcenter exists
+ * The cost center of this department if it is a department and a costcenter exists
*/
@JsonProperty(value = "costCenter", access = JsonProperty.Access.WRITE_ONLY)
private String costCenter;
/*
- * Additional details of this usage item. By default this is not populated,
- * unless it's specified in $expand.
+ * Additional details of this usage item. By default this is not populated, unless it's specified in $expand.
*/
@JsonProperty(value = "additionalProperties", access = JsonProperty.Access.WRITE_ONLY)
private String additionalProperties;
@@ -175,6 +169,10 @@ public final class MarketplaceProperties {
@JsonProperty(value = "isRecurringCharge", access = JsonProperty.Access.WRITE_ONLY)
private Boolean isRecurringCharge;
+ /** Creates an instance of MarketplaceProperties class. */
+ public MarketplaceProperties() {
+ }
+
/**
* Get the billingPeriodId property: The id of the billing period resource that the usage belongs to.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernChargeSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernChargeSummaryProperties.java
index 9a5a2f9e026a..d8882bd29c36 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.
*/
@@ -81,6 +77,10 @@ public final class ModernChargeSummaryProperties {
@JsonProperty(value = "isInvoiced", access = JsonProperty.Access.WRITE_ONLY)
private Boolean isInvoiced;
+ /** Creates an instance of ModernChargeSummaryProperties class. */
+ public ModernChargeSummaryProperties() {
+ }
+
/**
* Get the billingPeriodId property: 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/ModernReservationTransactionInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionInner.java
index 636c1f94bcf5..bcb2516d6a3f 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
@@ -4,26 +4,27 @@
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
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;
import java.util.UUID;
/** Modern Reservation transaction resource. */
-@Fluent
+@Immutable
public final class ModernReservationTransactionInner extends ReservationTransactionResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ModernReservationTransactionInner.class);
-
/*
* The properties of a modern reservation transaction.
*/
@JsonProperty(value = "properties", required = true)
private ModernReservationTransactionProperties innerProperties = new ModernReservationTransactionProperties();
+ /** Creates an instance of ModernReservationTransactionInner class. */
+ public ModernReservationTransactionInner() {
+ }
+
/**
* Get the innerProperties property: The properties of a modern reservation transaction.
*
@@ -107,7 +108,7 @@ public OffsetDateTime eventDate() {
}
/**
- * Get the eventType property: The type of the transaction (Purchase, Cancel, etc.).
+ * Get the eventType property: The type of the transaction (Purchase, Cancel or Refund).
*
* @return the eventType value.
*/
@@ -225,7 +226,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 +234,6 @@ public void validate() {
innerProperties().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(ModernReservationTransactionInner.class);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionProperties.java
index fb749b85a558..cb87dba75c37 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.
*/
@@ -24,8 +20,7 @@ public final class ModernReservationTransactionProperties {
private BigDecimal amount;
/*
- * This is the ARM Sku name. It can be used to join with the serviceType
- * field in additional info in usage records.
+ * This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
*/
@JsonProperty(value = "armSkuName", access = JsonProperty.Access.WRITE_ONLY)
private String armSkuName;
@@ -67,7 +62,7 @@ public final class ModernReservationTransactionProperties {
private OffsetDateTime eventDate;
/*
- * The type of the transaction (Purchase, Cancel, etc.)
+ * The type of the transaction (Purchase, Cancel or Refund).
*/
@JsonProperty(value = "eventType", access = JsonProperty.Access.WRITE_ONLY)
private String eventType;
@@ -121,10 +116,9 @@ public final class ModernReservationTransactionProperties {
private String region;
/*
- * The reservation order ID is the identifier for a reservation purchase.
- * Each reservation order ID represents a single purchase transaction. A
- * reservation order contains reservations. The reservation order specifies
- * the VM size and region for the reservations.
+ * The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a
+ * single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM
+ * size and region for the reservations.
*/
@JsonProperty(value = "reservationOrderId", access = JsonProperty.Access.WRITE_ONLY)
private String reservationOrderId;
@@ -141,6 +135,10 @@ public final class ModernReservationTransactionProperties {
@JsonProperty(value = "term", access = JsonProperty.Access.WRITE_ONLY)
private String term;
+ /** Creates an instance of ModernReservationTransactionProperties class. */
+ public ModernReservationTransactionProperties() {
+ }
+
/**
* Get the amount property: The charge of the transaction.
*
@@ -215,7 +213,7 @@ public OffsetDateTime eventDate() {
}
/**
- * Get the eventType property: The type of the transaction (Purchase, Cancel, etc.).
+ * Get the eventType property: The type of the transaction (Purchase, Cancel or Refund).
*
* @return the eventType value.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernUsageDetailProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernUsageDetailProperties.java
index 00c64480a2cd..f08e2c01caca 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.
*/
@@ -55,18 +51,16 @@ public final class ModernUsageDetailProperties {
private OffsetDateTime billingPeriodEndDate;
/*
- * Identifier for the billing profile that groups costs across invoices in
- * the a singular billing currency across across the customers who have
- * onboarded the Microsoft customer agreement and the customers in CSP who
- * have made entitlement purchases like SaaS, Marketplace, RI, etc.
+ * Identifier for the billing profile that groups costs across invoices in the a singular billing currency across
+ * across the customers who have onboarded the Microsoft customer agreement and the customers in CSP who have made
+ * entitlement purchases like SaaS, Marketplace, RI, etc.
*/
@JsonProperty(value = "billingProfileId", access = JsonProperty.Access.WRITE_ONLY)
private String billingProfileId;
/*
- * Name of the billing profile that groups costs across invoices in the a
- * singular billing currency across across the customers who have onboarded
- * the Microsoft customer agreement and the customers in CSP who have made
+ * Name of the billing profile that groups costs across invoices in the a singular billing currency across across
+ * the customers who have onboarded the Microsoft customer agreement and the customers in CSP who have made
* entitlement purchases like SaaS, Marketplace, RI, etc.
*/
@JsonProperty(value = "billingProfileName", access = JsonProperty.Access.WRITE_ONLY)
@@ -91,17 +85,16 @@ public final class ModernUsageDetailProperties {
private OffsetDateTime date;
/*
- * Name of the product that has accrued charges by consumption or purchase
- * as listed in the invoice. Not available for Marketplace.
+ * Name of the product that has accrued charges by consumption or purchase as listed in the invoice. Not available
+ * for Marketplace.
*/
@JsonProperty(value = "product", access = JsonProperty.Access.WRITE_ONLY)
private String product;
/*
- * The meter id (GUID). Not available for marketplace. For reserved
- * instance this represents the primary meter for which the reservation was
- * purchased. For the actual VM Size for which the reservation is purchased
- * see productOrderName.
+ * The meter id (GUID). Not available for marketplace. For reserved instance this represents the primary meter for
+ * which the reservation was purchased. For the actual VM Size for which the reservation is purchased see
+ * productOrderName.
*/
@JsonProperty(value = "meterId", access = JsonProperty.Access.WRITE_ONLY)
private UUID meterId;
@@ -113,8 +106,7 @@ public final class ModernUsageDetailProperties {
private String meterName;
/*
- * Identifies the location of the datacenter for certain services that are
- * priced based on datacenter location.
+ * Identifies the location of the datacenter for certain services that are priced based on datacenter location.
*/
@JsonProperty(value = "meterRegion", access = JsonProperty.Access.WRITE_ONLY)
private String meterRegion;
@@ -126,29 +118,25 @@ public final class ModernUsageDetailProperties {
private String meterCategory;
/*
- * Defines the type or sub-category of Azure service that can affect the
- * rate.
+ * Defines the type or sub-category of Azure service that can affect the rate.
*/
@JsonProperty(value = "meterSubCategory", access = JsonProperty.Access.WRITE_ONLY)
private String meterSubCategory;
/*
- * List the service family for the product purchased or charged (Example:
- * Storage ; Compute).
+ * List the service family for the product purchased or charged (Example: Storage ; Compute).
*/
@JsonProperty(value = "serviceFamily", access = JsonProperty.Access.WRITE_ONLY)
private String serviceFamily;
/*
- * Measure the quantity purchased or consumed.The amount of the meter used
- * during the billing period.
+ * Measure the quantity purchased or consumed.The amount of the meter used during the billing period.
*/
@JsonProperty(value = "quantity", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal quantity;
/*
- * Identifies the Unit that the service is charged in. For example, GB,
- * hours, 10,000 s.
+ * Identifies the Unit that the service is charged in. For example, GB, hours, 10,000 s.
*/
@JsonProperty(value = "unitOfMeasure", access = JsonProperty.Access.WRITE_ONLY)
private String unitOfMeasure;
@@ -166,8 +154,7 @@ public final class ModernUsageDetailProperties {
private BigDecimal costInUsd;
/*
- * Unit Price is the price applicable to you. (your EA or other contract
- * price).
+ * Unit Price is the price applicable to you. (your EA or other contract price).
*/
@JsonProperty(value = "unitPrice", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal unitPrice;
@@ -185,9 +172,8 @@ public final class ModernUsageDetailProperties {
private String resourceLocation;
/*
- * Consumed service name. Name of the azure resource provider that emits
- * the usage or was purchased. This value is not provided for marketplace
- * usage.
+ * Consumed service name. Name of the azure resource provider that emits the usage or was purchased. This value is
+ * not provided for marketplace usage.
*/
@JsonProperty(value = "consumedService", access = JsonProperty.Access.WRITE_ONLY)
private String consumedService;
@@ -205,60 +191,54 @@ public final class ModernUsageDetailProperties {
private String serviceInfo2;
/*
- * Additional details of this usage item. Use this field to get usage line
- * item specific details such as the actual VM Size (ServiceType) or the
- * ratio in which the reservation discount is applied.
+ * Additional details of this usage item. Use this field to get usage line item specific details such as the actual
+ * VM Size (ServiceType) or the ratio in which the reservation discount is applied.
*/
@JsonProperty(value = "additionalInfo", access = JsonProperty.Access.WRITE_ONLY)
private String additionalInfo;
/*
- * Identifier of the project that is being charged in the invoice. Not
- * applicable for Microsoft Customer Agreements onboarded by partners.
+ * Identifier of the project that is being charged in the invoice. Not applicable for Microsoft Customer Agreements
+ * onboarded by partners.
*/
@JsonProperty(value = "invoiceSectionId", access = JsonProperty.Access.WRITE_ONLY)
private String invoiceSectionId;
/*
- * Name of the project that is being charged in the invoice. Not applicable
- * for Microsoft Customer Agreements onboarded by partners.
+ * Name of the project that is being charged in the invoice. Not applicable for Microsoft Customer Agreements
+ * onboarded by partners.
*/
@JsonProperty(value = "invoiceSectionName", access = JsonProperty.Access.WRITE_ONLY)
private String invoiceSectionName;
/*
- * The cost center of this department if it is a department and a cost
- * center is provided.
+ * The cost center of this department if it is a department and a cost center is provided.
*/
@JsonProperty(value = "costCenter", access = JsonProperty.Access.WRITE_ONLY)
private String costCenter;
/*
- * Name of the Azure resource group used for cohesive lifecycle management
- * of resources.
+ * Name of the Azure resource group used for cohesive lifecycle management of resources.
*/
@JsonProperty(value = "resourceGroup", access = JsonProperty.Access.WRITE_ONLY)
private String resourceGroup;
/*
- * ARM resource id of the reservation. Only applies to records relevant to
- * reservations.
+ * ARM resource id of the reservation. Only applies to records relevant to reservations.
*/
@JsonProperty(value = "reservationId", access = JsonProperty.Access.WRITE_ONLY)
private String reservationId;
/*
- * User provided display name of the reservation. Last known name for a
- * particular day is populated in the daily data. Only applies to records
- * relevant to reservations.
+ * User provided display name of the reservation. Last known name for a particular day is populated in the daily
+ * data. Only applies to records relevant to reservations.
*/
@JsonProperty(value = "reservationName", access = JsonProperty.Access.WRITE_ONLY)
private String reservationName;
/*
- * The identifier for the asset or Azure plan name that the subscription
- * belongs to. For example: Azure Plan. For reservations this is the
- * Reservation Order ID.
+ * The identifier for the asset or Azure plan name that the subscription belongs to. For example: Azure Plan. For
+ * reservations this is the Reservation Order ID.
*/
@JsonProperty(value = "productOrderId", access = JsonProperty.Access.WRITE_ONLY)
private String productOrderId;
@@ -276,40 +256,34 @@ public final class ModernUsageDetailProperties {
private Boolean isAzureCreditEligible;
/*
- * Term (in months). Displays the term for the validity of the offer. For
- * example. In case of reserved instances it displays 12 months for yearly
- * term of reserved instance. For one time purchases or recurring
- * purchases, the terms displays 1 month; This is not applicable for Azure
- * consumption.
+ * Term (in months). Displays the term for the validity of the offer. For example. In case of reserved instances it
+ * displays 12 months for yearly term of reserved instance. For one time purchases or recurring purchases, the
+ * terms displays 1 month; This is not applicable for Azure consumption.
*/
@JsonProperty(value = "term", access = JsonProperty.Access.WRITE_ONLY)
private String term;
/*
- * Name of the publisher of the service including Microsoft or Third Party
- * publishers.
+ * Name of the publisher of the service including Microsoft or Third Party publishers.
*/
@JsonProperty(value = "publisherName", access = JsonProperty.Access.WRITE_ONLY)
private String publisherName;
/*
- * Type of publisher that identifies if the publisher is first party, third
- * party reseller or third party agency.
+ * Type of publisher that identifies if the publisher is first party, third party reseller or third party agency.
*/
@JsonProperty(value = "publisherType", access = JsonProperty.Access.WRITE_ONLY)
private String publisherType;
/*
- * Indicates a charge represents credits, usage, a Marketplace purchase, a
- * reservation fee, or a refund.
+ * Indicates a charge represents credits, usage, a Marketplace purchase, a reservation fee, or a refund.
*/
@JsonProperty(value = "chargeType", access = JsonProperty.Access.WRITE_ONLY)
private String chargeType;
/*
- * Indicates how frequently this charge will occur. OneTime for purchases
- * which only happen once, Monthly for fees which recur every month, and
- * UsageBased for charges based on how much a service is used.
+ * Indicates how frequently this charge will occur. OneTime for purchases which only happen once, Monthly for fees
+ * which recur every month, and UsageBased for charges based on how much a service is used.
*/
@JsonProperty(value = "frequency", access = JsonProperty.Access.WRITE_ONLY)
private String frequency;
@@ -321,22 +295,19 @@ public final class ModernUsageDetailProperties {
private BigDecimal costInBillingCurrency;
/*
- * ExtendedCost or blended cost before tax in pricing currency to correlate
- * with prices.
+ * ExtendedCost or blended cost before tax in pricing currency to correlate with prices.
*/
@JsonProperty(value = "costInPricingCurrency", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal costInPricingCurrency;
/*
- * Exchange rate used in conversion from pricing currency to billing
- * currency.
+ * Exchange rate used in conversion from pricing currency to billing currency.
*/
@JsonProperty(value = "exchangeRate", access = JsonProperty.Access.WRITE_ONLY)
private String exchangeRate;
/*
- * Date on which exchange rate used in conversion from pricing currency to
- * billing currency.
+ * Date on which exchange rate used in conversion from pricing currency to billing currency.
*/
@JsonProperty(value = "exchangeRateDate", access = JsonProperty.Access.WRITE_ONLY)
private OffsetDateTime exchangeRateDate;
@@ -348,8 +319,8 @@ public final class ModernUsageDetailProperties {
private String invoiceId;
/*
- * Reference to an original invoice there is a refund (negative cost). This
- * is populated only when there is a refund.
+ * Reference to an original invoice there is a refund (negative cost). This is populated only when there is a
+ * refund.
*/
@JsonProperty(value = "previousInvoiceId", access = JsonProperty.Access.WRITE_ONLY)
private String previousInvoiceId;
@@ -361,9 +332,8 @@ public final class ModernUsageDetailProperties {
private String pricingCurrencyCode;
/*
- * Identifier for the product that has accrued charges by consumption or
- * purchase . This is the concatenated key of productId and SkuId in
- * partner center.
+ * Identifier for the product that has accrued charges by consumption or purchase . This is the concatenated key of
+ * productId and SkuId in partner center.
*/
@JsonProperty(value = "productIdentifier", access = JsonProperty.Access.WRITE_ONLY)
private String productIdentifier;
@@ -375,16 +345,15 @@ public final class ModernUsageDetailProperties {
private String resourceLocationNormalized;
/*
- * Start date for the rating period when the service usage was rated for
- * charges. The prices for Azure services are determined for the rating
- * period.
+ * Start date for the rating period when the service usage was rated for charges. The prices for Azure services are
+ * determined for the rating period.
*/
@JsonProperty(value = "servicePeriodStartDate", access = JsonProperty.Access.WRITE_ONLY)
private OffsetDateTime servicePeriodStartDate;
/*
- * End date for the period when the service usage was rated for charges.
- * The prices for Azure services are determined based on the rating period.
+ * End date for the period when the service usage was rated for charges. The prices for Azure services are
+ * determined based on the rating period.
*/
@JsonProperty(value = "servicePeriodEndDate", access = JsonProperty.Access.WRITE_ONLY)
private OffsetDateTime servicePeriodEndDate;
@@ -456,8 +425,7 @@ public final class ModernUsageDetailProperties {
private BigDecimal paygCostInUsd;
/*
- * Rate of discount applied if there is a partner earned credit (PEC) based
- * on partner admin link access.
+ * Rate of discount applied if there is a partner earned credit (PEC) based on partner admin link access.
*/
@JsonProperty(value = "partnerEarnedCreditRate", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal partnerEarnedCreditRate;
@@ -487,8 +455,7 @@ public final class ModernUsageDetailProperties {
private String benefitName;
/*
- * Identifier for Product Category or Line Of Business, Ex - Azure,
- * Microsoft 365, AWS e.t.c
+ * Identifier for Product Category or Line Of Business, Ex - Azure, Microsoft 365, AWS e.t.c
*/
@JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY)
private String provider;
@@ -499,6 +466,10 @@ public final class ModernUsageDetailProperties {
@JsonProperty(value = "costAllocationRuleName", access = JsonProperty.Access.WRITE_ONLY)
private String costAllocationRuleName;
+ /** Creates an instance of ModernUsageDetailProperties class. */
+ public ModernUsageDetailProperties() {
+ }
+
/**
* Get the billingAccountId property: Billing Account identifier.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java
index fe76c6fdfa54..dfd056b7f565 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,45 +5,58 @@
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.ActionType;
import com.azure.resourcemanager.consumption.models.OperationDisplay;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.resourcemanager.consumption.models.Origin;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** A Consumption REST API operation. */
+/**
+ * REST API Operation
+ *
+ * Details of a REST API operation, returned from the Resource Provider Operations API.
+ */
@Fluent
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
- * Operation Id.
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
*/
- @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
- private String id;
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
/*
- * Operation name: {provider}/{resource}/{operation}.
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
+ * ARM/control-plane operations.
*/
- @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
- private String name;
+ @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isDataAction;
/*
- * The object that represents the operation.
+ * Localized display information for this particular operation.
*/
@JsonProperty(value = "display")
private OperationDisplay display;
- /**
- * Get the id property: Operation Id.
- *
- * @return the id value.
+ /*
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
+ * value is "user,system"
+ */
+ @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY)
+ private Origin origin;
+
+ /*
+ * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
*/
- public String id() {
- return this.id;
+ @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY)
+ private ActionType actionType;
+
+ /** Creates an instance of OperationInner class. */
+ public OperationInner() {
}
/**
- * Get the name property: Operation name: {provider}/{resource}/{operation}.
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
*
* @return the name value.
*/
@@ -52,7 +65,17 @@ public String name() {
}
/**
- * Get the display property: The object that represents the operation.
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for ARM/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
*
* @return the display value.
*/
@@ -61,7 +84,7 @@ public OperationDisplay display() {
}
/**
- * Set the display property: The object that represents the operation.
+ * Set the display property: Localized display information for this particular operation.
*
* @param display the display value to set.
* @return the OperationInner object itself.
@@ -71,6 +94,26 @@ public OperationInner withDisplay(OperationDisplay display) {
return this;
}
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
+ * only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetModel.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetModel.java
index 0e4aa629a411..4db63a05371f 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
*/
@@ -35,6 +31,10 @@ public final class PriceSheetModel {
@JsonProperty(value = "download", access = JsonProperty.Access.WRITE_ONLY)
private MeterDetails download;
+ /** Creates an instance of PriceSheetModel class. */
+ public PriceSheetModel() {
+ }
+
/**
* Get the pricesheets property: Price sheet.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetModelAutoGenerated.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetModelAutoGenerated.java
new file mode 100644
index 000000000000..a71a3020e76c
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetModelAutoGenerated.java
@@ -0,0 +1,78 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.consumption.models.MeterDetailsAutoGenerated;
+import com.azure.resourcemanager.consumption.models.PriceSheetPropertiesAutoGenerated;
+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 PriceSheetModelAutoGenerated {
+ /*
+ * Price sheet
+ */
+ @JsonProperty(value = "pricesheets", access = JsonProperty.Access.WRITE_ONLY)
+ private List pricesheets;
+
+ /*
+ * The link (url) to the next page of results.
+ */
+ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
+ private String nextLink;
+
+ /*
+ * Pricesheet download details.
+ */
+ @JsonProperty(value = "download", access = JsonProperty.Access.WRITE_ONLY)
+ private MeterDetailsAutoGenerated download;
+
+ /** Creates an instance of PriceSheetModelAutoGenerated class. */
+ public PriceSheetModelAutoGenerated() {
+ }
+
+ /**
+ * Get the pricesheets property: Price sheet.
+ *
+ * @return the pricesheets value.
+ */
+ public List pricesheets() {
+ return this.pricesheets;
+ }
+
+ /**
+ * Get the nextLink property: The link (url) to the next page of results.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Get the download property: Pricesheet download details.
+ *
+ * @return the download value.
+ */
+ public MeterDetailsAutoGenerated download() {
+ return this.download;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (pricesheets() != null) {
+ pricesheets().forEach(e -> e.validate());
+ }
+ if (download() != null) {
+ download().validate();
+ }
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultAutoGeneratedInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultAutoGeneratedInner.java
new file mode 100644
index 000000000000..d4292ebd23cf
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultAutoGeneratedInner.java
@@ -0,0 +1,106 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.azure.resourcemanager.consumption.models.MeterDetailsAutoGenerated;
+import com.azure.resourcemanager.consumption.models.PriceSheetPropertiesAutoGenerated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** An pricesheet resource. */
+@Immutable
+public final class PriceSheetResultAutoGeneratedInner extends ProxyResource {
+ /*
+ * price sheet result. It contains the pricesheet associated with billing period
+ */
+ @JsonProperty(value = "properties")
+ private PriceSheetModelAutoGenerated innerProperties;
+
+ /*
+ * The etag for the resource.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map tags;
+
+ /** Creates an instance of PriceSheetResultAutoGeneratedInner class. */
+ public PriceSheetResultAutoGeneratedInner() {
+ }
+
+ /**
+ * Get the innerProperties property: price sheet result. It contains the pricesheet associated with billing period.
+ *
+ * @return the innerProperties value.
+ */
+ private PriceSheetModelAutoGenerated innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the etag property: The etag for the resource.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Get the pricesheets property: Price sheet.
+ *
+ * @return the pricesheets value.
+ */
+ public List pricesheets() {
+ return this.innerProperties() == null ? null : this.innerProperties().pricesheets();
+ }
+
+ /**
+ * Get the nextLink property: The link (url) to the next page of results.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.innerProperties() == null ? null : this.innerProperties().nextLink();
+ }
+
+ /**
+ * Get the download property: Pricesheet download details.
+ *
+ * @return the download value.
+ */
+ public MeterDetailsAutoGenerated download() {
+ return this.innerProperties() == null ? null : this.innerProperties().download();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultInner.java
index 7d19b3f74d32..1c59b0c32e7a 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
@@ -4,41 +4,32 @@
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.management.SystemData;
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;
-import java.util.Map;
/** An pricesheet resource. */
-@Fluent
+@Immutable
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
+ * price sheet result. It contains the pricesheet associated with billing period
*/
@JsonProperty(value = "properties")
private PriceSheetModel innerProperties;
/*
- * The etag for the resource.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
- private String etag;
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
- /*
- * Resource tags.
- */
- @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
- private Map tags;
+ /** Creates an instance of PriceSheetResultInner class. */
+ public PriceSheetResultInner() {
+ }
/**
* Get the innerProperties property: price sheet result. It contains the pricesheet associated with billing period.
@@ -50,21 +41,12 @@ private PriceSheetModel innerProperties() {
}
/**
- * Get the etag property: The etag for the resource.
- *
- * @return the etag value.
- */
- public String etag() {
- return this.etag;
- }
-
- /**
- * Get the tags property: Resource tags.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @return the tags value.
+ * @return the systemData value.
*/
- public Map tags() {
- return this.tags;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailInner.java
index ba58947769d8..fdf3c65464a4 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
@@ -4,10 +4,8 @@
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+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.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
@@ -15,10 +13,8 @@
import java.util.Map;
/** reservation detail resource. */
-@Fluent
+@Immutable
public final class ReservationDetailInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationDetailInner.class);
-
/*
* The properties of the reservation detail.
*/
@@ -38,6 +34,10 @@ public final class ReservationDetailInner extends ProxyResource {
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
+ /** Creates an instance of ReservationDetailInner class. */
+ public ReservationDetailInner() {
+ }
+
/**
* Get the innerProperties property: The properties of the reservation detail.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailProperties.java
index 99fe617af2d0..56bbaffb1e61 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,13 +12,10 @@
/** 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
- * reservation order contains reservations. The reservation order specifies
- * the VM size and region for the reservations.
+ * The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a
+ * single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM
+ * size and region for the reservations.
*/
@JsonProperty(value = "reservationOrderId", access = JsonProperty.Access.WRITE_ONLY)
private String reservationOrderId;
@@ -38,25 +33,22 @@ public final class ReservationDetailProperties {
private String instanceFlexibilityGroup;
/*
- * The reservation ID is the identifier of a reservation within a
- * reservation order. Each reservation is the grouping for applying the
- * benefit scope and also specifies the number of instances to which the
- * reservation benefit can be applied to.
+ * The reservation ID is the identifier of a reservation within a reservation order. Each reservation is the
+ * grouping for applying the benefit scope and also specifies the number of instances to which the reservation
+ * benefit can be applied to.
*/
@JsonProperty(value = "reservationId", access = JsonProperty.Access.WRITE_ONLY)
private String reservationId;
/*
- * This is the ARM Sku name. It can be used to join with the serviceType
- * field in additional info in usage records.
+ * This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
*/
@JsonProperty(value = "skuName", access = JsonProperty.Access.WRITE_ONLY)
private String skuName;
/*
- * This is the total hours reserved for the day. E.g. if reservation for 1
- * instance was made on 1 PM, this will be 11 hours for that day and 24
- * hours from subsequent days.
+ * This is the total hours reserved for the day. E.g. if reservation for 1 instance was made on 1 PM, this will be
+ * 11 hours for that day and 24 hours from subsequent days.
*/
@JsonProperty(value = "reservedHours", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal reservedHours;
@@ -74,15 +66,13 @@ public final class ReservationDetailProperties {
private BigDecimal usedHours;
/*
- * This identifier is the name of the resource or the fully qualified
- * Resource ID.
+ * This identifier is the name of the resource or the fully qualified Resource ID.
*/
@JsonProperty(value = "instanceId", access = JsonProperty.Access.WRITE_ONLY)
private String instanceId;
/*
- * This is the total count of instances that are reserved for the
- * reservationId.
+ * This is the total count of instances that are reserved for the reservationId.
*/
@JsonProperty(value = "totalReservedQuantity", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal totalReservedQuantity;
@@ -93,6 +83,10 @@ public final class ReservationDetailProperties {
@JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY)
private String kind;
+ /** Creates an instance of ReservationDetailProperties class. */
+ public ReservationDetailProperties() {
+ }
+
/**
* Get the reservationOrderId property: The reservation order ID is the identifier for a reservation purchase. Each
* reservation order ID represents a single purchase transaction. A reservation order contains reservations. The
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsModelInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsModelInner.java
index 68e957a682f6..7a852a01876e 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.
*/
@@ -51,6 +47,10 @@ public final class ReservationRecommendationDetailsModelInner extends ProxyResou
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
+ /** Creates an instance of ReservationRecommendationDetailsModelInner class. */
+ public ReservationRecommendationDetailsModelInner() {
+ }
+
/**
* Get the location property: Resource Location.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsProperties.java
index adeb2dae589c..8574b3cc9615 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
*/
@@ -53,6 +49,10 @@ public final class ReservationRecommendationDetailsProperties {
@JsonProperty(value = "usage", access = JsonProperty.Access.WRITE_ONLY)
private ReservationRecommendationDetailsUsageProperties usage;
+ /** Creates an instance of ReservationRecommendationDetailsProperties class. */
+ public ReservationRecommendationDetailsProperties() {
+ }
+
/**
* Get the currency property: An ISO 4217 currency code identifier for the costs and savings.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationInner.java
index 45566e5e4012..afb943323e08 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.
*/
@@ -57,6 +53,10 @@ public class ReservationRecommendationInner extends ProxyResource {
@JsonProperty(value = "sku", access = JsonProperty.Access.WRITE_ONLY)
private String sku;
+ /** Creates an instance of ReservationRecommendationInner class. */
+ public ReservationRecommendationInner() {
+ }
+
/**
* Get the etag property: The etag for the resource.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java
index 7b913e6e0ac3..555b5dc018de 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
@@ -4,10 +4,8 @@
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+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.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
@@ -15,10 +13,8 @@
import java.util.Map;
/** reservation summary resource. */
-@Fluent
+@Immutable
public final class ReservationSummaryInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationSummaryInner.class);
-
/*
* The properties of the reservation summary.
*/
@@ -38,6 +34,10 @@ public final class ReservationSummaryInner extends ProxyResource {
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
+ /** Creates an instance of ReservationSummaryInner class. */
+ public ReservationSummaryInner() {
+ }
+
/**
* Get the innerProperties property: The properties of the reservation summary.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryProperties.java
index 2bd838de647e..16c83b8d9f6c 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,44 +12,37 @@
/** 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
- * reservation order contains reservations. The reservation order specifies
- * the VM size and region for the reservations.
+ * The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a
+ * single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM
+ * size and region for the reservations.
*/
@JsonProperty(value = "reservationOrderId", access = JsonProperty.Access.WRITE_ONLY)
private String reservationOrderId;
/*
- * The reservation ID is the identifier of a reservation within a
- * reservation order. Each reservation is the grouping for applying the
- * benefit scope and also specifies the number of instances to which the
- * reservation benefit can be applied to.
+ * The reservation ID is the identifier of a reservation within a reservation order. Each reservation is the
+ * grouping for applying the benefit scope and also specifies the number of instances to which the reservation
+ * benefit can be applied to.
*/
@JsonProperty(value = "reservationId", access = JsonProperty.Access.WRITE_ONLY)
private String reservationId;
/*
- * This is the ARM Sku name. It can be used to join with the serviceType
- * field in additional info in usage records.
+ * This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
*/
@JsonProperty(value = "skuName", access = JsonProperty.Access.WRITE_ONLY)
private String skuName;
/*
- * This is the total hours reserved. E.g. if reservation for 1 instance was
- * made on 1 PM, this will be 11 hours for that day and 24 hours from
- * subsequent days
+ * This is the total hours reserved. E.g. if reservation for 1 instance was made on 1 PM, this will be 11 hours for
+ * that day and 24 hours from subsequent days
*/
@JsonProperty(value = "reservedHours", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal reservedHours;
/*
- * Data corresponding to the utilization record. If the grain of data is
- * monthly, it will be first day of month.
+ * Data corresponding to the utilization record. If the grain of data is monthly, it will be first day of month.
*/
@JsonProperty(value = "usageDate", access = JsonProperty.Access.WRITE_ONLY)
private OffsetDateTime usageDate;
@@ -63,24 +54,21 @@ public final class ReservationSummaryProperties {
private BigDecimal usedHours;
/*
- * This is the minimum hourly utilization in the usage time (day or month).
- * E.g. if usage record corresponds to 12/10/2017 and on that for hour 4
- * and 5, utilization was 10%, this field will return 10% for that day
+ * This is the minimum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to
+ * 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field will return 10% for that day
*/
@JsonProperty(value = "minUtilizationPercentage", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal minUtilizationPercentage;
/*
- * This is average utilization for the entire time range. (day or month
- * depending on the grain)
+ * This is average utilization for the entire time range. (day or month depending on the grain)
*/
@JsonProperty(value = "avgUtilizationPercentage", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal avgUtilizationPercentage;
/*
- * This is the maximum hourly utilization in the usage time (day or month).
- * E.g. if usage record corresponds to 12/10/2017 and on that for hour 4
- * and 5, utilization was 100%, this field will return 100% for that day.
+ * This is the maximum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to
+ * 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field will return 100% for that day.
*/
@JsonProperty(value = "maxUtilizationPercentage", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal maxUtilizationPercentage;
@@ -104,8 +92,7 @@ public final class ReservationSummaryProperties {
private BigDecimal remainingQuantity;
/*
- * This is the total count of instances that are reserved for the
- * reservationId.
+ * This is the total count of instances that are reserved for the reservationId.
*/
@JsonProperty(value = "totalReservedQuantity", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal totalReservedQuantity;
@@ -122,6 +109,10 @@ public final class ReservationSummaryProperties {
@JsonProperty(value = "utilizedPercentage", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal utilizedPercentage;
+ /** Creates an instance of ReservationSummaryProperties class. */
+ public ReservationSummaryProperties() {
+ }
+
/**
* Get the reservationOrderId property: The reservation order ID is the identifier for a reservation purchase. Each
* reservation order ID represents a single purchase transaction. A reservation order contains reservations. The
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationTransactionInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationTransactionInner.java
index f09a430c58bf..f89084009e04 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
@@ -4,26 +4,26 @@
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.annotation.Immutable;
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;
import java.util.UUID;
/** Reservation transaction resource. */
-@Fluent
+@Immutable
public class ReservationTransactionInner extends ReservationTransactionResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationTransactionInner.class);
-
/*
* The properties of a legacy reservation transaction.
*/
@JsonProperty(value = "properties")
private LegacyReservationTransactionProperties innerProperties;
+ /** Creates an instance of ReservationTransactionInner class. */
+ public ReservationTransactionInner() {
+ }
+
/**
* Get the innerProperties property: The properties of a legacy reservation transaction.
*
@@ -63,7 +63,7 @@ public String description() {
}
/**
- * Get the eventType property: The type of the transaction (Purchase, Cancel, etc.).
+ * Get the eventType property: The type of the transaction (Purchase, Cancel or Refund).
*
* @return the eventType value.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagProperties.java
index c38afadca36c..64f9553d9e58 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.
*/
@@ -34,6 +30,10 @@ public final class TagProperties {
@JsonProperty(value = "previousLink", access = JsonProperty.Access.WRITE_ONLY)
private String previousLink;
+ /** Creates an instance of TagProperties class. */
+ public TagProperties() {
+ }
+
/**
* Get the tags property: A list of Tag.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java
index 2cd3f869d8e8..39b9d1274100 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.
*/
@@ -24,13 +20,16 @@ public final class TagsResultInner extends ProxyResource {
private TagProperties innerProperties;
/*
- * eTag of the resource. To handle concurrent update scenario, this field
- * will be used to determine whether the user is updating the latest
- * version or not.
+ * eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the
+ * user is updating the latest version or not.
*/
@JsonProperty(value = "eTag")
private String etag;
+ /** Creates an instance of TagsResultInner class. */
+ public TagsResultInner() {
+ }
+
/**
* Get the innerProperties property: The properties of the tag.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/UsageDetailInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/UsageDetailInner.java
index 97647be02c10..e7b8394c0b8c 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.
*/
@@ -45,6 +41,10 @@ public class UsageDetailInner extends ProxyResource {
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
+ /** Creates an instance of UsageDetailInner class. */
+ public UsageDetailInner() {
+ }
+
/**
* Get the etag property: The etag for the resource.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsClientImpl.java
index c241892a5f74..660b83d8b509 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;
@@ -53,7 +50,7 @@ public final class AggregatedCostsClientImpl implements AggregatedCostsClient {
*/
@Host("{$host}")
@ServiceInterface(name = "ConsumptionManagemen")
- private interface AggregatedCostsService {
+ public interface AggregatedCostsService {
@Headers({"Content-Type: application/json"})
@Get(
"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption"
@@ -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(
@@ -108,18 +106,14 @@ private Mono> getByManagement
return Mono
.error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null."));
}
+ final String apiVersion = "2021-10-01";
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
.getByManagementGroup(
- this.client.getEndpoint(),
- managementGroupId,
- this.client.getApiVersion(),
- filter,
- accept,
- context))
+ this.client.getEndpoint(), managementGroupId, apiVersion, filter, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -134,7 +128,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(
@@ -149,94 +144,61 @@ private Mono> getByManagement
return Mono
.error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null."));
}
+ final String apiVersion = "2021-10-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .getByManagementGroup(
- this.client.getEndpoint(), managementGroupId, this.client.getApiVersion(), filter, accept, context);
+ .getByManagementGroup(this.client.getEndpoint(), managementGroupId, apiVersion, filter, accept, context);
}
/**
* Provides the aggregate cost of a management group and all child management groups by current billing period.
*
* @param managementGroupId Azure Management Group ID.
- * @param filter May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (Utc
- * time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or',
- * or 'not'. 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 a management group aggregated cost resource.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getByManagementGroupAsync(
- String managementGroupId, String filter) {
- return getByManagementGroupWithResponseAsync(managementGroupId, filter)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
- }
-
- /**
- * Provides the aggregate cost of a management group and all child management groups by current billing period.
- *
- * @param managementGroupId Azure Management Group ID.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a management group aggregated cost resource.
+ * @return a management group aggregated cost resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByManagementGroupAsync(String managementGroupId) {
final String filter = null;
return getByManagementGroupWithResponseAsync(managementGroupId, filter)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
* Provides the aggregate cost of a management group and all child management groups by current billing period.
*
* @param managementGroupId Azure Management Group ID.
+ * @param filter May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (Utc
+ * time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or',
+ * or 'not'. 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 a management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ManagementGroupAggregatedCostResultInner getByManagementGroup(String managementGroupId) {
- final String filter = null;
- return getByManagementGroupAsync(managementGroupId, filter).block();
+ public Response getByManagementGroupWithResponse(
+ String managementGroupId, String filter, Context context) {
+ return getByManagementGroupWithResponseAsync(managementGroupId, filter, context).block();
}
/**
* Provides the aggregate cost of a management group and all child management groups by current billing period.
*
* @param managementGroupId Azure Management Group ID.
- * @param filter May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (Utc
- * time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or',
- * or 'not'. 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 a management group aggregated cost resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByManagementGroupWithResponse(
- String managementGroupId, String filter, Context context) {
- return getByManagementGroupWithResponseAsync(managementGroupId, filter, context).block();
+ public ManagementGroupAggregatedCostResultInner getByManagementGroup(String managementGroupId) {
+ final String filter = null;
+ return getByManagementGroupWithResponse(managementGroupId, filter, Context.NONE).getValue();
}
/**
@@ -247,7 +209,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>
@@ -266,6 +229,7 @@ public Response getByManagementGroupWi
return Mono
.error(new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."));
}
+ final String apiVersion = "2021-10-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -275,7 +239,7 @@ public Response getByManagementGroupWi
this.client.getEndpoint(),
managementGroupId,
billingPeriodName,
- this.client.getApiVersion(),
+ apiVersion,
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -290,7 +254,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>
@@ -310,16 +275,12 @@ public Response getByManagementGroupWi
return Mono
.error(new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."));
}
+ final String apiVersion = "2021-10-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.getForBillingPeriodByManagementGroup(
- this.client.getEndpoint(),
- managementGroupId,
- billingPeriodName,
- this.client.getApiVersion(),
- accept,
- context);
+ this.client.getEndpoint(), managementGroupId, billingPeriodName, apiVersion, accept, context);
}
/**
@@ -330,20 +291,13 @@ public Response getByManagementGroupWi
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a management group aggregated cost resource.
+ * @return a management group aggregated cost resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getForBillingPeriodByManagementGroupAsync(
String managementGroupId, String billingPeriodName) {
return getForBillingPeriodByManagementGroupWithResponseAsync(managementGroupId, billingPeriodName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -351,15 +305,17 @@ private Mono getForBillingPeriodByMana
*
* @param managementGroupId Azure Management Group ID.
* @param billingPeriodName Billing Period Name.
+ * @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 a management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ManagementGroupAggregatedCostResultInner getForBillingPeriodByManagementGroup(
- String managementGroupId, String billingPeriodName) {
- return getForBillingPeriodByManagementGroupAsync(managementGroupId, billingPeriodName).block();
+ public Response getForBillingPeriodByManagementGroupWithResponse(
+ String managementGroupId, String billingPeriodName, Context context) {
+ return getForBillingPeriodByManagementGroupWithResponseAsync(managementGroupId, billingPeriodName, context)
+ .block();
}
/**
@@ -367,16 +323,15 @@ public ManagementGroupAggregatedCostResultInner getForBillingPeriodByManagementG
*
* @param managementGroupId Azure Management Group ID.
* @param billingPeriodName Billing Period Name.
- * @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 a management group aggregated cost resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getForBillingPeriodByManagementGroupWithResponse(
- String managementGroupId, String billingPeriodName, Context context) {
- return getForBillingPeriodByManagementGroupWithResponseAsync(managementGroupId, billingPeriodName, context)
- .block();
+ public ManagementGroupAggregatedCostResultInner getForBillingPeriodByManagementGroup(
+ String managementGroupId, String billingPeriodName) {
+ return getForBillingPeriodByManagementGroupWithResponse(managementGroupId, billingPeriodName, Context.NONE)
+ .getValue();
}
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsImpl.java
index 946543806553..24c0cc78411a 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;
@@ -27,15 +26,6 @@ public AggregatedCostsImpl(
this.serviceManager = serviceManager;
}
- public ManagementGroupAggregatedCostResult getByManagementGroup(String managementGroupId) {
- ManagementGroupAggregatedCostResultInner inner = this.serviceClient().getByManagementGroup(managementGroupId);
- if (inner != null) {
- return new ManagementGroupAggregatedCostResultImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getByManagementGroupWithResponse(
String managementGroupId, String filter, Context context) {
Response inner =
@@ -51,10 +41,8 @@ public Response getByManagementGroupWithRes
}
}
- public ManagementGroupAggregatedCostResult getForBillingPeriodByManagementGroup(
- String managementGroupId, String billingPeriodName) {
- ManagementGroupAggregatedCostResultInner inner =
- this.serviceClient().getForBillingPeriodByManagementGroup(managementGroupId, billingPeriodName);
+ public ManagementGroupAggregatedCostResult getByManagementGroup(String managementGroupId) {
+ ManagementGroupAggregatedCostResultInner inner = this.serviceClient().getByManagementGroup(managementGroupId);
if (inner != null) {
return new ManagementGroupAggregatedCostResultImpl(inner, this.manager());
} else {
@@ -79,6 +67,17 @@ public Response getForBillingPeriodByManage
}
}
+ public ManagementGroupAggregatedCostResult getForBillingPeriodByManagementGroup(
+ String managementGroupId, String billingPeriodName) {
+ ManagementGroupAggregatedCostResultInner inner =
+ this.serviceClient().getForBillingPeriodByManagementGroup(managementGroupId, billingPeriodName);
+ if (inner != null) {
+ return new ManagementGroupAggregatedCostResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
private AggregatedCostsClient serviceClient() {
return this.innerClient;
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesClientImpl.java
index 142543f3d1a7..224d0033e093 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;
@@ -52,7 +49,7 @@ public final class BalancesClientImpl implements BalancesClient {
*/
@Host("{$host}")
@ServiceInterface(name = "ConsumptionManagemen")
- private interface BalancesService {
+ public interface BalancesService {
@Headers({"Content-Type: application/json"})
@Get("/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/balances")
@ExpectedResponses({200})
@@ -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) {
@@ -101,13 +99,13 @@ private Mono> getByBillingAccountWithResponseAsync(String
return Mono
.error(new IllegalArgumentException("Parameter billingAccountId is required and cannot be null."));
}
+ final String apiVersion = "2021-10-01";
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
- .getByBillingAccount(
- this.client.getEndpoint(), this.client.getApiVersion(), billingAccountId, accept, context))
+ .getByBillingAccount(this.client.getEndpoint(), apiVersion, billingAccountId, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -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(
@@ -135,11 +134,10 @@ private Mono> getByBillingAccountWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter billingAccountId is required and cannot be null."));
}
+ final String apiVersion = "2021-10-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .getByBillingAccount(
- this.client.getEndpoint(), this.client.getApiVersion(), billingAccountId, accept, context);
+ return service.getByBillingAccount(this.client.getEndpoint(), apiVersion, billingAccountId, accept, context);
}
/**
@@ -150,19 +148,11 @@ private Mono> getByBillingAccountWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the balances for a scope by billingAccountId.
+ * @return the balances for a scope by billingAccountId on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByBillingAccountAsync(String billingAccountId) {
- return getByBillingAccountWithResponseAsync(billingAccountId)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ return getByBillingAccountWithResponseAsync(billingAccountId).flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -170,14 +160,15 @@ private Mono getByBillingAccountAsync(String billingAccountId) {
* later.
*
* @param billingAccountId BillingAccount ID.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @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 BalanceInner getByBillingAccount(String billingAccountId) {
- return getByBillingAccountAsync(billingAccountId).block();
+ public Response getByBillingAccountWithResponse(String billingAccountId, Context context) {
+ return getByBillingAccountWithResponseAsync(billingAccountId, context).block();
}
/**
@@ -185,15 +176,14 @@ public BalanceInner getByBillingAccount(String billingAccountId) {
* later.
*
* @param billingAccountId BillingAccount ID.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the balances for a scope by billingAccountId.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByBillingAccountWithResponse(String billingAccountId, Context context) {
- return getByBillingAccountWithResponseAsync(billingAccountId, context).block();
+ public BalanceInner getByBillingAccount(String billingAccountId) {
+ return getByBillingAccountWithResponse(billingAccountId, Context.NONE).getValue();
}
/**
@@ -205,7 +195,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(
@@ -224,6 +215,7 @@ private Mono> getForBillingPeriodByBillingAccountWithResp
return Mono
.error(new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."));
}
+ final String apiVersion = "2021-10-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -231,7 +223,7 @@ private Mono> getForBillingPeriodByBillingAccountWithResp
service
.getForBillingPeriodByBillingAccount(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
billingAccountId,
billingPeriodName,
accept,
@@ -249,7 +241,8 @@ private Mono> getForBillingPeriodByBillingAccountWithResp
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the balances for a scope by billing period and billingAccountId.
+ * @return the balances for a scope by billing period and billingAccountId along with {@link Response} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getForBillingPeriodByBillingAccountWithResponseAsync(
@@ -268,16 +261,12 @@ private Mono> getForBillingPeriodByBillingAccountWithResp
return Mono
.error(new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."));
}
+ final String apiVersion = "2021-10-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.getForBillingPeriodByBillingAccount(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- billingAccountId,
- billingPeriodName,
- accept,
- context);
+ this.client.getEndpoint(), apiVersion, billingAccountId, billingPeriodName, accept, context);
}
/**
@@ -289,20 +278,13 @@ private Mono> getForBillingPeriodByBillingAccountWithResp
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the balances for a scope by billing period and billingAccountId.
+ * @return the balances for a scope by billing period and billingAccountId on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getForBillingPeriodByBillingAccountAsync(
String billingAccountId, String billingPeriodName) {
return getForBillingPeriodByBillingAccountWithResponseAsync(billingAccountId, billingPeriodName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -311,14 +293,17 @@ private Mono getForBillingPeriodByBillingAccountAsync(
*
* @param billingAccountId BillingAccount ID.
* @param billingPeriodName Billing Period Name.
+ * @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 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 BalanceInner getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName) {
- return getForBillingPeriodByBillingAccountAsync(billingAccountId, billingPeriodName).block();
+ public Response getForBillingPeriodByBillingAccountWithResponse(
+ String billingAccountId, String billingPeriodName, Context context) {
+ return getForBillingPeriodByBillingAccountWithResponseAsync(billingAccountId, billingPeriodName, context)
+ .block();
}
/**
@@ -327,16 +312,14 @@ public BalanceInner getForBillingPeriodByBillingAccount(String billingAccountId,
*
* @param billingAccountId BillingAccount ID.
* @param billingPeriodName Billing Period Name.
- * @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 the balances for a scope by billing period and billingAccountId.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getForBillingPeriodByBillingAccountWithResponse(
- String billingAccountId, String billingPeriodName, Context context) {
- return getForBillingPeriodByBillingAccountWithResponseAsync(billingAccountId, billingPeriodName, context)
- .block();
+ public BalanceInner getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName) {
+ return getForBillingPeriodByBillingAccountWithResponse(billingAccountId, billingPeriodName, Context.NONE)
+ .getValue();
}
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesImpl.java
index e1652cddc7ca..f106b96986d7 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;
@@ -27,15 +26,6 @@ public BalancesImpl(
this.serviceManager = serviceManager;
}
- public Balance getByBillingAccount(String billingAccountId) {
- BalanceInner inner = this.serviceClient().getByBillingAccount(billingAccountId);
- if (inner != null) {
- return new BalanceImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getByBillingAccountWithResponse(String billingAccountId, Context context) {
Response inner = this.serviceClient().getByBillingAccountWithResponse(billingAccountId, context);
if (inner != null) {
@@ -49,9 +39,8 @@ public Response getByBillingAccountWithResponse(String billingAccountId
}
}
- public Balance getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName) {
- BalanceInner inner =
- this.serviceClient().getForBillingPeriodByBillingAccount(billingAccountId, billingPeriodName);
+ public Balance getByBillingAccount(String billingAccountId) {
+ BalanceInner inner = this.serviceClient().getByBillingAccount(billingAccountId);
if (inner != null) {
return new BalanceImpl(inner, this.manager());
} else {
@@ -76,6 +65,16 @@ public Response getForBillingPeriodByBillingAccountWithResponse(
}
}
+ public Balance getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName) {
+ BalanceInner inner =
+ this.serviceClient().getForBillingPeriodByBillingAccount(billingAccountId, billingPeriodName);
+ if (inner != null) {
+ return new BalanceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
private BalancesClient serviceClient() {
return this.innerClient;
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsClientImpl.java
index d1175bb8bab1..6111069bc1a9 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;
@@ -60,7 +57,7 @@ public final class BudgetsClientImpl implements BudgetsClient {
*/
@Host("{$host}")
@ServiceInterface(name = "ConsumptionManagemen")
- private interface BudgetsService {
+ public interface BudgetsService {
@Headers({"Content-Type: application/json"})
@Get("/{scope}/providers/Microsoft.Consumption/budgets")
@ExpectedResponses({200})
@@ -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) {
@@ -151,10 +148,10 @@ private Mono> listSinglePageAsync(String scope) {
if (scope == null) {
return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
}
+ final String apiVersion = "2021-10-01";
final String accept = "application/json";
return FluxUtil
- .withContext(
- context -> service.list(this.client.getEndpoint(), scope, this.client.getApiVersion(), accept, context))
+ .withContext(context -> service.list(this.client.getEndpoint(), scope, apiVersion, accept, context))
.>map(
res ->
new PagedResponseBase<>(
@@ -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) {
@@ -199,10 +196,11 @@ private Mono> listSinglePageAsync(String scope, Conte
if (scope == null) {
return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
}
+ final String apiVersion = "2021-10-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .list(this.client.getEndpoint(), scope, this.client.getApiVersion(), accept, context)
+ .list(this.client.getEndpoint(), scope, apiVersion, accept, context)
.map(
res ->
new PagedResponseBase<>(
@@ -232,7 +230,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 +256,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 +282,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 +308,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 +334,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) {
@@ -352,13 +351,11 @@ private Mono> getWithResponseAsync(String scope, String bu
if (budgetName == null) {
return Mono.error(new IllegalArgumentException("Parameter budgetName is required and cannot be null."));
}
+ final String apiVersion = "2021-10-01";
final String accept = "application/json";
return FluxUtil
.withContext(
- context ->
- service
- .get(
- this.client.getEndpoint(), scope, this.client.getApiVersion(), budgetName, accept, context))
+ context -> service.get(this.client.getEndpoint(), scope, apiVersion, budgetName, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -382,7 +379,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) {
@@ -398,9 +396,10 @@ private Mono> getWithResponseAsync(String scope, String bu
if (budgetName == null) {
return Mono.error(new IllegalArgumentException("Parameter budgetName is required and cannot be null."));
}
+ final String apiVersion = "2021-10-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), scope, this.client.getApiVersion(), budgetName, accept, context);
+ return service.get(this.client.getEndpoint(), scope, apiVersion, budgetName, accept, context);
}
/**
@@ -422,19 +421,11 @@ private Mono> getWithResponseAsync(String scope, String bu
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the budget for the scope by budget name.
+ * @return the budget for the scope by budget name on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getAsync(String scope, String budgetName) {
- return getWithResponseAsync(scope, budgetName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ return getWithResponseAsync(scope, budgetName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -453,14 +444,15 @@ private Mono getAsync(String scope, String budgetName) {
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
+ * @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 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 BudgetInner get(String scope, String budgetName) {
- return getAsync(scope, budgetName).block();
+ public Response getWithResponse(String scope, String budgetName, Context context) {
+ return getWithResponseAsync(scope, budgetName, context).block();
}
/**
@@ -479,15 +471,14 @@ public BudgetInner get(String scope, String budgetName) {
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
- * @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 the budget for the scope by budget name.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(String scope, String budgetName, Context context) {
- return getWithResponseAsync(scope, budgetName, context).block();
+ public BudgetInner get(String scope, String budgetName) {
+ return getWithResponse(scope, budgetName, Context.NONE).getValue();
}
/**
@@ -512,7 +503,7 @@ public Response getWithResponse(String scope, String budgetName, Co
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a budget resource.
+ * @return a budget resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createOrUpdateWithResponseAsync(
@@ -534,19 +525,14 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
+ final String apiVersion = "2021-10-01";
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
.createOrUpdate(
- this.client.getEndpoint(),
- scope,
- this.client.getApiVersion(),
- budgetName,
- parameters,
- accept,
- context))
+ this.client.getEndpoint(), scope, apiVersion, budgetName, parameters, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -573,7 +559,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(
@@ -595,11 +581,11 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
+ final String apiVersion = "2021-10-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .createOrUpdate(
- this.client.getEndpoint(), scope, this.client.getApiVersion(), budgetName, parameters, accept, context);
+ .createOrUpdate(this.client.getEndpoint(), scope, apiVersion, budgetName, parameters, accept, context);
}
/**
@@ -624,19 +610,12 @@ private Mono> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a budget resource.
+ * @return a budget resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(String scope, String budgetName, BudgetInner parameters) {
return createOrUpdateWithResponseAsync(scope, budgetName, parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -658,14 +637,16 @@ private Mono createOrUpdateAsync(String scope, String budgetName, B
* invoiceSection scope.
* @param budgetName Budget Name.
* @param parameters Parameters supplied to the Create Budget operation.
+ * @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 a budget resource.
+ * @return a budget resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public BudgetInner createOrUpdate(String scope, String budgetName, BudgetInner parameters) {
- return createOrUpdateAsync(scope, budgetName, parameters).block();
+ public Response createOrUpdateWithResponse(
+ String scope, String budgetName, BudgetInner parameters, Context context) {
+ return createOrUpdateWithResponseAsync(scope, budgetName, parameters, context).block();
}
/**
@@ -687,16 +668,14 @@ public BudgetInner createOrUpdate(String scope, String budgetName, BudgetInner p
* invoiceSection scope.
* @param budgetName Budget Name.
* @param parameters Parameters supplied to the Create Budget operation.
- * @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 a budget resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response createOrUpdateWithResponse(
- String scope, String budgetName, BudgetInner parameters, Context context) {
- return createOrUpdateWithResponseAsync(scope, budgetName, parameters, context).block();
+ public BudgetInner createOrUpdate(String scope, String budgetName, BudgetInner parameters) {
+ return createOrUpdateWithResponse(scope, budgetName, parameters, Context.NONE).getValue();
}
/**
@@ -718,7 +697,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) {
@@ -734,13 +713,11 @@ private Mono> deleteWithResponseAsync(String scope, String budget
if (budgetName == null) {
return Mono.error(new IllegalArgumentException("Parameter budgetName is required and cannot be null."));
}
+ final String apiVersion = "2021-10-01";
final String accept = "application/json";
return FluxUtil
.withContext(
- context ->
- service
- .delete(
- this.client.getEndpoint(), scope, this.client.getApiVersion(), budgetName, accept, context))
+ context -> service.delete(this.client.getEndpoint(), scope, apiVersion, budgetName, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -764,7 +741,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) {
@@ -780,10 +757,10 @@ private Mono> deleteWithResponseAsync(String scope, String budget
if (budgetName == null) {
return Mono.error(new IllegalArgumentException("Parameter budgetName is required and cannot be null."));
}
+ final String apiVersion = "2021-10-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .delete(this.client.getEndpoint(), scope, this.client.getApiVersion(), budgetName, accept, context);
+ return service.delete(this.client.getEndpoint(), scope, apiVersion, budgetName, accept, context);
}
/**
@@ -805,11 +782,11 @@ private Mono> deleteWithResponseAsync(String scope, String budget
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String scope, String budgetName) {
- return deleteWithResponseAsync(scope, budgetName).flatMap((Response res) -> Mono.empty());
+ return deleteWithResponseAsync(scope, budgetName).flatMap(ignored -> Mono.empty());
}
/**
@@ -828,13 +805,15 @@ private Mono deleteAsync(String scope, String budgetName) {
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
+ * @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 the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String scope, String budgetName) {
- deleteAsync(scope, budgetName).block();
+ public Response deleteWithResponse(String scope, String budgetName, Context context) {
+ return deleteWithResponseAsync(scope, budgetName, context).block();
}
/**
@@ -853,25 +832,24 @@ public void delete(String scope, String budgetName) {
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
- * @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 the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteWithResponse(String scope, String budgetName, Context context) {
- return deleteWithResponseAsync(scope, budgetName, context).block();
+ public void delete(String scope, String budgetName) {
+ deleteWithResponse(scope, budgetName, Context.NONE);
}
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * 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 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) {
@@ -902,12 +880,13 @@ private Mono> listNextSinglePageAsync(String nextLink
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * 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 budgets.
+ * @return result of listing budgets along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink, Context context) {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsImpl.java
index 533b9307c644..7fbede8d3d93 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;
@@ -38,15 +37,6 @@ public PagedIterable list(String scope, Context context) {
return Utils.mapPage(inner, inner1 -> new BudgetImpl(inner1, this.manager()));
}
- public Budget get(String scope, String budgetName) {
- BudgetInner inner = this.serviceClient().get(scope, budgetName);
- if (inner != null) {
- return new BudgetImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getWithResponse(String scope, String budgetName, Context context) {
Response inner = this.serviceClient().getWithResponse(scope, budgetName, context);
if (inner != null) {
@@ -60,21 +50,30 @@ public Response getWithResponse(String scope, String budgetName, Context
}
}
- public void deleteByResourceGroup(String scope, String budgetName) {
- this.serviceClient().delete(scope, budgetName);
+ public Budget get(String scope, String budgetName) {
+ BudgetInner inner = this.serviceClient().get(scope, budgetName);
+ if (inner != null) {
+ return new BudgetImpl(inner, this.manager());
+ } else {
+ return null;
+ }
}
- public Response deleteWithResponse(String scope, String budgetName, Context context) {
+ public Response deleteByResourceGroupWithResponse(String scope, String budgetName, Context context) {
return this.serviceClient().deleteWithResponse(scope, budgetName, context);
}
+ public void deleteByResourceGroup(String scope, String budgetName) {
+ this.serviceClient().delete(scope, budgetName);
+ }
+
public Budget getById(String id) {
String scope =
Utils
.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,12 +131,12 @@ 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)));
}
- this.deleteWithResponse(scope, budgetName, Context.NONE);
+ this.deleteByResourceGroupWithResponse(scope, budgetName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
@@ -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,12 +155,12 @@ 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)));
}
- return this.deleteWithResponse(scope, budgetName, context);
+ return this.deleteByResourceGroupWithResponse(scope, budgetName, context);
}
private BudgetsClient serviceClient() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesClientImpl.java
index 7a1bc33418ff..b3c88df8ce4d 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;
@@ -52,7 +49,7 @@ public final class ChargesClientImpl implements ChargesClient {
*/
@Host("{$host}")
@ServiceInterface(name = "ConsumptionManagemen")
- private interface ChargesService {
+ public interface ChargesService {
@Headers({"Content-Type: application/json"})
@Get("/{scope}/providers/Microsoft.Consumption/charges")
@ExpectedResponses({200})
@@ -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(
@@ -113,6 +110,7 @@ private Mono> listWithResponseAsync(
if (scope == null) {
return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
}
+ final String apiVersion = "2021-10-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -121,7 +119,7 @@ private Mono> listWithResponseAsync(
.list(
this.client.getEndpoint(),
scope,
- this.client.getApiVersion(),
+ apiVersion,
startDate,
endDate,
filter,
@@ -162,7 +160,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(
@@ -176,65 +174,11 @@ private Mono> listWithResponseAsync(
if (scope == null) {
return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
}
+ final String apiVersion = "2021-10-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .list(
- this.client.getEndpoint(),
- scope,
- this.client.getApiVersion(),
- startDate,
- endDate,
- filter,
- apply,
- accept,
- context);
- }
-
- /**
- * Lists the charges based for the defined scope.
- *
- * @param scope The scope associated with charges operations. This includes
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period to the
- * scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing
- * period at department scope use
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
- * Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}'
- * for billingAccount scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
- * for invoiceSection scope, and
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
- * partners.
- * @param startDate Start date.
- * @param endDate End date.
- * @param filter May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time).
- * The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or
- * 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
- * @param apply May be used to group charges for billingAccount scope by properties/billingProfileId,
- * properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for billingProfile scope by
- * properties/invoiceSectionId.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono listAsync(
- String scope, String startDate, String endDate, String filter, String apply) {
- return listWithResponseAsync(scope, startDate, endDate, filter, apply)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .list(this.client.getEndpoint(), scope, apiVersion, startDate, endDate, filter, apply, accept, context);
}
/**
@@ -259,7 +203,7 @@ private Mono listAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing charge summary.
+ * @return result of listing charge summary on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono listAsync(String scope) {
@@ -268,14 +212,7 @@ private Mono listAsync(String scope) {
final String filter = null;
final String apply = null;
return listWithResponseAsync(scope, startDate, endDate, filter, apply)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -297,18 +234,24 @@ private Mono listAsync(String scope) {
* for invoiceSection scope, and
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
* partners.
+ * @param startDate Start date.
+ * @param endDate End date.
+ * @param filter May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time).
+ * The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or
+ * 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
+ * @param apply May be used to group charges for billingAccount scope by properties/billingProfileId,
+ * properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for billingProfile scope by
+ * properties/invoiceSectionId.
+ * @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 charge summary.
+ * @return result of listing charge summary along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ChargesListResultInner list(String scope) {
- final String startDate = null;
- final String endDate = null;
- final String filter = null;
- final String apply = null;
- return listAsync(scope, startDate, endDate, filter, apply).block();
+ public Response listWithResponse(
+ String scope, String startDate, String endDate, String filter, String apply, Context context) {
+ return listWithResponseAsync(scope, startDate, endDate, filter, apply, context).block();
}
/**
@@ -330,23 +273,17 @@ public ChargesListResultInner list(String scope) {
* for invoiceSection scope, and
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
* partners.
- * @param startDate Start date.
- * @param endDate End date.
- * @param filter May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time).
- * The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or
- * 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
- * @param apply May be used to group charges for billingAccount scope by properties/billingProfileId,
- * properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for billingProfile scope by
- * properties/invoiceSectionId.
- * @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 charge summary.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response listWithResponse(
- String scope, String startDate, String endDate, String filter, String apply, Context context) {
- return listWithResponseAsync(scope, startDate, endDate, filter, apply, context).block();
+ public ChargesListResultInner list(String scope) {
+ final String startDate = null;
+ final String endDate = null;
+ final String filter = null;
+ final String apply = null;
+ return listWithResponse(scope, startDate, endDate, filter, apply, Context.NONE).getValue();
}
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesImpl.java
index f698da520154..ac7878938b31 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;
@@ -27,15 +26,6 @@ public ChargesImpl(
this.serviceManager = serviceManager;
}
- public ChargesListResult list(String scope) {
- ChargesListResultInner inner = this.serviceClient().list(scope);
- if (inner != null) {
- return new ChargesListResultImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response listWithResponse(
String scope, String startDate, String endDate, String filter, String apply, Context context) {
Response inner =
@@ -51,6 +41,15 @@ public Response