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;
}
@@ -234,15 +265,13 @@ public ConsumptionManager authenticate(TokenCredential credential, AzureProfile
Objects.requireNonNull(profile, "'profile' cannot be null.");
StringBuilder userAgentBuilder = new StringBuilder();
- userAgentBuilder
- .append("azsdk-java")
+ userAgentBuilder.append("azsdk-java")
.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(" (")
+ userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
.append("; ")
.append(Configuration.getGlobalConfiguration().get("os.name"))
@@ -257,41 +286,40 @@ 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(
- this
- .policies
- .stream()
- .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
- .collect(Collectors.toList()));
+ policies.addAll(this.policies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
- policies
- .addAll(
- this
- .policies
- .stream()
- .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
- .collect(Collectors.toList()));
+ policies.addAll(this.policies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
- HttpPipeline httpPipeline =
- new HttpPipelineBuilder()
- .httpClient(httpClient)
- .policies(policies.toArray(new HttpPipelinePolicy[0]))
- .build();
+ HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
return new ConsumptionManager(httpPipeline, profile, defaultPollInterval);
}
}
- /** @return Resource collection API of UsageDetails. */
+ /**
+ * Gets the resource collection API of UsageDetails.
+ *
+ * @return Resource collection API of UsageDetails.
+ */
public UsageDetails usageDetails() {
if (this.usageDetails == null) {
this.usageDetails = new UsageDetailsImpl(clientObject.getUsageDetails(), this);
@@ -299,7 +327,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 +339,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 +351,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 +363,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 +375,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 +387,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 +399,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,34 +411,50 @@ 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 =
- new ReservationRecommendationsImpl(clientObject.getReservationRecommendations(), this);
+ this.reservationRecommendations
+ = new ReservationRecommendationsImpl(clientObject.getReservationRecommendations(), this);
}
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 =
- new ReservationRecommendationDetailsImpl(clientObject.getReservationRecommendationDetails(), this);
+ this.reservationRecommendationDetails
+ = new ReservationRecommendationDetailsImpl(clientObject.getReservationRecommendationDetails(), this);
}
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 =
- new ReservationTransactionsImpl(clientObject.getReservationTransactions(), this);
+ this.reservationTransactions
+ = new ReservationTransactionsImpl(clientObject.getReservationTransactions(), this);
}
return reservationTransactions;
}
- /** @return Resource collection API of PriceSheets. */
+ /**
+ * Gets the resource collection API of PriceSheets.
+ *
+ * @return Resource collection API of PriceSheets.
+ */
public PriceSheets priceSheets() {
if (this.priceSheets == null) {
this.priceSheets = new PriceSheetsImpl(clientObject.getPriceSheets(), this);
@@ -390,7 +462,11 @@ public PriceSheets priceSheets() {
return priceSheets;
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
@@ -398,7 +474,11 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of AggregatedCosts. */
+ /**
+ * Gets the resource collection API of AggregatedCosts.
+ *
+ * @return Resource collection API of AggregatedCosts.
+ */
public AggregatedCosts aggregatedCosts() {
if (this.aggregatedCosts == null) {
this.aggregatedCosts = new AggregatedCostsImpl(clientObject.getAggregatedCosts(), this);
@@ -406,7 +486,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 +498,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 +510,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);
@@ -431,8 +523,10 @@ public Credits credits() {
}
/**
- * @return Wrapped service client ConsumptionManagementClient providing direct access to the underlying
- * auto-generated API implementation, based on Azure REST API.
+ * Gets wrapped service client ConsumptionManagementClient providing direct access to the underlying auto-generated
+ * API implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client ConsumptionManagementClient.
*/
public ConsumptionManagementClient serviceClient() {
return this.clientObject;
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..6bf61ca51955 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
@@ -10,63 +10,65 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.ManagementGroupAggregatedCostResultInner;
-/** An instance of this class provides access to all the operations defined in AggregatedCostsClient. */
+/**
+ * An instance of this class provides access to all the operations defined in AggregatedCostsClient.
+ */
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..0e8cc73c081c 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
@@ -10,62 +10,64 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.BalanceInner;
-/** An instance of this class provides access to all the operations defined in BalancesClient. */
+/**
+ * An instance of this class provides access to all the operations defined in BalancesClient.
+ */
public interface BalancesClient {
/**
* 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.
+ * @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
* for May 1, 2014 or later.
- *
+ *
* @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
* for May 1, 2014 or later.
- *
+ *
* @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..2d81f64659bc 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
@@ -11,205 +11,199 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.BudgetInner;
-/** An instance of this class provides access to all the operations defined in BudgetsClient. */
+/**
+ * An instance of this class provides access to all the operations defined in BudgetsClient.
+ */
public interface BudgetsClient {
/**
* Lists all budgets for the defined scope.
- *
+ *
* @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
+ * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
+ * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
+ * Management Group scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
+ * billingProfile scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * invoiceSection scope.
* @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);
/**
* Lists all budgets for the defined scope.
- *
+ *
* @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
+ * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
+ * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
+ * Management Group scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
+ * billingProfile scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * invoiceSection 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 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);
/**
* Gets the budget for the scope by budget name.
- *
+ *
* @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
+ * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
+ * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
+ * Management Group scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
+ * billingProfile scope,
+ * '/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.
- *
+ *
* @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
+ * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
+ * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
+ * Management Group scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
+ * billingProfile scope,
+ * '/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
* concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put
* operation.
- *
+ *
* @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
+ * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
+ * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
+ * Management Group scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
+ * billingProfile scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * 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
* concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put
* operation.
- *
+ *
* @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
+ * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
+ * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
+ * Management Group scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
+ * billingProfile scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * 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.
- *
+ *
* @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
+ * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
+ * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
+ * Management Group scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
+ * billingProfile scope,
+ * '/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.
- *
+ *
* @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
+ * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
+ * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
+ * Management Group scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
+ * billingProfile scope,
+ * '/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..93f311441dd9 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
@@ -10,69 +10,69 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.ChargesListResultInner;
-/** An instance of this class provides access to all the operations defined in ChargesClient. */
+/**
+ * An instance of this class provides access to all the operations defined in ChargesClient.
+ */
public interface ChargesClient {
/**
* 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.
+ * '/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.
+ * @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.
- *
+ *
* @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.
- * @param context The context to associate with this operation.
+ * '/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.
* @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..9d4e04161fbf 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
@@ -7,158 +7,160 @@
import com.azure.core.http.HttpPipeline;
import java.time.Duration;
-/** The interface for ConsumptionManagementClient class. */
+/**
+ * The interface for ConsumptionManagementClient class.
+ */
public interface ConsumptionManagementClient {
/**
* Gets Azure Subscription ID.
- *
+ *
* @return the subscriptionId value.
*/
String getSubscriptionId();
/**
* Gets server parameter.
- *
+ *
* @return the endpoint value.
*/
String getEndpoint();
/**
* Gets Api Version.
- *
+ *
* @return the apiVersion value.
*/
String getApiVersion();
/**
* Gets The HTTP pipeline to send requests through.
- *
+ *
* @return the httpPipeline value.
*/
HttpPipeline getHttpPipeline();
/**
* Gets The default poll interval for long-running operation.
- *
+ *
* @return the defaultPollInterval value.
*/
Duration getDefaultPollInterval();
/**
* Gets the UsageDetailsClient object to access its operations.
- *
+ *
* @return the UsageDetailsClient object.
*/
UsageDetailsClient getUsageDetails();
/**
* Gets the MarketplacesClient object to access its operations.
- *
+ *
* @return the MarketplacesClient object.
*/
MarketplacesClient getMarketplaces();
/**
* Gets the BudgetsClient object to access its operations.
- *
+ *
* @return the BudgetsClient object.
*/
BudgetsClient getBudgets();
/**
* Gets the TagsClient object to access its operations.
- *
+ *
* @return the TagsClient object.
*/
TagsClient getTags();
/**
* Gets the ChargesClient object to access its operations.
- *
+ *
* @return the ChargesClient object.
*/
ChargesClient getCharges();
/**
* Gets the BalancesClient object to access its operations.
- *
+ *
* @return the BalancesClient object.
*/
BalancesClient getBalances();
/**
* Gets the ReservationsSummariesClient object to access its operations.
- *
+ *
* @return the ReservationsSummariesClient object.
*/
ReservationsSummariesClient getReservationsSummaries();
/**
* Gets the ReservationsDetailsClient object to access its operations.
- *
+ *
* @return the ReservationsDetailsClient object.
*/
ReservationsDetailsClient getReservationsDetails();
/**
* Gets the ReservationRecommendationsClient object to access its operations.
- *
+ *
* @return the ReservationRecommendationsClient object.
*/
ReservationRecommendationsClient getReservationRecommendations();
/**
* Gets the ReservationRecommendationDetailsClient object to access its operations.
- *
+ *
* @return the ReservationRecommendationDetailsClient object.
*/
ReservationRecommendationDetailsClient getReservationRecommendationDetails();
/**
* Gets the ReservationTransactionsClient object to access its operations.
- *
+ *
* @return the ReservationTransactionsClient object.
*/
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.
- *
+ *
* @return the AggregatedCostsClient object.
*/
AggregatedCostsClient getAggregatedCosts();
/**
* Gets the EventsOperationsClient object to access its operations.
- *
+ *
* @return the EventsOperationsClient object.
*/
EventsOperationsClient getEventsOperations();
/**
* Gets the LotsOperationsClient object to access its operations.
- *
+ *
* @return the LotsOperationsClient object.
*/
LotsOperationsClient getLotsOperations();
/**
* Gets the CreditsClient object to access its operations.
- *
+ *
* @return the CreditsClient object.
*/
CreditsClient getCredits();
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..5d7990e373e3 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
@@ -10,32 +10,34 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.CreditSummaryInner;
-/** An instance of this class provides access to all the operations defined in CreditsClient. */
+/**
+ * An instance of this class provides access to all the operations defined in CreditsClient.
+ */
public interface CreditsClient {
/**
* 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.
+ * @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..7a5b5cfb072d 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
@@ -10,12 +10,14 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.EventSummaryInner;
-/** An instance of this class provides access to all the operations defined in EventsOperationsClient. */
+/**
+ * An instance of this class provides access to all the operations defined in EventsOperationsClient.
+ */
public interface EventsOperationsClient {
/**
* Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or
* a billing profile for a given start and end date.
- *
+ *
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile ID.
* @param startDate Start date.
@@ -23,16 +25,16 @@ 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(
- String billingAccountId, String billingProfileId, String startDate, String endDate);
+ PagedIterable listByBillingProfile(String billingAccountId, String billingProfileId,
+ String startDate, String endDate);
/**
* Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or
* a billing profile for a given start and end date.
- *
+ *
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile ID.
* @param startDate Start date.
@@ -41,21 +43,21 @@ 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(
- String billingAccountId, String billingProfileId, String startDate, String endDate, Context context);
+ PagedIterable listByBillingProfile(String billingAccountId, String billingProfileId,
+ String startDate, String endDate, Context context);
/**
* Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or
* a billing profile for a given start and end date.
- *
+ *
* @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 event summary.
+ * @return result of listing event summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingAccount(String billingAccountId);
@@ -63,16 +65,16 @@ PagedIterable listByBillingProfile(
/**
* Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or
* a billing profile for a given start and end date.
- *
+ *
* @param billingAccountId BillingAccount ID.
* @param filter May be used to filter the events by lotId, lotSource etc. 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 (:).
+ * '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 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..606ef1d8020a 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
@@ -10,65 +10,99 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.LotSummaryInner;
-/** An instance of this class provides access to all the operations defined in LotsOperationsClient. */
+/**
+ * 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.
* @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.
+ * @return result of listing lot summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByBillingProfile(
- String billingAccountId, String billingProfileId, Context context);
+ 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',
- * '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 (:).
+ * '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 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..1e84c1962e60 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
@@ -10,25 +10,27 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.MarketplaceInner;
-/** An instance of this class provides access to all the operations defined in MarketplacesClient. */
+/**
+ * An instance of this class provides access to all the operations defined in MarketplacesClient.
+ */
public interface MarketplacesClient {
/**
* Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1,
* 2014 or later.
- *
+ *
* @param scope The scope associated with marketplace operations. This includes '/subscriptions/{subscriptionId}/'
- * for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
- * scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
- * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
- * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
- * subscription, billing account, department, enrollment account and ManagementGroup, 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/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
+ * for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
+ * scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
+ * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
+ * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
+ * subscription, billing account, department, enrollment account and ManagementGroup, 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/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
* @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);
@@ -36,28 +38,28 @@ public interface MarketplacesClient {
/**
* Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1,
* 2014 or later.
- *
+ *
* @param scope The scope associated with marketplace operations. This includes '/subscriptions/{subscriptionId}/'
- * for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
- * scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
- * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
- * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
- * subscription, billing account, department, enrollment account and ManagementGroup, 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/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
+ * for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
+ * scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
+ * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
+ * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
+ * subscription, billing account, department, enrollment account and ManagementGroup, 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/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
* @param filter May be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc
- * time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq',
- * 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
+ * time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq',
+ * 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
* @param top May be used to limit the number of results to the most recent N marketplaces.
* @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.
+ * 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 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 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..f3c685991cc8 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
@@ -10,26 +10,28 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.OperationInner;
-/** An instance of this class provides access to all the operations defined in OperationsClient. */
+/**
+ * An instance of this class provides access to all the operations defined in OperationsClient.
+ */
public interface OperationsClient {
/**
* Lists all of the available consumption REST API operations.
- *
+ *
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing consumption operations.
+ * @return result of listing consumption operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
/**
* Lists all of the available consumption REST API operations.
- *
+ *
* @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 consumption operations.
+ * @return result of listing consumption operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java
index 083b16f7e65c..154dc414cc31 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
@@ -7,14 +7,37 @@
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.consumption.fluent.models.OperationStatusInner;
import com.azure.resourcemanager.consumption.fluent.models.PriceSheetResultInner;
-/** An instance of this class provides access to all the operations defined in PriceSheetsClient. */
+/**
+ * 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.
- *
+ *
+ * @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.
@@ -23,27 +46,30 @@ public interface PriceSheetsClient {
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.
+ * 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.
+ * 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 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
* 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.
@@ -54,23 +80,59 @@ public interface PriceSheetsClient {
PriceSheetResultInner getByBillingPeriod(String billingPeriodName);
/**
- * 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.
- *
+ * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @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 {@link SyncPoller} for polling of the status of the long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OperationStatusInner>
+ beginDownloadByBillingAccountPeriod(String billingAccountId, String billingPeriodName);
+
+ /**
+ * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id.
+ *
+ * @param billingAccountId BillingAccount ID.
* @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
- * 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 scope by subscriptionId and billing period.
+ * @return the {@link SyncPoller} for polling of the status of the long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OperationStatusInner>
+ beginDownloadByBillingAccountPeriod(String billingAccountId, String billingPeriodName, Context context);
+
+ /**
+ * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @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 status of the long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner downloadByBillingAccountPeriod(String billingAccountId, String billingPeriodName);
+
+ /**
+ * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id.
+ *
+ * @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 status of the long running operation.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByBillingPeriodWithResponse(
- String billingPeriodName, String expand, String skiptoken, Integer top, Context context);
+ OperationStatusInner downloadByBillingAccountPeriod(String billingAccountId, String billingPeriodName,
+ Context context);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java
index 042ad2b40fdd..6143fa65e28b 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;
/**
@@ -18,48 +19,52 @@
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
- * '/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 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).
+ * Standard_DS1_v2 (for VM), Premium_SSD_Managed_Disks_P30 (for Managed Disks).
+ * @param filter Used to filter reservation recommendation details by: properties/subscriptionId can be specified
+ * for billing account and billing profile paths.
+ * @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, String filter, 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
- * '/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 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.
+ * Standard_DS1_v2 (for VM), Premium_SSD_Managed_Disks_P30 (for Managed Disks).
* @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..91e1aa4368a7 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
@@ -10,46 +10,48 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.ReservationRecommendationInner;
-/** An instance of this class provides access to all the operations defined in ReservationRecommendationsClient. */
+/**
+ * An instance of this class provides access to all the operations defined in ReservationRecommendationsClient.
+ */
public interface ReservationRecommendationsClient {
/**
* List of recommendations for purchasing reserved instances.
- *
- * @param scope 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
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope.
+ *
+ * @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
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
+ * billingProfile scope.
* @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
- * '/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 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
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
+ * billingProfile scope.
* @param filter May be used to filter reservationRecommendations by: properties/scope with allowed values
- * ['Single', 'Shared'] and default value 'Single'; properties/resourceType with allowed values
- * ['VirtualMachines', 'SQLDatabases', 'PostgreSQL', 'ManagedDisk', 'MySQL', 'RedHat', 'MariaDB', 'RedisCache',
- * 'CosmosDB', 'SqlDataWarehouse', 'SUSELinux', 'AppService', 'BlockBlob', 'AzureDataExplorer',
- * 'VMwareCloudSimple'] and default value 'VirtualMachines'; and properties/lookBackPeriod with allowed values
- * ['Last7Days', 'Last30Days', 'Last60Days'] and default value 'Last7Days'.
+ * ['Single', 'Shared'] and default value 'Single'; properties/resourceType with allowed values ['VirtualMachines',
+ * 'SQLDatabases', 'PostgreSQL', 'ManagedDisk', 'MySQL', 'RedHat', 'MariaDB', 'RedisCache', 'CosmosDB',
+ * 'SqlDataWarehouse', 'SUSELinux', 'AppService', 'BlockBlob', 'AzureDataExplorer', 'VMwareCloudSimple'] and default
+ * value 'VirtualMachines'; and properties/lookBackPeriod with allowed values ['Last7Days', 'Last30Days',
+ * 'Last60Days'] and default value 'Last7Days'.
* @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 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..4060747088e8 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
@@ -10,64 +10,90 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.ModernReservationTransactionInner;
import com.azure.resourcemanager.consumption.fluent.models.ReservationTransactionInner;
+import java.math.BigDecimal;
-/** An instance of this class provides access to all the operations defined in ReservationTransactionsClient. */
+/**
+ * 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. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the
+ * response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.
+ *
* @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. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the
+ * response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.
+ *
* @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 useMarkupIfPartner Applies mark up to the transactions if the caller is a partner.
+ * @param previewMarkupPercentage Preview markup percentage to be applied.
* @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);
+ PagedIterable list(String billingAccountId, String filter, Boolean useMarkupIfPartner,
+ BigDecimal previewMarkupPercentage, 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. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the
+ * response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.
+ *
* @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);
+ 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. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the
+ * response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.
+ *
* @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(
- String billingAccountId, String billingProfileId, String filter, Context context);
+ PagedIterable listByBillingProfile(String billingAccountId,
+ String billingProfileId, String filter, Context context);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java
index 2ffbf884bf39..fc258c8e085a 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
@@ -10,114 +10,134 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.ReservationDetailInner;
-/** An instance of this class provides access to all the operations defined in ReservationsDetailsClient. */
+/**
+ * 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 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also
+ * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges
+ * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into
+ * response size time outs.
+ *
* @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
- * filter supports 'le' and 'ge'.
+ * filter supports 'le' and 'ge'.
* @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 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also
+ * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges
+ * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into
+ * response size time outs.
+ *
* @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
- * filter supports 'le' and 'ge'.
+ * filter supports 'le' and 'ge'.
* @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 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);
+ 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 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also
+ * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges
+ * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into
+ * response size time outs.
+ *
* @param reservationOrderId Order Id of the reservation.
* @param reservationId Id of the reservation.
* @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The
- * filter supports 'le' and 'ge'.
+ * filter supports 'le' and 'ge'.
* @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);
+ 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 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also
+ * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges
+ * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into
+ * response size time outs.
+ *
* @param reservationOrderId Order Id of the reservation.
* @param reservationId Id of the reservation.
* @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The
- * filter supports 'le' and 'ge'.
+ * filter supports 'le' and 'ge'.
* @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 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);
+ PagedIterable listByReservationOrderAndReservation(String reservationOrderId,
+ String reservationId, String filter, Context context);
/**
- * Lists the reservations details for the defined scope and provided date range.
- *
- * @param scope 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).
+ * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
+ * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also
+ * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges
+ * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into
+ * response size time outs.
+ *
+ * @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.
- *
- * @param scope 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).
+ * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
+ * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also
+ * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges
+ * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into
+ * response size time outs.
+ *
+ * @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).
* @param startDate Start date. Only applicable when querying with billing profile.
* @param endDate End date. Only applicable when querying with billing profile.
* @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The
- * filter supports 'le' and 'ge'. Not applicable when querying with billing profile.
+ * filter supports 'le' and 'ge'. Not applicable when querying with billing profile.
* @param reservationId Reservation Id GUID. Only valid if reservationOrderId is also provided. Filter to a specific
- * reservation.
+ * reservation.
* @param reservationOrderId Reservation Order Id GUID. Required if reservationId is provided. Filter to a specific
- * reservation order.
+ * reservation order.
* @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 details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(
- String scope,
- String startDate,
- String endDate,
- String filter,
- String reservationId,
- String reservationOrderId,
- Context context);
+ PagedIterable list(String resourceScope, String startDate, String endDate, String filter,
+ String reservationId, String reservationOrderId, Context context);
}
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..5e0c268e4d4e 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
@@ -11,117 +11,124 @@
import com.azure.resourcemanager.consumption.fluent.models.ReservationSummaryInner;
import com.azure.resourcemanager.consumption.models.Datagrain;
-/** An instance of this class provides access to all the operations defined in ReservationsSummariesClient. */
+/**
+ * An instance of this class provides access to all the operations defined in ReservationsSummariesClient.
+ */
public interface ReservationsSummariesClient {
/**
- * Lists the reservations summaries for daily or monthly grain.
- *
+ * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of 12MB, so
+ * currently callers get 400 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 grain Can be daily or monthly.
* @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);
/**
- * Lists the reservations summaries for daily or monthly grain.
- *
+ * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of 12MB, so
+ * currently callers get 400 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 grain Can be daily or monthly.
* @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter
- * supports 'le' and 'ge'.
+ * supports 'le' and 'ge'.
* @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 summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByReservationOrder(
- String reservationOrderId, Datagrain grain, String filter, Context context);
+ PagedIterable listByReservationOrder(String reservationOrderId, Datagrain grain,
+ String filter, Context context);
/**
- * Lists the reservations summaries for daily or monthly grain.
- *
+ * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of 12MB, so
+ * currently callers get 400 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.
* @param grain Can be daily or monthly.
* @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(
- String reservationOrderId, String reservationId, Datagrain grain);
+ PagedIterable listByReservationOrderAndReservation(String reservationOrderId,
+ String reservationId, Datagrain grain);
/**
- * Lists the reservations summaries for daily or monthly grain.
- *
+ * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of 12MB, so
+ * currently callers get 400 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.
* @param grain Can be daily or monthly.
* @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter
- * supports 'le' and 'ge'.
+ * supports 'le' and 'ge'.
* @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 summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByReservationOrderAndReservation(
- String reservationOrderId, String reservationId, Datagrain grain, String filter, Context context);
+ PagedIterable listByReservationOrderAndReservation(String reservationOrderId,
+ String reservationId, Datagrain grain, String filter, Context context);
/**
- * Lists the reservations summaries for the defined scope daily or monthly grain.
- *
- * @param scope 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).
+ * Lists the reservations summaries for the defined scope daily or monthly grain. Note: ARM has a payload size limit
+ * of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call
+ * should be made with smaller date ranges.
+ *
+ * @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).
* @param grain Can be daily or monthly.
* @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
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope (modern).
+ * Lists the reservations summaries for the defined scope daily or monthly grain. Note: ARM has a payload size limit
+ * of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call
+ * should be made with smaller date ranges.
+ *
+ * @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).
* @param grain Can be daily or monthly.
* @param startDate Start date. Only applicable when querying with billing profile.
* @param endDate End date. Only applicable when querying with billing profile.
* @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter
- * supports 'le' and 'ge'. Not applicable when querying with billing profile.
+ * supports 'le' and 'ge'. Not applicable when querying with billing profile.
* @param reservationId Reservation Id GUID. Only valid if reservationOrderId is also provided. Filter to a specific
- * reservation.
+ * reservation.
* @param reservationOrderId Reservation Order Id GUID. Required if reservationId is provided. Filter to a specific
- * reservation order.
+ * reservation order.
* @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 summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(
- String scope,
- Datagrain grain,
- String startDate,
- String endDate,
- String filter,
- String reservationId,
- String reservationOrderId,
- Context context);
+ PagedIterable list(String resourceScope, Datagrain grain, String startDate, String endDate,
+ String filter, String reservationId, String reservationOrderId, Context context);
}
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..381907adfc02 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
@@ -10,44 +10,44 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.TagsResultInner;
-/** An instance of this class provides access to all the operations defined in TagsClient. */
+/**
+ * An instance of this class provides access to all the operations defined in TagsClient.
+ */
public interface TagsClient {
/**
* Get all available tag keys for the defined scope.
- *
+ *
* @param scope The scope associated with tags operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope..
+ * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
+ * scope, '/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.
- *
+ *
* @param scope The scope associated with tags operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope,
- * '/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.
+ * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
+ * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
+ * for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
+ * Management Group scope..
* @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..949d35836c6a 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
@@ -11,33 +11,40 @@
import com.azure.resourcemanager.consumption.fluent.models.UsageDetailInner;
import com.azure.resourcemanager.consumption.models.Metrictype;
-/** An instance of this class provides access to all the operations defined in UsageDetailsClient. */
+/**
+ * An instance of this class provides access to all the operations defined in UsageDetailsClient.
+ */
public interface UsageDetailsClient {
/**
* Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or
* later.
- *
+ *
+ * **Note:Microsoft will be retiring the Consumption Usage Details API at some point in the future. We do not
+ * recommend that you take a new dependency on this API. Please use the Cost Details API instead. We will notify
+ * customers once a date for retirement has been determined.For Learn more,see [Generate Cost Details Report -
+ * Create
+ * Operation](https://learn.microsoft.com/en-us/rest/api/cost-management/generate-cost-details-report/create-operation?tabs=HTTP)**.
+ *
* @param scope The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/'
- * for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
- * scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
- * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
- * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
- * subscription, billing account, department, enrollment account and management group, 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/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.
+ * for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
+ * scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
+ * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
+ * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
+ * subscription, billing account, department, enrollment account and management group, 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/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.
* @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);
@@ -45,43 +52,48 @@ public interface UsageDetailsClient {
/**
* Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or
* later.
- *
+ *
+ * **Note:Microsoft will be retiring the Consumption Usage Details API at some point in the future. We do not
+ * recommend that you take a new dependency on this API. Please use the Cost Details API instead. We will notify
+ * customers once a date for retirement has been determined.For Learn more,see [Generate Cost Details Report -
+ * Create
+ * Operation](https://learn.microsoft.com/en-us/rest/api/cost-management/generate-cost-details-report/create-operation?tabs=HTTP)**.
+ *
* @param scope The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/'
- * for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
- * scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
- * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
- * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
- * subscription, billing account, department, enrollment account and management group, 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/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.
+ * for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
+ * scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
+ * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
+ * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
+ * subscription, billing account, department, enrollment account and management group, 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/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 expand May be used to expand the properties/additionalInfo or properties/meterDetails within a list of
- * usage details. By default, these fields are not included when listing usage details.
+ * usage details. By default, these fields are not included when listing usage details.
* @param filter May be used to filter usageDetails by properties/resourceGroup, properties/resourceName,
- * properties/resourceId, properties/chargeType, properties/reservationId, properties/publisherType or tags. 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 (:). PublisherType Filter
- * accepts two values azure and marketplace and it is currently supported for Web Direct Offer Type.
+ * properties/resourceId, properties/chargeType, properties/reservationId, properties/publisherType or tags. 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 (:). PublisherType Filter accepts
+ * two values azure and marketplace and it is currently supported for Web Direct Offer Type.
* @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.
+ * 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 most recent N usageDetails.
* @param metric Allows to select different type of cost/usage records.
* @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 usage details.
+ * @return result of listing usage details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(
- String scope, String expand, String filter, String skiptoken, Integer top, Metrictype metric, Context context);
+ PagedIterable list(String scope, String expand, String filter, String skiptoken, Integer top,
+ Metrictype metric, Context context);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java
index be4d23435c3b..7cb790bb5562 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,22 +6,20 @@
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;
import java.util.List;
import java.util.Map;
-/** A balance resource. */
+/**
+ * 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,9 +39,15 @@ 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.
- *
+ *
* @return the innerProperties value.
*/
private BalanceProperties innerProperties() {
@@ -52,7 +56,7 @@ private BalanceProperties innerProperties() {
/**
* Get the etag property: The etag for the resource.
- *
+ *
* @return the etag value.
*/
public String etag() {
@@ -61,7 +65,7 @@ public String etag() {
/**
* Get the tags property: Resource tags.
- *
+ *
* @return the tags value.
*/
public Map tags() {
@@ -70,7 +74,7 @@ public Map tags() {
/**
* Get the currency property: The ISO currency in which the meter is charged, for example, USD.
- *
+ *
* @return the currency value.
*/
public String currency() {
@@ -79,7 +83,7 @@ public String currency() {
/**
* Get the beginningBalance property: The beginning balance for the billing period.
- *
+ *
* @return the beginningBalance value.
*/
public BigDecimal beginningBalance() {
@@ -89,7 +93,7 @@ public BigDecimal beginningBalance() {
/**
* Get the endingBalance property: The ending balance for the billing period (for open periods this will be updated
* daily).
- *
+ *
* @return the endingBalance value.
*/
public BigDecimal endingBalance() {
@@ -98,7 +102,7 @@ public BigDecimal endingBalance() {
/**
* Get the newPurchases property: Total new purchase amount.
- *
+ *
* @return the newPurchases value.
*/
public BigDecimal newPurchases() {
@@ -107,7 +111,7 @@ public BigDecimal newPurchases() {
/**
* Get the adjustments property: Total adjustment amount.
- *
+ *
* @return the adjustments value.
*/
public BigDecimal adjustments() {
@@ -116,7 +120,7 @@ public BigDecimal adjustments() {
/**
* Get the utilized property: Total Commitment usage.
- *
+ *
* @return the utilized value.
*/
public BigDecimal utilized() {
@@ -125,7 +129,7 @@ public BigDecimal utilized() {
/**
* Get the serviceOverage property: Overage for Azure services.
- *
+ *
* @return the serviceOverage value.
*/
public BigDecimal serviceOverage() {
@@ -134,7 +138,7 @@ public BigDecimal serviceOverage() {
/**
* Get the chargesBilledSeparately property: Charges Billed separately.
- *
+ *
* @return the chargesBilledSeparately value.
*/
public BigDecimal chargesBilledSeparately() {
@@ -143,7 +147,7 @@ public BigDecimal chargesBilledSeparately() {
/**
* Get the totalOverage property: serviceOverage + chargesBilledSeparately.
- *
+ *
* @return the totalOverage value.
*/
public BigDecimal totalOverage() {
@@ -152,7 +156,7 @@ public BigDecimal totalOverage() {
/**
* Get the totalUsage property: Azure service commitment + total Overage.
- *
+ *
* @return the totalUsage value.
*/
public BigDecimal totalUsage() {
@@ -161,7 +165,7 @@ public BigDecimal totalUsage() {
/**
* Get the azureMarketplaceServiceCharges property: Total charges for Azure Marketplace.
- *
+ *
* @return the azureMarketplaceServiceCharges value.
*/
public BigDecimal azureMarketplaceServiceCharges() {
@@ -170,7 +174,7 @@ public BigDecimal azureMarketplaceServiceCharges() {
/**
* Get the billingFrequency property: The billing frequency.
- *
+ *
* @return the billingFrequency value.
*/
public BillingFrequency billingFrequency() {
@@ -179,7 +183,7 @@ public BillingFrequency billingFrequency() {
/**
* Set the billingFrequency property: The billing frequency.
- *
+ *
* @param billingFrequency the billingFrequency value to set.
* @return the BalanceInner object itself.
*/
@@ -193,16 +197,25 @@ public BalanceInner withBillingFrequency(BillingFrequency billingFrequency) {
/**
* Get the priceHidden property: Price is hidden or not.
- *
+ *
* @return the priceHidden value.
*/
public Boolean priceHidden() {
return this.innerProperties() == null ? null : this.innerProperties().priceHidden();
}
+ /**
+ * Get the overageRefund property: Overage Refunds.
+ *
+ * @return the overageRefund value.
+ */
+ public BigDecimal overageRefund() {
+ return this.innerProperties() == null ? null : this.innerProperties().overageRefund();
+ }
+
/**
* Get the newPurchasesDetails property: List of new purchases.
- *
+ *
* @return the newPurchasesDetails value.
*/
public List newPurchasesDetails() {
@@ -211,7 +224,7 @@ public List newPurchasesDetails() {
/**
* Get the adjustmentDetails property: List of Adjustments (Promo credit, SIE credit etc.).
- *
+ *
* @return the adjustmentDetails value.
*/
public List adjustmentDetails() {
@@ -220,7 +233,7 @@ public List adjustmentDetails() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java
index f0e15ad53cf2..a30b2dd2557a 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,20 +5,18 @@
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;
-/** The properties of the balance. */
+/**
+ * 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 +30,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;
@@ -98,6 +95,12 @@ public final class BalanceProperties {
@JsonProperty(value = "priceHidden", access = JsonProperty.Access.WRITE_ONLY)
private Boolean priceHidden;
+ /*
+ * Overage Refunds
+ */
+ @JsonProperty(value = "overageRefund", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal overageRefund;
+
/*
* List of new purchases.
*/
@@ -110,9 +113,15 @@ 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.
- *
+ *
* @return the currency value.
*/
public String currency() {
@@ -121,7 +130,7 @@ public String currency() {
/**
* Get the beginningBalance property: The beginning balance for the billing period.
- *
+ *
* @return the beginningBalance value.
*/
public BigDecimal beginningBalance() {
@@ -131,7 +140,7 @@ public BigDecimal beginningBalance() {
/**
* Get the endingBalance property: The ending balance for the billing period (for open periods this will be updated
* daily).
- *
+ *
* @return the endingBalance value.
*/
public BigDecimal endingBalance() {
@@ -140,7 +149,7 @@ public BigDecimal endingBalance() {
/**
* Get the newPurchases property: Total new purchase amount.
- *
+ *
* @return the newPurchases value.
*/
public BigDecimal newPurchases() {
@@ -149,7 +158,7 @@ public BigDecimal newPurchases() {
/**
* Get the adjustments property: Total adjustment amount.
- *
+ *
* @return the adjustments value.
*/
public BigDecimal adjustments() {
@@ -158,7 +167,7 @@ public BigDecimal adjustments() {
/**
* Get the utilized property: Total Commitment usage.
- *
+ *
* @return the utilized value.
*/
public BigDecimal utilized() {
@@ -167,7 +176,7 @@ public BigDecimal utilized() {
/**
* Get the serviceOverage property: Overage for Azure services.
- *
+ *
* @return the serviceOverage value.
*/
public BigDecimal serviceOverage() {
@@ -176,7 +185,7 @@ public BigDecimal serviceOverage() {
/**
* Get the chargesBilledSeparately property: Charges Billed separately.
- *
+ *
* @return the chargesBilledSeparately value.
*/
public BigDecimal chargesBilledSeparately() {
@@ -185,7 +194,7 @@ public BigDecimal chargesBilledSeparately() {
/**
* Get the totalOverage property: serviceOverage + chargesBilledSeparately.
- *
+ *
* @return the totalOverage value.
*/
public BigDecimal totalOverage() {
@@ -194,7 +203,7 @@ public BigDecimal totalOverage() {
/**
* Get the totalUsage property: Azure service commitment + total Overage.
- *
+ *
* @return the totalUsage value.
*/
public BigDecimal totalUsage() {
@@ -203,7 +212,7 @@ public BigDecimal totalUsage() {
/**
* Get the azureMarketplaceServiceCharges property: Total charges for Azure Marketplace.
- *
+ *
* @return the azureMarketplaceServiceCharges value.
*/
public BigDecimal azureMarketplaceServiceCharges() {
@@ -212,7 +221,7 @@ public BigDecimal azureMarketplaceServiceCharges() {
/**
* Get the billingFrequency property: The billing frequency.
- *
+ *
* @return the billingFrequency value.
*/
public BillingFrequency billingFrequency() {
@@ -221,7 +230,7 @@ public BillingFrequency billingFrequency() {
/**
* Set the billingFrequency property: The billing frequency.
- *
+ *
* @param billingFrequency the billingFrequency value to set.
* @return the BalanceProperties object itself.
*/
@@ -232,16 +241,25 @@ public BalanceProperties withBillingFrequency(BillingFrequency billingFrequency)
/**
* Get the priceHidden property: Price is hidden or not.
- *
+ *
* @return the priceHidden value.
*/
public Boolean priceHidden() {
return this.priceHidden;
}
+ /**
+ * Get the overageRefund property: Overage Refunds.
+ *
+ * @return the overageRefund value.
+ */
+ public BigDecimal overageRefund() {
+ return this.overageRefund;
+ }
+
/**
* Get the newPurchasesDetails property: List of new purchases.
- *
+ *
* @return the newPurchasesDetails value.
*/
public List newPurchasesDetails() {
@@ -250,7 +268,7 @@ public List newPurchasesDetails() {
/**
* Get the adjustmentDetails property: List of Adjustments (Promo credit, SIE credit etc.).
- *
+ *
* @return the adjustmentDetails value.
*/
public List adjustmentDetails() {
@@ -259,7 +277,7 @@ public List adjustmentDetails() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetInner.java
index f8fea1a4e18b..2e1940048208 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,16 +13,15 @@
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;
-/** A budget resource. */
+/**
+ * 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,16 +29,20 @@ 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.
- *
+ *
* @return the innerProperties value.
*/
private BudgetProperties innerProperties() {
@@ -50,7 +52,7 @@ private BudgetProperties innerProperties() {
/**
* 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.
*/
public String etag() {
@@ -60,7 +62,7 @@ public String etag() {
/**
* 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.
- *
+ *
* @param etag the etag value to set.
* @return the BudgetInner object itself.
*/
@@ -71,7 +73,7 @@ public BudgetInner withEtag(String etag) {
/**
* Get the category property: The category of the budget, whether the budget tracks cost or usage.
- *
+ *
* @return the category value.
*/
public CategoryType category() {
@@ -80,7 +82,7 @@ public CategoryType category() {
/**
* Set the category property: The category of the budget, whether the budget tracks cost or usage.
- *
+ *
* @param category the category value to set.
* @return the BudgetInner object itself.
*/
@@ -94,7 +96,7 @@ public BudgetInner withCategory(CategoryType category) {
/**
* Get the amount property: The total amount of cost to track with the budget.
- *
+ *
* @return the amount value.
*/
public BigDecimal amount() {
@@ -103,7 +105,7 @@ public BigDecimal amount() {
/**
* Set the amount property: The total amount of cost to track with the budget.
- *
+ *
* @param amount the amount value to set.
* @return the BudgetInner object itself.
*/
@@ -118,7 +120,7 @@ public BudgetInner withAmount(BigDecimal amount) {
/**
* Get the timeGrain property: 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.
- *
+ *
* @return the timeGrain value.
*/
public TimeGrainType timeGrain() {
@@ -128,7 +130,7 @@ public TimeGrainType timeGrain() {
/**
* Set the timeGrain property: 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.
- *
+ *
* @param timeGrain the timeGrain value to set.
* @return the BudgetInner object itself.
*/
@@ -145,7 +147,7 @@ public BudgetInner withTimeGrain(TimeGrainType timeGrain) {
* 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.
- *
+ *
* @return the timePeriod value.
*/
public BudgetTimePeriod timePeriod() {
@@ -157,7 +159,7 @@ public BudgetTimePeriod timePeriod() {
* 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.
- *
+ *
* @param timePeriod the timePeriod value to set.
* @return the BudgetInner object itself.
*/
@@ -171,7 +173,7 @@ public BudgetInner withTimePeriod(BudgetTimePeriod timePeriod) {
/**
* Get the filter property: May be used to filter budgets by user-specified dimensions and/or tags.
- *
+ *
* @return the filter value.
*/
public BudgetFilter filter() {
@@ -180,7 +182,7 @@ public BudgetFilter filter() {
/**
* Set the filter property: May be used to filter budgets by user-specified dimensions and/or tags.
- *
+ *
* @param filter the filter value to set.
* @return the BudgetInner object itself.
*/
@@ -194,7 +196,7 @@ public BudgetInner withFilter(BudgetFilter filter) {
/**
* Get the currentSpend property: The current amount of cost which is being tracked for a budget.
- *
+ *
* @return the currentSpend value.
*/
public CurrentSpend currentSpend() {
@@ -204,7 +206,7 @@ public CurrentSpend currentSpend() {
/**
* Get the notifications property: Dictionary of notifications associated with the budget. Budget can have up to
* five notifications.
- *
+ *
* @return the notifications value.
*/
public Map notifications() {
@@ -214,7 +216,7 @@ public Map notifications() {
/**
* Set the notifications property: Dictionary of notifications associated with the budget. Budget can have up to
* five notifications.
- *
+ *
* @param notifications the notifications value to set.
* @return the BudgetInner object itself.
*/
@@ -228,7 +230,7 @@ public BudgetInner withNotifications(Map notifications) {
/**
* Get the forecastSpend property: The forecasted cost which is being tracked for a budget.
- *
+ *
* @return the forecastSpend value.
*/
public ForecastSpend forecastSpend() {
@@ -237,7 +239,7 @@ public ForecastSpend forecastSpend() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetProperties.java
index ef8131acd287..c9c90d3228f1 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,17 +13,16 @@
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;
import java.util.Map;
-/** The properties of the budget. */
+/**
+ * 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 +36,13 @@ 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 +60,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,9 +72,15 @@ 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.
- *
+ *
* @return the category value.
*/
public CategoryType category() {
@@ -91,7 +89,7 @@ public CategoryType category() {
/**
* Set the category property: The category of the budget, whether the budget tracks cost or usage.
- *
+ *
* @param category the category value to set.
* @return the BudgetProperties object itself.
*/
@@ -102,7 +100,7 @@ public BudgetProperties withCategory(CategoryType category) {
/**
* Get the amount property: The total amount of cost to track with the budget.
- *
+ *
* @return the amount value.
*/
public BigDecimal amount() {
@@ -111,7 +109,7 @@ public BigDecimal amount() {
/**
* Set the amount property: The total amount of cost to track with the budget.
- *
+ *
* @param amount the amount value to set.
* @return the BudgetProperties object itself.
*/
@@ -123,7 +121,7 @@ public BudgetProperties withAmount(BigDecimal amount) {
/**
* Get the timeGrain property: 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.
- *
+ *
* @return the timeGrain value.
*/
public TimeGrainType timeGrain() {
@@ -133,7 +131,7 @@ public TimeGrainType timeGrain() {
/**
* Set the timeGrain property: 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.
- *
+ *
* @param timeGrain the timeGrain value to set.
* @return the BudgetProperties object itself.
*/
@@ -147,7 +145,7 @@ public BudgetProperties withTimeGrain(TimeGrainType timeGrain) {
* 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.
- *
+ *
* @return the timePeriod value.
*/
public BudgetTimePeriod timePeriod() {
@@ -159,7 +157,7 @@ public BudgetTimePeriod timePeriod() {
* 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.
- *
+ *
* @param timePeriod the timePeriod value to set.
* @return the BudgetProperties object itself.
*/
@@ -170,7 +168,7 @@ public BudgetProperties withTimePeriod(BudgetTimePeriod timePeriod) {
/**
* Get the filter property: May be used to filter budgets by user-specified dimensions and/or tags.
- *
+ *
* @return the filter value.
*/
public BudgetFilter filter() {
@@ -179,7 +177,7 @@ public BudgetFilter filter() {
/**
* Set the filter property: May be used to filter budgets by user-specified dimensions and/or tags.
- *
+ *
* @param filter the filter value to set.
* @return the BudgetProperties object itself.
*/
@@ -190,7 +188,7 @@ public BudgetProperties withFilter(BudgetFilter filter) {
/**
* Get the currentSpend property: The current amount of cost which is being tracked for a budget.
- *
+ *
* @return the currentSpend value.
*/
public CurrentSpend currentSpend() {
@@ -200,7 +198,7 @@ public CurrentSpend currentSpend() {
/**
* Get the notifications property: Dictionary of notifications associated with the budget. Budget can have up to
* five notifications.
- *
+ *
* @return the notifications value.
*/
public Map notifications() {
@@ -210,7 +208,7 @@ public Map notifications() {
/**
* Set the notifications property: Dictionary of notifications associated with the budget. Budget can have up to
* five notifications.
- *
+ *
* @param notifications the notifications value to set.
* @return the BudgetProperties object itself.
*/
@@ -221,7 +219,7 @@ public BudgetProperties withNotifications(Map notification
/**
* Get the forecastSpend property: The forecasted cost which is being tracked for a budget.
- *
+ *
* @return the forecastSpend value.
*/
public ForecastSpend forecastSpend() {
@@ -230,29 +228,25 @@ public ForecastSpend forecastSpend() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (category() == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException("Missing required property category in model BudgetProperties"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property category in model BudgetProperties"));
}
if (amount() == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException("Missing required property amount in model BudgetProperties"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property amount in model BudgetProperties"));
}
if (timeGrain() == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException("Missing required property timeGrain in model BudgetProperties"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property timeGrain in model BudgetProperties"));
}
if (timePeriod() == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException("Missing required property timePeriod in model BudgetProperties"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property timePeriod in model BudgetProperties"));
} else {
timePeriod().validate();
}
@@ -263,17 +257,16 @@ public void validate() {
currentSpend().validate();
}
if (notifications() != null) {
- notifications()
- .values()
- .forEach(
- e -> {
- if (e != null) {
- e.validate();
- }
- });
+ notifications().values().forEach(e -> {
+ if (e != null) {
+ e.validate();
+ }
+ });
}
if (forecastSpend() != null) {
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..2760abd2e028 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,26 +5,30 @@
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. */
+/**
+ * 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.
- *
+ *
* @return the value value.
*/
public List value() {
@@ -33,7 +37,7 @@ public List value() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java
index 0ee648db2f11..6ef2c37c8705 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,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.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. */
+/**
+ * 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,21 +23,20 @@ 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.
+ /**
+ * Creates an instance of CreditSummaryInner class.
*/
- @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
- private Map tags;
+ public CreditSummaryInner() {
+ }
/**
* Get the innerProperties property: The properties of the credit summary.
- *
+ *
* @return the innerProperties value.
*/
private CreditSummaryProperties innerProperties() {
@@ -49,8 +44,9 @@ 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.
*/
public String etag() {
@@ -58,17 +54,20 @@ public String etag() {
}
/**
- * Get the tags property: Resource tags.
- *
- * @return the tags value.
+ * 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.
+ *
+ * @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;
}
/**
* Get the balanceSummary property: Summary of balances associated with this credit summary.
- *
+ *
* @return the balanceSummary value.
*/
public CreditBalanceSummary balanceSummary() {
@@ -77,7 +76,7 @@ public CreditBalanceSummary balanceSummary() {
/**
* Get the pendingCreditAdjustments property: Pending credit adjustments.
- *
+ *
* @return the pendingCreditAdjustments value.
*/
public Amount pendingCreditAdjustments() {
@@ -86,7 +85,7 @@ public Amount pendingCreditAdjustments() {
/**
* Get the expiredCredit property: Expired credit.
- *
+ *
* @return the expiredCredit value.
*/
public Amount expiredCredit() {
@@ -95,7 +94,7 @@ public Amount expiredCredit() {
/**
* Get the pendingEligibleCharges property: Pending eligible charges.
- *
+ *
* @return the pendingEligibleCharges value.
*/
public Amount pendingEligibleCharges() {
@@ -104,7 +103,7 @@ public Amount pendingEligibleCharges() {
/**
* Get the creditCurrency property: The credit currency.
- *
+ *
* @return the creditCurrency value.
*/
public String creditCurrency() {
@@ -113,7 +112,7 @@ public String creditCurrency() {
/**
* Get the billingCurrency property: The billing currency.
- *
+ *
* @return the billingCurrency value.
*/
public String billingCurrency() {
@@ -122,16 +121,26 @@ public String billingCurrency() {
/**
* Get the reseller property: Credit's reseller.
- *
+ *
* @return the reseller value.
*/
public Reseller reseller() {
return this.innerProperties() == null ? null : this.innerProperties().reseller();
}
+ /**
+ * Get the isEstimatedBalance property: If true, the listed details are based on an estimation and it will be
+ * subjected to change.
+ *
+ * @return the isEstimatedBalance value.
+ */
+ public Boolean isEstimatedBalance() {
+ return this.innerProperties() == null ? null : this.innerProperties().isEstimatedBalance();
+ }
+
/**
* Get the etag property: The eTag for the resource.
- *
+ *
* @return the etag value.
*/
public String etagPropertiesEtag() {
@@ -140,7 +149,7 @@ public String etagPropertiesEtag() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryProperties.java
index cbe557ebe2bb..8348d610171f 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,16 @@
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. */
+/**
+ * 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.
*/
@@ -59,15 +57,27 @@ public final class CreditSummaryProperties {
@JsonProperty(value = "reseller", access = JsonProperty.Access.WRITE_ONLY)
private Reseller reseller;
+ /*
+ * If true, the listed details are based on an estimation and it will be subjected to change.
+ */
+ @JsonProperty(value = "isEstimatedBalance", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isEstimatedBalance;
+
/*
* The eTag for the resource.
*/
@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.
- *
+ *
* @return the balanceSummary value.
*/
public CreditBalanceSummary balanceSummary() {
@@ -76,7 +86,7 @@ public CreditBalanceSummary balanceSummary() {
/**
* Get the pendingCreditAdjustments property: Pending credit adjustments.
- *
+ *
* @return the pendingCreditAdjustments value.
*/
public Amount pendingCreditAdjustments() {
@@ -85,7 +95,7 @@ public Amount pendingCreditAdjustments() {
/**
* Get the expiredCredit property: Expired credit.
- *
+ *
* @return the expiredCredit value.
*/
public Amount expiredCredit() {
@@ -94,7 +104,7 @@ public Amount expiredCredit() {
/**
* Get the pendingEligibleCharges property: Pending eligible charges.
- *
+ *
* @return the pendingEligibleCharges value.
*/
public Amount pendingEligibleCharges() {
@@ -103,7 +113,7 @@ public Amount pendingEligibleCharges() {
/**
* Get the creditCurrency property: The credit currency.
- *
+ *
* @return the creditCurrency value.
*/
public String creditCurrency() {
@@ -112,7 +122,7 @@ public String creditCurrency() {
/**
* Get the billingCurrency property: The billing currency.
- *
+ *
* @return the billingCurrency value.
*/
public String billingCurrency() {
@@ -121,16 +131,26 @@ public String billingCurrency() {
/**
* Get the reseller property: Credit's reseller.
- *
+ *
* @return the reseller value.
*/
public Reseller reseller() {
return this.reseller;
}
+ /**
+ * Get the isEstimatedBalance property: If true, the listed details are based on an estimation and it will be
+ * subjected to change.
+ *
+ * @return the isEstimatedBalance value.
+ */
+ public Boolean isEstimatedBalance() {
+ return this.isEstimatedBalance;
+ }
+
/**
* Get the etag property: The eTag for the resource.
- *
+ *
* @return the etag value.
*/
public String etag() {
@@ -139,7 +159,7 @@ public String etag() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventProperties.java
index c431a1c9e2bf..66de76800180 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,18 @@
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. */
+/**
+ * The event properties.
+ */
@Fluent
public final class EventProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(EventProperties.class);
-
/*
* The date of the event.
*/
@@ -32,39 +30,47 @@ 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;
/*
- * The balance after the event.
+ * The balance after the event, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment
*/
@JsonProperty(value = "closedBalance", access = JsonProperty.Access.WRITE_ONLY)
private Amount closedBalance;
+ /*
+ * Identifier of the billing account.
+ */
+ @JsonProperty(value = "billingAccountId", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingAccountId;
+
+ /*
+ * Name of the billing account.
+ */
+ @JsonProperty(value = "billingAccountDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingAccountDisplayName;
+
/*
* Identifies the type of the event.
*/
@@ -72,24 +78,19 @@ 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;
@@ -101,7 +102,7 @@ public final class EventProperties {
private String lotId;
/*
- * Identifies the source of the lot for which the event happened.
+ * Identifies the source of the lot for which the event happened.
*/
@JsonProperty(value = "lotSource", access = JsonProperty.Access.WRITE_ONLY)
private String lotSource;
@@ -131,15 +132,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,27 +150,38 @@ 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;
/*
- * The balance in billing currency after the event.
+ * The balance in billing currency after the event, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment
*/
@JsonProperty(value = "closedBalanceInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY)
private AmountWithExchangeRate closedBalanceInBillingCurrency;
+ /*
+ * If true, the listed details are based on an estimation and it will be subjected to change.
+ */
+ @JsonProperty(value = "isEstimatedBalance", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isEstimatedBalance;
+
/*
* The eTag for the resource.
*/
@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.
- *
+ *
* @return the transactionDate value.
*/
public OffsetDateTime transactionDate() {
@@ -180,7 +190,7 @@ public OffsetDateTime transactionDate() {
/**
* Get the description property: The description of the event.
- *
+ *
* @return the description value.
*/
public String description() {
@@ -189,7 +199,7 @@ public String description() {
/**
* Get the newCredit property: The amount of new credit or commitment for NewCredit or SettleCharges event.
- *
+ *
* @return the newCredit value.
*/
public Amount newCredit() {
@@ -199,7 +209,7 @@ public Amount newCredit() {
/**
* Get the adjustments property: The amount of balance adjustment. The property is not available for
* ConsumptionCommitment lots.
- *
+ *
* @return the adjustments value.
*/
public Amount adjustments() {
@@ -208,7 +218,7 @@ public Amount adjustments() {
/**
* Get the creditExpired property: The amount of expired credit or commitment for NewCredit or SettleCharges event.
- *
+ *
* @return the creditExpired value.
*/
public Amount creditExpired() {
@@ -217,7 +227,7 @@ public Amount creditExpired() {
/**
* Get the charges property: The amount of charges for events of type SettleCharges and PendingEligibleCharges.
- *
+ *
* @return the charges value.
*/
public Amount charges() {
@@ -225,17 +235,36 @@ public Amount charges() {
}
/**
- * Get the closedBalance property: The balance after the event.
- *
+ * Get the closedBalance property: The balance after the event, Note: This will not be returned for Contributor
+ * Organization Type in Multi-Entity consumption commitment.
+ *
* @return the closedBalance value.
*/
public Amount closedBalance() {
return this.closedBalance;
}
+ /**
+ * Get the billingAccountId property: Identifier of the billing account.
+ *
+ * @return the billingAccountId value.
+ */
+ public String billingAccountId() {
+ return this.billingAccountId;
+ }
+
+ /**
+ * Get the billingAccountDisplayName property: Name of the billing account.
+ *
+ * @return the billingAccountDisplayName value.
+ */
+ public String billingAccountDisplayName() {
+ return this.billingAccountDisplayName;
+ }
+
/**
* Get the eventType property: Identifies the type of the event.
- *
+ *
* @return the eventType value.
*/
public EventType eventType() {
@@ -244,7 +273,7 @@ public EventType eventType() {
/**
* Set the eventType property: Identifies the type of the event.
- *
+ *
* @param eventType the eventType value to set.
* @return the EventProperties object itself.
*/
@@ -256,7 +285,7 @@ public EventProperties withEventType(EventType eventType) {
/**
* Get the invoiceNumber property: The number which uniquely identifies the invoice on which the event was billed.
* This will be empty for unbilled events.
- *
+ *
* @return the invoiceNumber value.
*/
public String invoiceNumber() {
@@ -266,7 +295,7 @@ public String invoiceNumber() {
/**
* Get the billingProfileId property: The ID that uniquely identifies the billing profile for which the event
* happened. The property is only available for billing account of type MicrosoftCustomerAgreement.
- *
+ *
* @return the billingProfileId value.
*/
public String billingProfileId() {
@@ -276,7 +305,7 @@ public String billingProfileId() {
/**
* Get the billingProfileDisplayName property: The display name of the billing profile for which the event happened.
* The property is only available for billing account of type MicrosoftCustomerAgreement.
- *
+ *
* @return the billingProfileDisplayName value.
*/
public String billingProfileDisplayName() {
@@ -285,7 +314,7 @@ public String billingProfileDisplayName() {
/**
* Get the lotId property: The ID that uniquely identifies the lot for which the event happened.
- *
+ *
* @return the lotId value.
*/
public String lotId() {
@@ -294,7 +323,7 @@ public String lotId() {
/**
* Get the lotSource property: Identifies the source of the lot for which the event happened.
- *
+ *
* @return the lotSource value.
*/
public String lotSource() {
@@ -303,7 +332,7 @@ public String lotSource() {
/**
* Get the canceledCredit property: Amount of canceled credit.
- *
+ *
* @return the canceledCredit value.
*/
public Amount canceledCredit() {
@@ -312,7 +341,7 @@ public Amount canceledCredit() {
/**
* Get the creditCurrency property: The credit currency of the event.
- *
+ *
* @return the creditCurrency value.
*/
public String creditCurrency() {
@@ -321,7 +350,7 @@ public String creditCurrency() {
/**
* Get the billingCurrency property: The billing currency of the event.
- *
+ *
* @return the billingCurrency value.
*/
public String billingCurrency() {
@@ -330,7 +359,7 @@ public String billingCurrency() {
/**
* Get the reseller property: The reseller of the event.
- *
+ *
* @return the reseller value.
*/
public Reseller reseller() {
@@ -340,7 +369,7 @@ public Reseller reseller() {
/**
* Get the creditExpiredInBillingCurrency property: The amount of expired credit or commitment for NewCredit or
* SettleCharges event in billing currency.
- *
+ *
* @return the creditExpiredInBillingCurrency value.
*/
public AmountWithExchangeRate creditExpiredInBillingCurrency() {
@@ -350,7 +379,7 @@ public AmountWithExchangeRate creditExpiredInBillingCurrency() {
/**
* Get the newCreditInBillingCurrency property: The amount of new credit or commitment for NewCredit or
* SettleCharges event in billing currency.
- *
+ *
* @return the newCreditInBillingCurrency value.
*/
public AmountWithExchangeRate newCreditInBillingCurrency() {
@@ -359,7 +388,7 @@ public AmountWithExchangeRate newCreditInBillingCurrency() {
/**
* Get the adjustmentsInBillingCurrency property: The amount of balance adjustment in billing currency.
- *
+ *
* @return the adjustmentsInBillingCurrency value.
*/
public AmountWithExchangeRate adjustmentsInBillingCurrency() {
@@ -369,7 +398,7 @@ public AmountWithExchangeRate adjustmentsInBillingCurrency() {
/**
* Get the chargesInBillingCurrency property: The amount of charges for events of type SettleCharges and
* PendingEligibleCharges in billing currency.
- *
+ *
* @return the chargesInBillingCurrency value.
*/
public AmountWithExchangeRate chargesInBillingCurrency() {
@@ -377,17 +406,28 @@ public AmountWithExchangeRate chargesInBillingCurrency() {
}
/**
- * Get the closedBalanceInBillingCurrency property: The balance in billing currency after the event.
- *
+ * Get the closedBalanceInBillingCurrency property: The balance in billing currency after the event, Note: This will
+ * not be returned for Contributor Organization Type in Multi-Entity consumption commitment.
+ *
* @return the closedBalanceInBillingCurrency value.
*/
public AmountWithExchangeRate closedBalanceInBillingCurrency() {
return this.closedBalanceInBillingCurrency;
}
+ /**
+ * Get the isEstimatedBalance property: If true, the listed details are based on an estimation and it will be
+ * subjected to change.
+ *
+ * @return the isEstimatedBalance value.
+ */
+ public Boolean isEstimatedBalance() {
+ return this.isEstimatedBalance;
+ }
+
/**
* Get the etag property: The eTag for the resource.
- *
+ *
* @return the etag value.
*/
public String etag() {
@@ -396,7 +436,7 @@ public String etag() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventSummaryInner.java
index e031fc2d183d..c3001e8e6155 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,18 @@
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. */
+/**
+ * An event summary resource.
+ */
@Fluent
public final class EventSummaryInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(EventSummaryInner.class);
-
/*
* The event properties.
*/
@@ -27,16 +25,20 @@ 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.
- *
+ *
* @return the innerProperties value.
*/
private EventProperties innerProperties() {
@@ -46,7 +48,7 @@ private EventProperties innerProperties() {
/**
* 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.
*/
public String etag() {
@@ -56,7 +58,7 @@ public String etag() {
/**
* 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.
- *
+ *
* @param etag the etag value to set.
* @return the EventSummaryInner object itself.
*/
@@ -67,7 +69,7 @@ public EventSummaryInner withEtag(String etag) {
/**
* Get the transactionDate property: The date of the event.
- *
+ *
* @return the transactionDate value.
*/
public OffsetDateTime transactionDate() {
@@ -76,7 +78,7 @@ public OffsetDateTime transactionDate() {
/**
* Get the description property: The description of the event.
- *
+ *
* @return the description value.
*/
public String description() {
@@ -85,7 +87,7 @@ public String description() {
/**
* Get the newCredit property: The amount of new credit or commitment for NewCredit or SettleCharges event.
- *
+ *
* @return the newCredit value.
*/
public Amount newCredit() {
@@ -95,7 +97,7 @@ public Amount newCredit() {
/**
* Get the adjustments property: The amount of balance adjustment. The property is not available for
* ConsumptionCommitment lots.
- *
+ *
* @return the adjustments value.
*/
public Amount adjustments() {
@@ -104,7 +106,7 @@ public Amount adjustments() {
/**
* Get the creditExpired property: The amount of expired credit or commitment for NewCredit or SettleCharges event.
- *
+ *
* @return the creditExpired value.
*/
public Amount creditExpired() {
@@ -113,7 +115,7 @@ public Amount creditExpired() {
/**
* Get the charges property: The amount of charges for events of type SettleCharges and PendingEligibleCharges.
- *
+ *
* @return the charges value.
*/
public Amount charges() {
@@ -121,17 +123,36 @@ public Amount charges() {
}
/**
- * Get the closedBalance property: The balance after the event.
- *
+ * Get the closedBalance property: The balance after the event, Note: This will not be returned for Contributor
+ * Organization Type in Multi-Entity consumption commitment.
+ *
* @return the closedBalance value.
*/
public Amount closedBalance() {
return this.innerProperties() == null ? null : this.innerProperties().closedBalance();
}
+ /**
+ * Get the billingAccountId property: Identifier of the billing account.
+ *
+ * @return the billingAccountId value.
+ */
+ public String billingAccountId() {
+ return this.innerProperties() == null ? null : this.innerProperties().billingAccountId();
+ }
+
+ /**
+ * Get the billingAccountDisplayName property: Name of the billing account.
+ *
+ * @return the billingAccountDisplayName value.
+ */
+ public String billingAccountDisplayName() {
+ return this.innerProperties() == null ? null : this.innerProperties().billingAccountDisplayName();
+ }
+
/**
* Get the eventType property: Identifies the type of the event.
- *
+ *
* @return the eventType value.
*/
public EventType eventType() {
@@ -140,7 +161,7 @@ public EventType eventType() {
/**
* Set the eventType property: Identifies the type of the event.
- *
+ *
* @param eventType the eventType value to set.
* @return the EventSummaryInner object itself.
*/
@@ -155,7 +176,7 @@ public EventSummaryInner withEventType(EventType eventType) {
/**
* Get the invoiceNumber property: The number which uniquely identifies the invoice on which the event was billed.
* This will be empty for unbilled events.
- *
+ *
* @return the invoiceNumber value.
*/
public String invoiceNumber() {
@@ -165,7 +186,7 @@ public String invoiceNumber() {
/**
* Get the billingProfileId property: The ID that uniquely identifies the billing profile for which the event
* happened. The property is only available for billing account of type MicrosoftCustomerAgreement.
- *
+ *
* @return the billingProfileId value.
*/
public String billingProfileId() {
@@ -175,7 +196,7 @@ public String billingProfileId() {
/**
* Get the billingProfileDisplayName property: The display name of the billing profile for which the event happened.
* The property is only available for billing account of type MicrosoftCustomerAgreement.
- *
+ *
* @return the billingProfileDisplayName value.
*/
public String billingProfileDisplayName() {
@@ -184,7 +205,7 @@ public String billingProfileDisplayName() {
/**
* Get the lotId property: The ID that uniquely identifies the lot for which the event happened.
- *
+ *
* @return the lotId value.
*/
public String lotId() {
@@ -193,7 +214,7 @@ public String lotId() {
/**
* Get the lotSource property: Identifies the source of the lot for which the event happened.
- *
+ *
* @return the lotSource value.
*/
public String lotSource() {
@@ -202,7 +223,7 @@ public String lotSource() {
/**
* Get the canceledCredit property: Amount of canceled credit.
- *
+ *
* @return the canceledCredit value.
*/
public Amount canceledCredit() {
@@ -211,7 +232,7 @@ public Amount canceledCredit() {
/**
* Get the creditCurrency property: The credit currency of the event.
- *
+ *
* @return the creditCurrency value.
*/
public String creditCurrency() {
@@ -220,7 +241,7 @@ public String creditCurrency() {
/**
* Get the billingCurrency property: The billing currency of the event.
- *
+ *
* @return the billingCurrency value.
*/
public String billingCurrency() {
@@ -229,7 +250,7 @@ public String billingCurrency() {
/**
* Get the reseller property: The reseller of the event.
- *
+ *
* @return the reseller value.
*/
public Reseller reseller() {
@@ -239,7 +260,7 @@ public Reseller reseller() {
/**
* Get the creditExpiredInBillingCurrency property: The amount of expired credit or commitment for NewCredit or
* SettleCharges event in billing currency.
- *
+ *
* @return the creditExpiredInBillingCurrency value.
*/
public AmountWithExchangeRate creditExpiredInBillingCurrency() {
@@ -249,7 +270,7 @@ public AmountWithExchangeRate creditExpiredInBillingCurrency() {
/**
* Get the newCreditInBillingCurrency property: The amount of new credit or commitment for NewCredit or
* SettleCharges event in billing currency.
- *
+ *
* @return the newCreditInBillingCurrency value.
*/
public AmountWithExchangeRate newCreditInBillingCurrency() {
@@ -258,7 +279,7 @@ public AmountWithExchangeRate newCreditInBillingCurrency() {
/**
* Get the adjustmentsInBillingCurrency property: The amount of balance adjustment in billing currency.
- *
+ *
* @return the adjustmentsInBillingCurrency value.
*/
public AmountWithExchangeRate adjustmentsInBillingCurrency() {
@@ -268,7 +289,7 @@ public AmountWithExchangeRate adjustmentsInBillingCurrency() {
/**
* Get the chargesInBillingCurrency property: The amount of charges for events of type SettleCharges and
* PendingEligibleCharges in billing currency.
- *
+ *
* @return the chargesInBillingCurrency value.
*/
public AmountWithExchangeRate chargesInBillingCurrency() {
@@ -276,17 +297,28 @@ public AmountWithExchangeRate chargesInBillingCurrency() {
}
/**
- * Get the closedBalanceInBillingCurrency property: The balance in billing currency after the event.
- *
+ * Get the closedBalanceInBillingCurrency property: The balance in billing currency after the event, Note: This will
+ * not be returned for Contributor Organization Type in Multi-Entity consumption commitment.
+ *
* @return the closedBalanceInBillingCurrency value.
*/
public AmountWithExchangeRate closedBalanceInBillingCurrency() {
return this.innerProperties() == null ? null : this.innerProperties().closedBalanceInBillingCurrency();
}
+ /**
+ * Get the isEstimatedBalance property: If true, the listed details are based on an estimation and it will be
+ * subjected to change.
+ *
+ * @return the isEstimatedBalance value.
+ */
+ public Boolean isEstimatedBalance() {
+ return this.innerProperties() == null ? null : this.innerProperties().isEstimatedBalance();
+ }
+
/**
* Get the etag property: The eTag for the resource.
- *
+ *
* @return the etag value.
*/
public String etagPropertiesEtag() {
@@ -295,7 +327,7 @@ public String etagPropertiesEtag() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyChargeSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyChargeSummaryProperties.java
index 935660710f20..993b69f89f54 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,14 @@
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. */
+/**
+ * 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 +46,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,9 +55,15 @@ 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.
- *
+ *
* @return the billingPeriodId value.
*/
public String billingPeriodId() {
@@ -68,7 +72,7 @@ public String billingPeriodId() {
/**
* Get the usageStart property: Usage start date.
- *
+ *
* @return the usageStart value.
*/
public String usageStart() {
@@ -77,7 +81,7 @@ public String usageStart() {
/**
* Get the usageEnd property: Usage end date.
- *
+ *
* @return the usageEnd value.
*/
public String usageEnd() {
@@ -86,7 +90,7 @@ public String usageEnd() {
/**
* Get the azureCharges property: Azure Charges.
- *
+ *
* @return the azureCharges value.
*/
public BigDecimal azureCharges() {
@@ -95,7 +99,7 @@ public BigDecimal azureCharges() {
/**
* Get the chargesBilledSeparately property: Charges Billed separately.
- *
+ *
* @return the chargesBilledSeparately value.
*/
public BigDecimal chargesBilledSeparately() {
@@ -103,17 +107,17 @@ public BigDecimal chargesBilledSeparately() {
}
/**
- * Get the marketplaceCharges property: Marketplace Charges.
- *
- * @return the marketplaceCharges value.
+ * Get the azureMarketplaceCharges property: Marketplace Charges.
+ *
+ * @return the azureMarketplaceCharges value.
*/
- public BigDecimal marketplaceCharges() {
- return this.marketplaceCharges;
+ public BigDecimal azureMarketplaceCharges() {
+ return this.azureMarketplaceCharges;
}
/**
* Get the currency property: Currency Code.
- *
+ *
* @return the currency value.
*/
public String currency() {
@@ -122,7 +126,7 @@ public String currency() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyReservationTransactionProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyReservationTransactionProperties.java
index 55ddcf621918..160f28e1f6fd 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,18 +5,16 @@
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;
import java.util.UUID;
-/** The properties of a legacy reservation transaction. */
+/**
+ * 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 +22,7 @@ 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,9 +153,15 @@ 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.
- *
+ *
* @return the eventDate value.
*/
public OffsetDateTime eventDate() {
@@ -173,7 +172,7 @@ public OffsetDateTime eventDate() {
* 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
* reservation order specifies the VM size and region for the reservations.
- *
+ *
* @return the reservationOrderId value.
*/
public String reservationOrderId() {
@@ -182,7 +181,7 @@ public String reservationOrderId() {
/**
* Get the description property: The description of the transaction.
- *
+ *
* @return the description value.
*/
public String description() {
@@ -190,8 +189,8 @@ 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.
*/
public String eventType() {
@@ -200,7 +199,7 @@ public String eventType() {
/**
* Get the quantity property: The quantity of the transaction.
- *
+ *
* @return the quantity value.
*/
public BigDecimal quantity() {
@@ -209,7 +208,7 @@ public BigDecimal quantity() {
/**
* Get the amount property: The charge of the transaction.
- *
+ *
* @return the amount value.
*/
public BigDecimal amount() {
@@ -218,7 +217,7 @@ public BigDecimal amount() {
/**
* Get the currency property: The ISO currency in which the transaction is charged, for example, USD.
- *
+ *
* @return the currency value.
*/
public String currency() {
@@ -227,7 +226,7 @@ public String currency() {
/**
* Get the reservationOrderName property: The name of the reservation order.
- *
+ *
* @return the reservationOrderName value.
*/
public String reservationOrderName() {
@@ -236,7 +235,7 @@ public String reservationOrderName() {
/**
* Get the purchasingEnrollment property: The purchasing enrollment.
- *
+ *
* @return the purchasingEnrollment value.
*/
public String purchasingEnrollment() {
@@ -245,7 +244,7 @@ public String purchasingEnrollment() {
/**
* Get the purchasingSubscriptionGuid property: The subscription guid that makes the transaction.
- *
+ *
* @return the purchasingSubscriptionGuid value.
*/
public UUID purchasingSubscriptionGuid() {
@@ -254,7 +253,7 @@ public UUID purchasingSubscriptionGuid() {
/**
* Get the purchasingSubscriptionName property: The subscription name that makes the transaction.
- *
+ *
* @return the purchasingSubscriptionName value.
*/
public String purchasingSubscriptionName() {
@@ -264,7 +263,7 @@ public String purchasingSubscriptionName() {
/**
* Get the armSkuName property: This is the ARM Sku name. It can be used to join with the serviceType field in
* additional info in usage records.
- *
+ *
* @return the armSkuName value.
*/
public String armSkuName() {
@@ -273,7 +272,7 @@ public String armSkuName() {
/**
* Get the term property: This is the term of the transaction.
- *
+ *
* @return the term value.
*/
public String term() {
@@ -282,7 +281,7 @@ public String term() {
/**
* Get the region property: The region of the transaction.
- *
+ *
* @return the region value.
*/
public String region() {
@@ -291,7 +290,7 @@ public String region() {
/**
* Get the accountName property: The name of the account that makes the transaction.
- *
+ *
* @return the accountName value.
*/
public String accountName() {
@@ -300,7 +299,7 @@ public String accountName() {
/**
* Get the accountOwnerEmail property: The email of the account owner that makes the transaction.
- *
+ *
* @return the accountOwnerEmail value.
*/
public String accountOwnerEmail() {
@@ -309,7 +308,7 @@ public String accountOwnerEmail() {
/**
* Get the departmentName property: The department name.
- *
+ *
* @return the departmentName value.
*/
public String departmentName() {
@@ -319,7 +318,7 @@ public String departmentName() {
/**
* Get the costCenter property: The cost center of this department if it is a department and a cost center is
* provided.
- *
+ *
* @return the costCenter value.
*/
public String costCenter() {
@@ -328,7 +327,7 @@ public String costCenter() {
/**
* Get the currentEnrollment property: The current enrollment.
- *
+ *
* @return the currentEnrollment value.
*/
public String currentEnrollment() {
@@ -337,7 +336,7 @@ public String currentEnrollment() {
/**
* Get the billingFrequency property: The billing frequency, which can be either one-time or recurring.
- *
+ *
* @return the billingFrequency value.
*/
public String billingFrequency() {
@@ -346,7 +345,7 @@ public String billingFrequency() {
/**
* Get the billingMonth property: The billing month(yyyyMMdd), on which the event initiated.
- *
+ *
* @return the billingMonth value.
*/
public Integer billingMonth() {
@@ -355,7 +354,7 @@ public Integer billingMonth() {
/**
* Get the monetaryCommitment property: The monetary commitment amount at the enrollment scope.
- *
+ *
* @return the monetaryCommitment value.
*/
public BigDecimal monetaryCommitment() {
@@ -364,7 +363,7 @@ public BigDecimal monetaryCommitment() {
/**
* Get the overage property: The overage amount at the enrollment scope.
- *
+ *
* @return the overage value.
*/
public BigDecimal overage() {
@@ -373,7 +372,7 @@ public BigDecimal overage() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyUsageDetailProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyUsageDetailProperties.java
index 39b1dfa8f812..1d8b584679d9 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,20 +5,18 @@
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;
import java.util.UUID;
-/** The properties of the legacy usage detail. */
+/**
+ * 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 +84,25 @@ 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,7 @@ 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 +174,7 @@ 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 +186,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 +198,13 @@ 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 +234,7 @@ 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 +258,13 @@ 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,15 +275,33 @@ 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.
- *
+ *
* @return the billingAccountId value.
*/
public String billingAccountId() {
@@ -314,7 +310,7 @@ public String billingAccountId() {
/**
* Get the billingAccountName property: Billing Account Name.
- *
+ *
* @return the billingAccountName value.
*/
public String billingAccountName() {
@@ -323,7 +319,7 @@ public String billingAccountName() {
/**
* Get the billingPeriodStartDate property: The billing period start date.
- *
+ *
* @return the billingPeriodStartDate value.
*/
public OffsetDateTime billingPeriodStartDate() {
@@ -332,7 +328,7 @@ public OffsetDateTime billingPeriodStartDate() {
/**
* Get the billingPeriodEndDate property: The billing period end date.
- *
+ *
* @return the billingPeriodEndDate value.
*/
public OffsetDateTime billingPeriodEndDate() {
@@ -341,7 +337,7 @@ public OffsetDateTime billingPeriodEndDate() {
/**
* Get the billingProfileId property: Billing Profile identifier.
- *
+ *
* @return the billingProfileId value.
*/
public String billingProfileId() {
@@ -350,7 +346,7 @@ public String billingProfileId() {
/**
* Get the billingProfileName property: Billing Profile Name.
- *
+ *
* @return the billingProfileName value.
*/
public String billingProfileName() {
@@ -359,7 +355,7 @@ public String billingProfileName() {
/**
* Get the accountOwnerId property: Account Owner Id.
- *
+ *
* @return the accountOwnerId value.
*/
public String accountOwnerId() {
@@ -368,7 +364,7 @@ public String accountOwnerId() {
/**
* Get the accountName property: Account Name.
- *
+ *
* @return the accountName value.
*/
public String accountName() {
@@ -377,7 +373,7 @@ public String accountName() {
/**
* Get the subscriptionId property: Subscription guid.
- *
+ *
* @return the subscriptionId value.
*/
public String subscriptionId() {
@@ -386,7 +382,7 @@ public String subscriptionId() {
/**
* Get the subscriptionName property: Subscription name.
- *
+ *
* @return the subscriptionName value.
*/
public String subscriptionName() {
@@ -395,7 +391,7 @@ public String subscriptionName() {
/**
* Get the date property: Date for the usage record.
- *
+ *
* @return the date value.
*/
public OffsetDateTime date() {
@@ -404,7 +400,7 @@ public OffsetDateTime date() {
/**
* Get the product property: Product name for the consumed service or purchase. Not available for Marketplace.
- *
+ *
* @return the product value.
*/
public String product() {
@@ -414,7 +410,7 @@ public String product() {
/**
* Get the partNumber property: Part Number of the service used. Can be used to join with the price sheet. Not
* available for marketplace.
- *
+ *
* @return the partNumber value.
*/
public String partNumber() {
@@ -425,7 +421,7 @@ public String partNumber() {
* Get the meterId property: 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.
- *
+ *
* @return the meterId value.
*/
public UUID meterId() {
@@ -435,7 +431,7 @@ public UUID meterId() {
/**
* Get the meterDetails property: The details about the meter. By default this is not populated, unless it's
* specified in $expand.
- *
+ *
* @return the meterDetails value.
*/
public MeterDetailsResponse meterDetails() {
@@ -444,7 +440,7 @@ public MeterDetailsResponse meterDetails() {
/**
* Get the quantity property: The usage quantity.
- *
+ *
* @return the quantity value.
*/
public BigDecimal quantity() {
@@ -453,7 +449,7 @@ public BigDecimal quantity() {
/**
* Get the effectivePrice property: Effective Price that's charged for the usage.
- *
+ *
* @return the effectivePrice value.
*/
public BigDecimal effectivePrice() {
@@ -462,7 +458,7 @@ public BigDecimal effectivePrice() {
/**
* Get the cost property: The amount of cost before tax.
- *
+ *
* @return the cost value.
*/
public BigDecimal cost() {
@@ -471,7 +467,7 @@ public BigDecimal cost() {
/**
* Get the unitPrice property: Unit Price is the price applicable to you. (your EA or other contract price).
- *
+ *
* @return the unitPrice value.
*/
public BigDecimal unitPrice() {
@@ -480,7 +476,7 @@ public BigDecimal unitPrice() {
/**
* Get the billingCurrency property: Billing Currency.
- *
+ *
* @return the billingCurrency value.
*/
public String billingCurrency() {
@@ -489,7 +485,7 @@ public String billingCurrency() {
/**
* Get the resourceLocation property: Resource Location.
- *
+ *
* @return the resourceLocation value.
*/
public String resourceLocation() {
@@ -499,7 +495,7 @@ public String resourceLocation() {
/**
* Get the consumedService property: Consumed service name. Name of the azure resource provider that emits the usage
* or was purchased. This value is not provided for marketplace usage.
- *
+ *
* @return the consumedService value.
*/
public String consumedService() {
@@ -508,7 +504,7 @@ public String consumedService() {
/**
* Get the resourceId property: Unique identifier of the Azure Resource Manager usage detail resource.
- *
+ *
* @return the resourceId value.
*/
public String resourceId() {
@@ -517,7 +513,7 @@ public String resourceId() {
/**
* Get the resourceName property: Resource Name.
- *
+ *
* @return the resourceName value.
*/
public String resourceName() {
@@ -526,7 +522,7 @@ public String resourceName() {
/**
* Get the serviceInfo1 property: Service-specific metadata.
- *
+ *
* @return the serviceInfo1 value.
*/
public String serviceInfo1() {
@@ -535,7 +531,7 @@ public String serviceInfo1() {
/**
* Get the serviceInfo2 property: Legacy field with optional service-specific metadata.
- *
+ *
* @return the serviceInfo2 value.
*/
public String serviceInfo2() {
@@ -546,7 +542,7 @@ public String serviceInfo2() {
* Get the additionalInfo property: 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.
- *
+ *
* @return the additionalInfo value.
*/
public String additionalInfo() {
@@ -555,7 +551,7 @@ public String additionalInfo() {
/**
* Get the invoiceSection property: Invoice Section Name.
- *
+ *
* @return the invoiceSection value.
*/
public String invoiceSection() {
@@ -565,7 +561,7 @@ public String invoiceSection() {
/**
* Get the costCenter property: The cost center of this department if it is a department and a cost center is
* provided.
- *
+ *
* @return the costCenter value.
*/
public String costCenter() {
@@ -574,7 +570,7 @@ public String costCenter() {
/**
* Get the resourceGroup property: Resource Group Name.
- *
+ *
* @return the resourceGroup value.
*/
public String resourceGroup() {
@@ -584,7 +580,7 @@ public String resourceGroup() {
/**
* Get the reservationId property: ARM resource id of the reservation. Only applies to records relevant to
* reservations.
- *
+ *
* @return the reservationId value.
*/
public String reservationId() {
@@ -594,7 +590,7 @@ public String reservationId() {
/**
* Get the reservationName property: 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.
- *
+ *
* @return the reservationName value.
*/
public String reservationName() {
@@ -603,7 +599,7 @@ public String reservationName() {
/**
* Get the productOrderId property: Product Order Id. For reservations this is the Reservation Order ID.
- *
+ *
* @return the productOrderId value.
*/
public String productOrderId() {
@@ -612,7 +608,7 @@ public String productOrderId() {
/**
* Get the productOrderName property: Product Order Name. For reservations this is the SKU that was purchased.
- *
+ *
* @return the productOrderName value.
*/
public String productOrderName() {
@@ -621,7 +617,7 @@ public String productOrderName() {
/**
* Get the offerId property: Offer Id. Ex: MS-AZR-0017P, MS-AZR-0148P.
- *
+ *
* @return the offerId value.
*/
public String offerId() {
@@ -630,7 +626,7 @@ public String offerId() {
/**
* Get the isAzureCreditEligible property: Is Azure Credit Eligible.
- *
+ *
* @return the isAzureCreditEligible value.
*/
public Boolean isAzureCreditEligible() {
@@ -640,7 +636,7 @@ public Boolean isAzureCreditEligible() {
/**
* Get the term property: Term (in months). 1 month for monthly recurring purchase. 12 months for a 1 year
* reservation. 36 months for a 3 year reservation.
- *
+ *
* @return the term value.
*/
public String term() {
@@ -649,7 +645,7 @@ public String term() {
/**
* Get the publisherName property: Publisher Name.
- *
+ *
* @return the publisherName value.
*/
public String publisherName() {
@@ -658,7 +654,7 @@ public String publisherName() {
/**
* Get the publisherType property: Publisher Type.
- *
+ *
* @return the publisherType value.
*/
public String publisherType() {
@@ -667,7 +663,7 @@ public String publisherType() {
/**
* Get the planName property: Plan Name.
- *
+ *
* @return the planName value.
*/
public String planName() {
@@ -677,7 +673,7 @@ public String planName() {
/**
* Get the chargeType property: Indicates a charge represents credits, usage, a Marketplace purchase, a reservation
* fee, or a refund.
- *
+ *
* @return the chargeType value.
*/
public String chargeType() {
@@ -688,7 +684,7 @@ public String chargeType() {
* Get the frequency property: 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.
- *
+ *
* @return the frequency value.
*/
public String frequency() {
@@ -697,16 +693,34 @@ public String frequency() {
/**
* Get the payGPrice property: Retail price for the resource.
- *
+ *
* @return the payGPrice value.
*/
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.
- *
+ *
* @return the pricingModel value.
*/
public PricingModelType pricingModel() {
@@ -715,7 +729,7 @@ public PricingModelType pricingModel() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotProperties.java
index 6849ba86cdac..0b599447a346 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,23 +5,22 @@
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.OrganizationType;
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. */
+/**
+ * The lot properties.
+ */
@Immutable
public final class LotProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(LotProperties.class);
-
/*
- * The original amount of a lot.
+ * The original amount of a lot, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment
*/
@JsonProperty(value = "originalAmount", access = JsonProperty.Access.WRITE_ONLY)
private Amount originalAmount;
@@ -51,8 +50,7 @@ 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;
@@ -82,7 +80,7 @@ public final class LotProperties {
private String billingCurrency;
/*
- * The original amount of a lot in billing currency.
+ * The original amount of a lot in billing currency, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment
*/
@JsonProperty(value = "originalAmountInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY)
private AmountWithExchangeRate originalAmountInBillingCurrency;
@@ -99,15 +97,40 @@ public final class LotProperties {
@JsonProperty(value = "reseller", access = JsonProperty.Access.WRITE_ONLY)
private Reseller reseller;
+ /*
+ * If true, the listed details are based on an estimation and it will be subjected to change.
+ */
+ @JsonProperty(value = "isEstimatedBalance", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isEstimatedBalance;
+
/*
* The eTag for the resource.
*/
@JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
+ /*
+ * The organization type of the lot.
+ */
+ @JsonProperty(value = "OrganizationType", access = JsonProperty.Access.WRITE_ONLY)
+ private OrganizationType organizationType;
+
+ /*
+ * Amount consumed from the commitment.
+ */
+ @JsonProperty(value = "usedAmount", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount usedAmount;
+
+ /**
+ * Creates an instance of LotProperties class.
+ */
+ public LotProperties() {
+ }
+
/**
- * Get the originalAmount property: The original amount of a lot.
- *
+ * Get the originalAmount property: The original amount of a lot, Note: This will not be returned for Contributor
+ * Organization Type in Multi-Entity consumption commitment.
+ *
* @return the originalAmount value.
*/
public Amount originalAmount() {
@@ -116,7 +139,7 @@ public Amount originalAmount() {
/**
* Get the closedBalance property: The balance as of the last invoice.
- *
+ *
* @return the closedBalance value.
*/
public Amount closedBalance() {
@@ -125,7 +148,7 @@ public Amount closedBalance() {
/**
* Get the source property: The source of the lot.
- *
+ *
* @return the source value.
*/
public LotSource source() {
@@ -134,7 +157,7 @@ public LotSource source() {
/**
* Get the startDate property: The date when the lot became effective.
- *
+ *
* @return the startDate value.
*/
public OffsetDateTime startDate() {
@@ -143,7 +166,7 @@ public OffsetDateTime startDate() {
/**
* Get the expirationDate property: The expiration date of a lot.
- *
+ *
* @return the expirationDate value.
*/
public OffsetDateTime expirationDate() {
@@ -153,7 +176,7 @@ public OffsetDateTime expirationDate() {
/**
* Get the poNumber property: The po number of the invoice on which the lot was added. This property is not
* available for ConsumptionCommitment lots.
- *
+ *
* @return the poNumber value.
*/
public String poNumber() {
@@ -162,7 +185,7 @@ public String poNumber() {
/**
* Get the purchasedDate property: The date when the lot was added.
- *
+ *
* @return the purchasedDate value.
*/
public OffsetDateTime purchasedDate() {
@@ -171,7 +194,7 @@ public OffsetDateTime purchasedDate() {
/**
* Get the status property: The status of the lot.
- *
+ *
* @return the status value.
*/
public Status status() {
@@ -180,7 +203,7 @@ public Status status() {
/**
* Get the creditCurrency property: The currency of the lot.
- *
+ *
* @return the creditCurrency value.
*/
public String creditCurrency() {
@@ -189,7 +212,7 @@ public String creditCurrency() {
/**
* Get the billingCurrency property: The billing currency of the lot.
- *
+ *
* @return the billingCurrency value.
*/
public String billingCurrency() {
@@ -197,8 +220,9 @@ public String billingCurrency() {
}
/**
- * Get the originalAmountInBillingCurrency property: The original amount of a lot in billing currency.
- *
+ * Get the originalAmountInBillingCurrency property: The original amount of a lot in billing currency, Note: This
+ * will not be returned for Contributor Organization Type in Multi-Entity consumption commitment.
+ *
* @return the originalAmountInBillingCurrency value.
*/
public AmountWithExchangeRate originalAmountInBillingCurrency() {
@@ -207,7 +231,7 @@ public AmountWithExchangeRate originalAmountInBillingCurrency() {
/**
* Get the closedBalanceInBillingCurrency property: The balance as of the last invoice in billing currency.
- *
+ *
* @return the closedBalanceInBillingCurrency value.
*/
public AmountWithExchangeRate closedBalanceInBillingCurrency() {
@@ -216,25 +240,53 @@ public AmountWithExchangeRate closedBalanceInBillingCurrency() {
/**
* Get the reseller property: The reseller of the lot.
- *
+ *
* @return the reseller value.
*/
public Reseller reseller() {
return this.reseller;
}
+ /**
+ * Get the isEstimatedBalance property: If true, the listed details are based on an estimation and it will be
+ * subjected to change.
+ *
+ * @return the isEstimatedBalance value.
+ */
+ public Boolean isEstimatedBalance() {
+ return this.isEstimatedBalance;
+ }
+
/**
* Get the etag property: The eTag for the resource.
- *
+ *
* @return the etag value.
*/
public String etag() {
return this.etag;
}
+ /**
+ * Get the organizationType property: The organization type of the lot.
+ *
+ * @return the organizationType value.
+ */
+ public OrganizationType organizationType() {
+ return this.organizationType;
+ }
+
+ /**
+ * Get the usedAmount property: Amount consumed from the commitment.
+ *
+ * @return the usedAmount value.
+ */
+ public Amount usedAmount() {
+ return this.usedAmount;
+ }
+
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
@@ -253,5 +305,8 @@ public void validate() {
if (reseller() != null) {
reseller().validate();
}
+ if (usedAmount() != null) {
+ usedAmount().validate();
+ }
}
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotSummaryInner.java
index 66ba7de656ca..244db2d8f4c7 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,20 @@
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.OrganizationType;
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. */
+/**
+ * A lot summary resource.
+ */
@Fluent
public final class LotSummaryInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(LotSummaryInner.class);
-
/*
* The lot properties.
*/
@@ -28,16 +27,20 @@ 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.
- *
+ *
* @return the innerProperties value.
*/
private LotProperties innerProperties() {
@@ -47,7 +50,7 @@ private LotProperties innerProperties() {
/**
* 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.
*/
public String etag() {
@@ -57,7 +60,7 @@ public String etag() {
/**
* 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.
- *
+ *
* @param etag the etag value to set.
* @return the LotSummaryInner object itself.
*/
@@ -67,8 +70,9 @@ public LotSummaryInner withEtag(String etag) {
}
/**
- * Get the originalAmount property: The original amount of a lot.
- *
+ * Get the originalAmount property: The original amount of a lot, Note: This will not be returned for Contributor
+ * Organization Type in Multi-Entity consumption commitment.
+ *
* @return the originalAmount value.
*/
public Amount originalAmount() {
@@ -77,7 +81,7 @@ public Amount originalAmount() {
/**
* Get the closedBalance property: The balance as of the last invoice.
- *
+ *
* @return the closedBalance value.
*/
public Amount closedBalance() {
@@ -86,7 +90,7 @@ public Amount closedBalance() {
/**
* Get the source property: The source of the lot.
- *
+ *
* @return the source value.
*/
public LotSource source() {
@@ -95,7 +99,7 @@ public LotSource source() {
/**
* Get the startDate property: The date when the lot became effective.
- *
+ *
* @return the startDate value.
*/
public OffsetDateTime startDate() {
@@ -104,7 +108,7 @@ public OffsetDateTime startDate() {
/**
* Get the expirationDate property: The expiration date of a lot.
- *
+ *
* @return the expirationDate value.
*/
public OffsetDateTime expirationDate() {
@@ -114,7 +118,7 @@ public OffsetDateTime expirationDate() {
/**
* Get the poNumber property: The po number of the invoice on which the lot was added. This property is not
* available for ConsumptionCommitment lots.
- *
+ *
* @return the poNumber value.
*/
public String poNumber() {
@@ -123,7 +127,7 @@ public String poNumber() {
/**
* Get the purchasedDate property: The date when the lot was added.
- *
+ *
* @return the purchasedDate value.
*/
public OffsetDateTime purchasedDate() {
@@ -132,7 +136,7 @@ public OffsetDateTime purchasedDate() {
/**
* Get the status property: The status of the lot.
- *
+ *
* @return the status value.
*/
public Status status() {
@@ -141,7 +145,7 @@ public Status status() {
/**
* Get the creditCurrency property: The currency of the lot.
- *
+ *
* @return the creditCurrency value.
*/
public String creditCurrency() {
@@ -150,7 +154,7 @@ public String creditCurrency() {
/**
* Get the billingCurrency property: The billing currency of the lot.
- *
+ *
* @return the billingCurrency value.
*/
public String billingCurrency() {
@@ -158,8 +162,9 @@ public String billingCurrency() {
}
/**
- * Get the originalAmountInBillingCurrency property: The original amount of a lot in billing currency.
- *
+ * Get the originalAmountInBillingCurrency property: The original amount of a lot in billing currency, Note: This
+ * will not be returned for Contributor Organization Type in Multi-Entity consumption commitment.
+ *
* @return the originalAmountInBillingCurrency value.
*/
public AmountWithExchangeRate originalAmountInBillingCurrency() {
@@ -168,7 +173,7 @@ public AmountWithExchangeRate originalAmountInBillingCurrency() {
/**
* Get the closedBalanceInBillingCurrency property: The balance as of the last invoice in billing currency.
- *
+ *
* @return the closedBalanceInBillingCurrency value.
*/
public AmountWithExchangeRate closedBalanceInBillingCurrency() {
@@ -177,25 +182,53 @@ public AmountWithExchangeRate closedBalanceInBillingCurrency() {
/**
* Get the reseller property: The reseller of the lot.
- *
+ *
* @return the reseller value.
*/
public Reseller reseller() {
return this.innerProperties() == null ? null : this.innerProperties().reseller();
}
+ /**
+ * Get the isEstimatedBalance property: If true, the listed details are based on an estimation and it will be
+ * subjected to change.
+ *
+ * @return the isEstimatedBalance value.
+ */
+ public Boolean isEstimatedBalance() {
+ return this.innerProperties() == null ? null : this.innerProperties().isEstimatedBalance();
+ }
+
/**
* Get the etag property: The eTag for the resource.
- *
+ *
* @return the etag value.
*/
public String etagPropertiesEtag() {
return this.innerProperties() == null ? null : this.innerProperties().etag();
}
+ /**
+ * Get the organizationType property: The organization type of the lot.
+ *
+ * @return the organizationType value.
+ */
+ public OrganizationType organizationType() {
+ return this.innerProperties() == null ? null : this.innerProperties().organizationType();
+ }
+
+ /**
+ * Get the usedAmount property: Amount consumed from the commitment.
+ *
+ * @return the usedAmount value.
+ */
+ public Amount usedAmount() {
+ return this.innerProperties() == null ? null : this.innerProperties().usedAmount();
+ }
+
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostProperties.java
index de916d475acc..643a9ad843f3 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,21 +5,18 @@
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;
import java.util.List;
-/** The properties of the Management Group Aggregated Cost. */
+/**
+ * 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,22 +64,26 @@ 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.
- *
+ *
* @return the billingPeriodId value.
*/
public String billingPeriodId() {
@@ -91,7 +92,7 @@ public String billingPeriodId() {
/**
* Get the usageStart property: The start of the date time range covered by aggregated cost.
- *
+ *
* @return the usageStart value.
*/
public OffsetDateTime usageStart() {
@@ -100,7 +101,7 @@ public OffsetDateTime usageStart() {
/**
* Get the usageEnd property: The end of the date time range covered by the aggregated cost.
- *
+ *
* @return the usageEnd value.
*/
public OffsetDateTime usageEnd() {
@@ -109,7 +110,7 @@ public OffsetDateTime usageEnd() {
/**
* Get the azureCharges property: Azure Charges.
- *
+ *
* @return the azureCharges value.
*/
public BigDecimal azureCharges() {
@@ -118,7 +119,7 @@ public BigDecimal azureCharges() {
/**
* Get the marketplaceCharges property: Marketplace Charges.
- *
+ *
* @return the marketplaceCharges value.
*/
public BigDecimal marketplaceCharges() {
@@ -127,7 +128,7 @@ public BigDecimal marketplaceCharges() {
/**
* Get the chargesBilledSeparately property: Charges Billed Separately.
- *
+ *
* @return the chargesBilledSeparately value.
*/
public BigDecimal chargesBilledSeparately() {
@@ -136,7 +137,7 @@ public BigDecimal chargesBilledSeparately() {
/**
* Get the currency property: The ISO currency in which the meter is charged, for example, USD.
- *
+ *
* @return the currency value.
*/
public String currency() {
@@ -145,7 +146,7 @@ public String currency() {
/**
* Get the children property: Children of a management group.
- *
+ *
* @return the children value.
*/
public List children() {
@@ -154,12 +155,12 @@ public List children() {
/**
* Set the children property: Children of a management group.
- *
+ *
* @param children the children value to set.
* @return the ManagementGroupAggregatedCostProperties object itself.
*/
- public ManagementGroupAggregatedCostProperties withChildren(
- List children) {
+ public ManagementGroupAggregatedCostProperties
+ withChildren(List children) {
this.children = children;
return this;
}
@@ -167,7 +168,7 @@ public ManagementGroupAggregatedCostProperties withChildren(
/**
* Get the includedSubscriptions property: List of subscription Guids included in the calculation of aggregated
* cost.
- *
+ *
* @return the includedSubscriptions value.
*/
public List includedSubscriptions() {
@@ -177,7 +178,7 @@ public List includedSubscriptions() {
/**
* Set the includedSubscriptions property: List of subscription Guids included in the calculation of aggregated
* cost.
- *
+ *
* @param includedSubscriptions the includedSubscriptions value to set.
* @return the ManagementGroupAggregatedCostProperties object itself.
*/
@@ -189,7 +190,7 @@ public ManagementGroupAggregatedCostProperties withIncludedSubscriptions(List excludedSubscriptions() {
@@ -199,7 +200,7 @@ public List excludedSubscriptions() {
/**
* Set the excludedSubscriptions property: List of subscription Guids excluded from the calculation of aggregated
* cost.
- *
+ *
* @param excludedSubscriptions the excludedSubscriptions value to set.
* @return the ManagementGroupAggregatedCostProperties object itself.
*/
@@ -210,7 +211,7 @@ public ManagementGroupAggregatedCostProperties withExcludedSubscriptions(List tags;
+ /**
+ * Creates an instance of ManagementGroupAggregatedCostResultInner class.
+ */
+ public ManagementGroupAggregatedCostResultInner() {
+ }
+
/**
* Get the innerProperties property: The properties of the Management Group Aggregated Cost.
- *
+ *
* @return the innerProperties value.
*/
private ManagementGroupAggregatedCostProperties innerProperties() {
@@ -50,7 +54,7 @@ private ManagementGroupAggregatedCostProperties innerProperties() {
/**
* Get the etag property: The etag for the resource.
- *
+ *
* @return the etag value.
*/
public String etag() {
@@ -59,7 +63,7 @@ public String etag() {
/**
* Get the tags property: Resource tags.
- *
+ *
* @return the tags value.
*/
public Map tags() {
@@ -68,7 +72,7 @@ public Map tags() {
/**
* Get the billingPeriodId property: The id of the billing period resource that the aggregated cost belongs to.
- *
+ *
* @return the billingPeriodId value.
*/
public String billingPeriodId() {
@@ -77,7 +81,7 @@ public String billingPeriodId() {
/**
* Get the usageStart property: The start of the date time range covered by aggregated cost.
- *
+ *
* @return the usageStart value.
*/
public OffsetDateTime usageStart() {
@@ -86,7 +90,7 @@ public OffsetDateTime usageStart() {
/**
* Get the usageEnd property: The end of the date time range covered by the aggregated cost.
- *
+ *
* @return the usageEnd value.
*/
public OffsetDateTime usageEnd() {
@@ -95,7 +99,7 @@ public OffsetDateTime usageEnd() {
/**
* Get the azureCharges property: Azure Charges.
- *
+ *
* @return the azureCharges value.
*/
public BigDecimal azureCharges() {
@@ -104,7 +108,7 @@ public BigDecimal azureCharges() {
/**
* Get the marketplaceCharges property: Marketplace Charges.
- *
+ *
* @return the marketplaceCharges value.
*/
public BigDecimal marketplaceCharges() {
@@ -113,7 +117,7 @@ public BigDecimal marketplaceCharges() {
/**
* Get the chargesBilledSeparately property: Charges Billed Separately.
- *
+ *
* @return the chargesBilledSeparately value.
*/
public BigDecimal chargesBilledSeparately() {
@@ -122,7 +126,7 @@ public BigDecimal chargesBilledSeparately() {
/**
* Get the currency property: The ISO currency in which the meter is charged, for example, USD.
- *
+ *
* @return the currency value.
*/
public String currency() {
@@ -131,7 +135,7 @@ public String currency() {
/**
* Get the children property: Children of a management group.
- *
+ *
* @return the children value.
*/
public List children() {
@@ -140,12 +144,12 @@ public List children() {
/**
* Set the children property: Children of a management group.
- *
+ *
* @param children the children value to set.
* @return the ManagementGroupAggregatedCostResultInner object itself.
*/
- public ManagementGroupAggregatedCostResultInner withChildren(
- List children) {
+ public ManagementGroupAggregatedCostResultInner
+ withChildren(List children) {
if (this.innerProperties() == null) {
this.innerProperties = new ManagementGroupAggregatedCostProperties();
}
@@ -156,7 +160,7 @@ public ManagementGroupAggregatedCostResultInner withChildren(
/**
* Get the includedSubscriptions property: List of subscription Guids included in the calculation of aggregated
* cost.
- *
+ *
* @return the includedSubscriptions value.
*/
public List includedSubscriptions() {
@@ -166,7 +170,7 @@ public List includedSubscriptions() {
/**
* Set the includedSubscriptions property: List of subscription Guids included in the calculation of aggregated
* cost.
- *
+ *
* @param includedSubscriptions the includedSubscriptions value to set.
* @return the ManagementGroupAggregatedCostResultInner object itself.
*/
@@ -181,7 +185,7 @@ public ManagementGroupAggregatedCostResultInner withIncludedSubscriptions(List excludedSubscriptions() {
@@ -191,7 +195,7 @@ public List excludedSubscriptions() {
/**
* Set the excludedSubscriptions property: List of subscription Guids excluded from the calculation of aggregated
* cost.
- *
+ *
* @param excludedSubscriptions the excludedSubscriptions value to set.
* @return the ManagementGroupAggregatedCostResultInner object itself.
*/
@@ -205,7 +209,7 @@ public ManagementGroupAggregatedCostResultInner withExcludedSubscriptions(List tags;
+ /**
+ * Creates an instance of MarketplaceInner class.
+ */
+ public MarketplaceInner() {
+ }
+
/**
* Get the innerProperties property: The properties of the marketplace usage detail.
- *
+ *
* @return the innerProperties value.
*/
private MarketplaceProperties innerProperties() {
@@ -50,7 +54,7 @@ private MarketplaceProperties innerProperties() {
/**
* Get the etag property: The etag for the resource.
- *
+ *
* @return the etag value.
*/
public String etag() {
@@ -59,7 +63,7 @@ public String etag() {
/**
* Get the tags property: Resource tags.
- *
+ *
* @return the tags value.
*/
public Map tags() {
@@ -68,7 +72,7 @@ public Map tags() {
/**
* Get the billingPeriodId property: The id of the billing period resource that the usage belongs to.
- *
+ *
* @return the billingPeriodId value.
*/
public String billingPeriodId() {
@@ -77,7 +81,7 @@ public String billingPeriodId() {
/**
* Get the usageStart property: The start of the date time range covered by the usage detail.
- *
+ *
* @return the usageStart value.
*/
public OffsetDateTime usageStart() {
@@ -86,7 +90,7 @@ public OffsetDateTime usageStart() {
/**
* Get the usageEnd property: The end of the date time range covered by the usage detail.
- *
+ *
* @return the usageEnd value.
*/
public OffsetDateTime usageEnd() {
@@ -95,7 +99,7 @@ public OffsetDateTime usageEnd() {
/**
* Get the resourceRate property: The marketplace resource rate.
- *
+ *
* @return the resourceRate value.
*/
public BigDecimal resourceRate() {
@@ -104,7 +108,7 @@ public BigDecimal resourceRate() {
/**
* Get the offerName property: The type of offer.
- *
+ *
* @return the offerName value.
*/
public String offerName() {
@@ -113,7 +117,7 @@ public String offerName() {
/**
* Get the resourceGroup property: The name of resource group.
- *
+ *
* @return the resourceGroup value.
*/
public String resourceGroup() {
@@ -122,7 +126,7 @@ public String resourceGroup() {
/**
* Get the additionalInfo property: Additional information.
- *
+ *
* @return the additionalInfo value.
*/
public String additionalInfo() {
@@ -131,7 +135,7 @@ public String additionalInfo() {
/**
* Get the orderNumber property: The order number.
- *
+ *
* @return the orderNumber value.
*/
public String orderNumber() {
@@ -140,7 +144,7 @@ public String orderNumber() {
/**
* Get the instanceName property: The name of the resource instance that the usage is about.
- *
+ *
* @return the instanceName value.
*/
public String instanceName() {
@@ -149,7 +153,7 @@ public String instanceName() {
/**
* Get the instanceId property: The uri of the resource instance that the usage is about.
- *
+ *
* @return the instanceId value.
*/
public String instanceId() {
@@ -158,7 +162,7 @@ public String instanceId() {
/**
* Get the currency property: The ISO currency in which the meter is charged, for example, USD.
- *
+ *
* @return the currency value.
*/
public String currency() {
@@ -167,7 +171,7 @@ public String currency() {
/**
* Get the consumedQuantity property: The quantity of usage.
- *
+ *
* @return the consumedQuantity value.
*/
public BigDecimal consumedQuantity() {
@@ -176,7 +180,7 @@ public BigDecimal consumedQuantity() {
/**
* Get the unitOfMeasure property: The unit of measure.
- *
+ *
* @return the unitOfMeasure value.
*/
public String unitOfMeasure() {
@@ -185,7 +189,7 @@ public String unitOfMeasure() {
/**
* Get the pretaxCost property: The amount of cost before tax.
- *
+ *
* @return the pretaxCost value.
*/
public BigDecimal pretaxCost() {
@@ -194,7 +198,7 @@ public BigDecimal pretaxCost() {
/**
* Get the isEstimated property: The estimated usage is subject to change.
- *
+ *
* @return the isEstimated value.
*/
public Boolean isEstimated() {
@@ -203,7 +207,7 @@ public Boolean isEstimated() {
/**
* Get the meterId property: The meter id (GUID).
- *
+ *
* @return the meterId value.
*/
public UUID meterId() {
@@ -212,7 +216,7 @@ public UUID meterId() {
/**
* Get the subscriptionGuid property: Subscription guid.
- *
+ *
* @return the subscriptionGuid value.
*/
public UUID subscriptionGuid() {
@@ -221,7 +225,7 @@ public UUID subscriptionGuid() {
/**
* Get the subscriptionName property: Subscription name.
- *
+ *
* @return the subscriptionName value.
*/
public String subscriptionName() {
@@ -230,7 +234,7 @@ public String subscriptionName() {
/**
* Get the accountName property: Account name.
- *
+ *
* @return the accountName value.
*/
public String accountName() {
@@ -239,7 +243,7 @@ public String accountName() {
/**
* Get the departmentName property: Department name.
- *
+ *
* @return the departmentName value.
*/
public String departmentName() {
@@ -248,7 +252,7 @@ public String departmentName() {
/**
* Get the consumedService property: Consumed service name.
- *
+ *
* @return the consumedService value.
*/
public String consumedService() {
@@ -257,7 +261,7 @@ public String consumedService() {
/**
* Get the costCenter property: The cost center of this department if it is a department and a costcenter exists.
- *
+ *
* @return the costCenter value.
*/
public String costCenter() {
@@ -267,7 +271,7 @@ public String costCenter() {
/**
* Get the additionalProperties property: Additional details of this usage item. By default this is not populated,
* unless it's specified in $expand.
- *
+ *
* @return the additionalProperties value.
*/
public String additionalProperties() {
@@ -276,7 +280,7 @@ public String additionalProperties() {
/**
* Get the publisherName property: The name of publisher.
- *
+ *
* @return the publisherName value.
*/
public String publisherName() {
@@ -285,7 +289,7 @@ public String publisherName() {
/**
* Get the planName property: The name of plan.
- *
+ *
* @return the planName value.
*/
public String planName() {
@@ -294,7 +298,7 @@ public String planName() {
/**
* Get the isRecurringCharge property: Flag indicating whether this is a recurring charge or not.
- *
+ *
* @return the isRecurringCharge value.
*/
public Boolean isRecurringCharge() {
@@ -303,7 +307,7 @@ public Boolean isRecurringCharge() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceProperties.java
index 006420b0220a..ff7ae99d5196 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,18 +5,16 @@
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;
import java.util.UUID;
-/** The properties of the marketplace usage detail. */
+/**
+ * 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 +142,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,9 +171,15 @@ 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.
- *
+ *
* @return the billingPeriodId value.
*/
public String billingPeriodId() {
@@ -186,7 +188,7 @@ public String billingPeriodId() {
/**
* Get the usageStart property: The start of the date time range covered by the usage detail.
- *
+ *
* @return the usageStart value.
*/
public OffsetDateTime usageStart() {
@@ -195,7 +197,7 @@ public OffsetDateTime usageStart() {
/**
* Get the usageEnd property: The end of the date time range covered by the usage detail.
- *
+ *
* @return the usageEnd value.
*/
public OffsetDateTime usageEnd() {
@@ -204,7 +206,7 @@ public OffsetDateTime usageEnd() {
/**
* Get the resourceRate property: The marketplace resource rate.
- *
+ *
* @return the resourceRate value.
*/
public BigDecimal resourceRate() {
@@ -213,7 +215,7 @@ public BigDecimal resourceRate() {
/**
* Get the offerName property: The type of offer.
- *
+ *
* @return the offerName value.
*/
public String offerName() {
@@ -222,7 +224,7 @@ public String offerName() {
/**
* Get the resourceGroup property: The name of resource group.
- *
+ *
* @return the resourceGroup value.
*/
public String resourceGroup() {
@@ -231,7 +233,7 @@ public String resourceGroup() {
/**
* Get the additionalInfo property: Additional information.
- *
+ *
* @return the additionalInfo value.
*/
public String additionalInfo() {
@@ -240,7 +242,7 @@ public String additionalInfo() {
/**
* Get the orderNumber property: The order number.
- *
+ *
* @return the orderNumber value.
*/
public String orderNumber() {
@@ -249,7 +251,7 @@ public String orderNumber() {
/**
* Get the instanceName property: The name of the resource instance that the usage is about.
- *
+ *
* @return the instanceName value.
*/
public String instanceName() {
@@ -258,7 +260,7 @@ public String instanceName() {
/**
* Get the instanceId property: The uri of the resource instance that the usage is about.
- *
+ *
* @return the instanceId value.
*/
public String instanceId() {
@@ -267,7 +269,7 @@ public String instanceId() {
/**
* Get the currency property: The ISO currency in which the meter is charged, for example, USD.
- *
+ *
* @return the currency value.
*/
public String currency() {
@@ -276,7 +278,7 @@ public String currency() {
/**
* Get the consumedQuantity property: The quantity of usage.
- *
+ *
* @return the consumedQuantity value.
*/
public BigDecimal consumedQuantity() {
@@ -285,7 +287,7 @@ public BigDecimal consumedQuantity() {
/**
* Get the unitOfMeasure property: The unit of measure.
- *
+ *
* @return the unitOfMeasure value.
*/
public String unitOfMeasure() {
@@ -294,7 +296,7 @@ public String unitOfMeasure() {
/**
* Get the pretaxCost property: The amount of cost before tax.
- *
+ *
* @return the pretaxCost value.
*/
public BigDecimal pretaxCost() {
@@ -303,7 +305,7 @@ public BigDecimal pretaxCost() {
/**
* Get the isEstimated property: The estimated usage is subject to change.
- *
+ *
* @return the isEstimated value.
*/
public Boolean isEstimated() {
@@ -312,7 +314,7 @@ public Boolean isEstimated() {
/**
* Get the meterId property: The meter id (GUID).
- *
+ *
* @return the meterId value.
*/
public UUID meterId() {
@@ -321,7 +323,7 @@ public UUID meterId() {
/**
* Get the subscriptionGuid property: Subscription guid.
- *
+ *
* @return the subscriptionGuid value.
*/
public UUID subscriptionGuid() {
@@ -330,7 +332,7 @@ public UUID subscriptionGuid() {
/**
* Get the subscriptionName property: Subscription name.
- *
+ *
* @return the subscriptionName value.
*/
public String subscriptionName() {
@@ -339,7 +341,7 @@ public String subscriptionName() {
/**
* Get the accountName property: Account name.
- *
+ *
* @return the accountName value.
*/
public String accountName() {
@@ -348,7 +350,7 @@ public String accountName() {
/**
* Get the departmentName property: Department name.
- *
+ *
* @return the departmentName value.
*/
public String departmentName() {
@@ -357,7 +359,7 @@ public String departmentName() {
/**
* Get the consumedService property: Consumed service name.
- *
+ *
* @return the consumedService value.
*/
public String consumedService() {
@@ -366,7 +368,7 @@ public String consumedService() {
/**
* Get the costCenter property: The cost center of this department if it is a department and a costcenter exists.
- *
+ *
* @return the costCenter value.
*/
public String costCenter() {
@@ -376,7 +378,7 @@ public String costCenter() {
/**
* Get the additionalProperties property: Additional details of this usage item. By default this is not populated,
* unless it's specified in $expand.
- *
+ *
* @return the additionalProperties value.
*/
public String additionalProperties() {
@@ -385,7 +387,7 @@ public String additionalProperties() {
/**
* Get the publisherName property: The name of publisher.
- *
+ *
* @return the publisherName value.
*/
public String publisherName() {
@@ -394,7 +396,7 @@ public String publisherName() {
/**
* Get the planName property: The name of plan.
- *
+ *
* @return the planName value.
*/
public String planName() {
@@ -403,7 +405,7 @@ public String planName() {
/**
* Get the isRecurringCharge property: Flag indicating whether this is a recurring charge or not.
- *
+ *
* @return the isRecurringCharge value.
*/
public Boolean isRecurringCharge() {
@@ -412,7 +414,7 @@ public Boolean isRecurringCharge() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernChargeSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernChargeSummaryProperties.java
index 9a5a2f9e026a..31b9ed42e612 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,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.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** The properties of modern charge summary. */
+/**
+ * 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,9 +79,21 @@ public final class ModernChargeSummaryProperties {
@JsonProperty(value = "isInvoiced", access = JsonProperty.Access.WRITE_ONLY)
private Boolean isInvoiced;
+ /*
+ * Subscription guid.
+ */
+ @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String subscriptionId;
+
+ /**
+ * Creates an instance of ModernChargeSummaryProperties class.
+ */
+ public ModernChargeSummaryProperties() {
+ }
+
/**
* Get the billingPeriodId property: The id of the billing period resource that the charge belongs to.
- *
+ *
* @return the billingPeriodId value.
*/
public String billingPeriodId() {
@@ -92,7 +102,7 @@ public String billingPeriodId() {
/**
* Get the usageStart property: Usage start date.
- *
+ *
* @return the usageStart value.
*/
public String usageStart() {
@@ -101,7 +111,7 @@ public String usageStart() {
/**
* Get the usageEnd property: Usage end date.
- *
+ *
* @return the usageEnd value.
*/
public String usageEnd() {
@@ -110,7 +120,7 @@ public String usageEnd() {
/**
* Get the azureCharges property: Azure Charges.
- *
+ *
* @return the azureCharges value.
*/
public Amount azureCharges() {
@@ -119,7 +129,7 @@ public Amount azureCharges() {
/**
* Get the chargesBilledSeparately property: Charges Billed separately.
- *
+ *
* @return the chargesBilledSeparately value.
*/
public Amount chargesBilledSeparately() {
@@ -128,7 +138,7 @@ public Amount chargesBilledSeparately() {
/**
* Get the marketplaceCharges property: Marketplace Charges.
- *
+ *
* @return the marketplaceCharges value.
*/
public Amount marketplaceCharges() {
@@ -137,7 +147,7 @@ public Amount marketplaceCharges() {
/**
* Get the billingAccountId property: Billing Account Id.
- *
+ *
* @return the billingAccountId value.
*/
public String billingAccountId() {
@@ -146,7 +156,7 @@ public String billingAccountId() {
/**
* Get the billingProfileId property: Billing Profile Id.
- *
+ *
* @return the billingProfileId value.
*/
public String billingProfileId() {
@@ -155,7 +165,7 @@ public String billingProfileId() {
/**
* Get the invoiceSectionId property: Invoice Section Id.
- *
+ *
* @return the invoiceSectionId value.
*/
public String invoiceSectionId() {
@@ -164,7 +174,7 @@ public String invoiceSectionId() {
/**
* Get the customerId property: Customer Id.
- *
+ *
* @return the customerId value.
*/
public String customerId() {
@@ -173,16 +183,25 @@ public String customerId() {
/**
* Get the isInvoiced property: Is charge Invoiced.
- *
+ *
* @return the isInvoiced value.
*/
public Boolean isInvoiced() {
return this.isInvoiced;
}
+ /**
+ * Get the subscriptionId property: Subscription guid.
+ *
+ * @return the subscriptionId value.
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionInner.java
index 636c1f94bcf5..274f22ec521b 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,29 +4,34 @@
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
+/**
+ * Modern Reservation transaction resource.
+ */
+@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.
- *
+ *
* @return the innerProperties value.
*/
private ModernReservationTransactionProperties innerProperties() {
@@ -35,7 +40,7 @@ private ModernReservationTransactionProperties innerProperties() {
/**
* Get the amount property: The charge of the transaction.
- *
+ *
* @return the amount value.
*/
public BigDecimal amount() {
@@ -45,7 +50,7 @@ public BigDecimal amount() {
/**
* Get the armSkuName property: This is the ARM Sku name. It can be used to join with the serviceType field in
* additional info in usage records.
- *
+ *
* @return the armSkuName value.
*/
public String armSkuName() {
@@ -54,7 +59,7 @@ public String armSkuName() {
/**
* Get the billingFrequency property: The billing frequency, which can be either one-time or recurring.
- *
+ *
* @return the billingFrequency value.
*/
public String billingFrequency() {
@@ -63,7 +68,7 @@ public String billingFrequency() {
/**
* Get the billingProfileId property: Billing profile Id.
- *
+ *
* @return the billingProfileId value.
*/
public String billingProfileId() {
@@ -72,7 +77,7 @@ public String billingProfileId() {
/**
* Get the billingProfileName property: Billing profile name.
- *
+ *
* @return the billingProfileName value.
*/
public String billingProfileName() {
@@ -81,7 +86,7 @@ public String billingProfileName() {
/**
* Get the currency property: The ISO currency in which the transaction is charged, for example, USD.
- *
+ *
* @return the currency value.
*/
public String currency() {
@@ -90,7 +95,7 @@ public String currency() {
/**
* Get the description property: The description of the transaction.
- *
+ *
* @return the description value.
*/
public String description() {
@@ -99,7 +104,7 @@ public String description() {
/**
* Get the eventDate property: The date of the transaction.
- *
+ *
* @return the eventDate value.
*/
public OffsetDateTime eventDate() {
@@ -107,8 +112,8 @@ 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.
*/
public String eventType() {
@@ -117,7 +122,7 @@ public String eventType() {
/**
* Get the invoice property: Invoice Number.
- *
+ *
* @return the invoice value.
*/
public String invoice() {
@@ -126,7 +131,7 @@ public String invoice() {
/**
* Get the invoiceId property: Invoice Id as on the invoice where the specific transaction appears.
- *
+ *
* @return the invoiceId value.
*/
public String invoiceId() {
@@ -135,7 +140,7 @@ public String invoiceId() {
/**
* Get the invoiceSectionId property: Invoice Section Id.
- *
+ *
* @return the invoiceSectionId value.
*/
public String invoiceSectionId() {
@@ -144,7 +149,7 @@ public String invoiceSectionId() {
/**
* Get the invoiceSectionName property: Invoice Section Name.
- *
+ *
* @return the invoiceSectionName value.
*/
public String invoiceSectionName() {
@@ -153,7 +158,7 @@ public String invoiceSectionName() {
/**
* Get the purchasingSubscriptionGuid property: The subscription guid that makes the transaction.
- *
+ *
* @return the purchasingSubscriptionGuid value.
*/
public UUID purchasingSubscriptionGuid() {
@@ -162,7 +167,7 @@ public UUID purchasingSubscriptionGuid() {
/**
* Get the purchasingSubscriptionName property: The subscription name that makes the transaction.
- *
+ *
* @return the purchasingSubscriptionName value.
*/
public String purchasingSubscriptionName() {
@@ -171,7 +176,7 @@ public String purchasingSubscriptionName() {
/**
* Get the quantity property: The quantity of the transaction.
- *
+ *
* @return the quantity value.
*/
public BigDecimal quantity() {
@@ -180,7 +185,7 @@ public BigDecimal quantity() {
/**
* Get the region property: The region of the transaction.
- *
+ *
* @return the region value.
*/
public String region() {
@@ -191,7 +196,7 @@ public String region() {
* 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
* reservation order specifies the VM size and region for the reservations.
- *
+ *
* @return the reservationOrderId value.
*/
public String reservationOrderId() {
@@ -200,7 +205,7 @@ public String reservationOrderId() {
/**
* Get the reservationOrderName property: The name of the reservation order.
- *
+ *
* @return the reservationOrderName value.
*/
public String reservationOrderName() {
@@ -209,7 +214,7 @@ public String reservationOrderName() {
/**
* Get the term property: This is the term of the transaction.
- *
+ *
* @return the term value.
*/
public String term() {
@@ -218,19 +223,20 @@ public String term() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
public void validate() {
super.validate();
if (innerProperties() == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- "Missing required property innerProperties in model ModernReservationTransactionInner"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property innerProperties in model ModernReservationTransactionInner"));
} else {
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..919c51b3ad90 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,18 +5,16 @@
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;
import java.util.UUID;
-/** The properties of a modern reservation transaction. */
+/**
+ * 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 +22,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 +64,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 +118,7 @@ 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,9 +135,15 @@ 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.
- *
+ *
* @return the amount value.
*/
public BigDecimal amount() {
@@ -153,7 +153,7 @@ public BigDecimal amount() {
/**
* Get the armSkuName property: This is the ARM Sku name. It can be used to join with the serviceType field in
* additional info in usage records.
- *
+ *
* @return the armSkuName value.
*/
public String armSkuName() {
@@ -162,7 +162,7 @@ public String armSkuName() {
/**
* Get the billingFrequency property: The billing frequency, which can be either one-time or recurring.
- *
+ *
* @return the billingFrequency value.
*/
public String billingFrequency() {
@@ -171,7 +171,7 @@ public String billingFrequency() {
/**
* Get the billingProfileId property: Billing profile Id.
- *
+ *
* @return the billingProfileId value.
*/
public String billingProfileId() {
@@ -180,7 +180,7 @@ public String billingProfileId() {
/**
* Get the billingProfileName property: Billing profile name.
- *
+ *
* @return the billingProfileName value.
*/
public String billingProfileName() {
@@ -189,7 +189,7 @@ public String billingProfileName() {
/**
* Get the currency property: The ISO currency in which the transaction is charged, for example, USD.
- *
+ *
* @return the currency value.
*/
public String currency() {
@@ -198,7 +198,7 @@ public String currency() {
/**
* Get the description property: The description of the transaction.
- *
+ *
* @return the description value.
*/
public String description() {
@@ -207,7 +207,7 @@ public String description() {
/**
* Get the eventDate property: The date of the transaction.
- *
+ *
* @return the eventDate value.
*/
public OffsetDateTime eventDate() {
@@ -215,8 +215,8 @@ 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.
*/
public String eventType() {
@@ -225,7 +225,7 @@ public String eventType() {
/**
* Get the invoice property: Invoice Number.
- *
+ *
* @return the invoice value.
*/
public String invoice() {
@@ -234,7 +234,7 @@ public String invoice() {
/**
* Get the invoiceId property: Invoice Id as on the invoice where the specific transaction appears.
- *
+ *
* @return the invoiceId value.
*/
public String invoiceId() {
@@ -243,7 +243,7 @@ public String invoiceId() {
/**
* Get the invoiceSectionId property: Invoice Section Id.
- *
+ *
* @return the invoiceSectionId value.
*/
public String invoiceSectionId() {
@@ -252,7 +252,7 @@ public String invoiceSectionId() {
/**
* Get the invoiceSectionName property: Invoice Section Name.
- *
+ *
* @return the invoiceSectionName value.
*/
public String invoiceSectionName() {
@@ -261,7 +261,7 @@ public String invoiceSectionName() {
/**
* Get the purchasingSubscriptionGuid property: The subscription guid that makes the transaction.
- *
+ *
* @return the purchasingSubscriptionGuid value.
*/
public UUID purchasingSubscriptionGuid() {
@@ -270,7 +270,7 @@ public UUID purchasingSubscriptionGuid() {
/**
* Get the purchasingSubscriptionName property: The subscription name that makes the transaction.
- *
+ *
* @return the purchasingSubscriptionName value.
*/
public String purchasingSubscriptionName() {
@@ -279,7 +279,7 @@ public String purchasingSubscriptionName() {
/**
* Get the quantity property: The quantity of the transaction.
- *
+ *
* @return the quantity value.
*/
public BigDecimal quantity() {
@@ -288,7 +288,7 @@ public BigDecimal quantity() {
/**
* Get the region property: The region of the transaction.
- *
+ *
* @return the region value.
*/
public String region() {
@@ -299,7 +299,7 @@ public String region() {
* 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
* reservation order specifies the VM size and region for the reservations.
- *
+ *
* @return the reservationOrderId value.
*/
public String reservationOrderId() {
@@ -308,7 +308,7 @@ public String reservationOrderId() {
/**
* Get the reservationOrderName property: The name of the reservation order.
- *
+ *
* @return the reservationOrderName value.
*/
public String reservationOrderName() {
@@ -317,7 +317,7 @@ public String reservationOrderName() {
/**
* Get the term property: This is the term of the transaction.
- *
+ *
* @return the term value.
*/
public String term() {
@@ -326,7 +326,7 @@ public String term() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernUsageDetailProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernUsageDetailProperties.java
index 00c64480a2cd..6a910a4689db 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,19 +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.PricingModelType;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
import java.util.UUID;
-/** The properties of the usage detail. */
+/**
+ * The properties of the usage detail.
+ */
@Immutable
public final class ModernUsageDetailProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ModernUsageDetailProperties.class);
-
/*
* Billing Account identifier.
*/
@@ -55,19 +53,13 @@ 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
- * entitlement purchases like SaaS, Marketplace, RI, etc.
+ * 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)
private String billingProfileName;
@@ -91,17 +83,13 @@ 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 +101,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 +113,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 +149,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 +167,7 @@ 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 +185,49 @@ 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 +245,31 @@ 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 +281,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 +305,7 @@ 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 +317,7 @@ 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 +329,13 @@ 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 +407,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 +437,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,9 +448,15 @@ 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.
- *
+ *
* @return the billingAccountId value.
*/
public String billingAccountId() {
@@ -510,7 +465,7 @@ public String billingAccountId() {
/**
* Get the effectivePrice property: Effective Price that's charged for the usage.
- *
+ *
* @return the effectivePrice value.
*/
public BigDecimal effectivePrice() {
@@ -519,7 +474,7 @@ public BigDecimal effectivePrice() {
/**
* Get the pricingModel property: Identifier that indicates how the meter is priced.
- *
+ *
* @return the pricingModel value.
*/
public PricingModelType pricingModel() {
@@ -528,7 +483,7 @@ public PricingModelType pricingModel() {
/**
* Get the billingAccountName property: Name of the Billing Account.
- *
+ *
* @return the billingAccountName value.
*/
public String billingAccountName() {
@@ -537,7 +492,7 @@ public String billingAccountName() {
/**
* Get the billingPeriodStartDate property: Billing Period Start Date as in the invoice.
- *
+ *
* @return the billingPeriodStartDate value.
*/
public OffsetDateTime billingPeriodStartDate() {
@@ -546,7 +501,7 @@ public OffsetDateTime billingPeriodStartDate() {
/**
* Get the billingPeriodEndDate property: Billing Period End Date as in the invoice.
- *
+ *
* @return the billingPeriodEndDate value.
*/
public OffsetDateTime billingPeriodEndDate() {
@@ -557,7 +512,7 @@ public OffsetDateTime billingPeriodEndDate() {
* Get the billingProfileId property: 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.
- *
+ *
* @return the billingProfileId value.
*/
public String billingProfileId() {
@@ -568,7 +523,7 @@ public String billingProfileId() {
* Get the billingProfileName property: 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.
- *
+ *
* @return the billingProfileName value.
*/
public String billingProfileName() {
@@ -577,7 +532,7 @@ public String billingProfileName() {
/**
* Get the subscriptionGuid property: Unique Microsoft generated identifier for the Azure Subscription.
- *
+ *
* @return the subscriptionGuid value.
*/
public String subscriptionGuid() {
@@ -586,7 +541,7 @@ public String subscriptionGuid() {
/**
* Get the subscriptionName property: Name of the Azure Subscription.
- *
+ *
* @return the subscriptionName value.
*/
public String subscriptionName() {
@@ -595,7 +550,7 @@ public String subscriptionName() {
/**
* Get the date property: Date for the usage record.
- *
+ *
* @return the date value.
*/
public OffsetDateTime date() {
@@ -605,7 +560,7 @@ public OffsetDateTime date() {
/**
* Get the product property: Name of the product that has accrued charges by consumption or purchase as listed in
* the invoice. Not available for Marketplace.
- *
+ *
* @return the product value.
*/
public String product() {
@@ -616,7 +571,7 @@ public String product() {
* Get the meterId property: 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.
- *
+ *
* @return the meterId value.
*/
public UUID meterId() {
@@ -625,7 +580,7 @@ public UUID meterId() {
/**
* Get the meterName property: Identifies the name of the meter against which consumption is measured.
- *
+ *
* @return the meterName value.
*/
public String meterName() {
@@ -635,7 +590,7 @@ public String meterName() {
/**
* Get the meterRegion property: Identifies the location of the datacenter for certain services that are priced
* based on datacenter location.
- *
+ *
* @return the meterRegion value.
*/
public String meterRegion() {
@@ -644,7 +599,7 @@ public String meterRegion() {
/**
* Get the meterCategory property: Identifies the top-level service for the usage.
- *
+ *
* @return the meterCategory value.
*/
public String meterCategory() {
@@ -653,7 +608,7 @@ public String meterCategory() {
/**
* Get the meterSubCategory property: Defines the type or sub-category of Azure service that can affect the rate.
- *
+ *
* @return the meterSubCategory value.
*/
public String meterSubCategory() {
@@ -663,7 +618,7 @@ public String meterSubCategory() {
/**
* Get the serviceFamily property: List the service family for the product purchased or charged (Example: Storage ;
* Compute).
- *
+ *
* @return the serviceFamily value.
*/
public String serviceFamily() {
@@ -673,7 +628,7 @@ public String serviceFamily() {
/**
* Get the quantity property: Measure the quantity purchased or consumed.The amount of the meter used during the
* billing period.
- *
+ *
* @return the quantity value.
*/
public BigDecimal quantity() {
@@ -683,7 +638,7 @@ public BigDecimal quantity() {
/**
* Get the unitOfMeasure property: Identifies the Unit that the service is charged in. For example, GB, hours,
* 10,000 s.
- *
+ *
* @return the unitOfMeasure value.
*/
public String unitOfMeasure() {
@@ -692,7 +647,7 @@ public String unitOfMeasure() {
/**
* Get the instanceName property: Instance Name.
- *
+ *
* @return the instanceName value.
*/
public String instanceName() {
@@ -701,7 +656,7 @@ public String instanceName() {
/**
* Get the costInUsd property: Estimated extendedCost or blended cost before tax in USD.
- *
+ *
* @return the costInUsd value.
*/
public BigDecimal costInUsd() {
@@ -710,7 +665,7 @@ public BigDecimal costInUsd() {
/**
* Get the unitPrice property: Unit Price is the price applicable to you. (your EA or other contract price).
- *
+ *
* @return the unitPrice value.
*/
public BigDecimal unitPrice() {
@@ -719,7 +674,7 @@ public BigDecimal unitPrice() {
/**
* Get the billingCurrencyCode property: The currency defining the billed cost.
- *
+ *
* @return the billingCurrencyCode value.
*/
public String billingCurrencyCode() {
@@ -728,7 +683,7 @@ public String billingCurrencyCode() {
/**
* Get the resourceLocation property: Name of the resource location.
- *
+ *
* @return the resourceLocation value.
*/
public String resourceLocation() {
@@ -738,7 +693,7 @@ public String resourceLocation() {
/**
* Get the consumedService property: Consumed service name. Name of the azure resource provider that emits the usage
* or was purchased. This value is not provided for marketplace usage.
- *
+ *
* @return the consumedService value.
*/
public String consumedService() {
@@ -747,7 +702,7 @@ public String consumedService() {
/**
* Get the serviceInfo1 property: Service-specific metadata.
- *
+ *
* @return the serviceInfo1 value.
*/
public String serviceInfo1() {
@@ -756,7 +711,7 @@ public String serviceInfo1() {
/**
* Get the serviceInfo2 property: Legacy field with optional service-specific metadata.
- *
+ *
* @return the serviceInfo2 value.
*/
public String serviceInfo2() {
@@ -767,7 +722,7 @@ public String serviceInfo2() {
* Get the additionalInfo property: 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.
- *
+ *
* @return the additionalInfo value.
*/
public String additionalInfo() {
@@ -777,7 +732,7 @@ public String additionalInfo() {
/**
* Get the invoiceSectionId property: Identifier of the project that is being charged in the invoice. Not applicable
* for Microsoft Customer Agreements onboarded by partners.
- *
+ *
* @return the invoiceSectionId value.
*/
public String invoiceSectionId() {
@@ -787,7 +742,7 @@ public String invoiceSectionId() {
/**
* Get the invoiceSectionName property: Name of the project that is being charged in the invoice. Not applicable for
* Microsoft Customer Agreements onboarded by partners.
- *
+ *
* @return the invoiceSectionName value.
*/
public String invoiceSectionName() {
@@ -797,7 +752,7 @@ public String invoiceSectionName() {
/**
* Get the costCenter property: The cost center of this department if it is a department and a cost center is
* provided.
- *
+ *
* @return the costCenter value.
*/
public String costCenter() {
@@ -807,7 +762,7 @@ public String costCenter() {
/**
* Get the resourceGroup property: Name of the Azure resource group used for cohesive lifecycle management of
* resources.
- *
+ *
* @return the resourceGroup value.
*/
public String resourceGroup() {
@@ -817,7 +772,7 @@ public String resourceGroup() {
/**
* Get the reservationId property: ARM resource id of the reservation. Only applies to records relevant to
* reservations.
- *
+ *
* @return the reservationId value.
*/
public String reservationId() {
@@ -827,7 +782,7 @@ public String reservationId() {
/**
* Get the reservationName property: 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.
- *
+ *
* @return the reservationName value.
*/
public String reservationName() {
@@ -837,7 +792,7 @@ public String reservationName() {
/**
* Get the productOrderId property: 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.
- *
+ *
* @return the productOrderId value.
*/
public String productOrderId() {
@@ -846,7 +801,7 @@ public String productOrderId() {
/**
* Get the productOrderName property: Product Order Name. For reservations this is the SKU that was purchased.
- *
+ *
* @return the productOrderName value.
*/
public String productOrderName() {
@@ -855,7 +810,7 @@ public String productOrderName() {
/**
* Get the isAzureCreditEligible property: Determines if the cost is eligible to be paid for using Azure credits.
- *
+ *
* @return the isAzureCreditEligible value.
*/
public Boolean isAzureCreditEligible() {
@@ -866,7 +821,7 @@ public Boolean isAzureCreditEligible() {
* Get the term property: 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.
- *
+ *
* @return the term value.
*/
public String term() {
@@ -876,7 +831,7 @@ public String term() {
/**
* Get the publisherName property: Name of the publisher of the service including Microsoft or Third Party
* publishers.
- *
+ *
* @return the publisherName value.
*/
public String publisherName() {
@@ -886,7 +841,7 @@ public String publisherName() {
/**
* Get the publisherType property: Type of publisher that identifies if the publisher is first party, third party
* reseller or third party agency.
- *
+ *
* @return the publisherType value.
*/
public String publisherType() {
@@ -896,7 +851,7 @@ public String publisherType() {
/**
* Get the chargeType property: Indicates a charge represents credits, usage, a Marketplace purchase, a reservation
* fee, or a refund.
- *
+ *
* @return the chargeType value.
*/
public String chargeType() {
@@ -907,7 +862,7 @@ public String chargeType() {
* Get the frequency property: 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.
- *
+ *
* @return the frequency value.
*/
public String frequency() {
@@ -916,7 +871,7 @@ public String frequency() {
/**
* Get the costInBillingCurrency property: ExtendedCost or blended cost before tax in billed currency.
- *
+ *
* @return the costInBillingCurrency value.
*/
public BigDecimal costInBillingCurrency() {
@@ -926,7 +881,7 @@ public BigDecimal costInBillingCurrency() {
/**
* Get the costInPricingCurrency property: ExtendedCost or blended cost before tax in pricing currency to correlate
* with prices.
- *
+ *
* @return the costInPricingCurrency value.
*/
public BigDecimal costInPricingCurrency() {
@@ -935,7 +890,7 @@ public BigDecimal costInPricingCurrency() {
/**
* Get the exchangeRate property: Exchange rate used in conversion from pricing currency to billing currency.
- *
+ *
* @return the exchangeRate value.
*/
public String exchangeRate() {
@@ -945,7 +900,7 @@ public String exchangeRate() {
/**
* Get the exchangeRateDate property: Date on which exchange rate used in conversion from pricing currency to
* billing currency.
- *
+ *
* @return the exchangeRateDate value.
*/
public OffsetDateTime exchangeRateDate() {
@@ -954,7 +909,7 @@ public OffsetDateTime exchangeRateDate() {
/**
* Get the invoiceId property: Invoice ID as on the invoice where the specific transaction appears.
- *
+ *
* @return the invoiceId value.
*/
public String invoiceId() {
@@ -964,7 +919,7 @@ public String invoiceId() {
/**
* Get the previousInvoiceId property: Reference to an original invoice there is a refund (negative cost). This is
* populated only when there is a refund.
- *
+ *
* @return the previousInvoiceId value.
*/
public String previousInvoiceId() {
@@ -973,7 +928,7 @@ public String previousInvoiceId() {
/**
* Get the pricingCurrencyCode property: Pricing Billing Currency.
- *
+ *
* @return the pricingCurrencyCode value.
*/
public String pricingCurrencyCode() {
@@ -983,7 +938,7 @@ public String pricingCurrencyCode() {
/**
* Get the productIdentifier property: Identifier for the product that has accrued charges by consumption or
* purchase . This is the concatenated key of productId and SkuId in partner center.
- *
+ *
* @return the productIdentifier value.
*/
public String productIdentifier() {
@@ -992,7 +947,7 @@ public String productIdentifier() {
/**
* Get the resourceLocationNormalized property: Resource Location Normalized.
- *
+ *
* @return the resourceLocationNormalized value.
*/
public String resourceLocationNormalized() {
@@ -1002,7 +957,7 @@ public String resourceLocationNormalized() {
/**
* Get the servicePeriodStartDate property: 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.
- *
+ *
* @return the servicePeriodStartDate value.
*/
public OffsetDateTime servicePeriodStartDate() {
@@ -1012,7 +967,7 @@ public OffsetDateTime servicePeriodStartDate() {
/**
* Get the servicePeriodEndDate property: 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.
- *
+ *
* @return the servicePeriodEndDate value.
*/
public OffsetDateTime servicePeriodEndDate() {
@@ -1021,7 +976,7 @@ public OffsetDateTime servicePeriodEndDate() {
/**
* Get the customerTenantId property: Identifier of the customer's AAD tenant.
- *
+ *
* @return the customerTenantId value.
*/
public String customerTenantId() {
@@ -1030,7 +985,7 @@ public String customerTenantId() {
/**
* Get the customerName property: Name of the customer's AAD tenant.
- *
+ *
* @return the customerName value.
*/
public String customerName() {
@@ -1039,7 +994,7 @@ public String customerName() {
/**
* Get the partnerTenantId property: Identifier for the partner's AAD tenant.
- *
+ *
* @return the partnerTenantId value.
*/
public String partnerTenantId() {
@@ -1048,7 +1003,7 @@ public String partnerTenantId() {
/**
* Get the partnerName property: Name of the partner' AAD tenant.
- *
+ *
* @return the partnerName value.
*/
public String partnerName() {
@@ -1057,7 +1012,7 @@ public String partnerName() {
/**
* Get the resellerMpnId property: MPNId for the reseller associated with the subscription.
- *
+ *
* @return the resellerMpnId value.
*/
public String resellerMpnId() {
@@ -1066,7 +1021,7 @@ public String resellerMpnId() {
/**
* Get the resellerName property: Reseller Name.
- *
+ *
* @return the resellerName value.
*/
public String resellerName() {
@@ -1075,7 +1030,7 @@ public String resellerName() {
/**
* Get the publisherId property: Publisher Id.
- *
+ *
* @return the publisherId value.
*/
public String publisherId() {
@@ -1084,7 +1039,7 @@ public String publisherId() {
/**
* Get the marketPrice property: Market Price that's charged for the usage.
- *
+ *
* @return the marketPrice value.
*/
public BigDecimal marketPrice() {
@@ -1093,7 +1048,7 @@ public BigDecimal marketPrice() {
/**
* Get the exchangeRatePricingToBilling property: Exchange Rate from pricing currency to billing currency.
- *
+ *
* @return the exchangeRatePricingToBilling value.
*/
public BigDecimal exchangeRatePricingToBilling() {
@@ -1102,7 +1057,7 @@ public BigDecimal exchangeRatePricingToBilling() {
/**
* Get the paygCostInBillingCurrency property: The amount of PayG cost before tax in billing currency.
- *
+ *
* @return the paygCostInBillingCurrency value.
*/
public BigDecimal paygCostInBillingCurrency() {
@@ -1111,7 +1066,7 @@ public BigDecimal paygCostInBillingCurrency() {
/**
* Get the paygCostInUsd property: The amount of PayG cost before tax in US Dollar currency.
- *
+ *
* @return the paygCostInUsd value.
*/
public BigDecimal paygCostInUsd() {
@@ -1121,7 +1076,7 @@ public BigDecimal paygCostInUsd() {
/**
* Get the partnerEarnedCreditRate property: Rate of discount applied if there is a partner earned credit (PEC)
* based on partner admin link access.
- *
+ *
* @return the partnerEarnedCreditRate value.
*/
public BigDecimal partnerEarnedCreditRate() {
@@ -1130,7 +1085,7 @@ public BigDecimal partnerEarnedCreditRate() {
/**
* Get the partnerEarnedCreditApplied property: Flag to indicate if partner earned credit has been applied or not.
- *
+ *
* @return the partnerEarnedCreditApplied value.
*/
public String partnerEarnedCreditApplied() {
@@ -1139,7 +1094,7 @@ public String partnerEarnedCreditApplied() {
/**
* Get the payGPrice property: Retail price for the resource.
- *
+ *
* @return the payGPrice value.
*/
public BigDecimal payGPrice() {
@@ -1148,7 +1103,7 @@ public BigDecimal payGPrice() {
/**
* Get the benefitId property: Unique identifier for the applicable benefit.
- *
+ *
* @return the benefitId value.
*/
public String benefitId() {
@@ -1157,7 +1112,7 @@ public String benefitId() {
/**
* Get the benefitName property: Name of the applicable benefit.
- *
+ *
* @return the benefitName value.
*/
public String benefitName() {
@@ -1167,7 +1122,7 @@ public String benefitName() {
/**
* Get the provider property: Identifier for Product Category or Line Of Business, Ex - Azure, Microsoft 365, AWS
* e.t.c.
- *
+ *
* @return the provider value.
*/
public String provider() {
@@ -1176,7 +1131,7 @@ public String provider() {
/**
* Get the costAllocationRuleName property: Name for Cost Allocation Rule.
- *
+ *
* @return the costAllocationRuleName value.
*/
public String costAllocationRuleName() {
@@ -1185,7 +1140,7 @@ public String costAllocationRuleName() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java
index fe76c6fdfa54..ad3d3f44e6f2 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java
@@ -5,16 +5,14 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.OperationDisplay;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** A Consumption REST API operation. */
+/**
+ * A Consumption REST API operation.
+ */
@Fluent
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
* Operation Id.
*/
@@ -33,9 +31,15 @@ public final class OperationInner {
@JsonProperty(value = "display")
private OperationDisplay display;
+ /**
+ * Creates an instance of OperationInner class.
+ */
+ public OperationInner() {
+ }
+
/**
* Get the id property: Operation Id.
- *
+ *
* @return the id value.
*/
public String id() {
@@ -44,7 +48,7 @@ public String id() {
/**
* Get the name property: Operation name: {provider}/{resource}/{operation}.
- *
+ *
* @return the name value.
*/
public String name() {
@@ -53,7 +57,7 @@ public String name() {
/**
* Get the display property: The object that represents the operation.
- *
+ *
* @return the display value.
*/
public OperationDisplay display() {
@@ -62,7 +66,7 @@ public OperationDisplay display() {
/**
* Set the display property: The object that represents the operation.
- *
+ *
* @param display the display value to set.
* @return the OperationInner object itself.
*/
@@ -73,7 +77,7 @@ public OperationInner withDisplay(OperationDisplay display) {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationStatusInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationStatusInner.java
new file mode 100644
index 000000000000..043881ab92a9
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationStatusInner.java
@@ -0,0 +1,92 @@
+// 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.Fluent;
+import com.azure.resourcemanager.consumption.models.OperationStatusType;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/**
+ * The status of the long running operation.
+ */
+@Fluent
+public final class OperationStatusInner {
+ /*
+ * The status of the long running operation.
+ */
+ @JsonProperty(value = "status")
+ private OperationStatusType status;
+
+ /*
+ * The properties of the resource generated.
+ */
+ @JsonProperty(value = "properties")
+ private PricesheetDownloadProperties innerProperties;
+
+ /**
+ * Creates an instance of OperationStatusInner class.
+ */
+ public OperationStatusInner() {
+ }
+
+ /**
+ * Get the status property: The status of the long running operation.
+ *
+ * @return the status value.
+ */
+ public OperationStatusType status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: The status of the long running operation.
+ *
+ * @param status the status value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withStatus(OperationStatusType status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the innerProperties property: The properties of the resource generated.
+ *
+ * @return the innerProperties value.
+ */
+ private PricesheetDownloadProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the downloadUrl property: The link (url) to download the pricesheet.
+ *
+ * @return the downloadUrl value.
+ */
+ public String downloadUrl() {
+ return this.innerProperties() == null ? null : this.innerProperties().downloadUrl();
+ }
+
+ /**
+ * Get the validTill property: Download link validity.
+ *
+ * @return the validTill value.
+ */
+ public OffsetDateTime validTill() {
+ return this.innerProperties() == null ? null : this.innerProperties().validTill();
+ }
+
+ /**
+ * 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/PriceSheetModel.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetModel.java
index 0e4aa629a411..646174987adf 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,16 @@
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. */
+/**
+ * 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,9 +33,15 @@ 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.
- *
+ *
* @return the pricesheets value.
*/
public List pricesheets() {
@@ -46,7 +50,7 @@ public List pricesheets() {
/**
* Get the nextLink property: The link (url) to the next page of results.
- *
+ *
* @return the nextLink value.
*/
public String nextLink() {
@@ -55,7 +59,7 @@ public String nextLink() {
/**
* Get the download property: Pricesheet download details.
- *
+ *
* @return the download value.
*/
public MeterDetails download() {
@@ -64,7 +68,7 @@ public MeterDetails download() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultInner.java
index 7d19b3f74d32..8144dbcf1350 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,25 +4,22 @@
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.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
+/**
+ * An pricesheet resource.
+ */
+@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;
@@ -40,9 +37,15 @@ public final class PriceSheetResultInner extends ProxyResource {
@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.
- *
+ *
* @return the innerProperties value.
*/
private PriceSheetModel innerProperties() {
@@ -51,7 +54,7 @@ private PriceSheetModel innerProperties() {
/**
* Get the etag property: The etag for the resource.
- *
+ *
* @return the etag value.
*/
public String etag() {
@@ -60,7 +63,7 @@ public String etag() {
/**
* Get the tags property: Resource tags.
- *
+ *
* @return the tags value.
*/
public Map tags() {
@@ -69,7 +72,7 @@ public Map tags() {
/**
* Get the pricesheets property: Price sheet.
- *
+ *
* @return the pricesheets value.
*/
public List pricesheets() {
@@ -78,7 +81,7 @@ public List pricesheets() {
/**
* Get the nextLink property: The link (url) to the next page of results.
- *
+ *
* @return the nextLink value.
*/
public String nextLink() {
@@ -87,7 +90,7 @@ public String nextLink() {
/**
* Get the download property: Pricesheet download details.
- *
+ *
* @return the download value.
*/
public MeterDetails download() {
@@ -96,7 +99,7 @@ public MeterDetails download() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PricesheetDownloadProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PricesheetDownloadProperties.java
new file mode 100644
index 000000000000..faea82551a34
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PricesheetDownloadProperties.java
@@ -0,0 +1,59 @@
+// 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.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/**
+ * The properties of the price sheet download.
+ */
+@Immutable
+public final class PricesheetDownloadProperties {
+ /*
+ * The link (url) to download the pricesheet.
+ */
+ @JsonProperty(value = "downloadUrl", access = JsonProperty.Access.WRITE_ONLY)
+ private String downloadUrl;
+
+ /*
+ * Download link validity.
+ */
+ @JsonProperty(value = "validTill", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime validTill;
+
+ /**
+ * Creates an instance of PricesheetDownloadProperties class.
+ */
+ public PricesheetDownloadProperties() {
+ }
+
+ /**
+ * Get the downloadUrl property: The link (url) to download the pricesheet.
+ *
+ * @return the downloadUrl value.
+ */
+ public String downloadUrl() {
+ return this.downloadUrl;
+ }
+
+ /**
+ * Get the validTill property: Download link validity.
+ *
+ * @return the validTill value.
+ */
+ public OffsetDateTime validTill() {
+ return this.validTill;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailInner.java
index ba58947769d8..71910beea1f8 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,21 +4,19 @@
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;
import java.time.OffsetDateTime;
import java.util.Map;
-/** reservation detail resource. */
-@Fluent
+/**
+ * reservation detail resource.
+ */
+@Immutable
public final class ReservationDetailInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationDetailInner.class);
-
/*
* The properties of the reservation detail.
*/
@@ -38,9 +36,15 @@ 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.
- *
+ *
* @return the innerProperties value.
*/
private ReservationDetailProperties innerProperties() {
@@ -49,7 +53,7 @@ private ReservationDetailProperties innerProperties() {
/**
* Get the etag property: The etag for the resource.
- *
+ *
* @return the etag value.
*/
public String etag() {
@@ -58,7 +62,7 @@ public String etag() {
/**
* Get the tags property: Resource tags.
- *
+ *
* @return the tags value.
*/
public Map tags() {
@@ -69,7 +73,7 @@ public Map tags() {
* 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
* reservation order specifies the VM size and region for the reservations.
- *
+ *
* @return the reservationOrderId value.
*/
public String reservationOrderId() {
@@ -78,7 +82,7 @@ public String reservationOrderId() {
/**
* Get the instanceFlexibilityRatio property: The instance Flexibility Ratio.
- *
+ *
* @return the instanceFlexibilityRatio value.
*/
public String instanceFlexibilityRatio() {
@@ -87,7 +91,7 @@ public String instanceFlexibilityRatio() {
/**
* Get the instanceFlexibilityGroup property: The instance Flexibility Group.
- *
+ *
* @return the instanceFlexibilityGroup value.
*/
public String instanceFlexibilityGroup() {
@@ -98,7 +102,7 @@ public String instanceFlexibilityGroup() {
* Get the reservationId property: 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.
- *
+ *
* @return the reservationId value.
*/
public String reservationId() {
@@ -108,7 +112,7 @@ public String reservationId() {
/**
* Get the skuName property: This is the ARM Sku name. It can be used to join with the serviceType field in
* additional info in usage records.
- *
+ *
* @return the skuName value.
*/
public String skuName() {
@@ -118,7 +122,7 @@ public String skuName() {
/**
* Get the reservedHours property: 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.
- *
+ *
* @return the reservedHours value.
*/
public BigDecimal reservedHours() {
@@ -127,7 +131,7 @@ public BigDecimal reservedHours() {
/**
* Get the usageDate property: The date on which consumption occurred.
- *
+ *
* @return the usageDate value.
*/
public OffsetDateTime usageDate() {
@@ -136,7 +140,7 @@ public OffsetDateTime usageDate() {
/**
* Get the usedHours property: This is the total hours used by the instance.
- *
+ *
* @return the usedHours value.
*/
public BigDecimal usedHours() {
@@ -145,7 +149,7 @@ public BigDecimal usedHours() {
/**
* Get the instanceId property: This identifier is the name of the resource or the fully qualified Resource ID.
- *
+ *
* @return the instanceId value.
*/
public String instanceId() {
@@ -155,7 +159,7 @@ public String instanceId() {
/**
* Get the totalReservedQuantity property: This is the total count of instances that are reserved for the
* reservationId.
- *
+ *
* @return the totalReservedQuantity value.
*/
public BigDecimal totalReservedQuantity() {
@@ -164,7 +168,7 @@ public BigDecimal totalReservedQuantity() {
/**
* Get the kind property: The reservation kind.
- *
+ *
* @return the kind value.
*/
public String kind() {
@@ -173,7 +177,7 @@ public String kind() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailProperties.java
index 99fe617af2d0..a7aa52087f43 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,22 +5,17 @@
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;
-/** The properties of the reservation detail. */
+/**
+ * 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,19 @@ 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 +63,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,11 +80,17 @@ 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
* reservation order specifies the VM size and region for the reservations.
- *
+ *
* @return the reservationOrderId value.
*/
public String reservationOrderId() {
@@ -106,7 +99,7 @@ public String reservationOrderId() {
/**
* Get the instanceFlexibilityRatio property: The instance Flexibility Ratio.
- *
+ *
* @return the instanceFlexibilityRatio value.
*/
public String instanceFlexibilityRatio() {
@@ -115,7 +108,7 @@ public String instanceFlexibilityRatio() {
/**
* Get the instanceFlexibilityGroup property: The instance Flexibility Group.
- *
+ *
* @return the instanceFlexibilityGroup value.
*/
public String instanceFlexibilityGroup() {
@@ -126,7 +119,7 @@ public String instanceFlexibilityGroup() {
* Get the reservationId property: 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.
- *
+ *
* @return the reservationId value.
*/
public String reservationId() {
@@ -136,7 +129,7 @@ public String reservationId() {
/**
* Get the skuName property: This is the ARM Sku name. It can be used to join with the serviceType field in
* additional info in usage records.
- *
+ *
* @return the skuName value.
*/
public String skuName() {
@@ -146,7 +139,7 @@ public String skuName() {
/**
* Get the reservedHours property: 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.
- *
+ *
* @return the reservedHours value.
*/
public BigDecimal reservedHours() {
@@ -155,7 +148,7 @@ public BigDecimal reservedHours() {
/**
* Get the usageDate property: The date on which consumption occurred.
- *
+ *
* @return the usageDate value.
*/
public OffsetDateTime usageDate() {
@@ -164,7 +157,7 @@ public OffsetDateTime usageDate() {
/**
* Get the usedHours property: This is the total hours used by the instance.
- *
+ *
* @return the usedHours value.
*/
public BigDecimal usedHours() {
@@ -173,7 +166,7 @@ public BigDecimal usedHours() {
/**
* Get the instanceId property: This identifier is the name of the resource or the fully qualified Resource ID.
- *
+ *
* @return the instanceId value.
*/
public String instanceId() {
@@ -183,7 +176,7 @@ public String instanceId() {
/**
* Get the totalReservedQuantity property: This is the total count of instances that are reserved for the
* reservationId.
- *
+ *
* @return the totalReservedQuantity value.
*/
public BigDecimal totalReservedQuantity() {
@@ -192,7 +185,7 @@ public BigDecimal totalReservedQuantity() {
/**
* Get the kind property: The reservation kind.
- *
+ *
* @return the kind value.
*/
public String kind() {
@@ -201,7 +194,7 @@ public String kind() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsModelInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsModelInner.java
index 68e957a682f6..5d44c2705dd4 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,20 +6,18 @@
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;
-/** Reservation recommendation details. */
+/**
+ * Reservation recommendation details.
+ */
@Fluent
public final class ReservationRecommendationDetailsModelInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationRecommendationDetailsModelInner.class);
-
/*
* Resource Location.
*/
@@ -51,9 +49,15 @@ 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.
- *
+ *
* @return the location value.
*/
public String location() {
@@ -62,7 +66,7 @@ public String location() {
/**
* Set the location property: Resource Location.
- *
+ *
* @param location the location value to set.
* @return the ReservationRecommendationDetailsModelInner object itself.
*/
@@ -73,7 +77,7 @@ public ReservationRecommendationDetailsModelInner withLocation(String location)
/**
* Get the sku property: Resource sku.
- *
+ *
* @return the sku value.
*/
public String sku() {
@@ -82,7 +86,7 @@ public String sku() {
/**
* Set the sku property: Resource sku.
- *
+ *
* @param sku the sku value to set.
* @return the ReservationRecommendationDetailsModelInner object itself.
*/
@@ -93,7 +97,7 @@ public ReservationRecommendationDetailsModelInner withSku(String sku) {
/**
* Get the innerProperties property: The properties of the reservation recommendation.
- *
+ *
* @return the innerProperties value.
*/
private ReservationRecommendationDetailsProperties innerProperties() {
@@ -102,7 +106,7 @@ private ReservationRecommendationDetailsProperties innerProperties() {
/**
* Get the etag property: The etag for the resource.
- *
+ *
* @return the etag value.
*/
public String etag() {
@@ -111,7 +115,7 @@ public String etag() {
/**
* Get the tags property: Resource tags.
- *
+ *
* @return the tags value.
*/
public Map tags() {
@@ -120,7 +124,7 @@ public Map tags() {
/**
* Get the currency property: An ISO 4217 currency code identifier for the costs and savings.
- *
+ *
* @return the currency value.
*/
public String currency() {
@@ -129,7 +133,7 @@ public String currency() {
/**
* Get the resource property: Resource specific properties.
- *
+ *
* @return the resource value.
*/
public ReservationRecommendationDetailsResourceProperties resource() {
@@ -138,7 +142,7 @@ public ReservationRecommendationDetailsResourceProperties resource() {
/**
* Get the resourceGroup property: Resource Group.
- *
+ *
* @return the resourceGroup value.
*/
public String resourceGroup() {
@@ -147,7 +151,7 @@ public String resourceGroup() {
/**
* Get the savings property: Savings information for the recommendation.
- *
+ *
* @return the savings value.
*/
public ReservationRecommendationDetailsSavingsProperties savings() {
@@ -156,7 +160,7 @@ public ReservationRecommendationDetailsSavingsProperties savings() {
/**
* Get the scope property: Scope of the reservation, ex: Single or Shared.
- *
+ *
* @return the scope value.
*/
public String scope() {
@@ -165,7 +169,7 @@ public String scope() {
/**
* Get the usage property: Historical usage details used to calculate the estimated savings.
- *
+ *
* @return the usage value.
*/
public ReservationRecommendationDetailsUsageProperties usage() {
@@ -174,7 +178,7 @@ public ReservationRecommendationDetailsUsageProperties usage() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsProperties.java
index adeb2dae589c..c76daeb32d28 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,20 +5,18 @@
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. */
+/**
+ * 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
+ * An ISO 4217 currency code identifier for the costs and savings
*/
@JsonProperty(value = "currency", access = JsonProperty.Access.WRITE_ONLY)
private String currency;
@@ -53,9 +51,15 @@ 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.
- *
+ *
* @return the currency value.
*/
public String currency() {
@@ -64,7 +68,7 @@ public String currency() {
/**
* Get the resource property: Resource specific properties.
- *
+ *
* @return the resource value.
*/
public ReservationRecommendationDetailsResourceProperties resource() {
@@ -73,7 +77,7 @@ public ReservationRecommendationDetailsResourceProperties resource() {
/**
* Get the resourceGroup property: Resource Group.
- *
+ *
* @return the resourceGroup value.
*/
public String resourceGroup() {
@@ -82,7 +86,7 @@ public String resourceGroup() {
/**
* Get the savings property: Savings information for the recommendation.
- *
+ *
* @return the savings value.
*/
public ReservationRecommendationDetailsSavingsProperties savings() {
@@ -91,7 +95,7 @@ public ReservationRecommendationDetailsSavingsProperties savings() {
/**
* Get the scope property: Scope of the reservation, ex: Single or Shared.
- *
+ *
* @return the scope value.
*/
public String scope() {
@@ -100,7 +104,7 @@ public String scope() {
/**
* Get the usage property: Historical usage details used to calculate the estimated savings.
- *
+ *
* @return the usage value.
*/
public ReservationRecommendationDetailsUsageProperties usage() {
@@ -109,7 +113,7 @@ public ReservationRecommendationDetailsUsageProperties usage() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationInner.java
index 45566e5e4012..cef12243cad1 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,31 +6,37 @@
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.azure.resourcemanager.consumption.models.ReservationRecommendationKind;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeId;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.Map;
-/** A reservation recommendation resource. */
+/**
+ * A reservation recommendation resource.
+ */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
- include = JsonTypeInfo.As.PROPERTY,
property = "kind",
- defaultImpl = ReservationRecommendationInner.class)
+ defaultImpl = ReservationRecommendationInner.class,
+ visible = true)
@JsonTypeName("ReservationRecommendation")
@JsonSubTypes({
@JsonSubTypes.Type(name = "legacy", value = LegacyReservationRecommendation.class),
- @JsonSubTypes.Type(name = "modern", value = ModernReservationRecommendation.class)
-})
+ @JsonSubTypes.Type(name = "modern", value = ModernReservationRecommendation.class) })
@Immutable
public class ReservationRecommendationInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationRecommendationInner.class);
+ /*
+ * Specifies the kind of reservation recommendation.
+ */
+ @JsonTypeId
+ @JsonProperty(value = "kind", required = true)
+ private ReservationRecommendationKind kind;
/*
* The etag for the resource.
@@ -57,9 +63,25 @@ public class ReservationRecommendationInner extends ProxyResource {
@JsonProperty(value = "sku", access = JsonProperty.Access.WRITE_ONLY)
private String sku;
+ /**
+ * Creates an instance of ReservationRecommendationInner class.
+ */
+ public ReservationRecommendationInner() {
+ this.kind = ReservationRecommendationKind.fromString("ReservationRecommendation");
+ }
+
+ /**
+ * Get the kind property: Specifies the kind of reservation recommendation.
+ *
+ * @return the kind value.
+ */
+ public ReservationRecommendationKind kind() {
+ return this.kind;
+ }
+
/**
* Get the etag property: The etag for the resource.
- *
+ *
* @return the etag value.
*/
public String etag() {
@@ -68,7 +90,7 @@ public String etag() {
/**
* Get the tags property: Resource tags.
- *
+ *
* @return the tags value.
*/
public Map tags() {
@@ -77,7 +99,7 @@ public Map tags() {
/**
* Get the location property: Resource location.
- *
+ *
* @return the location value.
*/
public String location() {
@@ -86,7 +108,7 @@ public String location() {
/**
* Get the sku property: Resource sku.
- *
+ *
* @return the sku value.
*/
public String sku() {
@@ -95,7 +117,7 @@ public String sku() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java
index 7b913e6e0ac3..be026475b05e 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,21 +4,19 @@
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;
import java.time.OffsetDateTime;
import java.util.Map;
-/** reservation summary resource. */
-@Fluent
+/**
+ * reservation summary resource.
+ */
+@Immutable
public final class ReservationSummaryInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationSummaryInner.class);
-
/*
* The properties of the reservation summary.
*/
@@ -38,9 +36,15 @@ 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.
- *
+ *
* @return the innerProperties value.
*/
private ReservationSummaryProperties innerProperties() {
@@ -49,7 +53,7 @@ private ReservationSummaryProperties innerProperties() {
/**
* Get the etag property: The etag for the resource.
- *
+ *
* @return the etag value.
*/
public String etag() {
@@ -58,7 +62,7 @@ public String etag() {
/**
* Get the tags property: Resource tags.
- *
+ *
* @return the tags value.
*/
public Map tags() {
@@ -69,7 +73,7 @@ public Map tags() {
* 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
* reservation order specifies the VM size and region for the reservations.
- *
+ *
* @return the reservationOrderId value.
*/
public String reservationOrderId() {
@@ -80,7 +84,7 @@ public String reservationOrderId() {
* Get the reservationId property: 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.
- *
+ *
* @return the reservationId value.
*/
public String reservationId() {
@@ -90,7 +94,7 @@ public String reservationId() {
/**
* Get the skuName property: This is the ARM Sku name. It can be used to join with the serviceType field in
* additional info in usage records.
- *
+ *
* @return the skuName value.
*/
public String skuName() {
@@ -100,7 +104,7 @@ public String skuName() {
/**
* Get the reservedHours property: 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.
- *
+ *
* @return the reservedHours value.
*/
public BigDecimal reservedHours() {
@@ -110,7 +114,7 @@ public BigDecimal reservedHours() {
/**
* Get the usageDate property: Data corresponding to the utilization record. If the grain of data is monthly, it
* will be first day of month.
- *
+ *
* @return the usageDate value.
*/
public OffsetDateTime usageDate() {
@@ -119,7 +123,7 @@ public OffsetDateTime usageDate() {
/**
* Get the usedHours property: Total used hours by the reservation.
- *
+ *
* @return the usedHours value.
*/
public BigDecimal usedHours() {
@@ -130,7 +134,7 @@ public BigDecimal usedHours() {
* Get the minUtilizationPercentage property: 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.
- *
+ *
* @return the minUtilizationPercentage value.
*/
public BigDecimal minUtilizationPercentage() {
@@ -140,7 +144,7 @@ public BigDecimal minUtilizationPercentage() {
/**
* Get the avgUtilizationPercentage property: This is average utilization for the entire time range. (day or month
* depending on the grain).
- *
+ *
* @return the avgUtilizationPercentage value.
*/
public BigDecimal avgUtilizationPercentage() {
@@ -151,7 +155,7 @@ public BigDecimal avgUtilizationPercentage() {
* Get the maxUtilizationPercentage property: 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.
- *
+ *
* @return the maxUtilizationPercentage value.
*/
public BigDecimal maxUtilizationPercentage() {
@@ -160,7 +164,7 @@ public BigDecimal maxUtilizationPercentage() {
/**
* Get the kind property: The reservation kind.
- *
+ *
* @return the kind value.
*/
public String kind() {
@@ -169,7 +173,7 @@ public String kind() {
/**
* Get the purchasedQuantity property: This is the purchased quantity for the reservationId.
- *
+ *
* @return the purchasedQuantity value.
*/
public BigDecimal purchasedQuantity() {
@@ -178,7 +182,7 @@ public BigDecimal purchasedQuantity() {
/**
* Get the remainingQuantity property: This is the remaining quantity for the reservationId.
- *
+ *
* @return the remainingQuantity value.
*/
public BigDecimal remainingQuantity() {
@@ -188,7 +192,7 @@ public BigDecimal remainingQuantity() {
/**
* Get the totalReservedQuantity property: This is the total count of instances that are reserved for the
* reservationId.
- *
+ *
* @return the totalReservedQuantity value.
*/
public BigDecimal totalReservedQuantity() {
@@ -197,7 +201,7 @@ public BigDecimal totalReservedQuantity() {
/**
* Get the usedQuantity property: This is the used quantity for the reservationId.
- *
+ *
* @return the usedQuantity value.
*/
public BigDecimal usedQuantity() {
@@ -206,7 +210,7 @@ public BigDecimal usedQuantity() {
/**
* Get the utilizedPercentage property: This is the utilized percentage for the reservation Id.
- *
+ *
* @return the utilizedPercentage value.
*/
public BigDecimal utilizedPercentage() {
@@ -215,7 +219,7 @@ public BigDecimal utilizedPercentage() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryProperties.java
index 2bd838de647e..d10fa502577d 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,53 +5,41 @@
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;
-/** The properties of the reservation summary. */
+/**
+ * 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 +51,19 @@ 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 +87,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,11 +104,17 @@ 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
* reservation order specifies the VM size and region for the reservations.
- *
+ *
* @return the reservationOrderId value.
*/
public String reservationOrderId() {
@@ -137,7 +125,7 @@ public String reservationOrderId() {
* Get the reservationId property: 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.
- *
+ *
* @return the reservationId value.
*/
public String reservationId() {
@@ -147,7 +135,7 @@ public String reservationId() {
/**
* Get the skuName property: This is the ARM Sku name. It can be used to join with the serviceType field in
* additional info in usage records.
- *
+ *
* @return the skuName value.
*/
public String skuName() {
@@ -157,7 +145,7 @@ public String skuName() {
/**
* Get the reservedHours property: 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.
- *
+ *
* @return the reservedHours value.
*/
public BigDecimal reservedHours() {
@@ -167,7 +155,7 @@ public BigDecimal reservedHours() {
/**
* Get the usageDate property: Data corresponding to the utilization record. If the grain of data is monthly, it
* will be first day of month.
- *
+ *
* @return the usageDate value.
*/
public OffsetDateTime usageDate() {
@@ -176,7 +164,7 @@ public OffsetDateTime usageDate() {
/**
* Get the usedHours property: Total used hours by the reservation.
- *
+ *
* @return the usedHours value.
*/
public BigDecimal usedHours() {
@@ -187,7 +175,7 @@ public BigDecimal usedHours() {
* Get the minUtilizationPercentage property: 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.
- *
+ *
* @return the minUtilizationPercentage value.
*/
public BigDecimal minUtilizationPercentage() {
@@ -197,7 +185,7 @@ public BigDecimal minUtilizationPercentage() {
/**
* Get the avgUtilizationPercentage property: This is average utilization for the entire time range. (day or month
* depending on the grain).
- *
+ *
* @return the avgUtilizationPercentage value.
*/
public BigDecimal avgUtilizationPercentage() {
@@ -208,7 +196,7 @@ public BigDecimal avgUtilizationPercentage() {
* Get the maxUtilizationPercentage property: 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.
- *
+ *
* @return the maxUtilizationPercentage value.
*/
public BigDecimal maxUtilizationPercentage() {
@@ -217,7 +205,7 @@ public BigDecimal maxUtilizationPercentage() {
/**
* Get the kind property: The reservation kind.
- *
+ *
* @return the kind value.
*/
public String kind() {
@@ -226,7 +214,7 @@ public String kind() {
/**
* Get the purchasedQuantity property: This is the purchased quantity for the reservationId.
- *
+ *
* @return the purchasedQuantity value.
*/
public BigDecimal purchasedQuantity() {
@@ -235,7 +223,7 @@ public BigDecimal purchasedQuantity() {
/**
* Get the remainingQuantity property: This is the remaining quantity for the reservationId.
- *
+ *
* @return the remainingQuantity value.
*/
public BigDecimal remainingQuantity() {
@@ -245,7 +233,7 @@ public BigDecimal remainingQuantity() {
/**
* Get the totalReservedQuantity property: This is the total count of instances that are reserved for the
* reservationId.
- *
+ *
* @return the totalReservedQuantity value.
*/
public BigDecimal totalReservedQuantity() {
@@ -254,7 +242,7 @@ public BigDecimal totalReservedQuantity() {
/**
* Get the usedQuantity property: This is the used quantity for the reservationId.
- *
+ *
* @return the usedQuantity value.
*/
public BigDecimal usedQuantity() {
@@ -263,7 +251,7 @@ public BigDecimal usedQuantity() {
/**
* Get the utilizedPercentage property: This is the utilized percentage for the reservation Id.
- *
+ *
* @return the utilizedPercentage value.
*/
public BigDecimal utilizedPercentage() {
@@ -272,7 +260,7 @@ public BigDecimal utilizedPercentage() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationTransactionInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationTransactionInner.java
index f09a430c58bf..780d1d72d876 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,29 +4,33 @@
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
+/**
+ * Reservation transaction resource.
+ */
+@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.
- *
+ *
* @return the innerProperties value.
*/
private LegacyReservationTransactionProperties innerProperties() {
@@ -35,7 +39,7 @@ private LegacyReservationTransactionProperties innerProperties() {
/**
* Get the eventDate property: The date of the transaction.
- *
+ *
* @return the eventDate value.
*/
public OffsetDateTime eventDate() {
@@ -46,7 +50,7 @@ public OffsetDateTime eventDate() {
* 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
* reservation order specifies the VM size and region for the reservations.
- *
+ *
* @return the reservationOrderId value.
*/
public String reservationOrderId() {
@@ -55,7 +59,7 @@ public String reservationOrderId() {
/**
* Get the description property: The description of the transaction.
- *
+ *
* @return the description value.
*/
public String description() {
@@ -63,8 +67,8 @@ 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.
*/
public String eventType() {
@@ -73,7 +77,7 @@ public String eventType() {
/**
* Get the quantity property: The quantity of the transaction.
- *
+ *
* @return the quantity value.
*/
public BigDecimal quantity() {
@@ -82,7 +86,7 @@ public BigDecimal quantity() {
/**
* Get the amount property: The charge of the transaction.
- *
+ *
* @return the amount value.
*/
public BigDecimal amount() {
@@ -91,7 +95,7 @@ public BigDecimal amount() {
/**
* Get the currency property: The ISO currency in which the transaction is charged, for example, USD.
- *
+ *
* @return the currency value.
*/
public String currency() {
@@ -100,7 +104,7 @@ public String currency() {
/**
* Get the reservationOrderName property: The name of the reservation order.
- *
+ *
* @return the reservationOrderName value.
*/
public String reservationOrderName() {
@@ -109,7 +113,7 @@ public String reservationOrderName() {
/**
* Get the purchasingEnrollment property: The purchasing enrollment.
- *
+ *
* @return the purchasingEnrollment value.
*/
public String purchasingEnrollment() {
@@ -118,7 +122,7 @@ public String purchasingEnrollment() {
/**
* Get the purchasingSubscriptionGuid property: The subscription guid that makes the transaction.
- *
+ *
* @return the purchasingSubscriptionGuid value.
*/
public UUID purchasingSubscriptionGuid() {
@@ -127,7 +131,7 @@ public UUID purchasingSubscriptionGuid() {
/**
* Get the purchasingSubscriptionName property: The subscription name that makes the transaction.
- *
+ *
* @return the purchasingSubscriptionName value.
*/
public String purchasingSubscriptionName() {
@@ -137,7 +141,7 @@ public String purchasingSubscriptionName() {
/**
* Get the armSkuName property: This is the ARM Sku name. It can be used to join with the serviceType field in
* additional info in usage records.
- *
+ *
* @return the armSkuName value.
*/
public String armSkuName() {
@@ -146,7 +150,7 @@ public String armSkuName() {
/**
* Get the term property: This is the term of the transaction.
- *
+ *
* @return the term value.
*/
public String term() {
@@ -155,7 +159,7 @@ public String term() {
/**
* Get the region property: The region of the transaction.
- *
+ *
* @return the region value.
*/
public String region() {
@@ -164,7 +168,7 @@ public String region() {
/**
* Get the accountName property: The name of the account that makes the transaction.
- *
+ *
* @return the accountName value.
*/
public String accountName() {
@@ -173,7 +177,7 @@ public String accountName() {
/**
* Get the accountOwnerEmail property: The email of the account owner that makes the transaction.
- *
+ *
* @return the accountOwnerEmail value.
*/
public String accountOwnerEmail() {
@@ -182,7 +186,7 @@ public String accountOwnerEmail() {
/**
* Get the departmentName property: The department name.
- *
+ *
* @return the departmentName value.
*/
public String departmentName() {
@@ -192,7 +196,7 @@ public String departmentName() {
/**
* Get the costCenter property: The cost center of this department if it is a department and a cost center is
* provided.
- *
+ *
* @return the costCenter value.
*/
public String costCenter() {
@@ -201,7 +205,7 @@ public String costCenter() {
/**
* Get the currentEnrollment property: The current enrollment.
- *
+ *
* @return the currentEnrollment value.
*/
public String currentEnrollment() {
@@ -210,7 +214,7 @@ public String currentEnrollment() {
/**
* Get the billingFrequency property: The billing frequency, which can be either one-time or recurring.
- *
+ *
* @return the billingFrequency value.
*/
public String billingFrequency() {
@@ -219,7 +223,7 @@ public String billingFrequency() {
/**
* Get the billingMonth property: The billing month(yyyyMMdd), on which the event initiated.
- *
+ *
* @return the billingMonth value.
*/
public Integer billingMonth() {
@@ -228,7 +232,7 @@ public Integer billingMonth() {
/**
* Get the monetaryCommitment property: The monetary commitment amount at the enrollment scope.
- *
+ *
* @return the monetaryCommitment value.
*/
public BigDecimal monetaryCommitment() {
@@ -237,7 +241,7 @@ public BigDecimal monetaryCommitment() {
/**
* Get the overage property: The overage amount at the enrollment scope.
- *
+ *
* @return the overage value.
*/
public BigDecimal overage() {
@@ -246,7 +250,7 @@ public BigDecimal overage() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
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..a97f434ad83b 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,15 @@
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. */
+/**
+ * The properties of the tag.
+ */
@Fluent
public final class TagProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(TagProperties.class);
-
/*
* A list of Tag.
*/
@@ -34,9 +32,15 @@ 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.
- *
+ *
* @return the tags value.
*/
public List tags() {
@@ -45,7 +49,7 @@ public List tags() {
/**
* Set the tags property: A list of Tag.
- *
+ *
* @param tags the tags value to set.
* @return the TagProperties object itself.
*/
@@ -56,7 +60,7 @@ public TagProperties withTags(List tags) {
/**
* Get the nextLink property: The link (url) to the next page of results.
- *
+ *
* @return the nextLink value.
*/
public String nextLink() {
@@ -65,7 +69,7 @@ public String nextLink() {
/**
* Get the previousLink property: The link (url) to the previous page of results.
- *
+ *
* @return the previousLink value.
*/
public String previousLink() {
@@ -74,7 +78,7 @@ public String previousLink() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java
index 2cd3f869d8e8..ee139c286dd2 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,15 @@
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. */
+/**
+ * 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,16 +22,20 @@ 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.
- *
+ *
* @return the innerProperties value.
*/
private TagProperties innerProperties() {
@@ -43,7 +45,7 @@ private TagProperties innerProperties() {
/**
* 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.
*/
public String etag() {
@@ -53,7 +55,7 @@ public String etag() {
/**
* 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.
- *
+ *
* @param etag the etag value to set.
* @return the TagsResultInner object itself.
*/
@@ -64,7 +66,7 @@ public TagsResultInner withEtag(String etag) {
/**
* Get the tags property: A list of Tag.
- *
+ *
* @return the tags value.
*/
public List tags() {
@@ -73,7 +75,7 @@ public List tags() {
/**
* Set the tags property: A list of Tag.
- *
+ *
* @param tags the tags value to set.
* @return the TagsResultInner object itself.
*/
@@ -87,7 +89,7 @@ public TagsResultInner withTags(List tags) {
/**
* Get the nextLink property: The link (url) to the next page of results.
- *
+ *
* @return the nextLink value.
*/
public String nextLink() {
@@ -96,7 +98,7 @@ public String nextLink() {
/**
* Get the previousLink property: The link (url) to the previous page of results.
- *
+ *
* @return the previousLink value.
*/
public String previousLink() {
@@ -105,7 +107,7 @@ public String previousLink() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/UsageDetailInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/UsageDetailInner.java
index 97647be02c10..24aad729a83d 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,31 +6,33 @@
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.azure.resourcemanager.consumption.models.UsageDetailsKind;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeId;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.Map;
-/** An usage detail resource. */
-@JsonTypeInfo(
- use = JsonTypeInfo.Id.NAME,
- include = JsonTypeInfo.As.PROPERTY,
- property = "kind",
- defaultImpl = UsageDetailInner.class)
+/**
+ * An usage detail resource.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "kind", defaultImpl = UsageDetailInner.class, visible = true)
@JsonTypeName("UsageDetail")
@JsonSubTypes({
@JsonSubTypes.Type(name = "legacy", value = LegacyUsageDetail.class),
- @JsonSubTypes.Type(name = "modern", value = ModernUsageDetail.class)
-})
+ @JsonSubTypes.Type(name = "modern", value = ModernUsageDetail.class) })
@Immutable
public class UsageDetailInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageDetailInner.class);
+ /*
+ * Specifies the kind of usage details.
+ */
+ @JsonTypeId
+ @JsonProperty(value = "kind", required = true)
+ private UsageDetailsKind kind;
/*
* The etag for the resource.
@@ -45,9 +47,25 @@ 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() {
+ this.kind = UsageDetailsKind.fromString("UsageDetail");
+ }
+
+ /**
+ * Get the kind property: Specifies the kind of usage details.
+ *
+ * @return the kind value.
+ */
+ public UsageDetailsKind kind() {
+ return this.kind;
+ }
+
/**
* Get the etag property: The etag for the resource.
- *
+ *
* @return the etag value.
*/
public String etag() {
@@ -56,7 +74,7 @@ public String etag() {
/**
* Get the tags property: Resource tags.
- *
+ *
* @return the tags value.
*/
public Map tags() {
@@ -65,7 +83,7 @@ public Map tags() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/package-info.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/package-info.java
index 7598912d3a16..82de9c902780 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/package-info.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/package-info.java
@@ -3,7 +3,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
/**
- * Package containing the inner data models for ConsumptionManagementClient. Consumption management client provides
- * access to consumption resources for Azure Enterprise Subscriptions.
+ * Package containing the inner data models for ConsumptionManagementClient.
+ * Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
*/
package com.azure.resourcemanager.consumption.fluent.models;
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/package-info.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/package-info.java
index 9cd646224d1d..599c20c7e941 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/package-info.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/package-info.java
@@ -3,7 +3,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
/**
- * Package containing the service clients for ConsumptionManagementClient. Consumption management client provides access
- * to consumption resources for Azure Enterprise Subscriptions.
+ * Package containing the service clients for ConsumptionManagementClient.
+ * Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
*/
package com.azure.resourcemanager.consumption.fluent;
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..e75f6ab389bd 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,29 +21,32 @@
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. */
+/**
+ * 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. */
+ /**
+ * The proxy service used to perform REST calls.
+ */
private final AggregatedCostsService service;
- /** The service client containing this operation class. */
+ /**
+ * The service client containing this operation class.
+ */
private final ConsumptionManagementClientImpl client;
/**
* Initializes an instance of AggregatedCostsClientImpl.
- *
+ *
* @param client the instance of the service client containing this operation class.
*/
AggregatedCostsClientImpl(ConsumptionManagementClientImpl client) {
- this.service =
- RestProxy.create(AggregatedCostsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.service
+ = RestProxy.create(AggregatedCostsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
@@ -53,56 +56,45 @@ public final class AggregatedCostsClientImpl implements AggregatedCostsClient {
*/
@Host("{$host}")
@ServiceInterface(name = "ConsumptionManagemen")
- private interface AggregatedCostsService {
- @Headers({"Content-Type: application/json"})
- @Get(
- "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption"
- + "/aggregatedcost")
- @ExpectedResponses({200})
+ public interface AggregatedCostsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/aggregatedcost")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> getByManagementGroup(
- @HostParam("$host") String endpoint,
- @PathParam("managementGroupId") String managementGroupId,
- @QueryParam("api-version") String apiVersion,
- @QueryParam("$filter") String filter,
- @HeaderParam("Accept") String accept,
- Context context);
+ @HostParam("$host") String endpoint, @PathParam("managementGroupId") String managementGroupId,
+ @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter,
+ @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
- @Get(
- "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing"
- + "/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/aggregatedCost")
- @ExpectedResponses({200})
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/aggregatedCost")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> getForBillingPeriodByManagementGroup(
- @HostParam("$host") String endpoint,
- @PathParam("managementGroupId") String managementGroupId,
- @PathParam("billingPeriodName") String billingPeriodName,
- @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept,
- Context context);
+ @HostParam("$host") String endpoint, @PathParam("managementGroupId") String managementGroupId,
+ @PathParam("billingPeriodName") String billingPeriodName, @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept, 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 (:).
+ * 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.
+ * @return a management group aggregated cost resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByManagementGroupWithResponseAsync(
- String managementGroupId, String filter) {
+ private Mono>
+ getByManagementGroupWithResponseAsync(String managementGroupId, String filter) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (managementGroupId == null) {
return Mono
@@ -110,40 +102,31 @@ private Mono> getByManagement
}
final String accept = "application/json";
return FluxUtil
- .withContext(
- context ->
- service
- .getByManagementGroup(
- this.client.getEndpoint(),
- managementGroupId,
- this.client.getApiVersion(),
- filter,
- accept,
- context))
+ .withContext(context -> service.getByManagementGroup(this.client.getEndpoint(), managementGroupId,
+ this.client.getApiVersion(), filter, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* 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 (:).
+ * 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} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByManagementGroupWithResponseAsync(
- String managementGroupId, String filter, Context context) {
+ private Mono>
+ getByManagementGroupWithResponseAsync(String managementGroupId, String filter, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (managementGroupId == null) {
return Mono
@@ -151,112 +134,77 @@ private Mono> getByManagement
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .getByManagementGroup(
- this.client.getEndpoint(), managementGroupId, this.client.getApiVersion(), 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();
- }
- });
+ return service.getByManagementGroup(this.client.getEndpoint(), managementGroupId, this.client.getApiVersion(),
+ 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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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();
}
/**
* 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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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>
getForBillingPeriodByManagementGroupWithResponseAsync(String managementGroupId, String billingPeriodName) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (managementGroupId == null) {
return Mono
@@ -268,39 +216,30 @@ public Response getByManagementGroupWi
}
final String accept = "application/json";
return FluxUtil
- .withContext(
- context ->
- service
- .getForBillingPeriodByManagementGroup(
- this.client.getEndpoint(),
- managementGroupId,
- billingPeriodName,
- this.client.getApiVersion(),
- accept,
- context))
+ .withContext(context -> service.getForBillingPeriodByManagementGroup(this.client.getEndpoint(),
+ managementGroupId, billingPeriodName, this.client.getApiVersion(), accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* 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 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>
- getForBillingPeriodByManagementGroupWithResponseAsync(
- String managementGroupId, String billingPeriodName, Context context) {
+ getForBillingPeriodByManagementGroupWithResponseAsync(String managementGroupId, String billingPeriodName,
+ Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (managementGroupId == null) {
return Mono
@@ -312,71 +251,59 @@ public Response getByManagementGroupWi
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .getForBillingPeriodByManagementGroup(
- this.client.getEndpoint(),
- managementGroupId,
- billingPeriodName,
- this.client.getApiVersion(),
- accept,
- context);
+ return service.getForBillingPeriodByManagementGroup(this.client.getEndpoint(), managementGroupId,
+ billingPeriodName, this.client.getApiVersion(), accept, 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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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) {
+ 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()));
}
/**
* 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 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();
}
/**
* 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 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..1171488586a8 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,68 +12,59 @@
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;
private final com.azure.resourcemanager.consumption.ConsumptionManager serviceManager;
- public AggregatedCostsImpl(
- AggregatedCostsClient innerClient, com.azure.resourcemanager.consumption.ConsumptionManager serviceManager) {
+ public AggregatedCostsImpl(AggregatedCostsClient innerClient,
+ com.azure.resourcemanager.consumption.ConsumptionManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
- public ManagementGroupAggregatedCostResult getByManagementGroup(String managementGroupId) {
- ManagementGroupAggregatedCostResultInner inner = this.serviceClient().getByManagementGroup(managementGroupId);
+ public Response getByManagementGroupWithResponse(String managementGroupId,
+ String filter, Context context) {
+ Response inner
+ = this.serviceClient().getByManagementGroupWithResponse(managementGroupId, filter, context);
if (inner != null) {
- return new ManagementGroupAggregatedCostResultImpl(inner, this.manager());
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new ManagementGroupAggregatedCostResultImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
- public Response getByManagementGroupWithResponse(
- String managementGroupId, String filter, Context context) {
- Response inner =
- this.serviceClient().getByManagementGroupWithResponse(managementGroupId, filter, context);
+ public ManagementGroupAggregatedCostResult getByManagementGroup(String managementGroupId) {
+ ManagementGroupAggregatedCostResultInner inner = this.serviceClient().getByManagementGroup(managementGroupId);
if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
- new ManagementGroupAggregatedCostResultImpl(inner.getValue(), this.manager()));
+ return new ManagementGroupAggregatedCostResultImpl(inner, this.manager());
} else {
return null;
}
}
- public ManagementGroupAggregatedCostResult getForBillingPeriodByManagementGroup(
- String managementGroupId, String billingPeriodName) {
- ManagementGroupAggregatedCostResultInner inner =
- this.serviceClient().getForBillingPeriodByManagementGroup(managementGroupId, billingPeriodName);
+ public Response getForBillingPeriodByManagementGroupWithResponse(
+ String managementGroupId, String billingPeriodName, Context context) {
+ Response inner = this.serviceClient()
+ .getForBillingPeriodByManagementGroupWithResponse(managementGroupId, billingPeriodName, context);
if (inner != null) {
- return new ManagementGroupAggregatedCostResultImpl(inner, this.manager());
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new ManagementGroupAggregatedCostResultImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
- public Response getForBillingPeriodByManagementGroupWithResponse(
- String managementGroupId, String billingPeriodName, Context context) {
- Response inner =
- this
- .serviceClient()
- .getForBillingPeriodByManagementGroupWithResponse(managementGroupId, billingPeriodName, context);
+ public ManagementGroupAggregatedCostResult getForBillingPeriodByManagementGroup(String managementGroupId,
+ String billingPeriodName) {
+ ManagementGroupAggregatedCostResultInner inner
+ = this.serviceClient().getForBillingPeriodByManagementGroup(managementGroupId, billingPeriodName);
if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
- new ManagementGroupAggregatedCostResultImpl(inner.getValue(), this.manager()));
+ return new ManagementGroupAggregatedCostResultImpl(inner, this.manager());
} else {
return null;
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalanceImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalanceImpl.java
index 2f73babf5e6d..5dfef26a7afc 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalanceImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalanceImpl.java
@@ -101,6 +101,10 @@ public Boolean priceHidden() {
return this.innerModel().priceHidden();
}
+ public BigDecimal overageRefund() {
+ return this.innerModel().overageRefund();
+ }
+
public List newPurchasesDetails() {
List inner = this.innerModel().newPurchasesDetails();
if (inner != null) {
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..4c87e4282655 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,24 +21,27 @@
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. */
+/**
+ * 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. */
+ /**
+ * The proxy service used to perform REST calls.
+ */
private final BalancesService service;
- /** The service client containing this operation class. */
+ /**
+ * The service client containing this operation class.
+ */
private final ConsumptionManagementClientImpl client;
/**
* Initializes an instance of BalancesClientImpl.
- *
+ *
* @param client the instance of the service client containing this operation class.
*/
BalancesClientImpl(ConsumptionManagementClientImpl client) {
@@ -52,50 +55,41 @@ public final class BalancesClientImpl implements BalancesClient {
*/
@Host("{$host}")
@ServiceInterface(name = "ConsumptionManagemen")
- private interface BalancesService {
- @Headers({"Content-Type: application/json"})
+ public interface BalancesService {
+ @Headers({ "Content-Type: application/json" })
@Get("/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/balances")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> getByBillingAccount(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("billingAccountId") String billingAccountId,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono> getByBillingAccount(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("billingAccountId") String billingAccountId,
+ @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
- @Get(
- "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}"
- + "/providers/Microsoft.Consumption/balances")
- @ExpectedResponses({200})
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> getForBillingPeriodByBillingAccount(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("billingAccountId") String billingAccountId,
- @PathParam("billingPeriodName") String billingPeriodName,
- @HeaderParam("Accept") String accept,
+ Mono> getForBillingPeriodByBillingAccount(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("billingAccountId") String billingAccountId,
+ @PathParam("billingPeriodName") String billingPeriodName, @HeaderParam("Accept") String accept,
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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountId == null) {
return Mono
@@ -103,33 +97,29 @@ private Mono> getByBillingAccountWithResponseAsync(String
}
final String accept = "application/json";
return FluxUtil
- .withContext(
- context ->
- service
- .getByBillingAccount(
- this.client.getEndpoint(), this.client.getApiVersion(), billingAccountId, accept, context))
+ .withContext(context -> service.getByBillingAccount(this.client.getEndpoint(), this.client.getApiVersion(),
+ billingAccountId, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* 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 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, Context context) {
+ private Mono> getByBillingAccountWithResponseAsync(String billingAccountId,
+ Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountId == null) {
return Mono
@@ -137,84 +127,74 @@ private Mono> getByBillingAccountWithResponseAsync(
}
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(), this.client.getApiVersion(), billingAccountId,
+ accept, 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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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()));
}
/**
* 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 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();
}
/**
* 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 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();
}
/**
* Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only
* for May 1, 2014 or later.
- *
+ *
* @param billingAccountId BillingAccount ID.
* @param billingPeriodName Billing Period Name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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(
- String billingAccountId, String billingPeriodName) {
+ private Mono> getForBillingPeriodByBillingAccountWithResponseAsync(String billingAccountId,
+ String billingPeriodName) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountId == null) {
return Mono
@@ -226,39 +206,30 @@ private Mono> getForBillingPeriodByBillingAccountWithResp
}
final String accept = "application/json";
return FluxUtil
- .withContext(
- context ->
- service
- .getForBillingPeriodByBillingAccount(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- billingAccountId,
- billingPeriodName,
- accept,
- context))
+ .withContext(context -> service.getForBillingPeriodByBillingAccount(this.client.getEndpoint(),
+ this.client.getApiVersion(), billingAccountId, billingPeriodName, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only
* for May 1, 2014 or later.
- *
+ *
* @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} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getForBillingPeriodByBillingAccountWithResponseAsync(
- String billingAccountId, String billingPeriodName, Context context) {
+ private Mono> getForBillingPeriodByBillingAccountWithResponseAsync(String billingAccountId,
+ String billingPeriodName, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountId == null) {
return Mono
@@ -270,73 +241,61 @@ private Mono> getForBillingPeriodByBillingAccountWithResp
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .getForBillingPeriodByBillingAccount(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- billingAccountId,
- billingPeriodName,
- accept,
- context);
+ return service.getForBillingPeriodByBillingAccount(this.client.getEndpoint(), this.client.getApiVersion(),
+ billingAccountId, billingPeriodName, accept, context);
}
/**
* Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only
* for May 1, 2014 or later.
- *
+ *
* @param billingAccountId BillingAccount ID.
* @param billingPeriodName Billing Period Name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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) {
+ 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()));
}
/**
* Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only
* for May 1, 2014 or later.
- *
+ *
* @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();
}
/**
* Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only
* for May 1, 2014 or later.
- *
+ *
* @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..d9f8e0c14867 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,65 +12,56 @@
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;
private final com.azure.resourcemanager.consumption.ConsumptionManager serviceManager;
- public BalancesImpl(
- BalancesClient innerClient, com.azure.resourcemanager.consumption.ConsumptionManager serviceManager) {
+ public BalancesImpl(BalancesClient innerClient,
+ com.azure.resourcemanager.consumption.ConsumptionManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
- public Balance getByBillingAccount(String billingAccountId) {
- BalanceInner inner = this.serviceClient().getByBillingAccount(billingAccountId);
+ public Response getByBillingAccountWithResponse(String billingAccountId, Context context) {
+ Response inner = this.serviceClient().getByBillingAccountWithResponse(billingAccountId, context);
if (inner != null) {
- return new BalanceImpl(inner, this.manager());
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new BalanceImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
- public Response getByBillingAccountWithResponse(String billingAccountId, Context context) {
- Response inner = this.serviceClient().getByBillingAccountWithResponse(billingAccountId, context);
+ public Balance getByBillingAccount(String billingAccountId) {
+ BalanceInner inner = this.serviceClient().getByBillingAccount(billingAccountId);
if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
- new BalanceImpl(inner.getValue(), this.manager()));
+ return new BalanceImpl(inner, this.manager());
} else {
return null;
}
}
- public Balance getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName) {
- BalanceInner inner =
- this.serviceClient().getForBillingPeriodByBillingAccount(billingAccountId, billingPeriodName);
+ public Response getForBillingPeriodByBillingAccountWithResponse(String billingAccountId,
+ String billingPeriodName, Context context) {
+ Response inner = this.serviceClient()
+ .getForBillingPeriodByBillingAccountWithResponse(billingAccountId, billingPeriodName, context);
if (inner != null) {
- return new BalanceImpl(inner, this.manager());
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new BalanceImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
- public Response getForBillingPeriodByBillingAccountWithResponse(
- String billingAccountId, String billingPeriodName, Context context) {
- Response inner =
- this
- .serviceClient()
- .getForBillingPeriodByBillingAccountWithResponse(billingAccountId, billingPeriodName, context);
+ public Balance getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName) {
+ BalanceInner inner
+ = this.serviceClient().getForBillingPeriodByBillingAccount(billingAccountId, billingPeriodName);
if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
- new BalanceImpl(inner.getValue(), this.manager()));
+ return new BalanceImpl(inner, this.manager());
} else {
return null;
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetImpl.java
index e75cd7f54bd9..40db430b39de 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetImpl.java
@@ -94,22 +94,18 @@ public BudgetImpl withExistingScope(String scope) {
}
public Budget create() {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getBudgets()
- .createOrUpdateWithResponse(scope, budgetName, this.innerModel(), Context.NONE)
- .getValue();
+ this.innerObject = serviceManager.serviceClient()
+ .getBudgets()
+ .createOrUpdateWithResponse(scope, budgetName, this.innerModel(), Context.NONE)
+ .getValue();
return this;
}
public Budget create(Context context) {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getBudgets()
- .createOrUpdateWithResponse(scope, budgetName, this.innerModel(), context)
- .getValue();
+ this.innerObject = serviceManager.serviceClient()
+ .getBudgets()
+ .createOrUpdateWithResponse(scope, budgetName, this.innerModel(), context)
+ .getValue();
return this;
}
@@ -124,47 +120,39 @@ public BudgetImpl update() {
}
public Budget apply() {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getBudgets()
- .createOrUpdateWithResponse(scope, budgetName, this.innerModel(), Context.NONE)
- .getValue();
+ this.innerObject = serviceManager.serviceClient()
+ .getBudgets()
+ .createOrUpdateWithResponse(scope, budgetName, this.innerModel(), Context.NONE)
+ .getValue();
return this;
}
public Budget apply(Context context) {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getBudgets()
- .createOrUpdateWithResponse(scope, budgetName, this.innerModel(), context)
- .getValue();
+ this.innerObject = serviceManager.serviceClient()
+ .getBudgets()
+ .createOrUpdateWithResponse(scope, budgetName, this.innerModel(), context)
+ .getValue();
return this;
}
BudgetImpl(BudgetInner innerObject, com.azure.resourcemanager.consumption.ConsumptionManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.scope =
- Utils
- .getValueFromIdByParameterName(
- innerObject.id(), "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope");
- this.budgetName =
- Utils
- .getValueFromIdByParameterName(
- innerObject.id(), "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName");
+ this.scope = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(),
+ "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope");
+ this.budgetName = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(),
+ "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName");
}
public Budget refresh() {
- this.innerObject =
- serviceManager.serviceClient().getBudgets().getWithResponse(scope, budgetName, Context.NONE).getValue();
+ this.innerObject
+ = serviceManager.serviceClient().getBudgets().getWithResponse(scope, budgetName, Context.NONE).getValue();
return this;
}
public Budget refresh(Context context) {
- this.innerObject =
- serviceManager.serviceClient().getBudgets().getWithResponse(scope, budgetName, context).getValue();
+ this.innerObject
+ = serviceManager.serviceClient().getBudgets().getWithResponse(scope, budgetName, context).getValue();
return this;
}
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..e49f942bee87 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,25 +28,28 @@
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;
import reactor.core.publisher.Mono;
-/** An instance of this class provides access to all the operations defined in BudgetsClient. */
+/**
+ * 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. */
+ /**
+ * The proxy service used to perform REST calls.
+ */
private final BudgetsService service;
- /** The service client containing this operation class. */
+ /**
+ * The service client containing this operation class.
+ */
private final ConsumptionManagementClientImpl client;
/**
* Initializes an instance of BudgetsClientImpl.
- *
+ *
* @param client the instance of the service client containing this operation class.
*/
BudgetsClientImpl(ConsumptionManagementClientImpl client) {
@@ -60,93 +63,72 @@ public final class BudgetsClientImpl implements BudgetsClient {
*/
@Host("{$host}")
@ServiceInterface(name = "ConsumptionManagemen")
- private interface BudgetsService {
- @Headers({"Content-Type: application/json"})
+ public interface BudgetsService {
+ @Headers({ "Content-Type: application/json" })
@Get("/{scope}/providers/Microsoft.Consumption/budgets")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(
- @HostParam("$host") String endpoint,
- @PathParam(value = "scope", encoded = true) String scope,
- @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
+ Mono> list(@HostParam("$host") String endpoint,
+ @PathParam(value = "scope", encoded = true) String scope, @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
@Get("/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> get(
- @HostParam("$host") String endpoint,
- @PathParam(value = "scope", encoded = true) String scope,
- @QueryParam("api-version") String apiVersion,
- @PathParam("budgetName") String budgetName,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
+ Mono> get(@HostParam("$host") String endpoint,
+ @PathParam(value = "scope", encoded = true) String scope, @QueryParam("api-version") String apiVersion,
+ @PathParam("budgetName") String budgetName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
@Put("/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}")
- @ExpectedResponses({200, 201})
+ @ExpectedResponses({ 200, 201 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> createOrUpdate(
- @HostParam("$host") String endpoint,
- @PathParam(value = "scope", encoded = true) String scope,
- @QueryParam("api-version") String apiVersion,
- @PathParam("budgetName") String budgetName,
- @BodyParam("application/json") BudgetInner parameters,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
+ Mono> createOrUpdate(@HostParam("$host") String endpoint,
+ @PathParam(value = "scope", encoded = true) String scope, @QueryParam("api-version") String apiVersion,
+ @PathParam("budgetName") String budgetName, @BodyParam("application/json") BudgetInner parameters,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
@Delete("/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> delete(
- @HostParam("$host") String endpoint,
- @PathParam(value = "scope", encoded = true) String scope,
- @QueryParam("api-version") String apiVersion,
- @PathParam("budgetName") String budgetName,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
+ Mono> delete(@HostParam("$host") String endpoint,
+ @PathParam(value = "scope", encoded = true) String scope, @QueryParam("api-version") String apiVersion,
+ @PathParam("budgetName") String budgetName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
}
/**
* Lists all budgets for the defined scope.
- *
+ *
* @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
+ * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
+ * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
+ * Management Group scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
+ * billingProfile scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * invoiceSection 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) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (scope == null) {
return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
@@ -155,84 +137,65 @@ private Mono> listSinglePageAsync(String scope) {
return FluxUtil
.withContext(
context -> service.list(this.client.getEndpoint(), scope, this.client.getApiVersion(), accept, context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Lists all budgets for the defined scope.
- *
+ *
* @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
+ * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
+ * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
+ * Management Group scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
+ * billingProfile scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * invoiceSection scope.
* @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> listSinglePageAsync(String scope, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (scope == null) {
return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), scope, this.client.getApiVersion(), accept, context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
+ return service.list(this.client.getEndpoint(), scope, this.client.getApiVersion(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
}
/**
* Lists all budgets for the defined scope.
- *
+ *
* @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
+ * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
+ * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
+ * Management Group scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
+ * billingProfile scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * invoiceSection 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