diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 1666c59f2daba..687978e810f4a 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -204,6 +204,7 @@ com.azure.resourcemanager:azure-resourcemanager-confluent;1.0.0-beta.1;1.0.0-bet
com.azure.resourcemanager:azure-resourcemanager-digitaltwins;1.0.0-beta.1;1.0.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-netapp;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-storagecache;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-consumption;1.0.0-beta.1;1.0.0-beta.1
# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
# version. Unreleased dependencies are only valid for dependency versions.
diff --git a/pom.xml b/pom.xml
index b5983de344d21..6da7f4e0aafd4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -576,6 +576,7 @@
sdk/cognitiveservicessdk/communicationsdk/confluent
+ sdk/consumptionsdk/coresdk/cosmossdk/costmanagement
diff --git a/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md b/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md
new file mode 100644
index 0000000000000..fc3451378d24f
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2021-02-22)
+
+- Azure Resource Manager Consumption client library for Java. This package contains Microsoft Azure SDK for Consumption Management SDK. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2019-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
diff --git a/sdk/consumption/azure-resourcemanager-consumption/README.md b/sdk/consumption/azure-resourcemanager-consumption/README.md
new file mode 100644
index 0000000000000..24e10b59cf865
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/README.md
@@ -0,0 +1,99 @@
+# Azure Resource Manager Consumption client library for Java
+
+Azure Resource Manager Consumption client library for Java.
+
+This package contains Microsoft Azure SDK for Consumption Management SDK. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2019-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+## We'd love to hear your feedback
+
+We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
+
+If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
+
+Thank you in advance for your collaboration. We really appreciate your time!
+
+## Documentation
+
+Various documentation is available to help you get started
+
+- [API reference documentation][docs]
+
+## Getting started
+
+### Prerequisites
+
+- [Java Development Kit (JDK)][jdk] with version 8 or above
+- [Azure Subscription][azure_subscription]
+
+### Adding the package to your product
+
+[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-consumption;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-consumption
+ 1.0.0-beta.1
+
+```
+[//]: # ({x-version-update-end})
+
+### Include the recommended packages
+
+Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
+
+[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+
+### Authentication
+
+By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+
+- `AZURE_CLIENT_ID` for Azure client ID.
+- `AZURE_TENANT_ID` for Azure tenant ID.
+- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
+
+In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+
+With above configuration, `azure` client can be authenticated by following code:
+
+```java
+AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+TokenCredential credential = new DefaultAzureCredentialBuilder()
+ .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
+ .build();
+ConsumptionManager manager = ConsumptionManager
+ .authenticate(credential, profile);
+```
+
+The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+
+See [Authentication][authenticate] for more options.
+
+## Key concepts
+
+See [API design][design] for general introduction on design and key concepts on Azure Management Libraries.
+
+## Examples
+
+## Troubleshooting
+
+## Next steps
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/master/CONTRIBUTING.md).
+
+1. Fork it
+1. Create your feature branch (`git checkout -b my-new-feature`)
+1. Commit your changes (`git commit -am 'Add some feature'`)
+1. Push to the branch (`git push origin my-new-feature`)
+1. Create new Pull Request
+
+
+[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
+[docs]: https://azure.github.io/azure-sdk-for-java/
+[jdk]: https://docs.microsoft.com/java/azure/jdk/
+[azure_subscription]: https://azure.microsoft.com/free/
+[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity
+[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/core/azure-core-http-netty
+[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/AUTH.md
+[design]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/consumption/azure-resourcemanager-consumption/pom.xml b/sdk/consumption/azure-resourcemanager-consumption/pom.xml
new file mode 100644
index 0000000000000..d50e6c81ca21a
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/pom.xml
@@ -0,0 +1,67 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-consumption
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for Consumption Management
+ This package contains Microsoft Azure SDK for Consumption Management SDK. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2019-10. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt
+ https://github.com/Azure/azure-sdk-for-java
+
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+
+
+
+
+ com.azure
+ azure-core
+ 1.13.0
+
+
+ com.azure
+ azure-core-management
+ 1.1.1
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.5
+
+ true
+
+
+
+
+
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java
new file mode 100644
index 0000000000000..adccef256b278
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java
@@ -0,0 +1,424 @@
+// 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;
+
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
+import com.azure.core.http.policy.HttpLogOptions;
+import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpPipelinePolicy;
+import com.azure.core.http.policy.HttpPolicyProviders;
+import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.profile.AzureProfile;
+import com.azure.core.util.Configuration;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.consumption.fluent.ConsumptionManagementClient;
+import com.azure.resourcemanager.consumption.implementation.AggregatedCostsImpl;
+import com.azure.resourcemanager.consumption.implementation.BalancesImpl;
+import com.azure.resourcemanager.consumption.implementation.BudgetsImpl;
+import com.azure.resourcemanager.consumption.implementation.ChargesImpl;
+import com.azure.resourcemanager.consumption.implementation.ConsumptionManagementClientBuilder;
+import com.azure.resourcemanager.consumption.implementation.CreditsImpl;
+import com.azure.resourcemanager.consumption.implementation.EventsOperationsImpl;
+import com.azure.resourcemanager.consumption.implementation.ForecastsImpl;
+import com.azure.resourcemanager.consumption.implementation.LotsOperationsImpl;
+import com.azure.resourcemanager.consumption.implementation.MarketplacesImpl;
+import com.azure.resourcemanager.consumption.implementation.OperationsImpl;
+import com.azure.resourcemanager.consumption.implementation.PriceSheetsImpl;
+import com.azure.resourcemanager.consumption.implementation.ReservationRecommendationDetailsImpl;
+import com.azure.resourcemanager.consumption.implementation.ReservationRecommendationsImpl;
+import com.azure.resourcemanager.consumption.implementation.ReservationTransactionsImpl;
+import com.azure.resourcemanager.consumption.implementation.ReservationsDetailsImpl;
+import com.azure.resourcemanager.consumption.implementation.ReservationsSummariesImpl;
+import com.azure.resourcemanager.consumption.implementation.TagsImpl;
+import com.azure.resourcemanager.consumption.implementation.UsageDetailsImpl;
+import com.azure.resourcemanager.consumption.models.AggregatedCosts;
+import com.azure.resourcemanager.consumption.models.Balances;
+import com.azure.resourcemanager.consumption.models.Budgets;
+import com.azure.resourcemanager.consumption.models.Charges;
+import com.azure.resourcemanager.consumption.models.Credits;
+import com.azure.resourcemanager.consumption.models.EventsOperations;
+import com.azure.resourcemanager.consumption.models.Forecasts;
+import com.azure.resourcemanager.consumption.models.LotsOperations;
+import com.azure.resourcemanager.consumption.models.Marketplaces;
+import com.azure.resourcemanager.consumption.models.Operations;
+import com.azure.resourcemanager.consumption.models.PriceSheets;
+import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetails;
+import com.azure.resourcemanager.consumption.models.ReservationRecommendations;
+import com.azure.resourcemanager.consumption.models.ReservationTransactions;
+import com.azure.resourcemanager.consumption.models.ReservationsDetails;
+import com.azure.resourcemanager.consumption.models.ReservationsSummaries;
+import com.azure.resourcemanager.consumption.models.Tags;
+import com.azure.resourcemanager.consumption.models.UsageDetails;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * Entry point to ConsumptionManager. Consumption management client provides access to consumption resources for Azure
+ * Enterprise Subscriptions.
+ */
+public final class ConsumptionManager {
+ private UsageDetails usageDetails;
+
+ private Marketplaces marketplaces;
+
+ private Budgets budgets;
+
+ private Tags tags;
+
+ private Charges charges;
+
+ private Balances balances;
+
+ private ReservationsSummaries reservationsSummaries;
+
+ private ReservationsDetails reservationsDetails;
+
+ private ReservationRecommendations reservationRecommendations;
+
+ private ReservationRecommendationDetails reservationRecommendationDetails;
+
+ private ReservationTransactions reservationTransactions;
+
+ private PriceSheets priceSheets;
+
+ private Forecasts forecasts;
+
+ private Operations operations;
+
+ private AggregatedCosts aggregatedCosts;
+
+ private EventsOperations eventsOperations;
+
+ private LotsOperations lotsOperations;
+
+ private Credits credits;
+
+ private final ConsumptionManagementClient clientObject;
+
+ private ConsumptionManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new ConsumptionManagementClientBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of Consumption service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Consumption service API instance.
+ */
+ public static ConsumptionManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return configure().authenticate(credential, profile);
+ }
+
+ /**
+ * Gets a Configurable instance that can be used to create ConsumptionManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new ConsumptionManager.Configurable();
+ }
+
+ /** The Configurable allowing configurations to be set. */
+ public static final class Configurable {
+ private final ClientLogger logger = new ClientLogger(Configurable.class);
+
+ private HttpClient httpClient;
+ private HttpLogOptions httpLogOptions;
+ private final List policies = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Sets the retry policy to the HTTP pipeline.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the default poll interval, used when service does not provide "Retry-After" header.
+ *
+ * @param defaultPollInterval the default poll interval.
+ * @return the configurable object itself.
+ */
+ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of Consumption service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Consumption service API instance.
+ */
+ public ConsumptionManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder
+ .append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.consumption")
+ .append("/")
+ .append("1.0.0-beta.1");
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder
+ .append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (retryPolicy == null) {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new RequestIdPolicy());
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies
+ .add(
+ new BearerTokenAuthenticationPolicy(
+ credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ 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. */
+ public UsageDetails usageDetails() {
+ if (this.usageDetails == null) {
+ this.usageDetails = new UsageDetailsImpl(clientObject.getUsageDetails(), this);
+ }
+ return usageDetails;
+ }
+
+ /** @return Resource collection API of Marketplaces. */
+ public Marketplaces marketplaces() {
+ if (this.marketplaces == null) {
+ this.marketplaces = new MarketplacesImpl(clientObject.getMarketplaces(), this);
+ }
+ return marketplaces;
+ }
+
+ /** @return Resource collection API of Budgets. */
+ public Budgets budgets() {
+ if (this.budgets == null) {
+ this.budgets = new BudgetsImpl(clientObject.getBudgets(), this);
+ }
+ return budgets;
+ }
+
+ /** @return Resource collection API of Tags. */
+ public Tags tags() {
+ if (this.tags == null) {
+ this.tags = new TagsImpl(clientObject.getTags(), this);
+ }
+ return tags;
+ }
+
+ /** @return Resource collection API of Charges. */
+ public Charges charges() {
+ if (this.charges == null) {
+ this.charges = new ChargesImpl(clientObject.getCharges(), this);
+ }
+ return charges;
+ }
+
+ /** @return Resource collection API of Balances. */
+ public Balances balances() {
+ if (this.balances == null) {
+ this.balances = new BalancesImpl(clientObject.getBalances(), this);
+ }
+ return balances;
+ }
+
+ /** @return Resource collection API of ReservationsSummaries. */
+ public ReservationsSummaries reservationsSummaries() {
+ if (this.reservationsSummaries == null) {
+ this.reservationsSummaries = new ReservationsSummariesImpl(clientObject.getReservationsSummaries(), this);
+ }
+ return reservationsSummaries;
+ }
+
+ /** @return Resource collection API of ReservationsDetails. */
+ public ReservationsDetails reservationsDetails() {
+ if (this.reservationsDetails == null) {
+ this.reservationsDetails = new ReservationsDetailsImpl(clientObject.getReservationsDetails(), this);
+ }
+ return reservationsDetails;
+ }
+
+ /** @return Resource collection API of ReservationRecommendations. */
+ public ReservationRecommendations reservationRecommendations() {
+ if (this.reservationRecommendations == null) {
+ this.reservationRecommendations =
+ new ReservationRecommendationsImpl(clientObject.getReservationRecommendations(), this);
+ }
+ return reservationRecommendations;
+ }
+
+ /** @return Resource collection API of ReservationRecommendationDetails. */
+ public ReservationRecommendationDetails reservationRecommendationDetails() {
+ if (this.reservationRecommendationDetails == null) {
+ this.reservationRecommendationDetails =
+ new ReservationRecommendationDetailsImpl(clientObject.getReservationRecommendationDetails(), this);
+ }
+ return reservationRecommendationDetails;
+ }
+
+ /** @return Resource collection API of ReservationTransactions. */
+ public ReservationTransactions reservationTransactions() {
+ if (this.reservationTransactions == null) {
+ this.reservationTransactions =
+ new ReservationTransactionsImpl(clientObject.getReservationTransactions(), this);
+ }
+ return reservationTransactions;
+ }
+
+ /** @return Resource collection API of PriceSheets. */
+ public PriceSheets priceSheets() {
+ if (this.priceSheets == null) {
+ this.priceSheets = new PriceSheetsImpl(clientObject.getPriceSheets(), this);
+ }
+ return priceSheets;
+ }
+
+ /** @return Resource collection API of Forecasts. */
+ public Forecasts forecasts() {
+ if (this.forecasts == null) {
+ this.forecasts = new ForecastsImpl(clientObject.getForecasts(), this);
+ }
+ return forecasts;
+ }
+
+ /** @return Resource collection API of Operations. */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /** @return Resource collection API of AggregatedCosts. */
+ public AggregatedCosts aggregatedCosts() {
+ if (this.aggregatedCosts == null) {
+ this.aggregatedCosts = new AggregatedCostsImpl(clientObject.getAggregatedCosts(), this);
+ }
+ return aggregatedCosts;
+ }
+
+ /** @return Resource collection API of EventsOperations. */
+ public EventsOperations eventsOperations() {
+ if (this.eventsOperations == null) {
+ this.eventsOperations = new EventsOperationsImpl(clientObject.getEventsOperations(), this);
+ }
+ return eventsOperations;
+ }
+
+ /** @return Resource collection API of LotsOperations. */
+ public LotsOperations lotsOperations() {
+ if (this.lotsOperations == null) {
+ this.lotsOperations = new LotsOperationsImpl(clientObject.getLotsOperations(), this);
+ }
+ return lotsOperations;
+ }
+
+ /** @return Resource collection API of Credits. */
+ public Credits credits() {
+ if (this.credits == null) {
+ this.credits = new CreditsImpl(clientObject.getCredits(), this);
+ }
+ return credits;
+ }
+
+ /**
+ * @return Wrapped service client ConsumptionManagementClient providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
+ */
+ 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
new file mode 100644
index 0000000000000..813767044909a
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java
@@ -0,0 +1,72 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.consumption.fluent.models.ManagementGroupAggregatedCostResultInner;
+
+/** 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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)
+ ManagementGroupAggregatedCostResultInner getByManagementGroup(String managementGroupId);
+
+ /**
+ * 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);
+
+ /**
+ * 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 com.azure.core.management.exception.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)
+ ManagementGroupAggregatedCostResultInner getForBillingPeriodByManagementGroup(
+ String managementGroupId, String billingPeriodName);
+
+ /**
+ * 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);
+}
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
new file mode 100644
index 0000000000000..e21a93426a857
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java
@@ -0,0 +1,71 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.consumption.fluent.models.BalanceInner;
+
+/** 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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)
+ BalanceInner getByBillingAccount(String billingAccountId);
+
+ /**
+ * 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);
+
+ /**
+ * 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 com.azure.core.management.exception.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)
+ BalanceInner getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName);
+
+ /**
+ * 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);
+}
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
new file mode 100644
index 0000000000000..031ef9c557caf
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java
@@ -0,0 +1,215 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+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. */
+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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if 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.
+ */
+ @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.
+ * @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.
+ */
+ @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.
+ * @param budgetName Budget 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 budget for the scope by budget name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BudgetInner get(String scope, String budgetName);
+
+ /**
+ * 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.
+ * @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);
+
+ /**
+ * 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.
+ * @param budgetName Budget Name.
+ * @param parameters Parameters supplied to the Create Budget 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)
+ BudgetInner createOrUpdate(String scope, String budgetName, BudgetInner parameters);
+
+ /**
+ * 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.
+ * @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);
+
+ /**
+ * 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.
+ * @param budgetName Budget 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String scope, String budgetName);
+
+ /**
+ * 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.
+ * @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);
+}
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
new file mode 100644
index 0000000000000..58df00d67d608
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java
@@ -0,0 +1,78 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.consumption.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.consumption.fluent.models.ChargesListResultInner;
+
+/** 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if 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)
+ ChargesListResultInner list(String scope);
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if 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);
+}
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
new file mode 100644
index 0000000000000..ecf718cfb97f6
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ConsumptionManagementClient.java
@@ -0,0 +1,172 @@
+// 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;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** 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 ForecastsClient object to access its operations.
+ *
+ * @return the ForecastsClient object.
+ */
+ ForecastsClient getForecasts();
+
+ /**
+ * 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
new file mode 100644
index 0000000000000..4a9bba8b64c61
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java
@@ -0,0 +1,41 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.consumption.fluent.models.CreditSummaryInner;
+
+/** 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a credit summary resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CreditSummaryInner get(String billingAccountId, String billingProfileId);
+
+ /**
+ * 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);
+}
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
new file mode 100644
index 0000000000000..f1b00fdb33b43
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java
@@ -0,0 +1,47 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+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. */
+public interface EventsOperationsClient {
+ /**
+ * Lists the events by billingAccountId and billingProfileId for given start and end date.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId Azure Billing Profile ID.
+ * @param startDate Start date.
+ * @param endDate End date.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing event summary.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String billingAccountId, String billingProfileId, String startDate, String endDate);
+
+ /**
+ * Lists the events by billingAccountId and billingProfileId for given start and end date.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId Azure Billing Profile ID.
+ * @param startDate Start date.
+ * @param endDate End date.
+ * @param 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String billingAccountId, String billingProfileId, String startDate, String endDate, Context context);
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ForecastsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ForecastsClient.java
new file mode 100644
index 0000000000000..5290f74fa0894
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ForecastsClient.java
@@ -0,0 +1,43 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.consumption.fluent.models.ForecastInner;
+
+/** An instance of this class provides access to all the operations defined in ForecastsClient. */
+public interface ForecastsClient {
+ /**
+ * Lists the forecast charges for scope defined. Please note that this API is no longer actively under development.
+ * We recommend using our new Forecast API moving forward:
+ * https://docs.microsoft.com/en-us/rest/api/cost-management/forecast/usage.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing forecasts.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists the forecast charges for scope defined. Please note that this API is no longer actively under development.
+ * We recommend using our new Forecast API moving forward:
+ * https://docs.microsoft.com/en-us/rest/api/cost-management/forecast/usage.
+ *
+ * @param filter May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or
+ * properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support
+ * 'ne', 'or', or 'not'.
+ * @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 forecasts.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(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
new file mode 100644
index 0000000000000..bb01b16c41436
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java
@@ -0,0 +1,41 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+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. */
+public interface LotsOperationsClient {
+ /**
+ * Lists the lots by billingAccountId and billingProfileId.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId Azure Billing Profile ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing lot summary.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String billingAccountId, String billingProfileId);
+
+ /**
+ * Lists the lots 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 result of listing lot summary.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String billingAccountId, String billingProfileId, 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
new file mode 100644
index 0000000000000..56f5b91e7340d
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java
@@ -0,0 +1,64 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+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. */
+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}'.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String scope);
+
+ /**
+ * 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}'.
+ * @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'.
+ * @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.
+ * @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.
+ */
+ @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
new file mode 100644
index 0000000000000..d8528c9abbd37
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java
@@ -0,0 +1,36 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+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. */
+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.
+ */
+ @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.
+ */
+ @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
new file mode 100644
index 0000000000000..840cb18b61d47
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java
@@ -0,0 +1,78 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.consumption.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.consumption.fluent.models.PriceSheetResultInner;
+
+/** An instance of this class provides access to all the operations defined in PriceSheetsClient. */
+public interface PriceSheetsClient {
+ /**
+ * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or
+ * later.
+ *
+ * @throws com.azure.core.management.exception.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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PriceSheetResultInner get();
+
+ /**
+ * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or
+ * later.
+ *
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String expand, String skiptoken, Integer top, Context context);
+
+ /**
+ * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only
+ * for May 1, 2014 or later.
+ *
+ * @param billingPeriodName Billing Period Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the price sheet for a scope by subscriptionId and billing period.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ 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.
+ *
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByBillingPeriodWithResponse(
+ String billingPeriodName, String expand, String skiptoken, Integer top, Context context);
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java
new file mode 100644
index 0000000000000..b688c8a20e957
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java
@@ -0,0 +1,76 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.consumption.fluent.models.ReservationRecommendationDetailsModelInner;
+import com.azure.resourcemanager.consumption.models.LookBackPeriod;
+import com.azure.resourcemanager.consumption.models.Scope;
+import com.azure.resourcemanager.consumption.models.Term;
+
+/**
+ * An instance of this class provides access to all the operations defined in ReservationRecommendationDetailsClient.
+ */
+public interface ReservationRecommendationDetailsClient {
+ /**
+ * Details of a reservation recommendation for what-if analysis of reserved instances.
+ *
+ * @param billingScope The scope associated with reservation recommendation details operations. This includes
+ * '/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).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.consumption.models.HighCasedErrorResponseException 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)
+ ReservationRecommendationDetailsModelInner get(
+ String billingScope, Scope scope, String region, Term term, LookBackPeriod lookBackPeriod, String product);
+
+ /**
+ * Details of a reservation recommendation for what-if analysis of reserved instances.
+ *
+ * @param billingScope The scope associated with reservation recommendation details operations. This includes
+ * '/subscriptions/{subscriptionId}/' for subscription scope,
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,
+ * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
+ * billingProfile scope.
+ * @param scope Scope of the reservation.
+ * @param region Used to select the region the recommendation should be generated for.
+ * @param term Specify length of reservation recommendation term.
+ * @param lookBackPeriod Filter the time period on which reservation recommendation results are based.
+ * @param product Filter the products for which reservation recommendation results are generated. Examples:
+ * Standard_DS1_v2 (for VM), Premium_SSD_Managed_Disks_P30 (for Managed Disks).
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.consumption.models.HighCasedErrorResponseException 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 billingScope,
+ Scope scope,
+ String region,
+ Term term,
+ LookBackPeriod lookBackPeriod,
+ String product,
+ Context context);
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java
new file mode 100644
index 0000000000000..c713f5d4d2771
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java
@@ -0,0 +1,55 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+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. */
+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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String scope);
+
+ /**
+ * 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 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'.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String scope, String filter, Context context);
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java
new file mode 100644
index 0000000000000..3d45b967b6e36
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java
@@ -0,0 +1,73 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.consumption.fluent.models.ModernReservationTransactionInner;
+import com.azure.resourcemanager.consumption.fluent.models.ReservationTransactionInner;
+
+/** 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.
+ *
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String billingAccountId);
+
+ /**
+ * List of transactions for reserved instances on billing account scope.
+ *
+ * @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'.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String billingAccountId, String filter, Context context);
+
+ /**
+ * List of transactions for reserved instances on billing account scope.
+ *
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(
+ String billingAccountId, String billingProfileId);
+
+ /**
+ * List of transactions for reserved instances on billing account scope.
+ *
+ * @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'.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ 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
new file mode 100644
index 0000000000000..2ffbf884bf393
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java
@@ -0,0 +1,123 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+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. */
+public interface ReservationsDetailsClient {
+ /**
+ * Lists the reservations details for provided date range.
+ *
+ * @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'.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByReservationOrder(String reservationOrderId, String filter);
+
+ /**
+ * Lists the reservations details for provided date range.
+ *
+ * @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'.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByReservationOrder(
+ String reservationOrderId, String filter, Context context);
+
+ /**
+ * Lists the reservations details for provided date range.
+ *
+ * @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'.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByReservationOrderAndReservation(
+ String reservationOrderId, String reservationId, String filter);
+
+ /**
+ * Lists the reservations details for provided date range.
+ *
+ * @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'.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByReservationOrderAndReservation(
+ String reservationOrderId, String reservationId, String filter, Context context);
+
+ /**
+ * Lists the reservations details for the defined scope and provided date range.
+ *
+ * @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).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String scope);
+
+ /**
+ * 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).
+ * @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.
+ * @param reservationId Reservation Id GUID. Only valid if reservationOrderId is also provided. Filter to a specific
+ * reservation.
+ * @param reservationOrderId Reservation Order Id GUID. Required if reservationId is provided. Filter to a specific
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String scope,
+ 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
new file mode 100644
index 0000000000000..40be069d1339d
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java
@@ -0,0 +1,127 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+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. */
+public interface ReservationsSummariesClient {
+ /**
+ * Lists the reservations summaries for daily or monthly grain.
+ *
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByReservationOrder(String reservationOrderId, Datagrain grain);
+
+ /**
+ * Lists the reservations summaries for daily or monthly grain.
+ *
+ * @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'.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByReservationOrder(
+ String reservationOrderId, Datagrain grain, String filter, Context context);
+
+ /**
+ * Lists the reservations summaries for daily or monthly grain.
+ *
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByReservationOrderAndReservation(
+ String reservationOrderId, String reservationId, Datagrain grain);
+
+ /**
+ * Lists the reservations summaries for daily or monthly grain.
+ *
+ * @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'.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ 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).
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String scope, 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).
+ * @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.
+ * @param reservationId Reservation Id GUID. Only valid if reservationOrderId is also provided. Filter to a specific
+ * reservation.
+ * @param reservationOrderId Reservation Order Id GUID. Required if reservationId is provided. Filter to a specific
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String scope,
+ 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
new file mode 100644
index 0000000000000..2266b2caca8cc
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java
@@ -0,0 +1,53 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.consumption.fluent.models.TagsResultInner;
+
+/** 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..
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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)
+ TagsResultInner get(String scope);
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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);
+}
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
new file mode 100644
index 0000000000000..e89c21afee289
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java
@@ -0,0 +1,87 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+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. */
+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.
+ *
+ * @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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String scope);
+
+ /**
+ * Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or
+ * later.
+ *
+ * @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.
+ * @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.
+ * @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.
+ * @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 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ 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
new file mode 100644
index 0000000000000..c4ddf96fa00a8
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java
@@ -0,0 +1,307 @@
+// 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.core.annotation.JsonFlatten;
+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.JsonProperty;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/** A balance resource. */
+@JsonFlatten
+@Fluent
+public class BalanceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(BalanceInner.class);
+
+ /*
+ * The ISO currency in which the meter is charged, for example, USD.
+ */
+ @JsonProperty(value = "properties.currency", access = JsonProperty.Access.WRITE_ONLY)
+ private String currency;
+
+ /*
+ * The beginning balance for the billing period.
+ */
+ @JsonProperty(value = "properties.beginningBalance", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal beginningBalance;
+
+ /*
+ * The ending balance for the billing period (for open periods this will be
+ * updated daily).
+ */
+ @JsonProperty(value = "properties.endingBalance", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal endingBalance;
+
+ /*
+ * Total new purchase amount.
+ */
+ @JsonProperty(value = "properties.newPurchases", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal newPurchases;
+
+ /*
+ * Total adjustment amount.
+ */
+ @JsonProperty(value = "properties.adjustments", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal adjustments;
+
+ /*
+ * Total Commitment usage.
+ */
+ @JsonProperty(value = "properties.utilized", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal utilized;
+
+ /*
+ * Overage for Azure services.
+ */
+ @JsonProperty(value = "properties.serviceOverage", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal serviceOverage;
+
+ /*
+ * Charges Billed separately.
+ */
+ @JsonProperty(value = "properties.chargesBilledSeparately", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal chargesBilledSeparately;
+
+ /*
+ * serviceOverage + chargesBilledSeparately.
+ */
+ @JsonProperty(value = "properties.totalOverage", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal totalOverage;
+
+ /*
+ * Azure service commitment + total Overage.
+ */
+ @JsonProperty(value = "properties.totalUsage", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal totalUsage;
+
+ /*
+ * Total charges for Azure Marketplace.
+ */
+ @JsonProperty(value = "properties.azureMarketplaceServiceCharges", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal azureMarketplaceServiceCharges;
+
+ /*
+ * The billing frequency.
+ */
+ @JsonProperty(value = "properties.billingFrequency")
+ private BillingFrequency billingFrequency;
+
+ /*
+ * Price is hidden or not.
+ */
+ @JsonProperty(value = "properties.priceHidden", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean priceHidden;
+
+ /*
+ * List of new purchases.
+ */
+ @JsonProperty(value = "properties.newPurchasesDetails", access = JsonProperty.Access.WRITE_ONLY)
+ private List newPurchasesDetails;
+
+ /*
+ * List of Adjustments (Promo credit, SIE credit etc.).
+ */
+ @JsonProperty(value = "properties.adjustmentDetails", access = JsonProperty.Access.WRITE_ONLY)
+ private List adjustmentDetails;
+
+ /*
+ * Resource etag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
+ private 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() {
+ return this.currency;
+ }
+
+ /**
+ * Get the beginningBalance property: The beginning balance for the billing period.
+ *
+ * @return the beginningBalance value.
+ */
+ public BigDecimal beginningBalance() {
+ return this.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() {
+ return this.endingBalance;
+ }
+
+ /**
+ * Get the newPurchases property: Total new purchase amount.
+ *
+ * @return the newPurchases value.
+ */
+ public BigDecimal newPurchases() {
+ return this.newPurchases;
+ }
+
+ /**
+ * Get the adjustments property: Total adjustment amount.
+ *
+ * @return the adjustments value.
+ */
+ public BigDecimal adjustments() {
+ return this.adjustments;
+ }
+
+ /**
+ * Get the utilized property: Total Commitment usage.
+ *
+ * @return the utilized value.
+ */
+ public BigDecimal utilized() {
+ return this.utilized;
+ }
+
+ /**
+ * Get the serviceOverage property: Overage for Azure services.
+ *
+ * @return the serviceOverage value.
+ */
+ public BigDecimal serviceOverage() {
+ return this.serviceOverage;
+ }
+
+ /**
+ * Get the chargesBilledSeparately property: Charges Billed separately.
+ *
+ * @return the chargesBilledSeparately value.
+ */
+ public BigDecimal chargesBilledSeparately() {
+ return this.chargesBilledSeparately;
+ }
+
+ /**
+ * Get the totalOverage property: serviceOverage + chargesBilledSeparately.
+ *
+ * @return the totalOverage value.
+ */
+ public BigDecimal totalOverage() {
+ return this.totalOverage;
+ }
+
+ /**
+ * Get the totalUsage property: Azure service commitment + total Overage.
+ *
+ * @return the totalUsage value.
+ */
+ public BigDecimal totalUsage() {
+ return this.totalUsage;
+ }
+
+ /**
+ * Get the azureMarketplaceServiceCharges property: Total charges for Azure Marketplace.
+ *
+ * @return the azureMarketplaceServiceCharges value.
+ */
+ public BigDecimal azureMarketplaceServiceCharges() {
+ return this.azureMarketplaceServiceCharges;
+ }
+
+ /**
+ * Get the billingFrequency property: The billing frequency.
+ *
+ * @return the billingFrequency value.
+ */
+ public BillingFrequency billingFrequency() {
+ return this.billingFrequency;
+ }
+
+ /**
+ * Set the billingFrequency property: The billing frequency.
+ *
+ * @param billingFrequency the billingFrequency value to set.
+ * @return the BalanceInner object itself.
+ */
+ public BalanceInner withBillingFrequency(BillingFrequency billingFrequency) {
+ this.billingFrequency = billingFrequency;
+ return this;
+ }
+
+ /**
+ * Get the priceHidden property: Price is hidden or not.
+ *
+ * @return the priceHidden value.
+ */
+ public Boolean priceHidden() {
+ return this.priceHidden;
+ }
+
+ /**
+ * Get the newPurchasesDetails property: List of new purchases.
+ *
+ * @return the newPurchasesDetails value.
+ */
+ public List newPurchasesDetails() {
+ return this.newPurchasesDetails;
+ }
+
+ /**
+ * Get the adjustmentDetails property: List of Adjustments (Promo credit, SIE credit etc.).
+ *
+ * @return the adjustmentDetails value.
+ */
+ public List adjustmentDetails() {
+ return this.adjustmentDetails;
+ }
+
+ /**
+ * Get the etag property: Resource etag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (newPurchasesDetails() != null) {
+ newPurchasesDetails().forEach(e -> e.validate());
+ }
+ if (adjustmentDetails() != null) {
+ adjustmentDetails().forEach(e -> e.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
new file mode 100644
index 0000000000000..992c86ad77669
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetInner.java
@@ -0,0 +1,272 @@
+// 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.core.annotation.JsonFlatten;
+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;
+import com.azure.resourcemanager.consumption.models.CurrentSpend;
+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. */
+@JsonFlatten
+@Fluent
+public class BudgetInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(BudgetInner.class);
+
+ /*
+ * The category of the budget, whether the budget tracks cost or usage.
+ */
+ @JsonProperty(value = "properties.category")
+ private CategoryType category;
+
+ /*
+ * The total amount of cost to track with the budget
+ */
+ @JsonProperty(value = "properties.amount")
+ 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
+ */
+ @JsonProperty(value = "properties.timeGrain")
+ 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.
+ */
+ @JsonProperty(value = "properties.timePeriod")
+ private BudgetTimePeriod timePeriod;
+
+ /*
+ * May be used to filter budgets by user-specified dimensions and/or tags.
+ */
+ @JsonProperty(value = "properties.filter")
+ private BudgetFilter filter;
+
+ /*
+ * The current amount of cost which is being tracked for a budget.
+ */
+ @JsonProperty(value = "properties.currentSpend", access = JsonProperty.Access.WRITE_ONLY)
+ private CurrentSpend currentSpend;
+
+ /*
+ * Dictionary of notifications associated with the budget. Budget can have
+ * up to five notifications.
+ */
+ @JsonProperty(value = "properties.notifications")
+ private Map notifications;
+
+ /*
+ * 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;
+
+ /**
+ * Get the category property: The category of the budget, whether the budget tracks cost or usage.
+ *
+ * @return the category value.
+ */
+ public CategoryType category() {
+ return this.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.
+ */
+ public BudgetInner withCategory(CategoryType category) {
+ this.category = category;
+ return this;
+ }
+
+ /**
+ * Get the amount property: The total amount of cost to track with the budget.
+ *
+ * @return the amount value.
+ */
+ public BigDecimal amount() {
+ return this.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.
+ */
+ public BudgetInner withAmount(BigDecimal amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * 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() {
+ return this.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.
+ */
+ public BudgetInner withTimeGrain(TimeGrainType timeGrain) {
+ this.timeGrain = timeGrain;
+ return this;
+ }
+
+ /**
+ * Get the timePeriod property: 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.
+ *
+ * @return the timePeriod value.
+ */
+ public BudgetTimePeriod timePeriod() {
+ return this.timePeriod;
+ }
+
+ /**
+ * Set the timePeriod property: 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.
+ *
+ * @param timePeriod the timePeriod value to set.
+ * @return the BudgetInner object itself.
+ */
+ public BudgetInner withTimePeriod(BudgetTimePeriod timePeriod) {
+ this.timePeriod = timePeriod;
+ return this;
+ }
+
+ /**
+ * Get the filter property: May be used to filter budgets by user-specified dimensions and/or tags.
+ *
+ * @return the filter value.
+ */
+ public BudgetFilter filter() {
+ return this.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.
+ */
+ public BudgetInner withFilter(BudgetFilter filter) {
+ this.filter = filter;
+ return this;
+ }
+
+ /**
+ * Get the currentSpend property: The current amount of cost which is being tracked for a budget.
+ *
+ * @return the currentSpend value.
+ */
+ public CurrentSpend currentSpend() {
+ return this.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() {
+ return this.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.
+ */
+ public BudgetInner withNotifications(Map notifications) {
+ this.notifications = notifications;
+ return this;
+ }
+
+ /**
+ * 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() {
+ return this.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.
+ */
+ public BudgetInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (timePeriod() != null) {
+ timePeriod().validate();
+ }
+ if (filter() != null) {
+ filter().validate();
+ }
+ if (currentSpend() != null) {
+ currentSpend().validate();
+ }
+ if (notifications() != null) {
+ notifications()
+ .values()
+ .forEach(
+ e -> {
+ if (e != null) {
+ e.validate();
+ }
+ });
+ }
+ }
+}
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
new file mode 100644
index 0000000000000..4675dd79f2cb1
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ChargesListResultInner.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.consumption.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.consumption.models.ChargeSummary;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Result of listing charge summary. */
+@Immutable
+public final class ChargesListResultInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ChargesListResultInner.class);
+
+ /*
+ * The list of charge summary
+ */
+ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
+ private List value;
+
+ /**
+ * Get the value property: The list of charge summary.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.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
new file mode 100644
index 0000000000000..e80385b7787ff
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java
@@ -0,0 +1,132 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.consumption.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.JsonFlatten;
+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.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** A credit summary resource. */
+@JsonFlatten
+@Immutable
+public class CreditSummaryInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CreditSummaryInner.class);
+
+ /*
+ * Summary of balances associated with this credit summary.
+ */
+ @JsonProperty(value = "properties.balanceSummary", access = JsonProperty.Access.WRITE_ONLY)
+ private CreditBalanceSummary balanceSummary;
+
+ /*
+ * Pending credit adjustments.
+ */
+ @JsonProperty(value = "properties.pendingCreditAdjustments", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount pendingCreditAdjustments;
+
+ /*
+ * Expired credit.
+ */
+ @JsonProperty(value = "properties.expiredCredit", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount expiredCredit;
+
+ /*
+ * Pending eligible charges.
+ */
+ @JsonProperty(value = "properties.pendingEligibleCharges", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount pendingEligibleCharges;
+
+ /*
+ * Resource etag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
+ private Map tags;
+
+ /**
+ * Get the balanceSummary property: Summary of balances associated with this credit summary.
+ *
+ * @return the balanceSummary value.
+ */
+ public CreditBalanceSummary balanceSummary() {
+ return this.balanceSummary;
+ }
+
+ /**
+ * Get the pendingCreditAdjustments property: Pending credit adjustments.
+ *
+ * @return the pendingCreditAdjustments value.
+ */
+ public Amount pendingCreditAdjustments() {
+ return this.pendingCreditAdjustments;
+ }
+
+ /**
+ * Get the expiredCredit property: Expired credit.
+ *
+ * @return the expiredCredit value.
+ */
+ public Amount expiredCredit() {
+ return this.expiredCredit;
+ }
+
+ /**
+ * Get the pendingEligibleCharges property: Pending eligible charges.
+ *
+ * @return the pendingEligibleCharges value.
+ */
+ public Amount pendingEligibleCharges() {
+ return this.pendingEligibleCharges;
+ }
+
+ /**
+ * Get the etag property: Resource etag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (balanceSummary() != null) {
+ balanceSummary().validate();
+ }
+ if (pendingCreditAdjustments() != null) {
+ pendingCreditAdjustments().validate();
+ }
+ if (expiredCredit() != null) {
+ expiredCredit().validate();
+ }
+ if (pendingEligibleCharges() != null) {
+ pendingEligibleCharges().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
new file mode 100644
index 0000000000000..f1757eb9e7da3
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventSummaryInner.java
@@ -0,0 +1,222 @@
+// 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.core.annotation.JsonFlatten;
+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.EventType;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** An event summary resource. */
+@JsonFlatten
+@Fluent
+public class EventSummaryInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(EventSummaryInner.class);
+
+ /*
+ * Transaction date.
+ */
+ @JsonProperty(value = "properties.transactionDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime transactionDate;
+
+ /*
+ * Transaction description.
+ */
+ @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY)
+ private String description;
+
+ /*
+ * New Credit.
+ */
+ @JsonProperty(value = "properties.newCredit", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount newCredit;
+
+ /*
+ * Adjustments amount.
+ */
+ @JsonProperty(value = "properties.adjustments", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount adjustments;
+
+ /*
+ * Credit expired.
+ */
+ @JsonProperty(value = "properties.creditExpired", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount creditExpired;
+
+ /*
+ * Charges amount.
+ */
+ @JsonProperty(value = "properties.charges", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount charges;
+
+ /*
+ * Closed balance.
+ */
+ @JsonProperty(value = "properties.closedBalance", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount closedBalance;
+
+ /*
+ * The type of event.
+ */
+ @JsonProperty(value = "properties.eventType")
+ private EventType eventType;
+
+ /*
+ * Invoice number.
+ */
+ @JsonProperty(value = "properties.invoiceNumber", access = JsonProperty.Access.WRITE_ONLY)
+ private String invoiceNumber;
+
+ /*
+ * Resource etag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
+ private Map tags;
+
+ /**
+ * Get the transactionDate property: Transaction date.
+ *
+ * @return the transactionDate value.
+ */
+ public OffsetDateTime transactionDate() {
+ return this.transactionDate;
+ }
+
+ /**
+ * Get the description property: Transaction description.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Get the newCredit property: New Credit.
+ *
+ * @return the newCredit value.
+ */
+ public Amount newCredit() {
+ return this.newCredit;
+ }
+
+ /**
+ * Get the adjustments property: Adjustments amount.
+ *
+ * @return the adjustments value.
+ */
+ public Amount adjustments() {
+ return this.adjustments;
+ }
+
+ /**
+ * Get the creditExpired property: Credit expired.
+ *
+ * @return the creditExpired value.
+ */
+ public Amount creditExpired() {
+ return this.creditExpired;
+ }
+
+ /**
+ * Get the charges property: Charges amount.
+ *
+ * @return the charges value.
+ */
+ public Amount charges() {
+ return this.charges;
+ }
+
+ /**
+ * Get the closedBalance property: Closed balance.
+ *
+ * @return the closedBalance value.
+ */
+ public Amount closedBalance() {
+ return this.closedBalance;
+ }
+
+ /**
+ * Get the eventType property: The type of event.
+ *
+ * @return the eventType value.
+ */
+ public EventType eventType() {
+ return this.eventType;
+ }
+
+ /**
+ * Set the eventType property: The type of event.
+ *
+ * @param eventType the eventType value to set.
+ * @return the EventSummaryInner object itself.
+ */
+ public EventSummaryInner withEventType(EventType eventType) {
+ this.eventType = eventType;
+ return this;
+ }
+
+ /**
+ * Get the invoiceNumber property: Invoice number.
+ *
+ * @return the invoiceNumber value.
+ */
+ public String invoiceNumber() {
+ return this.invoiceNumber;
+ }
+
+ /**
+ * Get the etag property: Resource etag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (newCredit() != null) {
+ newCredit().validate();
+ }
+ if (adjustments() != null) {
+ adjustments().validate();
+ }
+ if (creditExpired() != null) {
+ creditExpired().validate();
+ }
+ if (charges() != null) {
+ charges().validate();
+ }
+ if (closedBalance() != null) {
+ closedBalance().validate();
+ }
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ForecastInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ForecastInner.java
new file mode 100644
index 0000000000000..2815eea54078c
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ForecastInner.java
@@ -0,0 +1,187 @@
+// 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.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.consumption.models.ChargeType;
+import com.azure.resourcemanager.consumption.models.ForecastPropertiesConfidenceLevelsItem;
+import com.azure.resourcemanager.consumption.models.Grain;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/** A forecast resource. */
+@JsonFlatten
+@Fluent
+public class ForecastInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ForecastInner.class);
+
+ /*
+ * The usage date of the forecast.
+ */
+ @JsonProperty(value = "properties.usageDate", access = JsonProperty.Access.WRITE_ONLY)
+ private String usageDate;
+
+ /*
+ * The granularity of forecast. Please note that Yearly is not currently
+ * supported in this API. The API will provide responses in the Monthly
+ * grain if Yearly is selected. To get yearly grain data, please use our
+ * newer Forecast API.
+ */
+ @JsonProperty(value = "properties.grain")
+ private Grain grain;
+
+ /*
+ * The amount of charge
+ */
+ @JsonProperty(value = "properties.charge", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal charge;
+
+ /*
+ * The ISO currency in which the meter is charged, for example, USD.
+ */
+ @JsonProperty(value = "properties.currency", access = JsonProperty.Access.WRITE_ONLY)
+ private String currency;
+
+ /*
+ * The type of the charge. Could be actual or forecast
+ */
+ @JsonProperty(value = "properties.chargeType")
+ private ChargeType chargeType;
+
+ /*
+ * The details about the forecast confidence levels. This is populated only
+ * when chargeType is Forecast.
+ */
+ @JsonProperty(value = "properties.confidenceLevels", access = JsonProperty.Access.WRITE_ONLY)
+ private List confidenceLevels;
+
+ /*
+ * Resource etag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
+ private Map tags;
+
+ /**
+ * Get the usageDate property: The usage date of the forecast.
+ *
+ * @return the usageDate value.
+ */
+ public String usageDate() {
+ return this.usageDate;
+ }
+
+ /**
+ * Get the grain property: The granularity of forecast. Please note that Yearly is not currently supported in this
+ * API. The API will provide responses in the Monthly grain if Yearly is selected. To get yearly grain data, please
+ * use our newer Forecast API.
+ *
+ * @return the grain value.
+ */
+ public Grain grain() {
+ return this.grain;
+ }
+
+ /**
+ * Set the grain property: The granularity of forecast. Please note that Yearly is not currently supported in this
+ * API. The API will provide responses in the Monthly grain if Yearly is selected. To get yearly grain data, please
+ * use our newer Forecast API.
+ *
+ * @param grain the grain value to set.
+ * @return the ForecastInner object itself.
+ */
+ public ForecastInner withGrain(Grain grain) {
+ this.grain = grain;
+ return this;
+ }
+
+ /**
+ * Get the charge property: The amount of charge.
+ *
+ * @return the charge value.
+ */
+ public BigDecimal charge() {
+ return this.charge;
+ }
+
+ /**
+ * Get the currency property: The ISO currency in which the meter is charged, for example, USD.
+ *
+ * @return the currency value.
+ */
+ public String currency() {
+ return this.currency;
+ }
+
+ /**
+ * Get the chargeType property: The type of the charge. Could be actual or forecast.
+ *
+ * @return the chargeType value.
+ */
+ public ChargeType chargeType() {
+ return this.chargeType;
+ }
+
+ /**
+ * Set the chargeType property: The type of the charge. Could be actual or forecast.
+ *
+ * @param chargeType the chargeType value to set.
+ * @return the ForecastInner object itself.
+ */
+ public ForecastInner withChargeType(ChargeType chargeType) {
+ this.chargeType = chargeType;
+ return this;
+ }
+
+ /**
+ * Get the confidenceLevels property: The details about the forecast confidence levels. This is populated only when
+ * chargeType is Forecast.
+ *
+ * @return the confidenceLevels value.
+ */
+ public List confidenceLevels() {
+ return this.confidenceLevels;
+ }
+
+ /**
+ * Get the etag property: Resource etag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (confidenceLevels() != null) {
+ confidenceLevels().forEach(e -> e.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
new file mode 100644
index 0000000000000..667d567330667
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotSummaryInner.java
@@ -0,0 +1,157 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.consumption.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.JsonFlatten;
+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.LotSource;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** A lot summary resource. */
+@JsonFlatten
+@Immutable
+public class LotSummaryInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(LotSummaryInner.class);
+
+ /*
+ * Original amount.
+ */
+ @JsonProperty(value = "properties.originalAmount", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount originalAmount;
+
+ /*
+ * Closed balance.
+ */
+ @JsonProperty(value = "properties.closedBalance", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount closedBalance;
+
+ /*
+ * Lot source.
+ */
+ @JsonProperty(value = "properties.source", access = JsonProperty.Access.WRITE_ONLY)
+ private LotSource source;
+
+ /*
+ * Start date.
+ */
+ @JsonProperty(value = "properties.startDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime startDate;
+
+ /*
+ * Expiration date.
+ */
+ @JsonProperty(value = "properties.expirationDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime expirationDate;
+
+ /*
+ * PO number.
+ */
+ @JsonProperty(value = "properties.poNumber", access = JsonProperty.Access.WRITE_ONLY)
+ private String poNumber;
+
+ /*
+ * Resource etag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
+ private Map tags;
+
+ /**
+ * Get the originalAmount property: Original amount.
+ *
+ * @return the originalAmount value.
+ */
+ public Amount originalAmount() {
+ return this.originalAmount;
+ }
+
+ /**
+ * Get the closedBalance property: Closed balance.
+ *
+ * @return the closedBalance value.
+ */
+ public Amount closedBalance() {
+ return this.closedBalance;
+ }
+
+ /**
+ * Get the source property: Lot source.
+ *
+ * @return the source value.
+ */
+ public LotSource source() {
+ return this.source;
+ }
+
+ /**
+ * Get the startDate property: Start date.
+ *
+ * @return the startDate value.
+ */
+ public OffsetDateTime startDate() {
+ return this.startDate;
+ }
+
+ /**
+ * Get the expirationDate property: Expiration date.
+ *
+ * @return the expirationDate value.
+ */
+ public OffsetDateTime expirationDate() {
+ return this.expirationDate;
+ }
+
+ /**
+ * Get the poNumber property: PO number.
+ *
+ * @return the poNumber value.
+ */
+ public String poNumber() {
+ return this.poNumber;
+ }
+
+ /**
+ * Get the etag property: Resource etag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (originalAmount() != null) {
+ originalAmount().validate();
+ }
+ if (closedBalance() != null) {
+ closedBalance().validate();
+ }
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostResultInner.java
new file mode 100644
index 0000000000000..d5ace675a1a9b
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostResultInner.java
@@ -0,0 +1,255 @@
+// 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.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.math.BigDecimal;
+import java.time.OffsetDateTime;
+import java.util.List;
+import java.util.Map;
+
+/** A management group aggregated cost resource. */
+@JsonFlatten
+@Fluent
+public class ManagementGroupAggregatedCostResultInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagementGroupAggregatedCostResultInner.class);
+
+ /*
+ * The id of the billing period resource that the aggregated cost belongs
+ * to.
+ */
+ @JsonProperty(value = "properties.billingPeriodId", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingPeriodId;
+
+ /*
+ * The start of the date time range covered by aggregated cost.
+ */
+ @JsonProperty(value = "properties.usageStart", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime usageStart;
+
+ /*
+ * The end of the date time range covered by the aggregated cost.
+ */
+ @JsonProperty(value = "properties.usageEnd", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime usageEnd;
+
+ /*
+ * Azure Charges.
+ */
+ @JsonProperty(value = "properties.azureCharges", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal azureCharges;
+
+ /*
+ * Marketplace Charges.
+ */
+ @JsonProperty(value = "properties.marketplaceCharges", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal marketplaceCharges;
+
+ /*
+ * Charges Billed Separately.
+ */
+ @JsonProperty(value = "properties.chargesBilledSeparately", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal chargesBilledSeparately;
+
+ /*
+ * The ISO currency in which the meter is charged, for example, USD.
+ */
+ @JsonProperty(value = "properties.currency", access = JsonProperty.Access.WRITE_ONLY)
+ private String currency;
+
+ /*
+ * Children of a management group
+ */
+ @JsonProperty(value = "properties.children")
+ private List children;
+
+ /*
+ * List of subscription Guids included in the calculation of aggregated
+ * cost
+ */
+ @JsonProperty(value = "properties.includedSubscriptions")
+ private List includedSubscriptions;
+
+ /*
+ * List of subscription Guids excluded from the calculation of aggregated
+ * cost
+ */
+ @JsonProperty(value = "properties.excludedSubscriptions")
+ private List excludedSubscriptions;
+
+ /*
+ * Resource etag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
+ private 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() {
+ return this.billingPeriodId;
+ }
+
+ /**
+ * Get the usageStart property: The start of the date time range covered by aggregated cost.
+ *
+ * @return the usageStart value.
+ */
+ public OffsetDateTime usageStart() {
+ return this.usageStart;
+ }
+
+ /**
+ * Get the usageEnd property: The end of the date time range covered by the aggregated cost.
+ *
+ * @return the usageEnd value.
+ */
+ public OffsetDateTime usageEnd() {
+ return this.usageEnd;
+ }
+
+ /**
+ * Get the azureCharges property: Azure Charges.
+ *
+ * @return the azureCharges value.
+ */
+ public BigDecimal azureCharges() {
+ return this.azureCharges;
+ }
+
+ /**
+ * Get the marketplaceCharges property: Marketplace Charges.
+ *
+ * @return the marketplaceCharges value.
+ */
+ public BigDecimal marketplaceCharges() {
+ return this.marketplaceCharges;
+ }
+
+ /**
+ * Get the chargesBilledSeparately property: Charges Billed Separately.
+ *
+ * @return the chargesBilledSeparately value.
+ */
+ public BigDecimal chargesBilledSeparately() {
+ return this.chargesBilledSeparately;
+ }
+
+ /**
+ * Get the currency property: The ISO currency in which the meter is charged, for example, USD.
+ *
+ * @return the currency value.
+ */
+ public String currency() {
+ return this.currency;
+ }
+
+ /**
+ * Get the children property: Children of a management group.
+ *
+ * @return the children value.
+ */
+ public List children() {
+ return this.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) {
+ this.children = children;
+ return this;
+ }
+
+ /**
+ * Get the includedSubscriptions property: List of subscription Guids included in the calculation of aggregated
+ * cost.
+ *
+ * @return the includedSubscriptions value.
+ */
+ public List includedSubscriptions() {
+ return this.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.
+ */
+ public ManagementGroupAggregatedCostResultInner withIncludedSubscriptions(List includedSubscriptions) {
+ this.includedSubscriptions = includedSubscriptions;
+ return this;
+ }
+
+ /**
+ * Get the excludedSubscriptions property: List of subscription Guids excluded from the calculation of aggregated
+ * cost.
+ *
+ * @return the excludedSubscriptions value.
+ */
+ public List excludedSubscriptions() {
+ return this.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.
+ */
+ public ManagementGroupAggregatedCostResultInner withExcludedSubscriptions(List excludedSubscriptions) {
+ this.excludedSubscriptions = excludedSubscriptions;
+ return this;
+ }
+
+ /**
+ * Get the etag property: Resource etag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (children() != null) {
+ children().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceInner.java
new file mode 100644
index 0000000000000..764f0bc7f5297
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceInner.java
@@ -0,0 +1,439 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.consumption.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.math.BigDecimal;
+import java.time.OffsetDateTime;
+import java.util.Map;
+import java.util.UUID;
+
+/** An marketplace resource. */
+@JsonFlatten
+@Immutable
+public class MarketplaceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(MarketplaceInner.class);
+
+ /*
+ * The id of the billing period resource that the usage belongs to.
+ */
+ @JsonProperty(value = "properties.billingPeriodId", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingPeriodId;
+
+ /*
+ * The start of the date time range covered by the usage detail.
+ */
+ @JsonProperty(value = "properties.usageStart", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime usageStart;
+
+ /*
+ * The end of the date time range covered by the usage detail.
+ */
+ @JsonProperty(value = "properties.usageEnd", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime usageEnd;
+
+ /*
+ * The marketplace resource rate.
+ */
+ @JsonProperty(value = "properties.resourceRate", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal resourceRate;
+
+ /*
+ * The type of offer.
+ */
+ @JsonProperty(value = "properties.offerName", access = JsonProperty.Access.WRITE_ONLY)
+ private String offerName;
+
+ /*
+ * The name of resource group.
+ */
+ @JsonProperty(value = "properties.resourceGroup", access = JsonProperty.Access.WRITE_ONLY)
+ private String resourceGroup;
+
+ /*
+ * The order number.
+ */
+ @JsonProperty(value = "properties.orderNumber", access = JsonProperty.Access.WRITE_ONLY)
+ private String orderNumber;
+
+ /*
+ * The name of the resource instance that the usage is about.
+ */
+ @JsonProperty(value = "properties.instanceName", access = JsonProperty.Access.WRITE_ONLY)
+ private String instanceName;
+
+ /*
+ * The uri of the resource instance that the usage is about.
+ */
+ @JsonProperty(value = "properties.instanceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String instanceId;
+
+ /*
+ * The ISO currency in which the meter is charged, for example, USD.
+ */
+ @JsonProperty(value = "properties.currency", access = JsonProperty.Access.WRITE_ONLY)
+ private String currency;
+
+ /*
+ * The quantity of usage.
+ */
+ @JsonProperty(value = "properties.consumedQuantity", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal consumedQuantity;
+
+ /*
+ * The unit of measure.
+ */
+ @JsonProperty(value = "properties.unitOfMeasure", access = JsonProperty.Access.WRITE_ONLY)
+ private String unitOfMeasure;
+
+ /*
+ * The amount of cost before tax.
+ */
+ @JsonProperty(value = "properties.pretaxCost", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal pretaxCost;
+
+ /*
+ * The estimated usage is subject to change.
+ */
+ @JsonProperty(value = "properties.isEstimated", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isEstimated;
+
+ /*
+ * The meter id (GUID).
+ */
+ @JsonProperty(value = "properties.meterId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID meterId;
+
+ /*
+ * Subscription guid.
+ */
+ @JsonProperty(value = "properties.subscriptionGuid", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID subscriptionGuid;
+
+ /*
+ * Subscription name.
+ */
+ @JsonProperty(value = "properties.subscriptionName", access = JsonProperty.Access.WRITE_ONLY)
+ private String subscriptionName;
+
+ /*
+ * Account name.
+ */
+ @JsonProperty(value = "properties.accountName", access = JsonProperty.Access.WRITE_ONLY)
+ private String accountName;
+
+ /*
+ * Department name.
+ */
+ @JsonProperty(value = "properties.departmentName", access = JsonProperty.Access.WRITE_ONLY)
+ private String departmentName;
+
+ /*
+ * Consumed service name.
+ */
+ @JsonProperty(value = "properties.consumedService", access = JsonProperty.Access.WRITE_ONLY)
+ private String consumedService;
+
+ /*
+ * The cost center of this department if it is a department and a
+ * costcenter exists
+ */
+ @JsonProperty(value = "properties.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.
+ */
+ @JsonProperty(value = "properties.additionalProperties", access = JsonProperty.Access.WRITE_ONLY)
+ private String additionalProperties;
+
+ /*
+ * The name of publisher.
+ */
+ @JsonProperty(value = "properties.publisherName", access = JsonProperty.Access.WRITE_ONLY)
+ private String publisherName;
+
+ /*
+ * The name of plan.
+ */
+ @JsonProperty(value = "properties.planName", access = JsonProperty.Access.WRITE_ONLY)
+ private String planName;
+
+ /*
+ * Flag indicating whether this is a recurring charge or not.
+ */
+ @JsonProperty(value = "properties.isRecurringCharge", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isRecurringCharge;
+
+ /*
+ * Resource etag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
+ private 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() {
+ return this.billingPeriodId;
+ }
+
+ /**
+ * Get the usageStart property: The start of the date time range covered by the usage detail.
+ *
+ * @return the usageStart value.
+ */
+ public OffsetDateTime usageStart() {
+ return this.usageStart;
+ }
+
+ /**
+ * Get the usageEnd property: The end of the date time range covered by the usage detail.
+ *
+ * @return the usageEnd value.
+ */
+ public OffsetDateTime usageEnd() {
+ return this.usageEnd;
+ }
+
+ /**
+ * Get the resourceRate property: The marketplace resource rate.
+ *
+ * @return the resourceRate value.
+ */
+ public BigDecimal resourceRate() {
+ return this.resourceRate;
+ }
+
+ /**
+ * Get the offerName property: The type of offer.
+ *
+ * @return the offerName value.
+ */
+ public String offerName() {
+ return this.offerName;
+ }
+
+ /**
+ * Get the resourceGroup property: The name of resource group.
+ *
+ * @return the resourceGroup value.
+ */
+ public String resourceGroup() {
+ return this.resourceGroup;
+ }
+
+ /**
+ * Get the orderNumber property: The order number.
+ *
+ * @return the orderNumber value.
+ */
+ public String orderNumber() {
+ return this.orderNumber;
+ }
+
+ /**
+ * Get the instanceName property: The name of the resource instance that the usage is about.
+ *
+ * @return the instanceName value.
+ */
+ public String instanceName() {
+ return this.instanceName;
+ }
+
+ /**
+ * Get the instanceId property: The uri of the resource instance that the usage is about.
+ *
+ * @return the instanceId value.
+ */
+ public String instanceId() {
+ return this.instanceId;
+ }
+
+ /**
+ * Get the currency property: The ISO currency in which the meter is charged, for example, USD.
+ *
+ * @return the currency value.
+ */
+ public String currency() {
+ return this.currency;
+ }
+
+ /**
+ * Get the consumedQuantity property: The quantity of usage.
+ *
+ * @return the consumedQuantity value.
+ */
+ public BigDecimal consumedQuantity() {
+ return this.consumedQuantity;
+ }
+
+ /**
+ * Get the unitOfMeasure property: The unit of measure.
+ *
+ * @return the unitOfMeasure value.
+ */
+ public String unitOfMeasure() {
+ return this.unitOfMeasure;
+ }
+
+ /**
+ * Get the pretaxCost property: The amount of cost before tax.
+ *
+ * @return the pretaxCost value.
+ */
+ public BigDecimal pretaxCost() {
+ return this.pretaxCost;
+ }
+
+ /**
+ * Get the isEstimated property: The estimated usage is subject to change.
+ *
+ * @return the isEstimated value.
+ */
+ public Boolean isEstimated() {
+ return this.isEstimated;
+ }
+
+ /**
+ * Get the meterId property: The meter id (GUID).
+ *
+ * @return the meterId value.
+ */
+ public UUID meterId() {
+ return this.meterId;
+ }
+
+ /**
+ * Get the subscriptionGuid property: Subscription guid.
+ *
+ * @return the subscriptionGuid value.
+ */
+ public UUID subscriptionGuid() {
+ return this.subscriptionGuid;
+ }
+
+ /**
+ * Get the subscriptionName property: Subscription name.
+ *
+ * @return the subscriptionName value.
+ */
+ public String subscriptionName() {
+ return this.subscriptionName;
+ }
+
+ /**
+ * Get the accountName property: Account name.
+ *
+ * @return the accountName value.
+ */
+ public String accountName() {
+ return this.accountName;
+ }
+
+ /**
+ * Get the departmentName property: Department name.
+ *
+ * @return the departmentName value.
+ */
+ public String departmentName() {
+ return this.departmentName;
+ }
+
+ /**
+ * Get the consumedService property: Consumed service name.
+ *
+ * @return the consumedService value.
+ */
+ public String consumedService() {
+ return this.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() {
+ return this.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() {
+ return this.additionalProperties;
+ }
+
+ /**
+ * Get the publisherName property: The name of publisher.
+ *
+ * @return the publisherName value.
+ */
+ public String publisherName() {
+ return this.publisherName;
+ }
+
+ /**
+ * Get the planName property: The name of plan.
+ *
+ * @return the planName value.
+ */
+ public String planName() {
+ return this.planName;
+ }
+
+ /**
+ * Get the isRecurringCharge property: Flag indicating whether this is a recurring charge or not.
+ *
+ * @return the isRecurringCharge value.
+ */
+ public Boolean isRecurringCharge() {
+ return this.isRecurringCharge;
+ }
+
+ /**
+ * Get the etag property: Resource etag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * 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
new file mode 100644
index 0000000000000..444c92f8195d3
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionInner.java
@@ -0,0 +1,339 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.consumption.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.JsonFlatten;
+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. */
+@JsonFlatten
+@Immutable
+public class ModernReservationTransactionInner extends ReservationTransactionResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ModernReservationTransactionInner.class);
+
+ /*
+ * The charge of the transaction.
+ */
+ @JsonProperty(value = "properties.amount", access = JsonProperty.Access.WRITE_ONLY)
+ 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.
+ */
+ @JsonProperty(value = "properties.armSkuName", access = JsonProperty.Access.WRITE_ONLY)
+ private String armSkuName;
+
+ /*
+ * The billing frequency, which can be either one-time or recurring.
+ */
+ @JsonProperty(value = "properties.billingFrequency", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingFrequency;
+
+ /*
+ * Billing profile Id.
+ */
+ @JsonProperty(value = "properties.billingProfileId", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingProfileId;
+
+ /*
+ * Billing profile name.
+ */
+ @JsonProperty(value = "properties.billingProfileName", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingProfileName;
+
+ /*
+ * The ISO currency in which the transaction is charged, for example, USD.
+ */
+ @JsonProperty(value = "properties.currency", access = JsonProperty.Access.WRITE_ONLY)
+ private String currency;
+
+ /*
+ * The description of the transaction.
+ */
+ @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY)
+ private String description;
+
+ /*
+ * The date of the transaction
+ */
+ @JsonProperty(value = "properties.eventDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime eventDate;
+
+ /*
+ * The type of the transaction (Purchase, Cancel, etc.)
+ */
+ @JsonProperty(value = "properties.eventType", access = JsonProperty.Access.WRITE_ONLY)
+ private String eventType;
+
+ /*
+ * Invoice Number
+ */
+ @JsonProperty(value = "properties.invoice", access = JsonProperty.Access.WRITE_ONLY)
+ private String invoice;
+
+ /*
+ * Invoice Id as on the invoice where the specific transaction appears.
+ */
+ @JsonProperty(value = "properties.invoiceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String invoiceId;
+
+ /*
+ * Invoice Section Id
+ */
+ @JsonProperty(value = "properties.invoiceSectionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String invoiceSectionId;
+
+ /*
+ * Invoice Section Name.
+ */
+ @JsonProperty(value = "properties.invoiceSectionName", access = JsonProperty.Access.WRITE_ONLY)
+ private String invoiceSectionName;
+
+ /*
+ * The subscription guid that makes the transaction.
+ */
+ @JsonProperty(value = "properties.purchasingSubscriptionGuid", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID purchasingSubscriptionGuid;
+
+ /*
+ * The subscription name that makes the transaction.
+ */
+ @JsonProperty(value = "properties.purchasingSubscriptionName", access = JsonProperty.Access.WRITE_ONLY)
+ private String purchasingSubscriptionName;
+
+ /*
+ * The quantity of the transaction.
+ */
+ @JsonProperty(value = "properties.quantity", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal quantity;
+
+ /*
+ * The region of the transaction.
+ */
+ @JsonProperty(value = "properties.region", access = JsonProperty.Access.WRITE_ONLY)
+ 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.
+ */
+ @JsonProperty(value = "properties.reservationOrderId", access = JsonProperty.Access.WRITE_ONLY)
+ private String reservationOrderId;
+
+ /*
+ * The name of the reservation order.
+ */
+ @JsonProperty(value = "properties.reservationOrderName", access = JsonProperty.Access.WRITE_ONLY)
+ private String reservationOrderName;
+
+ /*
+ * This is the term of the transaction.
+ */
+ @JsonProperty(value = "properties.term", access = JsonProperty.Access.WRITE_ONLY)
+ private String term;
+
+ /**
+ * Get the amount property: The charge of the transaction.
+ *
+ * @return the amount value.
+ */
+ public BigDecimal amount() {
+ return this.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() {
+ return this.armSkuName;
+ }
+
+ /**
+ * Get the billingFrequency property: The billing frequency, which can be either one-time or recurring.
+ *
+ * @return the billingFrequency value.
+ */
+ public String billingFrequency() {
+ return this.billingFrequency;
+ }
+
+ /**
+ * Get the billingProfileId property: Billing profile Id.
+ *
+ * @return the billingProfileId value.
+ */
+ public String billingProfileId() {
+ return this.billingProfileId;
+ }
+
+ /**
+ * Get the billingProfileName property: Billing profile name.
+ *
+ * @return the billingProfileName value.
+ */
+ public String billingProfileName() {
+ return this.billingProfileName;
+ }
+
+ /**
+ * Get the currency property: The ISO currency in which the transaction is charged, for example, USD.
+ *
+ * @return the currency value.
+ */
+ public String currency() {
+ return this.currency;
+ }
+
+ /**
+ * Get the description property: The description of the transaction.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Get the eventDate property: The date of the transaction.
+ *
+ * @return the eventDate value.
+ */
+ public OffsetDateTime eventDate() {
+ return this.eventDate;
+ }
+
+ /**
+ * Get the eventType property: The type of the transaction (Purchase, Cancel, etc.).
+ *
+ * @return the eventType value.
+ */
+ public String eventType() {
+ return this.eventType;
+ }
+
+ /**
+ * Get the invoice property: Invoice Number.
+ *
+ * @return the invoice value.
+ */
+ public String invoice() {
+ return this.invoice;
+ }
+
+ /**
+ * Get the invoiceId property: Invoice Id as on the invoice where the specific transaction appears.
+ *
+ * @return the invoiceId value.
+ */
+ public String invoiceId() {
+ return this.invoiceId;
+ }
+
+ /**
+ * Get the invoiceSectionId property: Invoice Section Id.
+ *
+ * @return the invoiceSectionId value.
+ */
+ public String invoiceSectionId() {
+ return this.invoiceSectionId;
+ }
+
+ /**
+ * Get the invoiceSectionName property: Invoice Section Name.
+ *
+ * @return the invoiceSectionName value.
+ */
+ public String invoiceSectionName() {
+ return this.invoiceSectionName;
+ }
+
+ /**
+ * Get the purchasingSubscriptionGuid property: The subscription guid that makes the transaction.
+ *
+ * @return the purchasingSubscriptionGuid value.
+ */
+ public UUID purchasingSubscriptionGuid() {
+ return this.purchasingSubscriptionGuid;
+ }
+
+ /**
+ * Get the purchasingSubscriptionName property: The subscription name that makes the transaction.
+ *
+ * @return the purchasingSubscriptionName value.
+ */
+ public String purchasingSubscriptionName() {
+ return this.purchasingSubscriptionName;
+ }
+
+ /**
+ * Get the quantity property: The quantity of the transaction.
+ *
+ * @return the quantity value.
+ */
+ public BigDecimal quantity() {
+ return this.quantity;
+ }
+
+ /**
+ * Get the region property: The region of the transaction.
+ *
+ * @return the region value.
+ */
+ public String region() {
+ return this.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() {
+ return this.reservationOrderId;
+ }
+
+ /**
+ * Get the reservationOrderName property: The name of the reservation order.
+ *
+ * @return the reservationOrderName value.
+ */
+ public String reservationOrderName() {
+ return this.reservationOrderName;
+ }
+
+ /**
+ * Get the term property: This is the term of the transaction.
+ *
+ * @return the term value.
+ */
+ public String term() {
+ return this.term;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java
new file mode 100644
index 0000000000000..fe76c6fdfa548
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java
@@ -0,0 +1,84 @@
+// 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.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.consumption.models.OperationDisplay;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A Consumption REST API operation. */
+@Fluent
+public final class OperationInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
+
+ /*
+ * Operation Id.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /*
+ * Operation name: {provider}/{resource}/{operation}.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * The object that represents the operation.
+ */
+ @JsonProperty(value = "display")
+ private OperationDisplay display;
+
+ /**
+ * Get the id property: Operation Id.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: Operation name: {provider}/{resource}/{operation}.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the display property: The object that represents the operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: The object that represents the operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().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
new file mode 100644
index 0000000000000..c00e8709ca0ef
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultInner.java
@@ -0,0 +1,93 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.consumption.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.consumption.models.PriceSheetProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** An pricesheet resource. */
+@JsonFlatten
+@Immutable
+public class PriceSheetResultInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PriceSheetResultInner.class);
+
+ /*
+ * Price sheet
+ */
+ @JsonProperty(value = "properties.pricesheets", access = JsonProperty.Access.WRITE_ONLY)
+ private List pricesheets;
+
+ /*
+ * The link (url) to the next page of results.
+ */
+ @JsonProperty(value = "properties.nextLink", access = JsonProperty.Access.WRITE_ONLY)
+ private String nextLink;
+
+ /*
+ * Resource etag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
+ private Map tags;
+
+ /**
+ * Get the pricesheets property: Price sheet.
+ *
+ * @return the pricesheets value.
+ */
+ public List pricesheets() {
+ return this.pricesheets;
+ }
+
+ /**
+ * Get the nextLink property: The link (url) to the next page of results.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Get the etag property: Resource etag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (pricesheets() != null) {
+ pricesheets().forEach(e -> e.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
new file mode 100644
index 0000000000000..c00a1f591d987
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailInner.java
@@ -0,0 +1,243 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.consumption.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.math.BigDecimal;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** reservation detail resource. */
+@JsonFlatten
+@Immutable
+public class ReservationDetailInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationDetailInner.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.
+ */
+ @JsonProperty(value = "properties.reservationOrderId", access = JsonProperty.Access.WRITE_ONLY)
+ private String reservationOrderId;
+
+ /*
+ * The instance Flexibility Ratio.
+ */
+ @JsonProperty(value = "properties.instanceFlexibilityRatio", access = JsonProperty.Access.WRITE_ONLY)
+ private String instanceFlexibilityRatio;
+
+ /*
+ * The instance Flexibility Group.
+ */
+ @JsonProperty(value = "properties.instanceFlexibilityGroup", access = JsonProperty.Access.WRITE_ONLY)
+ 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.
+ */
+ @JsonProperty(value = "properties.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.
+ */
+ @JsonProperty(value = "properties.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.
+ */
+ @JsonProperty(value = "properties.reservedHours", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal reservedHours;
+
+ /*
+ * The date on which consumption occurred.
+ */
+ @JsonProperty(value = "properties.usageDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime usageDate;
+
+ /*
+ * This is the total hours used by the instance.
+ */
+ @JsonProperty(value = "properties.usedHours", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal usedHours;
+
+ /*
+ * This identifier is the name of the resource or the fully qualified
+ * Resource ID.
+ */
+ @JsonProperty(value = "properties.instanceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String instanceId;
+
+ /*
+ * This is the total count of instances that are reserved for the
+ * reservationId.
+ */
+ @JsonProperty(value = "properties.totalReservedQuantity", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal totalReservedQuantity;
+
+ /*
+ * The reservation kind.
+ */
+ @JsonProperty(value = "properties.kind", access = JsonProperty.Access.WRITE_ONLY)
+ private String kind;
+
+ /*
+ * Resource etag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
+ private 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() {
+ return this.reservationOrderId;
+ }
+
+ /**
+ * Get the instanceFlexibilityRatio property: The instance Flexibility Ratio.
+ *
+ * @return the instanceFlexibilityRatio value.
+ */
+ public String instanceFlexibilityRatio() {
+ return this.instanceFlexibilityRatio;
+ }
+
+ /**
+ * Get the instanceFlexibilityGroup property: The instance Flexibility Group.
+ *
+ * @return the instanceFlexibilityGroup value.
+ */
+ public String instanceFlexibilityGroup() {
+ return this.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() {
+ return this.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() {
+ return this.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() {
+ return this.reservedHours;
+ }
+
+ /**
+ * Get the usageDate property: The date on which consumption occurred.
+ *
+ * @return the usageDate value.
+ */
+ public OffsetDateTime usageDate() {
+ return this.usageDate;
+ }
+
+ /**
+ * Get the usedHours property: This is the total hours used by the instance.
+ *
+ * @return the usedHours value.
+ */
+ public BigDecimal usedHours() {
+ return this.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() {
+ return this.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() {
+ return this.totalReservedQuantity;
+ }
+
+ /**
+ * Get the kind property: The reservation kind.
+ *
+ * @return the kind value.
+ */
+ public String kind() {
+ return this.kind;
+ }
+
+ /**
+ * Get the etag property: Resource etag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * 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
new file mode 100644
index 0000000000000..ee7873fc7e472
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsModelInner.java
@@ -0,0 +1,212 @@
+// 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.core.annotation.JsonFlatten;
+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.JsonProperty;
+import java.util.Map;
+
+/** Reservation recommendation details. */
+@JsonFlatten
+@Fluent
+public class ReservationRecommendationDetailsModelInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationRecommendationDetailsModelInner.class);
+
+ /*
+ * Resource Location.
+ */
+ @JsonProperty(value = "location")
+ private String location;
+
+ /*
+ * Resource sku
+ */
+ @JsonProperty(value = "sku")
+ private String sku;
+
+ /*
+ * An ISO 4217 currency code identifier for the costs and savings
+ */
+ @JsonProperty(value = "properties.currency", access = JsonProperty.Access.WRITE_ONLY)
+ private String currency;
+
+ /*
+ * Resource specific properties.
+ */
+ @JsonProperty(value = "properties.resource", access = JsonProperty.Access.WRITE_ONLY)
+ private ReservationRecommendationDetailsResourceProperties resource;
+
+ /*
+ * Resource Group.
+ */
+ @JsonProperty(value = "properties.resourceGroup", access = JsonProperty.Access.WRITE_ONLY)
+ private String resourceGroup;
+
+ /*
+ * Savings information for the recommendation.
+ */
+ @JsonProperty(value = "properties.savings", access = JsonProperty.Access.WRITE_ONLY)
+ private ReservationRecommendationDetailsSavingsProperties savings;
+
+ /*
+ * Scope of the reservation, ex: Single or Shared.
+ */
+ @JsonProperty(value = "properties.scope", access = JsonProperty.Access.WRITE_ONLY)
+ private String scope;
+
+ /*
+ * Historical usage details used to calculate the estimated savings.
+ */
+ @JsonProperty(value = "properties.usage", access = JsonProperty.Access.WRITE_ONLY)
+ private ReservationRecommendationDetailsUsageProperties usage;
+
+ /*
+ * Resource etag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
+ private Map tags;
+
+ /**
+ * Get the location property: Resource Location.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: Resource Location.
+ *
+ * @param location the location value to set.
+ * @return the ReservationRecommendationDetailsModelInner object itself.
+ */
+ public ReservationRecommendationDetailsModelInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the sku property: Resource sku.
+ *
+ * @return the sku value.
+ */
+ public String sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: Resource sku.
+ *
+ * @param sku the sku value to set.
+ * @return the ReservationRecommendationDetailsModelInner object itself.
+ */
+ public ReservationRecommendationDetailsModelInner withSku(String sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the currency property: An ISO 4217 currency code identifier for the costs and savings.
+ *
+ * @return the currency value.
+ */
+ public String currency() {
+ return this.currency;
+ }
+
+ /**
+ * Get the resource property: Resource specific properties.
+ *
+ * @return the resource value.
+ */
+ public ReservationRecommendationDetailsResourceProperties resource() {
+ return this.resource;
+ }
+
+ /**
+ * Get the resourceGroup property: Resource Group.
+ *
+ * @return the resourceGroup value.
+ */
+ public String resourceGroup() {
+ return this.resourceGroup;
+ }
+
+ /**
+ * Get the savings property: Savings information for the recommendation.
+ *
+ * @return the savings value.
+ */
+ public ReservationRecommendationDetailsSavingsProperties savings() {
+ return this.savings;
+ }
+
+ /**
+ * Get the scope property: Scope of the reservation, ex: Single or Shared.
+ *
+ * @return the scope value.
+ */
+ public String scope() {
+ return this.scope;
+ }
+
+ /**
+ * Get the usage property: Historical usage details used to calculate the estimated savings.
+ *
+ * @return the usage value.
+ */
+ public ReservationRecommendationDetailsUsageProperties usage() {
+ return this.usage;
+ }
+
+ /**
+ * Get the etag property: Resource etag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (resource() != null) {
+ resource().validate();
+ }
+ if (savings() != null) {
+ savings().validate();
+ }
+ if (usage() != null) {
+ usage().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
new file mode 100644
index 0000000000000..91cae06f12195
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationInner.java
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.consumption.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.consumption.models.LegacyReservationRecommendation;
+import com.azure.resourcemanager.consumption.models.ModernReservationRecommendation;
+import com.azure.resourcemanager.consumption.models.ResourceAttributes;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import java.util.Map;
+
+/** A reservation recommendation resource. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.PROPERTY,
+ property = "kind",
+ defaultImpl = ReservationRecommendationInner.class)
+@JsonTypeName("ReservationRecommendation")
+@JsonSubTypes({
+ @JsonSubTypes.Type(name = "legacy", value = LegacyReservationRecommendation.class),
+ @JsonSubTypes.Type(name = "modern", value = ModernReservationRecommendation.class)
+})
+@Immutable
+public class ReservationRecommendationInner extends ResourceAttributes {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationRecommendationInner.class);
+
+ /*
+ * Resource etag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
+ private Map tags;
+
+ /**
+ * Get the etag property: Resource etag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java
new file mode 100644
index 0000000000000..239761bc9379a
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java
@@ -0,0 +1,314 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.consumption.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.math.BigDecimal;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** reservation summary resource. */
+@JsonFlatten
+@Immutable
+public class ReservationSummaryInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationSummaryInner.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.
+ */
+ @JsonProperty(value = "properties.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.
+ */
+ @JsonProperty(value = "properties.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.
+ */
+ @JsonProperty(value = "properties.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
+ */
+ @JsonProperty(value = "properties.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.
+ */
+ @JsonProperty(value = "properties.usageDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime usageDate;
+
+ /*
+ * Total used hours by the reservation
+ */
+ @JsonProperty(value = "properties.usedHours", access = JsonProperty.Access.WRITE_ONLY)
+ 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
+ */
+ @JsonProperty(value = "properties.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)
+ */
+ @JsonProperty(value = "properties.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.
+ */
+ @JsonProperty(value = "properties.maxUtilizationPercentage", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal maxUtilizationPercentage;
+
+ /*
+ * The reservation kind.
+ */
+ @JsonProperty(value = "properties.kind", access = JsonProperty.Access.WRITE_ONLY)
+ private String kind;
+
+ /*
+ * This is the purchased quantity for the reservationId.
+ */
+ @JsonProperty(value = "properties.purchasedQuantity", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal purchasedQuantity;
+
+ /*
+ * This is the remaining quantity for the reservationId.
+ */
+ @JsonProperty(value = "properties.remainingQuantity", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal remainingQuantity;
+
+ /*
+ * This is the total count of instances that are reserved for the
+ * reservationId.
+ */
+ @JsonProperty(value = "properties.totalReservedQuantity", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal totalReservedQuantity;
+
+ /*
+ * This is the used quantity for the reservationId.
+ */
+ @JsonProperty(value = "properties.usedQuantity", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal usedQuantity;
+
+ /*
+ * This is the utilized percentage for the reservation Id.
+ */
+ @JsonProperty(value = "properties.utilizedPercentage", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal utilizedPercentage;
+
+ /*
+ * Resource etag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
+ private 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() {
+ return this.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() {
+ return this.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() {
+ return this.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() {
+ return this.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() {
+ return this.usageDate;
+ }
+
+ /**
+ * Get the usedHours property: Total used hours by the reservation.
+ *
+ * @return the usedHours value.
+ */
+ public BigDecimal usedHours() {
+ return this.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() {
+ return this.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() {
+ return this.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() {
+ return this.maxUtilizationPercentage;
+ }
+
+ /**
+ * Get the kind property: The reservation kind.
+ *
+ * @return the kind value.
+ */
+ public String kind() {
+ return this.kind;
+ }
+
+ /**
+ * Get the purchasedQuantity property: This is the purchased quantity for the reservationId.
+ *
+ * @return the purchasedQuantity value.
+ */
+ public BigDecimal purchasedQuantity() {
+ return this.purchasedQuantity;
+ }
+
+ /**
+ * Get the remainingQuantity property: This is the remaining quantity for the reservationId.
+ *
+ * @return the remainingQuantity value.
+ */
+ public BigDecimal remainingQuantity() {
+ return this.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() {
+ return this.totalReservedQuantity;
+ }
+
+ /**
+ * Get the usedQuantity property: This is the used quantity for the reservationId.
+ *
+ * @return the usedQuantity value.
+ */
+ public BigDecimal usedQuantity() {
+ return this.usedQuantity;
+ }
+
+ /**
+ * Get the utilizedPercentage property: This is the utilized percentage for the reservation Id.
+ *
+ * @return the utilizedPercentage value.
+ */
+ public BigDecimal utilizedPercentage() {
+ return this.utilizedPercentage;
+ }
+
+ /**
+ * Get the etag property: Resource etag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * 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
new file mode 100644
index 0000000000000..c941d11d67f4b
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationTransactionInner.java
@@ -0,0 +1,341 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.consumption.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.JsonFlatten;
+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;
+
+/** Reservation transaction resource. */
+@JsonFlatten
+@Immutable
+public class ReservationTransactionInner extends ReservationTransactionResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationTransactionInner.class);
+
+ /*
+ * The date of the transaction
+ */
+ @JsonProperty(value = "properties.eventDate", access = JsonProperty.Access.WRITE_ONLY)
+ 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.
+ */
+ @JsonProperty(value = "properties.reservationOrderId", access = JsonProperty.Access.WRITE_ONLY)
+ private String reservationOrderId;
+
+ /*
+ * The description of the transaction.
+ */
+ @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY)
+ private String description;
+
+ /*
+ * The type of the transaction (Purchase, Cancel, etc.)
+ */
+ @JsonProperty(value = "properties.eventType", access = JsonProperty.Access.WRITE_ONLY)
+ private String eventType;
+
+ /*
+ * The quantity of the transaction.
+ */
+ @JsonProperty(value = "properties.quantity", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal quantity;
+
+ /*
+ * The charge of the transaction.
+ */
+ @JsonProperty(value = "properties.amount", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal amount;
+
+ /*
+ * The ISO currency in which the transaction is charged, for example, USD.
+ */
+ @JsonProperty(value = "properties.currency", access = JsonProperty.Access.WRITE_ONLY)
+ private String currency;
+
+ /*
+ * The name of the reservation order.
+ */
+ @JsonProperty(value = "properties.reservationOrderName", access = JsonProperty.Access.WRITE_ONLY)
+ private String reservationOrderName;
+
+ /*
+ * The purchasing enrollment.
+ */
+ @JsonProperty(value = "properties.purchasingEnrollment", access = JsonProperty.Access.WRITE_ONLY)
+ private String purchasingEnrollment;
+
+ /*
+ * The subscription guid that makes the transaction.
+ */
+ @JsonProperty(value = "properties.purchasingSubscriptionGuid", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID purchasingSubscriptionGuid;
+
+ /*
+ * The subscription name that makes the transaction.
+ */
+ @JsonProperty(value = "properties.purchasingSubscriptionName", access = JsonProperty.Access.WRITE_ONLY)
+ 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.
+ */
+ @JsonProperty(value = "properties.armSkuName", access = JsonProperty.Access.WRITE_ONLY)
+ private String armSkuName;
+
+ /*
+ * This is the term of the transaction.
+ */
+ @JsonProperty(value = "properties.term", access = JsonProperty.Access.WRITE_ONLY)
+ private String term;
+
+ /*
+ * The region of the transaction.
+ */
+ @JsonProperty(value = "properties.region", access = JsonProperty.Access.WRITE_ONLY)
+ private String region;
+
+ /*
+ * The name of the account that makes the transaction.
+ */
+ @JsonProperty(value = "properties.accountName", access = JsonProperty.Access.WRITE_ONLY)
+ private String accountName;
+
+ /*
+ * The email of the account owner that makes the transaction.
+ */
+ @JsonProperty(value = "properties.accountOwnerEmail", access = JsonProperty.Access.WRITE_ONLY)
+ private String accountOwnerEmail;
+
+ /*
+ * The department name.
+ */
+ @JsonProperty(value = "properties.departmentName", access = JsonProperty.Access.WRITE_ONLY)
+ private String departmentName;
+
+ /*
+ * The cost center of this department if it is a department and a cost
+ * center is provided.
+ */
+ @JsonProperty(value = "properties.costCenter", access = JsonProperty.Access.WRITE_ONLY)
+ private String costCenter;
+
+ /*
+ * The current enrollment.
+ */
+ @JsonProperty(value = "properties.currentEnrollment", access = JsonProperty.Access.WRITE_ONLY)
+ private String currentEnrollment;
+
+ /*
+ * The billing frequency, which can be either one-time or recurring.
+ */
+ @JsonProperty(value = "properties.billingFrequency", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingFrequency;
+
+ /**
+ * Get the eventDate property: The date of the transaction.
+ *
+ * @return the eventDate value.
+ */
+ public OffsetDateTime eventDate() {
+ return this.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() {
+ return this.reservationOrderId;
+ }
+
+ /**
+ * Get the description property: The description of the transaction.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Get the eventType property: The type of the transaction (Purchase, Cancel, etc.).
+ *
+ * @return the eventType value.
+ */
+ public String eventType() {
+ return this.eventType;
+ }
+
+ /**
+ * Get the quantity property: The quantity of the transaction.
+ *
+ * @return the quantity value.
+ */
+ public BigDecimal quantity() {
+ return this.quantity;
+ }
+
+ /**
+ * Get the amount property: The charge of the transaction.
+ *
+ * @return the amount value.
+ */
+ public BigDecimal amount() {
+ return this.amount;
+ }
+
+ /**
+ * Get the currency property: The ISO currency in which the transaction is charged, for example, USD.
+ *
+ * @return the currency value.
+ */
+ public String currency() {
+ return this.currency;
+ }
+
+ /**
+ * Get the reservationOrderName property: The name of the reservation order.
+ *
+ * @return the reservationOrderName value.
+ */
+ public String reservationOrderName() {
+ return this.reservationOrderName;
+ }
+
+ /**
+ * Get the purchasingEnrollment property: The purchasing enrollment.
+ *
+ * @return the purchasingEnrollment value.
+ */
+ public String purchasingEnrollment() {
+ return this.purchasingEnrollment;
+ }
+
+ /**
+ * Get the purchasingSubscriptionGuid property: The subscription guid that makes the transaction.
+ *
+ * @return the purchasingSubscriptionGuid value.
+ */
+ public UUID purchasingSubscriptionGuid() {
+ return this.purchasingSubscriptionGuid;
+ }
+
+ /**
+ * Get the purchasingSubscriptionName property: The subscription name that makes the transaction.
+ *
+ * @return the purchasingSubscriptionName value.
+ */
+ public String purchasingSubscriptionName() {
+ return this.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() {
+ return this.armSkuName;
+ }
+
+ /**
+ * Get the term property: This is the term of the transaction.
+ *
+ * @return the term value.
+ */
+ public String term() {
+ return this.term;
+ }
+
+ /**
+ * Get the region property: The region of the transaction.
+ *
+ * @return the region value.
+ */
+ public String region() {
+ return this.region;
+ }
+
+ /**
+ * Get the accountName property: The name of the account that makes the transaction.
+ *
+ * @return the accountName value.
+ */
+ public String accountName() {
+ return this.accountName;
+ }
+
+ /**
+ * Get the accountOwnerEmail property: The email of the account owner that makes the transaction.
+ *
+ * @return the accountOwnerEmail value.
+ */
+ public String accountOwnerEmail() {
+ return this.accountOwnerEmail;
+ }
+
+ /**
+ * Get the departmentName property: The department name.
+ *
+ * @return the departmentName value.
+ */
+ public String departmentName() {
+ return this.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() {
+ return this.costCenter;
+ }
+
+ /**
+ * Get the currentEnrollment property: The current enrollment.
+ *
+ * @return the currentEnrollment value.
+ */
+ public String currentEnrollment() {
+ return this.currentEnrollment;
+ }
+
+ /**
+ * Get the billingFrequency property: The billing frequency, which can be either one-time or recurring.
+ *
+ * @return the billingFrequency value.
+ */
+ public String billingFrequency() {
+ return this.billingFrequency;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java
new file mode 100644
index 0000000000000..2ab865eeb918d
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java
@@ -0,0 +1,118 @@
+// 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.core.annotation.JsonFlatten;
+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. */
+@JsonFlatten
+@Fluent
+public class TagsResultInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(TagsResultInner.class);
+
+ /*
+ * A list of Tag.
+ */
+ @JsonProperty(value = "properties.tags")
+ private List tags;
+
+ /*
+ * The link (url) to the next page of results.
+ */
+ @JsonProperty(value = "properties.nextLink", access = JsonProperty.Access.WRITE_ONLY)
+ private String nextLink;
+
+ /*
+ * The link (url) to the previous page of results.
+ */
+ @JsonProperty(value = "properties.previousLink", access = JsonProperty.Access.WRITE_ONLY)
+ private String previousLink;
+
+ /*
+ * 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;
+
+ /**
+ * Get the tags property: A list of Tag.
+ *
+ * @return the tags value.
+ */
+ public List tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: A list of Tag.
+ *
+ * @param tags the tags value to set.
+ * @return the TagsResultInner object itself.
+ */
+ public TagsResultInner withTags(List tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: The link (url) to the next page of results.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Get the previousLink property: The link (url) to the previous page of results.
+ *
+ * @return the previousLink value.
+ */
+ public String previousLink() {
+ return this.previousLink;
+ }
+
+ /**
+ * 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() {
+ return this.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.
+ */
+ public TagsResultInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (tags() != null) {
+ tags().forEach(e -> e.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
new file mode 100644
index 0000000000000..1a8de7e134bb4
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/UsageDetailInner.java
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.consumption.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.consumption.models.LegacyUsageDetail;
+import com.azure.resourcemanager.consumption.models.ModernUsageDetail;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+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)
+@JsonTypeName("UsageDetail")
+@JsonSubTypes({
+ @JsonSubTypes.Type(name = "legacy", value = LegacyUsageDetail.class),
+ @JsonSubTypes.Type(name = "modern", value = ModernUsageDetail.class)
+})
+@Immutable
+public class UsageDetailInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageDetailInner.class);
+
+ /*
+ * Resource etag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
+ private Map tags;
+
+ /**
+ * Get the etag property: Resource etag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * 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
new file mode 100644
index 0000000000000..7598912d3a16b
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// 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 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
new file mode 100644
index 0000000000000..9cd646224d1dc
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// 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 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
new file mode 100644
index 0000000000000..0b824dad78e9d
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsClientImpl.java
@@ -0,0 +1,382 @@
+// 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.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.consumption.fluent.AggregatedCostsClient;
+import com.azure.resourcemanager.consumption.fluent.models.ManagementGroupAggregatedCostResultInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in AggregatedCostsClient. */
+public final class AggregatedCostsClientImpl implements AggregatedCostsClient {
+ private final ClientLogger logger = new ClientLogger(AggregatedCostsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final AggregatedCostsService service;
+
+ /** 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.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ConsumptionManagementClientAggregatedCosts to be used by the proxy
+ * service to perform REST calls.
+ */
+ @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})
+ @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);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing"
+ + "/billingPeriods/{billingPeriodName}/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);
+ }
+
+ /**
+ * 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> 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."));
+ }
+ if (managementGroupId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByManagementGroup(
+ this.client.getEndpoint(),
+ managementGroupId,
+ this.client.getApiVersion(),
+ filter,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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)
+ 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."));
+ }
+ if (managementGroupId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null."));
+ }
+ 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();
+ }
+ });
+ }
+
+ /**
+ * 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.
+ */
+ @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();
+ }
+ });
+ }
+
+ /**
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ManagementGroupAggregatedCostResultInner getByManagementGroup(String managementGroupId) {
+ final String filter = null;
+ return getByManagementGroupAsync(managementGroupId, filter).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();
+ }
+
+ /**
+ * 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.
+ */
+ @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."));
+ }
+ if (managementGroupId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null."));
+ }
+ if (billingPeriodName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getForBillingPeriodByManagementGroup(
+ this.client.getEndpoint(),
+ managementGroupId,
+ billingPeriodName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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)
+ private Mono>
+ 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."));
+ }
+ if (managementGroupId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null."));
+ }
+ if (billingPeriodName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getForBillingPeriodByManagementGroupAsync(
+ String managementGroupId, String billingPeriodName) {
+ return getForBillingPeriodByManagementGroupWithResponseAsync(managementGroupId, billingPeriodName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ManagementGroupAggregatedCostResultInner getForBillingPeriodByManagementGroup(
+ String managementGroupId, String billingPeriodName) {
+ return getForBillingPeriodByManagementGroupAsync(managementGroupId, billingPeriodName).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();
+ }
+}
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
new file mode 100644
index 0000000000000..51661176cb4a7
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsImpl.java
@@ -0,0 +1,89 @@
+// 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.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.consumption.ConsumptionManager;
+import com.azure.resourcemanager.consumption.fluent.AggregatedCostsClient;
+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 final AggregatedCostsClient innerClient;
+
+ private final ConsumptionManager serviceManager;
+
+ public AggregatedCostsImpl(AggregatedCostsClient innerClient, ConsumptionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public ManagementGroupAggregatedCostResult getByManagementGroup(String managementGroupId) {
+ ManagementGroupAggregatedCostResultInner inner = this.serviceClient().getByManagementGroup(managementGroupId);
+ if (inner != null) {
+ return new ManagementGroupAggregatedCostResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getByManagementGroupWithResponse(
+ String managementGroupId, String filter, Context context) {
+ Response inner =
+ this.serviceClient().getByManagementGroupWithResponse(managementGroupId, filter, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ManagementGroupAggregatedCostResultImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public ManagementGroupAggregatedCostResult getForBillingPeriodByManagementGroup(
+ String managementGroupId, String billingPeriodName) {
+ ManagementGroupAggregatedCostResultInner inner =
+ this.serviceClient().getForBillingPeriodByManagementGroup(managementGroupId, billingPeriodName);
+ if (inner != null) {
+ return new ManagementGroupAggregatedCostResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getForBillingPeriodByManagementGroupWithResponse(
+ String managementGroupId, String billingPeriodName, Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getForBillingPeriodByManagementGroupWithResponse(managementGroupId, billingPeriodName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ManagementGroupAggregatedCostResultImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private AggregatedCostsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private ConsumptionManager manager() {
+ return this.serviceManager;
+ }
+}
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
new file mode 100644
index 0000000000000..fb5770ebde130
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalanceImpl.java
@@ -0,0 +1,130 @@
+// 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.implementation;
+
+import com.azure.resourcemanager.consumption.ConsumptionManager;
+import com.azure.resourcemanager.consumption.fluent.models.BalanceInner;
+import com.azure.resourcemanager.consumption.models.Balance;
+import com.azure.resourcemanager.consumption.models.BalancePropertiesAdjustmentDetailsItem;
+import com.azure.resourcemanager.consumption.models.BalancePropertiesNewPurchasesDetailsItem;
+import com.azure.resourcemanager.consumption.models.BillingFrequency;
+import java.math.BigDecimal;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public final class BalanceImpl implements Balance {
+ private BalanceInner innerObject;
+
+ private final ConsumptionManager serviceManager;
+
+ BalanceImpl(BalanceInner innerObject, ConsumptionManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String currency() {
+ return this.innerModel().currency();
+ }
+
+ public BigDecimal beginningBalance() {
+ return this.innerModel().beginningBalance();
+ }
+
+ public BigDecimal endingBalance() {
+ return this.innerModel().endingBalance();
+ }
+
+ public BigDecimal newPurchases() {
+ return this.innerModel().newPurchases();
+ }
+
+ public BigDecimal adjustments() {
+ return this.innerModel().adjustments();
+ }
+
+ public BigDecimal utilized() {
+ return this.innerModel().utilized();
+ }
+
+ public BigDecimal serviceOverage() {
+ return this.innerModel().serviceOverage();
+ }
+
+ public BigDecimal chargesBilledSeparately() {
+ return this.innerModel().chargesBilledSeparately();
+ }
+
+ public BigDecimal totalOverage() {
+ return this.innerModel().totalOverage();
+ }
+
+ public BigDecimal totalUsage() {
+ return this.innerModel().totalUsage();
+ }
+
+ public BigDecimal azureMarketplaceServiceCharges() {
+ return this.innerModel().azureMarketplaceServiceCharges();
+ }
+
+ public BillingFrequency billingFrequency() {
+ return this.innerModel().billingFrequency();
+ }
+
+ public Boolean priceHidden() {
+ return this.innerModel().priceHidden();
+ }
+
+ public List newPurchasesDetails() {
+ List inner = this.innerModel().newPurchasesDetails();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List adjustmentDetails() {
+ List inner = this.innerModel().adjustmentDetails();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public BalanceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private ConsumptionManager manager() {
+ return this.serviceManager;
+ }
+}
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
new file mode 100644
index 0000000000000..e000ed3fa46a9
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesClientImpl.java
@@ -0,0 +1,342 @@
+// 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.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.consumption.fluent.BalancesClient;
+import com.azure.resourcemanager.consumption.fluent.models.BalanceInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in BalancesClient. */
+public final class BalancesClientImpl implements BalancesClient {
+ private final ClientLogger logger = new ClientLogger(BalancesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final BalancesService service;
+
+ /** 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) {
+ this.service = RestProxy.create(BalancesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ConsumptionManagementClientBalances to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ConsumptionManagemen")
+ private interface BalancesService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/balances")
+ @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);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Billing/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,
+ 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.
+ */
+ @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."));
+ }
+ if (billingAccountId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingAccountId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByBillingAccount(
+ this.client.getEndpoint(), this.client.getApiVersion(), billingAccountId, accept, context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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)
+ 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."));
+ }
+ if (billingAccountId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingAccountId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(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.
+ */
+ @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();
+ }
+ });
+ }
+
+ /**
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BalanceInner getByBillingAccount(String billingAccountId) {
+ return getByBillingAccountAsync(billingAccountId).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();
+ }
+
+ /**
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ 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."));
+ }
+ if (billingAccountId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingAccountId is required and cannot be null."));
+ }
+ if (billingPeriodName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getForBillingPeriodByBillingAccount(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ billingAccountId,
+ billingPeriodName,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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)
+ 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."));
+ }
+ if (billingAccountId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingAccountId is required and cannot be null."));
+ }
+ if (billingPeriodName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getForBillingPeriodByBillingAccountAsync(
+ String billingAccountId, String billingPeriodName) {
+ return getForBillingPeriodByBillingAccountWithResponseAsync(billingAccountId, billingPeriodName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BalanceInner getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName) {
+ return getForBillingPeriodByBillingAccountAsync(billingAccountId, billingPeriodName).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();
+ }
+}
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
new file mode 100644
index 0000000000000..a2178bf24a032
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesImpl.java
@@ -0,0 +1,86 @@
+// 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.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.consumption.ConsumptionManager;
+import com.azure.resourcemanager.consumption.fluent.BalancesClient;
+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 final BalancesClient innerClient;
+
+ private final ConsumptionManager serviceManager;
+
+ public BalancesImpl(BalancesClient innerClient, ConsumptionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Balance getByBillingAccount(String billingAccountId) {
+ BalanceInner inner = this.serviceClient().getByBillingAccount(billingAccountId);
+ if (inner != null) {
+ return new BalanceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getByBillingAccountWithResponse(String billingAccountId, Context context) {
+ Response inner = this.serviceClient().getByBillingAccountWithResponse(billingAccountId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new BalanceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Balance getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName) {
+ BalanceInner inner =
+ this.serviceClient().getForBillingPeriodByBillingAccount(billingAccountId, billingPeriodName);
+ if (inner != null) {
+ return new BalanceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getForBillingPeriodByBillingAccountWithResponse(
+ String billingAccountId, String billingPeriodName, Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getForBillingPeriodByBillingAccountWithResponse(billingAccountId, billingPeriodName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new BalanceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private BalancesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private ConsumptionManager manager() {
+ return this.serviceManager;
+ }
+}
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
new file mode 100644
index 0000000000000..87e725348b76c
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetImpl.java
@@ -0,0 +1,201 @@
+// 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.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.consumption.ConsumptionManager;
+import com.azure.resourcemanager.consumption.fluent.models.BudgetInner;
+import com.azure.resourcemanager.consumption.models.Budget;
+import com.azure.resourcemanager.consumption.models.BudgetFilter;
+import com.azure.resourcemanager.consumption.models.BudgetTimePeriod;
+import com.azure.resourcemanager.consumption.models.CategoryType;
+import com.azure.resourcemanager.consumption.models.CurrentSpend;
+import com.azure.resourcemanager.consumption.models.Notification;
+import com.azure.resourcemanager.consumption.models.TimeGrainType;
+import java.math.BigDecimal;
+import java.util.Collections;
+import java.util.Map;
+
+public final class BudgetImpl implements Budget, Budget.Definition, Budget.Update {
+ private BudgetInner innerObject;
+
+ private final ConsumptionManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public CategoryType category() {
+ return this.innerModel().category();
+ }
+
+ public BigDecimal amount() {
+ return this.innerModel().amount();
+ }
+
+ public TimeGrainType timeGrain() {
+ return this.innerModel().timeGrain();
+ }
+
+ public BudgetTimePeriod timePeriod() {
+ return this.innerModel().timePeriod();
+ }
+
+ public BudgetFilter filter() {
+ return this.innerModel().filter();
+ }
+
+ public CurrentSpend currentSpend() {
+ return this.innerModel().currentSpend();
+ }
+
+ public Map notifications() {
+ Map inner = this.innerModel().notifications();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
+ public BudgetInner innerModel() {
+ return this.innerObject;
+ }
+
+ private ConsumptionManager manager() {
+ return this.serviceManager;
+ }
+
+ private String scope;
+
+ private String budgetName;
+
+ public BudgetImpl withExistingScope(String scope) {
+ this.scope = scope;
+ return this;
+ }
+
+ public Budget create() {
+ 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();
+ return this;
+ }
+
+ BudgetImpl(String name, ConsumptionManager serviceManager) {
+ this.innerObject = new BudgetInner();
+ this.serviceManager = serviceManager;
+ this.budgetName = name;
+ }
+
+ public BudgetImpl update() {
+ return this;
+ }
+
+ public Budget apply() {
+ 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();
+ return this;
+ }
+
+ BudgetImpl(BudgetInner innerObject, 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");
+ }
+
+ public Budget refresh() {
+ 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();
+ return this;
+ }
+
+ public BudgetImpl withCategory(CategoryType category) {
+ this.innerModel().withCategory(category);
+ return this;
+ }
+
+ public BudgetImpl withAmount(BigDecimal amount) {
+ this.innerModel().withAmount(amount);
+ return this;
+ }
+
+ public BudgetImpl withTimeGrain(TimeGrainType timeGrain) {
+ this.innerModel().withTimeGrain(timeGrain);
+ return this;
+ }
+
+ public BudgetImpl withTimePeriod(BudgetTimePeriod timePeriod) {
+ this.innerModel().withTimePeriod(timePeriod);
+ return this;
+ }
+
+ public BudgetImpl withFilter(BudgetFilter filter) {
+ this.innerModel().withFilter(filter);
+ return this;
+ }
+
+ public BudgetImpl withNotifications(Map notifications) {
+ this.innerModel().withNotifications(notifications);
+ return this;
+ }
+
+ public BudgetImpl withEtag(String etag) {
+ this.innerModel().withEtag(etag);
+ 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
new file mode 100644
index 0000000000000..718b8370ad13a
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsClientImpl.java
@@ -0,0 +1,937 @@
+// 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.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+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. */
+public final class BudgetsClientImpl implements BudgetsClient {
+ private final ClientLogger logger = new ClientLogger(BudgetsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final BudgetsService service;
+
+ /** 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) {
+ this.service = RestProxy.create(BudgetsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ConsumptionManagementClientBudgets to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ConsumptionManagemen")
+ private interface BudgetsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/{scope}/providers/Microsoft.Consumption/budgets")
+ @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"})
+ @Get("/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}")
+ @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"})
+ @Put("/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}")
+ @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"})
+ @Delete("/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}")
+ @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"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if 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.
+ */
+ @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."));
+ }
+ if (scope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), scope, this.client.getApiVersion(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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.
+ * @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.
+ */
+ @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."));
+ }
+ 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));
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String scope) {
+ return new PagedFlux<>(() -> listSinglePageAsync(scope), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * 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.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String scope, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(scope, context), nextLink -> listNextSinglePageAsync(nextLink, 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String scope) {
+ return new PagedIterable<>(listAsync(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.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String scope, Context context) {
+ return new PagedIterable<>(listAsync(scope, 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.
+ * @param budgetName Budget 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 budget for the scope by budget name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String scope, String budgetName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (scope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
+ }
+ if (budgetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter budgetName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(), scope, this.client.getApiVersion(), budgetName, accept, context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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.
+ * @param budgetName Budget Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the budget for the scope by budget name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String scope, String budgetName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (scope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
+ }
+ if (budgetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter budgetName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), scope, this.client.getApiVersion(), budgetName, accept, 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.
+ * @param budgetName Budget 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 budget for the scope by budget name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String scope, String budgetName) {
+ return getWithResponseAsync(scope, budgetName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * 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.
+ * @param budgetName Budget 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 budget for the scope by budget name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BudgetInner get(String scope, String budgetName) {
+ return getAsync(scope, budgetName).block();
+ }
+
+ /**
+ * 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.
+ * @param budgetName Budget Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the budget for the scope by budget name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String scope, String budgetName, Context context) {
+ return getWithResponseAsync(scope, budgetName, context).block();
+ }
+
+ /**
+ * 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.
+ * @param budgetName Budget Name.
+ * @param parameters Parameters supplied to the Create Budget operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a budget resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String scope, String budgetName, BudgetInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (scope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
+ }
+ if (budgetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter budgetName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ scope,
+ this.client.getApiVersion(),
+ budgetName,
+ parameters,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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.
+ * @param budgetName Budget Name.
+ * @param parameters Parameters supplied to the Create Budget operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a budget resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String scope, String budgetName, BudgetInner parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (scope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
+ }
+ if (budgetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter budgetName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(), scope, this.client.getApiVersion(), budgetName, parameters, accept, 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.
+ * @param budgetName Budget Name.
+ * @param parameters Parameters supplied to the Create Budget operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a budget resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String scope, String budgetName, BudgetInner parameters) {
+ return createOrUpdateWithResponseAsync(scope, budgetName, parameters)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * 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.
+ * @param budgetName Budget Name.
+ * @param parameters Parameters supplied to the Create Budget operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a budget resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BudgetInner createOrUpdate(String scope, String budgetName, BudgetInner parameters) {
+ return createOrUpdateAsync(scope, budgetName, parameters).block();
+ }
+
+ /**
+ * 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.
+ * @param budgetName Budget Name.
+ * @param parameters Parameters supplied to the Create Budget operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a budget resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String scope, String budgetName, BudgetInner parameters, Context context) {
+ return createOrUpdateWithResponseAsync(scope, budgetName, parameters, context).block();
+ }
+
+ /**
+ * 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.
+ * @param budgetName Budget 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String scope, String budgetName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (scope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
+ }
+ if (budgetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter budgetName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(), scope, this.client.getApiVersion(), budgetName, accept, context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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.
+ * @param budgetName Budget Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String scope, String budgetName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (scope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
+ }
+ if (budgetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter budgetName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(this.client.getEndpoint(), scope, this.client.getApiVersion(), budgetName, accept, 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.
+ * @param budgetName Budget 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String scope, String budgetName) {
+ return deleteWithResponseAsync(scope, budgetName).flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * 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.
+ * @param budgetName Budget 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String scope, String budgetName) {
+ deleteAsync(scope, budgetName).block();
+ }
+
+ /**
+ * 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.
+ * @param budgetName Budget Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String scope, String budgetName, Context context) {
+ return deleteWithResponseAsync(scope, budgetName, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing budgets.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing budgets.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsImpl.java
new file mode 100644
index 0000000000000..3453ca4fce4a1
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsImpl.java
@@ -0,0 +1,178 @@
+// 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.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.consumption.ConsumptionManager;
+import com.azure.resourcemanager.consumption.fluent.BudgetsClient;
+import com.azure.resourcemanager.consumption.fluent.models.BudgetInner;
+import com.azure.resourcemanager.consumption.models.Budget;
+import com.azure.resourcemanager.consumption.models.Budgets;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class BudgetsImpl implements Budgets {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(BudgetsImpl.class);
+
+ private final BudgetsClient innerClient;
+
+ private final ConsumptionManager serviceManager;
+
+ public BudgetsImpl(BudgetsClient innerClient, ConsumptionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String scope) {
+ PagedIterable inner = this.serviceClient().list(scope);
+ return Utils.mapPage(inner, inner1 -> new BudgetImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String scope, Context context) {
+ PagedIterable inner = this.serviceClient().list(scope, context);
+ return Utils.mapPage(inner, inner1 -> new BudgetImpl(inner1, this.manager()));
+ }
+
+ public Budget get(String scope, String budgetName) {
+ BudgetInner inner = this.serviceClient().get(scope, budgetName);
+ if (inner != null) {
+ return new BudgetImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(String scope, String budgetName, Context context) {
+ Response inner = this.serviceClient().getWithResponse(scope, budgetName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new BudgetImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String scope, String budgetName) {
+ this.serviceClient().delete(scope, budgetName);
+ }
+
+ public Response deleteWithResponse(String scope, String budgetName, Context context) {
+ return this.serviceClient().deleteWithResponse(scope, budgetName, context);
+ }
+
+ public Budget getById(String id) {
+ String scope =
+ Utils
+ .getValueFromIdByParameterName(
+ id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope");
+ if (scope == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
+ }
+ String budgetName =
+ Utils
+ .getValueFromIdByParameterName(
+ id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName");
+ if (budgetName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'budgets'.", id)));
+ }
+ return this.getWithResponse(scope, budgetName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String scope =
+ Utils
+ .getValueFromIdByParameterName(
+ id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope");
+ if (scope == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
+ }
+ String budgetName =
+ Utils
+ .getValueFromIdByParameterName(
+ id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName");
+ if (budgetName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'budgets'.", id)));
+ }
+ return this.getWithResponse(scope, budgetName, context);
+ }
+
+ public void deleteById(String id) {
+ String scope =
+ Utils
+ .getValueFromIdByParameterName(
+ id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope");
+ if (scope == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
+ }
+ String budgetName =
+ Utils
+ .getValueFromIdByParameterName(
+ id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName");
+ if (budgetName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'budgets'.", id)));
+ }
+ this.deleteWithResponse(scope, budgetName, Context.NONE).getValue();
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String scope =
+ Utils
+ .getValueFromIdByParameterName(
+ id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope");
+ if (scope == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
+ }
+ String budgetName =
+ Utils
+ .getValueFromIdByParameterName(
+ id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName");
+ if (budgetName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'budgets'.", id)));
+ }
+ return this.deleteWithResponse(scope, budgetName, context);
+ }
+
+ private BudgetsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private ConsumptionManager manager() {
+ return this.serviceManager;
+ }
+
+ public BudgetImpl define(String name) {
+ return new BudgetImpl(name, this.manager());
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesClientImpl.java
new file mode 100644
index 0000000000000..0d43fe26f25a9
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesClientImpl.java
@@ -0,0 +1,352 @@
+// 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.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.consumption.fluent.ChargesClient;
+import com.azure.resourcemanager.consumption.fluent.models.ChargesListResultInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ChargesClient. */
+public final class ChargesClientImpl implements ChargesClient {
+ private final ClientLogger logger = new ClientLogger(ChargesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final ChargesService service;
+
+ /** The service client containing this operation class. */
+ private final ConsumptionManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ChargesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ChargesClientImpl(ConsumptionManagementClientImpl client) {
+ this.service = RestProxy.create(ChargesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ConsumptionManagementClientCharges to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ConsumptionManagemen")
+ private interface ChargesService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/{scope}/providers/Microsoft.Consumption/charges")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam(value = "scope", encoded = true) String scope,
+ @QueryParam("api-version") String apiVersion,
+ @QueryParam("startDate") String startDate,
+ @QueryParam("endDate") String endDate,
+ @QueryParam("$filter") String filter,
+ @QueryParam("$apply") String apply,
+ @HeaderParam("Accept") String accept,
+ 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing charge summary.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listWithResponseAsync(
+ String scope, String startDate, String endDate, String filter, String apply) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (scope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ scope,
+ this.client.getApiVersion(),
+ startDate,
+ endDate,
+ filter,
+ apply,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing charge summary.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listWithResponseAsync(
+ String scope, String startDate, String endDate, String filter, String apply, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (scope == null) {
+ return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ scope,
+ this.client.getApiVersion(),
+ startDate,
+ endDate,
+ filter,
+ apply,
+ accept,
+ context);
+ }
+
+ /**
+ * Lists the charges based for the defined scope.
+ *
+ * @param scope The scope associated with charges operations. This includes
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
+ * scope, and
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
+ * for EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period to the
+ * scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing
+ * period at department scope use
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
+ * Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}'
+ * for billingAccount scope,
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
+ * billingProfile scope,
+ * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
+ * for invoiceSection scope, and
+ * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
+ * partners.
+ * @param startDate Start date.
+ * @param endDate End date.
+ * @param filter May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time).
+ * The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or
+ * 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
+ * @param apply May be used to group charges for billingAccount scope by properties/billingProfileId,
+ * properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for billingProfile scope by
+ * properties/invoiceSectionId.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing charge summary.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listAsync(
+ String scope, String startDate, String endDate, String filter, String apply) {
+ return listWithResponseAsync(scope, startDate, endDate, filter, apply)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing charge summary.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listAsync(String scope) {
+ final String startDate = null;
+ final String endDate = null;
+ final String filter = null;
+ final String apply = null;
+ return listWithResponseAsync(scope, startDate, endDate, filter, apply)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing charge summary.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ChargesListResultInner list(String scope) {
+ final String startDate = null;
+ final String endDate = null;
+ final String filter = null;
+ final String apply = null;
+ return listAsync(scope, startDate, endDate, filter, apply).block();
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing charge summary.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listWithResponse(
+ String scope, String startDate, String endDate, String filter, String apply, Context context) {
+ return listWithResponseAsync(scope, startDate, endDate, filter, apply, context).block();
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesImpl.java
new file mode 100644
index 0000000000000..058593964c481
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesImpl.java
@@ -0,0 +1,61 @@
+// 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.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.consumption.ConsumptionManager;
+import com.azure.resourcemanager.consumption.fluent.ChargesClient;
+import com.azure.resourcemanager.consumption.fluent.models.ChargesListResultInner;
+import com.azure.resourcemanager.consumption.models.Charges;
+import com.azure.resourcemanager.consumption.models.ChargesListResult;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class ChargesImpl implements Charges {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ChargesImpl.class);
+
+ private final ChargesClient innerClient;
+
+ private final ConsumptionManager serviceManager;
+
+ public ChargesImpl(ChargesClient innerClient, ConsumptionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public ChargesListResult list(String scope) {
+ ChargesListResultInner inner = this.serviceClient().list(scope);
+ if (inner != null) {
+ return new ChargesListResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response listWithResponse(
+ String scope, String startDate, String endDate, String filter, String apply, Context context) {
+ Response inner =
+ this.serviceClient().listWithResponse(scope, startDate, endDate, filter, apply, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ChargesListResultImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private ChargesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private ConsumptionManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesListResultImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesListResultImpl.java
new file mode 100644
index 0000000000000..9b9b430cdfea0
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesListResultImpl.java
@@ -0,0 +1,40 @@
+// 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.implementation;
+
+import com.azure.resourcemanager.consumption.ConsumptionManager;
+import com.azure.resourcemanager.consumption.fluent.models.ChargesListResultInner;
+import com.azure.resourcemanager.consumption.models.ChargeSummary;
+import com.azure.resourcemanager.consumption.models.ChargesListResult;
+import java.util.Collections;
+import java.util.List;
+
+public final class ChargesListResultImpl implements ChargesListResult {
+ private ChargesListResultInner innerObject;
+
+ private final ConsumptionManager serviceManager;
+
+ ChargesListResultImpl(ChargesListResultInner innerObject, ConsumptionManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List value() {
+ List inner = this.innerModel().value();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public ChargesListResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private ConsumptionManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientBuilder.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientBuilder.java
new file mode 100644
index 0000000000000..efd5a406aff68
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientBuilder.java
@@ -0,0 +1,146 @@
+// 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.implementation;
+
+import com.azure.core.annotation.ServiceClientBuilder;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.CookiePolicy;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerAdapter;
+import java.time.Duration;
+
+/** A builder for creating a new instance of the ConsumptionManagementClientImpl type. */
+@ServiceClientBuilder(serviceClients = {ConsumptionManagementClientImpl.class})
+public final class ConsumptionManagementClientBuilder {
+ /*
+ * Azure Subscription ID.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets Azure Subscription ID.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the ConsumptionManagementClientBuilder.
+ */
+ public ConsumptionManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the ConsumptionManagementClientBuilder.
+ */
+ public ConsumptionManagementClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the ConsumptionManagementClientBuilder.
+ */
+ public ConsumptionManagementClientBuilder environment(AzureEnvironment environment) {
+ this.environment = environment;
+ return this;
+ }
+
+ /*
+ * The default poll interval for long-running operation
+ */
+ private Duration defaultPollInterval;
+
+ /**
+ * Sets The default poll interval for long-running operation.
+ *
+ * @param defaultPollInterval the defaultPollInterval value.
+ * @return the ConsumptionManagementClientBuilder.
+ */
+ public ConsumptionManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
+ return this;
+ }
+
+ /*
+ * The HTTP pipeline to send requests through
+ */
+ private HttpPipeline pipeline;
+
+ /**
+ * Sets The HTTP pipeline to send requests through.
+ *
+ * @param pipeline the pipeline value.
+ * @return the ConsumptionManagementClientBuilder.
+ */
+ public ConsumptionManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The serializer to serialize an object into a string
+ */
+ private SerializerAdapter serializerAdapter;
+
+ /**
+ * Sets The serializer to serialize an object into a string.
+ *
+ * @param serializerAdapter the serializerAdapter value.
+ * @return the ConsumptionManagementClientBuilder.
+ */
+ public ConsumptionManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of ConsumptionManagementClientImpl with the provided parameters.
+ *
+ * @return an instance of ConsumptionManagementClientImpl.
+ */
+ public ConsumptionManagementClientImpl buildClient() {
+ if (endpoint == null) {
+ this.endpoint = "https://management.azure.com";
+ }
+ if (environment == null) {
+ this.environment = AzureEnvironment.AZURE;
+ }
+ if (defaultPollInterval == null) {
+ this.defaultPollInterval = Duration.ofSeconds(30);
+ }
+ if (pipeline == null) {
+ this.pipeline =
+ new HttpPipelineBuilder()
+ .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
+ .build();
+ }
+ if (serializerAdapter == null) {
+ this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
+ }
+ ConsumptionManagementClientImpl client =
+ new ConsumptionManagementClientImpl(
+ pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ return client;
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientImpl.java
new file mode 100644
index 0000000000000..051fbfcaf5ff5
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientImpl.java
@@ -0,0 +1,531 @@
+// 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.implementation;
+
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.AsyncPollResponse;
+import com.azure.core.util.polling.LongRunningOperationStatus;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.serializer.SerializerAdapter;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.consumption.fluent.AggregatedCostsClient;
+import com.azure.resourcemanager.consumption.fluent.BalancesClient;
+import com.azure.resourcemanager.consumption.fluent.BudgetsClient;
+import com.azure.resourcemanager.consumption.fluent.ChargesClient;
+import com.azure.resourcemanager.consumption.fluent.ConsumptionManagementClient;
+import com.azure.resourcemanager.consumption.fluent.CreditsClient;
+import com.azure.resourcemanager.consumption.fluent.EventsOperationsClient;
+import com.azure.resourcemanager.consumption.fluent.ForecastsClient;
+import com.azure.resourcemanager.consumption.fluent.LotsOperationsClient;
+import com.azure.resourcemanager.consumption.fluent.MarketplacesClient;
+import com.azure.resourcemanager.consumption.fluent.OperationsClient;
+import com.azure.resourcemanager.consumption.fluent.PriceSheetsClient;
+import com.azure.resourcemanager.consumption.fluent.ReservationRecommendationDetailsClient;
+import com.azure.resourcemanager.consumption.fluent.ReservationRecommendationsClient;
+import com.azure.resourcemanager.consumption.fluent.ReservationTransactionsClient;
+import com.azure.resourcemanager.consumption.fluent.ReservationsDetailsClient;
+import com.azure.resourcemanager.consumption.fluent.ReservationsSummariesClient;
+import com.azure.resourcemanager.consumption.fluent.TagsClient;
+import com.azure.resourcemanager.consumption.fluent.UsageDetailsClient;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import java.util.Map;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** Initializes a new instance of the ConsumptionManagementClientImpl type. */
+@ServiceClient(builder = ConsumptionManagementClientBuilder.class)
+public final class ConsumptionManagementClientImpl implements ConsumptionManagementClient {
+ private final ClientLogger logger = new ClientLogger(ConsumptionManagementClientImpl.class);
+
+ /** Azure Subscription ID. */
+ private final String subscriptionId;
+
+ /**
+ * Gets Azure Subscription ID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /** server parameter. */
+ private final String endpoint;
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /** Api Version. */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /** The HTTP pipeline to send requests through. */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /** The serializer to serialize an object into a string. */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /** The default poll interval for long-running operation. */
+ private final Duration defaultPollInterval;
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ public Duration getDefaultPollInterval() {
+ return this.defaultPollInterval;
+ }
+
+ /** The UsageDetailsClient object to access its operations. */
+ private final UsageDetailsClient usageDetails;
+
+ /**
+ * Gets the UsageDetailsClient object to access its operations.
+ *
+ * @return the UsageDetailsClient object.
+ */
+ public UsageDetailsClient getUsageDetails() {
+ return this.usageDetails;
+ }
+
+ /** The MarketplacesClient object to access its operations. */
+ private final MarketplacesClient marketplaces;
+
+ /**
+ * Gets the MarketplacesClient object to access its operations.
+ *
+ * @return the MarketplacesClient object.
+ */
+ public MarketplacesClient getMarketplaces() {
+ return this.marketplaces;
+ }
+
+ /** The BudgetsClient object to access its operations. */
+ private final BudgetsClient budgets;
+
+ /**
+ * Gets the BudgetsClient object to access its operations.
+ *
+ * @return the BudgetsClient object.
+ */
+ public BudgetsClient getBudgets() {
+ return this.budgets;
+ }
+
+ /** The TagsClient object to access its operations. */
+ private final TagsClient tags;
+
+ /**
+ * Gets the TagsClient object to access its operations.
+ *
+ * @return the TagsClient object.
+ */
+ public TagsClient getTags() {
+ return this.tags;
+ }
+
+ /** The ChargesClient object to access its operations. */
+ private final ChargesClient charges;
+
+ /**
+ * Gets the ChargesClient object to access its operations.
+ *
+ * @return the ChargesClient object.
+ */
+ public ChargesClient getCharges() {
+ return this.charges;
+ }
+
+ /** The BalancesClient object to access its operations. */
+ private final BalancesClient balances;
+
+ /**
+ * Gets the BalancesClient object to access its operations.
+ *
+ * @return the BalancesClient object.
+ */
+ public BalancesClient getBalances() {
+ return this.balances;
+ }
+
+ /** The ReservationsSummariesClient object to access its operations. */
+ private final ReservationsSummariesClient reservationsSummaries;
+
+ /**
+ * Gets the ReservationsSummariesClient object to access its operations.
+ *
+ * @return the ReservationsSummariesClient object.
+ */
+ public ReservationsSummariesClient getReservationsSummaries() {
+ return this.reservationsSummaries;
+ }
+
+ /** The ReservationsDetailsClient object to access its operations. */
+ private final ReservationsDetailsClient reservationsDetails;
+
+ /**
+ * Gets the ReservationsDetailsClient object to access its operations.
+ *
+ * @return the ReservationsDetailsClient object.
+ */
+ public ReservationsDetailsClient getReservationsDetails() {
+ return this.reservationsDetails;
+ }
+
+ /** The ReservationRecommendationsClient object to access its operations. */
+ private final ReservationRecommendationsClient reservationRecommendations;
+
+ /**
+ * Gets the ReservationRecommendationsClient object to access its operations.
+ *
+ * @return the ReservationRecommendationsClient object.
+ */
+ public ReservationRecommendationsClient getReservationRecommendations() {
+ return this.reservationRecommendations;
+ }
+
+ /** The ReservationRecommendationDetailsClient object to access its operations. */
+ private final ReservationRecommendationDetailsClient reservationRecommendationDetails;
+
+ /**
+ * Gets the ReservationRecommendationDetailsClient object to access its operations.
+ *
+ * @return the ReservationRecommendationDetailsClient object.
+ */
+ public ReservationRecommendationDetailsClient getReservationRecommendationDetails() {
+ return this.reservationRecommendationDetails;
+ }
+
+ /** The ReservationTransactionsClient object to access its operations. */
+ private final ReservationTransactionsClient reservationTransactions;
+
+ /**
+ * Gets the ReservationTransactionsClient object to access its operations.
+ *
+ * @return the ReservationTransactionsClient object.
+ */
+ public ReservationTransactionsClient getReservationTransactions() {
+ return this.reservationTransactions;
+ }
+
+ /** The PriceSheetsClient object to access its operations. */
+ private final PriceSheetsClient priceSheets;
+
+ /**
+ * Gets the PriceSheetsClient object to access its operations.
+ *
+ * @return the PriceSheetsClient object.
+ */
+ public PriceSheetsClient getPriceSheets() {
+ return this.priceSheets;
+ }
+
+ /** The ForecastsClient object to access its operations. */
+ private final ForecastsClient forecasts;
+
+ /**
+ * Gets the ForecastsClient object to access its operations.
+ *
+ * @return the ForecastsClient object.
+ */
+ public ForecastsClient getForecasts() {
+ return this.forecasts;
+ }
+
+ /** The OperationsClient object to access its operations. */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /** The AggregatedCostsClient object to access its operations. */
+ private final AggregatedCostsClient aggregatedCosts;
+
+ /**
+ * Gets the AggregatedCostsClient object to access its operations.
+ *
+ * @return the AggregatedCostsClient object.
+ */
+ public AggregatedCostsClient getAggregatedCosts() {
+ return this.aggregatedCosts;
+ }
+
+ /** The EventsOperationsClient object to access its operations. */
+ private final EventsOperationsClient eventsOperations;
+
+ /**
+ * Gets the EventsOperationsClient object to access its operations.
+ *
+ * @return the EventsOperationsClient object.
+ */
+ public EventsOperationsClient getEventsOperations() {
+ return this.eventsOperations;
+ }
+
+ /** The LotsOperationsClient object to access its operations. */
+ private final LotsOperationsClient lotsOperations;
+
+ /**
+ * Gets the LotsOperationsClient object to access its operations.
+ *
+ * @return the LotsOperationsClient object.
+ */
+ public LotsOperationsClient getLotsOperations() {
+ return this.lotsOperations;
+ }
+
+ /** The CreditsClient object to access its operations. */
+ private final CreditsClient credits;
+
+ /**
+ * Gets the CreditsClient object to access its operations.
+ *
+ * @return the CreditsClient object.
+ */
+ public CreditsClient getCredits() {
+ return this.credits;
+ }
+
+ /**
+ * Initializes an instance of ConsumptionManagementClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param subscriptionId Azure Subscription ID.
+ * @param endpoint server parameter.
+ */
+ ConsumptionManagementClientImpl(
+ HttpPipeline httpPipeline,
+ SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval,
+ AzureEnvironment environment,
+ String subscriptionId,
+ String endpoint) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.apiVersion = "2019-10-01";
+ this.usageDetails = new UsageDetailsClientImpl(this);
+ this.marketplaces = new MarketplacesClientImpl(this);
+ this.budgets = new BudgetsClientImpl(this);
+ this.tags = new TagsClientImpl(this);
+ this.charges = new ChargesClientImpl(this);
+ this.balances = new BalancesClientImpl(this);
+ this.reservationsSummaries = new ReservationsSummariesClientImpl(this);
+ this.reservationsDetails = new ReservationsDetailsClientImpl(this);
+ this.reservationRecommendations = new ReservationRecommendationsClientImpl(this);
+ this.reservationRecommendationDetails = new ReservationRecommendationDetailsClientImpl(this);
+ this.reservationTransactions = new ReservationTransactionsClientImpl(this);
+ this.priceSheets = new PriceSheetsClientImpl(this);
+ this.forecasts = new ForecastsClientImpl(this);
+ this.operations = new OperationsClientImpl(this);
+ this.aggregatedCosts = new AggregatedCostsClientImpl(this);
+ this.eventsOperations = new EventsOperationsClientImpl(this);
+ this.lotsOperations = new LotsOperationsClientImpl(this);
+ this.credits = new CreditsClientImpl(this);
+ }
+
+ /**
+ * Gets default client context.
+ *
+ * @return the default client context.
+ */
+ public Context getContext() {
+ return Context.NONE;
+ }
+
+ /**
+ * Merges default client context with provided context.
+ *
+ * @param context the context to be merged with default client context.
+ * @return the merged context.
+ */
+ public Context mergeContext(Context context) {
+ for (Map.Entry