diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 90aecf6b32a6..6d78c0f40540 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -185,6 +185,7 @@ com.azure.resourcemanager:azure-resourcemanager-recoveryservices;1.0.0-beta.1;1.
com.azure.resourcemanager:azure-resourcemanager-kusto;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-loganalytics;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-eventgrid;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-billing;1.0.0-beta.1;1.0.0-beta.1
com.microsoft:microsoft-opentelemetry-exporter-azuremonitor;1.0.0-beta.1;1.0.0-beta.2
diff --git a/pom.xml b/pom.xml
index b80dac967d8f..27c5acc596ef 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,6 +15,7 @@
sdk/appconfiguration
sdk/authorization
sdk/batch
+ sdk/billing
sdk/boms
sdk/cognitiveservices
sdk/communication
diff --git a/sdk/billing/azure-resourcemanager-billing/CHANGELOG.md b/sdk/billing/azure-resourcemanager-billing/CHANGELOG.md
new file mode 100644
index 000000000000..1c068025f6c3
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2020-12-23)
+
+- Azure Resource Manager Billing client library for Java. This package contains Microsoft Azure SDK for Billing Management SDK. Billing client provides access to billing resources for Azure subscriptions. Package tag package-2020-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
\ No newline at end of file
diff --git a/sdk/billing/azure-resourcemanager-billing/README.md b/sdk/billing/azure-resourcemanager-billing/README.md
new file mode 100644
index 000000000000..f240a496751c
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/README.md
@@ -0,0 +1,83 @@
+# Azure Resource Manager Billing client library for Java
+
+Azure Resource Manager Billing client library for Java.
+
+This package contains Microsoft Azure SDK for Billing Management SDK. Billing client provides access to billing resources for Azure subscriptions. Package tag package-2020-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+## 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-billing;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-billing
+ 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();
+BillingManager manager = BillingManager
+ .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
+
+
+[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/billing/azure-resourcemanager-billing/pom.xml b/sdk/billing/azure-resourcemanager-billing/pom.xml
new file mode 100644
index 000000000000..a0cd02641052
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/pom.xml
@@ -0,0 +1,62 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-billing
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for Billing Management
+ This package contains Microsoft Azure SDK for Billing Management SDK. Billing client provides access to billing resources for Azure subscriptions. Package tag package-2020-05. 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-management
+ 1.0.0
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.5
+
+ true
+
+
+
+
+
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/BillingManager.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/BillingManager.java
new file mode 100644
index 000000000000..6989712ae0f1
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/BillingManager.java
@@ -0,0 +1,430 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing;
+
+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.billing.fluent.BillingManagementClient;
+import com.azure.resourcemanager.billing.implementation.AddressImpl;
+import com.azure.resourcemanager.billing.implementation.AgreementsImpl;
+import com.azure.resourcemanager.billing.implementation.AvailableBalancesImpl;
+import com.azure.resourcemanager.billing.implementation.BillingAccountsImpl;
+import com.azure.resourcemanager.billing.implementation.BillingManagementClientBuilder;
+import com.azure.resourcemanager.billing.implementation.BillingPeriodsImpl;
+import com.azure.resourcemanager.billing.implementation.BillingPermissionsImpl;
+import com.azure.resourcemanager.billing.implementation.BillingProfilesImpl;
+import com.azure.resourcemanager.billing.implementation.BillingPropertiesImpl;
+import com.azure.resourcemanager.billing.implementation.BillingRoleAssignmentsImpl;
+import com.azure.resourcemanager.billing.implementation.BillingRoleDefinitionsImpl;
+import com.azure.resourcemanager.billing.implementation.BillingSubscriptionsImpl;
+import com.azure.resourcemanager.billing.implementation.CustomersImpl;
+import com.azure.resourcemanager.billing.implementation.EnrollmentAccountsImpl;
+import com.azure.resourcemanager.billing.implementation.InstructionsImpl;
+import com.azure.resourcemanager.billing.implementation.InvoiceSectionsImpl;
+import com.azure.resourcemanager.billing.implementation.InvoicesImpl;
+import com.azure.resourcemanager.billing.implementation.OperationsImpl;
+import com.azure.resourcemanager.billing.implementation.PoliciesImpl;
+import com.azure.resourcemanager.billing.implementation.ProductsImpl;
+import com.azure.resourcemanager.billing.implementation.TransactionsImpl;
+import com.azure.resourcemanager.billing.models.Address;
+import com.azure.resourcemanager.billing.models.Agreements;
+import com.azure.resourcemanager.billing.models.AvailableBalances;
+import com.azure.resourcemanager.billing.models.BillingAccounts;
+import com.azure.resourcemanager.billing.models.BillingPeriods;
+import com.azure.resourcemanager.billing.models.BillingPermissions;
+import com.azure.resourcemanager.billing.models.BillingProfiles;
+import com.azure.resourcemanager.billing.models.BillingProperties;
+import com.azure.resourcemanager.billing.models.BillingRoleAssignments;
+import com.azure.resourcemanager.billing.models.BillingRoleDefinitions;
+import com.azure.resourcemanager.billing.models.BillingSubscriptions;
+import com.azure.resourcemanager.billing.models.Customers;
+import com.azure.resourcemanager.billing.models.EnrollmentAccounts;
+import com.azure.resourcemanager.billing.models.Instructions;
+import com.azure.resourcemanager.billing.models.InvoiceSections;
+import com.azure.resourcemanager.billing.models.Invoices;
+import com.azure.resourcemanager.billing.models.Operations;
+import com.azure.resourcemanager.billing.models.Policies;
+import com.azure.resourcemanager.billing.models.Products;
+import com.azure.resourcemanager.billing.models.Transactions;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/** Entry point to BillingManager. Billing client provides access to billing resources for Azure subscriptions. */
+public final class BillingManager {
+ private BillingAccounts billingAccounts;
+
+ private Address address;
+
+ private AvailableBalances availableBalances;
+
+ private Instructions instructions;
+
+ private BillingProfiles billingProfiles;
+
+ private Customers customers;
+
+ private InvoiceSections invoiceSections;
+
+ private BillingPermissions billingPermissions;
+
+ private BillingSubscriptions billingSubscriptions;
+
+ private Products products;
+
+ private Invoices invoices;
+
+ private Transactions transactions;
+
+ private Policies policies;
+
+ private BillingProperties billingProperties;
+
+ private Operations operations;
+
+ private BillingRoleDefinitions billingRoleDefinitions;
+
+ private BillingRoleAssignments billingRoleAssignments;
+
+ private Agreements agreements;
+
+ private EnrollmentAccounts enrollmentAccounts;
+
+ private BillingPeriods billingPeriods;
+
+ private final BillingManagementClient clientObject;
+
+ private BillingManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new BillingManagementClientBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of Billing service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Billing service API instance.
+ */
+ public static BillingManager 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 BillingManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new BillingManager.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 Billing service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Billing service API instance.
+ */
+ public BillingManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ if (retryPolicy == null) {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ List policies = new ArrayList<>();
+ policies
+ .add(
+ new UserAgentPolicy(
+ null,
+ "com.azure.resourcemanager.billing",
+ "1.0.0-beta.1",
+ Configuration.getGlobalConfiguration()));
+ 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 BillingManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /** @return Resource collection API of BillingAccounts. */
+ public BillingAccounts billingAccounts() {
+ if (this.billingAccounts == null) {
+ this.billingAccounts = new BillingAccountsImpl(clientObject.getBillingAccounts(), this);
+ }
+ return billingAccounts;
+ }
+
+ /** @return Resource collection API of Address. */
+ public Address address() {
+ if (this.address == null) {
+ this.address = new AddressImpl(clientObject.getAddress(), this);
+ }
+ return address;
+ }
+
+ /** @return Resource collection API of AvailableBalances. */
+ public AvailableBalances availableBalances() {
+ if (this.availableBalances == null) {
+ this.availableBalances = new AvailableBalancesImpl(clientObject.getAvailableBalances(), this);
+ }
+ return availableBalances;
+ }
+
+ /** @return Resource collection API of Instructions. */
+ public Instructions instructions() {
+ if (this.instructions == null) {
+ this.instructions = new InstructionsImpl(clientObject.getInstructions(), this);
+ }
+ return instructions;
+ }
+
+ /** @return Resource collection API of BillingProfiles. */
+ public BillingProfiles billingProfiles() {
+ if (this.billingProfiles == null) {
+ this.billingProfiles = new BillingProfilesImpl(clientObject.getBillingProfiles(), this);
+ }
+ return billingProfiles;
+ }
+
+ /** @return Resource collection API of Customers. */
+ public Customers customers() {
+ if (this.customers == null) {
+ this.customers = new CustomersImpl(clientObject.getCustomers(), this);
+ }
+ return customers;
+ }
+
+ /** @return Resource collection API of InvoiceSections. */
+ public InvoiceSections invoiceSections() {
+ if (this.invoiceSections == null) {
+ this.invoiceSections = new InvoiceSectionsImpl(clientObject.getInvoiceSections(), this);
+ }
+ return invoiceSections;
+ }
+
+ /** @return Resource collection API of BillingPermissions. */
+ public BillingPermissions billingPermissions() {
+ if (this.billingPermissions == null) {
+ this.billingPermissions = new BillingPermissionsImpl(clientObject.getBillingPermissions(), this);
+ }
+ return billingPermissions;
+ }
+
+ /** @return Resource collection API of BillingSubscriptions. */
+ public BillingSubscriptions billingSubscriptions() {
+ if (this.billingSubscriptions == null) {
+ this.billingSubscriptions = new BillingSubscriptionsImpl(clientObject.getBillingSubscriptions(), this);
+ }
+ return billingSubscriptions;
+ }
+
+ /** @return Resource collection API of Products. */
+ public Products products() {
+ if (this.products == null) {
+ this.products = new ProductsImpl(clientObject.getProducts(), this);
+ }
+ return products;
+ }
+
+ /** @return Resource collection API of Invoices. */
+ public Invoices invoices() {
+ if (this.invoices == null) {
+ this.invoices = new InvoicesImpl(clientObject.getInvoices(), this);
+ }
+ return invoices;
+ }
+
+ /** @return Resource collection API of Transactions. */
+ public Transactions transactions() {
+ if (this.transactions == null) {
+ this.transactions = new TransactionsImpl(clientObject.getTransactions(), this);
+ }
+ return transactions;
+ }
+
+ /** @return Resource collection API of Policies. */
+ public Policies policies() {
+ if (this.policies == null) {
+ this.policies = new PoliciesImpl(clientObject.getPolicies(), this);
+ }
+ return policies;
+ }
+
+ /** @return Resource collection API of BillingProperties. */
+ public BillingProperties billingProperties() {
+ if (this.billingProperties == null) {
+ this.billingProperties = new BillingPropertiesImpl(clientObject.getBillingProperties(), this);
+ }
+ return billingProperties;
+ }
+
+ /** @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 BillingRoleDefinitions. */
+ public BillingRoleDefinitions billingRoleDefinitions() {
+ if (this.billingRoleDefinitions == null) {
+ this.billingRoleDefinitions =
+ new BillingRoleDefinitionsImpl(clientObject.getBillingRoleDefinitions(), this);
+ }
+ return billingRoleDefinitions;
+ }
+
+ /** @return Resource collection API of BillingRoleAssignments. */
+ public BillingRoleAssignments billingRoleAssignments() {
+ if (this.billingRoleAssignments == null) {
+ this.billingRoleAssignments =
+ new BillingRoleAssignmentsImpl(clientObject.getBillingRoleAssignments(), this);
+ }
+ return billingRoleAssignments;
+ }
+
+ /** @return Resource collection API of Agreements. */
+ public Agreements agreements() {
+ if (this.agreements == null) {
+ this.agreements = new AgreementsImpl(clientObject.getAgreements(), this);
+ }
+ return agreements;
+ }
+
+ /** @return Resource collection API of EnrollmentAccounts. */
+ public EnrollmentAccounts enrollmentAccounts() {
+ if (this.enrollmentAccounts == null) {
+ this.enrollmentAccounts = new EnrollmentAccountsImpl(clientObject.getEnrollmentAccounts(), this);
+ }
+ return enrollmentAccounts;
+ }
+
+ /** @return Resource collection API of BillingPeriods. */
+ public BillingPeriods billingPeriods() {
+ if (this.billingPeriods == null) {
+ this.billingPeriods = new BillingPeriodsImpl(clientObject.getBillingPeriods(), this);
+ }
+ return billingPeriods;
+ }
+
+ /**
+ * @return Wrapped service client BillingManagementClient providing direct access to the underlying auto-generated
+ * API implementation, based on Azure REST API.
+ */
+ public BillingManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AddressClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AddressClient.java
new file mode 100644
index 000000000000..66eecfbbab46
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AddressClient.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.billing.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.billing.fluent.models.ValidateAddressResponseInner;
+import com.azure.resourcemanager.billing.models.AddressDetails;
+
+/** An instance of this class provides access to all the operations defined in AddressClient. */
+public interface AddressClient {
+ /**
+ * Validates an address. Use the operation to validate an address before using it as soldTo or a billTo address.
+ *
+ * @param address Address details.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the address validation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ValidateAddressResponseInner validate(AddressDetails address);
+
+ /**
+ * Validates an address. Use the operation to validate an address before using it as soldTo or a billTo address.
+ *
+ * @param address Address details.
+ * @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 the address validation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response validateWithResponse(AddressDetails address, Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AgreementsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AgreementsClient.java
new file mode 100644
index 000000000000..ad29ace3539d
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AgreementsClient.java
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.fluent.models.AgreementInner;
+
+/** An instance of this class provides access to all the operations defined in AgreementsClient. */
+public interface AgreementsClient {
+ /**
+ * Lists the agreements for a billing account.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing agreements.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingAccount(String billingAccountName);
+
+ /**
+ * Lists the agreements for a billing account.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param expand May be used to expand the participants.
+ * @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 agreements.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingAccount(String billingAccountName, String expand, Context context);
+
+ /**
+ * Gets an agreement by ID.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param agreementName The ID that uniquely identifies an agreement.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an agreement by ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AgreementInner get(String billingAccountName, String agreementName);
+
+ /**
+ * Gets an agreement by ID.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param agreementName The ID that uniquely identifies an agreement.
+ * @param expand May be used to expand the participants.
+ * @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 an agreement by ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String billingAccountName, String agreementName, String expand, Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AvailableBalancesClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AvailableBalancesClient.java
new file mode 100644
index 000000000000..3b9e3e6df477
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AvailableBalancesClient.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.fluent.models.AvailableBalanceInner;
+
+/** An instance of this class provides access to all the operations defined in AvailableBalancesClient. */
+public interface AvailableBalancesClient {
+ /**
+ * The available credit balance for a billing profile. This is the balance that can be used for pay now to settle
+ * due or past due invoices. The operation is supported only for billing accounts with agreement type Microsoft
+ * Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 latest Azure credit balance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AvailableBalanceInner get(String billingAccountName, String billingProfileName);
+
+ /**
+ * The available credit balance for a billing profile. This is the balance that can be used for pay now to settle
+ * due or past due invoices. The operation is supported only for billing accounts with agreement type Microsoft
+ * Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @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 latest Azure credit balance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String billingAccountName, String billingProfileName, Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingAccountsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingAccountsClient.java
new file mode 100644
index 000000000000..cc282b809d92
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingAccountsClient.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.billing.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.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.billing.fluent.models.BillingAccountInner;
+import com.azure.resourcemanager.billing.fluent.models.InvoiceSectionWithCreateSubPermissionInner;
+import com.azure.resourcemanager.billing.models.BillingAccountUpdateRequest;
+
+/** An instance of this class provides access to all the operations defined in BillingAccountsClient. */
+public interface BillingAccountsClient {
+ /**
+ * Lists the billing accounts that a user has access to.
+ *
+ * @throws com.azure.core.management.exception.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 list of billing accounts.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists the billing accounts that a user has access to.
+ *
+ * @param expand May be used to expand the soldTo, invoice sections and billing profiles.
+ * @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 list of billing accounts.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String expand, Context context);
+
+ /**
+ * Gets a billing account by its ID.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 billing account by its ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingAccountInner get(String billingAccountName);
+
+ /**
+ * Gets a billing account by its ID.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param expand May be used to expand the soldTo, invoice sections and billing profiles.
+ * @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 billing account by its ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String billingAccountName, String expand, Context context);
+
+ /**
+ * Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the update billing account 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 billing account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, BillingAccountInner> beginUpdate(
+ String billingAccountName, BillingAccountUpdateRequest parameters);
+
+ /**
+ * Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the update billing account 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 billing account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, BillingAccountInner> beginUpdate(
+ String billingAccountName, BillingAccountUpdateRequest parameters, Context context);
+
+ /**
+ * Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the update billing account 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 billing account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingAccountInner update(String billingAccountName, BillingAccountUpdateRequest parameters);
+
+ /**
+ * Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the update billing account 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 billing account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingAccountInner update(String billingAccountName, BillingAccountUpdateRequest parameters, Context context);
+
+ /**
+ * Lists the invoice sections for which the user has permission to create Azure subscriptions. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of invoice section properties with create subscription permission.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listInvoiceSectionsByCreateSubscriptionPermission(
+ String billingAccountName);
+
+ /**
+ * Lists the invoice sections for which the user has permission to create Azure subscriptions. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @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 list of invoice section properties with create subscription permission.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listInvoiceSectionsByCreateSubscriptionPermission(
+ String billingAccountName, Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingManagementClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingManagementClient.java
new file mode 100644
index 000000000000..1dae2ff4904f
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingManagementClient.java
@@ -0,0 +1,179 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for BillingManagementClient class. */
+public interface BillingManagementClient {
+ /**
+ * Gets The ID that uniquely identifies an Azure subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * 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 BillingAccountsClient object to access its operations.
+ *
+ * @return the BillingAccountsClient object.
+ */
+ BillingAccountsClient getBillingAccounts();
+
+ /**
+ * Gets the AddressClient object to access its operations.
+ *
+ * @return the AddressClient object.
+ */
+ AddressClient getAddress();
+
+ /**
+ * Gets the AvailableBalancesClient object to access its operations.
+ *
+ * @return the AvailableBalancesClient object.
+ */
+ AvailableBalancesClient getAvailableBalances();
+
+ /**
+ * Gets the InstructionsClient object to access its operations.
+ *
+ * @return the InstructionsClient object.
+ */
+ InstructionsClient getInstructions();
+
+ /**
+ * Gets the BillingProfilesClient object to access its operations.
+ *
+ * @return the BillingProfilesClient object.
+ */
+ BillingProfilesClient getBillingProfiles();
+
+ /**
+ * Gets the CustomersClient object to access its operations.
+ *
+ * @return the CustomersClient object.
+ */
+ CustomersClient getCustomers();
+
+ /**
+ * Gets the InvoiceSectionsClient object to access its operations.
+ *
+ * @return the InvoiceSectionsClient object.
+ */
+ InvoiceSectionsClient getInvoiceSections();
+
+ /**
+ * Gets the BillingPermissionsClient object to access its operations.
+ *
+ * @return the BillingPermissionsClient object.
+ */
+ BillingPermissionsClient getBillingPermissions();
+
+ /**
+ * Gets the BillingSubscriptionsClient object to access its operations.
+ *
+ * @return the BillingSubscriptionsClient object.
+ */
+ BillingSubscriptionsClient getBillingSubscriptions();
+
+ /**
+ * Gets the ProductsClient object to access its operations.
+ *
+ * @return the ProductsClient object.
+ */
+ ProductsClient getProducts();
+
+ /**
+ * Gets the InvoicesClient object to access its operations.
+ *
+ * @return the InvoicesClient object.
+ */
+ InvoicesClient getInvoices();
+
+ /**
+ * Gets the TransactionsClient object to access its operations.
+ *
+ * @return the TransactionsClient object.
+ */
+ TransactionsClient getTransactions();
+
+ /**
+ * Gets the PoliciesClient object to access its operations.
+ *
+ * @return the PoliciesClient object.
+ */
+ PoliciesClient getPolicies();
+
+ /**
+ * Gets the BillingPropertiesClient object to access its operations.
+ *
+ * @return the BillingPropertiesClient object.
+ */
+ BillingPropertiesClient getBillingProperties();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the BillingRoleDefinitionsClient object to access its operations.
+ *
+ * @return the BillingRoleDefinitionsClient object.
+ */
+ BillingRoleDefinitionsClient getBillingRoleDefinitions();
+
+ /**
+ * Gets the BillingRoleAssignmentsClient object to access its operations.
+ *
+ * @return the BillingRoleAssignmentsClient object.
+ */
+ BillingRoleAssignmentsClient getBillingRoleAssignments();
+
+ /**
+ * Gets the AgreementsClient object to access its operations.
+ *
+ * @return the AgreementsClient object.
+ */
+ AgreementsClient getAgreements();
+
+ /**
+ * Gets the EnrollmentAccountsClient object to access its operations.
+ *
+ * @return the EnrollmentAccountsClient object.
+ */
+ EnrollmentAccountsClient getEnrollmentAccounts();
+
+ /**
+ * Gets the BillingPeriodsClient object to access its operations.
+ *
+ * @return the BillingPeriodsClient object.
+ */
+ BillingPeriodsClient getBillingPeriods();
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPeriodsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPeriodsClient.java
new file mode 100644
index 000000000000..9b05db568d5a
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPeriodsClient.java
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.fluent.models.BillingPeriodInner;
+
+/** An instance of this class provides access to all the operations defined in BillingPeriodsClient. */
+public interface BillingPeriodsClient {
+ /**
+ * Lists the available billing periods for a subscription in reverse chronological order. This is only supported for
+ * Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web
+ * portal are not supported through this preview API.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing billing periods.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists the available billing periods for a subscription in reverse chronological order. This is only supported for
+ * Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web
+ * portal are not supported through this preview API.
+ *
+ * @param filter May be used to filter billing periods by billingPeriodEndDate. The filter supports 'eq', 'lt',
+ * 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
+ * @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 billing periods.
+ * @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 billing periods.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String filter, String skiptoken, Integer top, Context context);
+
+ /**
+ * Gets a named billing period. This is only supported for Azure Web-Direct subscriptions. Other subscription types
+ * which were not purchased directly through the Azure web portal are not supported through this preview API.
+ *
+ * @param billingPeriodName The name of a BillingPeriod resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 named billing period.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingPeriodInner get(String billingPeriodName);
+
+ /**
+ * Gets a named billing period. This is only supported for Azure Web-Direct subscriptions. Other subscription types
+ * which were not purchased directly through the Azure web portal are not supported through this preview API.
+ *
+ * @param billingPeriodName The name of a BillingPeriod resource.
+ * @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 named billing period.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String billingPeriodName, Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPermissionsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPermissionsClient.java
new file mode 100644
index 000000000000..806c78a4a825
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPermissionsClient.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.billing.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.billing.fluent.models.BillingPermissionsPropertiesInner;
+
+/** An instance of this class provides access to all the operations defined in BillingPermissionsClient. */
+public interface BillingPermissionsClient {
+ /**
+ * Lists the billing permissions the caller has for a customer.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param customerName The ID that uniquely identifies a customer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of list billingPermissions a caller has on a billing account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCustomer(String billingAccountName, String customerName);
+
+ /**
+ * Lists the billing permissions the caller has for a customer.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param customerName The ID that uniquely identifies a customer.
+ * @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 list billingPermissions a caller has on a billing account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCustomer(
+ String billingAccountName, String customerName, Context context);
+
+ /**
+ * Lists the billing permissions the caller has on a billing account.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of list billingPermissions a caller has on a billing account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingAccount(String billingAccountName);
+
+ /**
+ * Lists the billing permissions the caller has on a billing account.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @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 list billingPermissions a caller has on a billing account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingAccount(String billingAccountName, Context context);
+
+ /**
+ * Lists the billing permissions the caller has on an invoice section.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of list billingPermissions a caller has on a billing account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByInvoiceSections(
+ String billingAccountName, String billingProfileName, String invoiceSectionName);
+
+ /**
+ * Lists the billing permissions the caller has on an invoice section.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @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 list billingPermissions a caller has on a billing account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByInvoiceSections(
+ String billingAccountName, String billingProfileName, String invoiceSectionName, Context context);
+
+ /**
+ * Lists the billing permissions the caller has on a billing profile.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of list billingPermissions a caller has on a billing account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(
+ String billingAccountName, String billingProfileName);
+
+ /**
+ * Lists the billing permissions the caller has on a billing profile.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @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 list billingPermissions a caller has on a billing account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(
+ String billingAccountName, String billingProfileName, Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingProfilesClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingProfilesClient.java
new file mode 100644
index 000000000000..9d9733411ec2
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingProfilesClient.java
@@ -0,0 +1,142 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.billing.fluent.models.BillingProfileInner;
+
+/** An instance of this class provides access to all the operations defined in BillingProfilesClient. */
+public interface BillingProfilesClient {
+ /**
+ * Lists the billing profiles that a user has access to. The operation is supported for billing accounts with
+ * agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of billing profiles.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingAccount(String billingAccountName);
+
+ /**
+ * Lists the billing profiles that a user has access to. The operation is supported for billing accounts with
+ * agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param expand May be used to expand the invoice sections.
+ * @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 list of billing profiles.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingAccount(String billingAccountName, String expand, Context context);
+
+ /**
+ * Gets a billing profile by its ID. The operation is supported for billing accounts with agreement type Microsoft
+ * Customer Agreement or Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 billing profile by its ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingProfileInner get(String billingAccountName, String billingProfileName);
+
+ /**
+ * Gets a billing profile by its ID. The operation is supported for billing accounts with agreement type Microsoft
+ * Customer Agreement or Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param expand May be used to expand the invoice sections.
+ * @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 billing profile by its ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String billingAccountName, String billingProfileName, String expand, Context context);
+
+ /**
+ * Creates or updates a billing profile. The operation is supported for billing accounts with agreement type
+ * Microsoft Customer Agreement or Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param parameters The new or updated billing profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 billing profile.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, BillingProfileInner> beginCreateOrUpdate(
+ String billingAccountName, String billingProfileName, BillingProfileInner parameters);
+
+ /**
+ * Creates or updates a billing profile. The operation is supported for billing accounts with agreement type
+ * Microsoft Customer Agreement or Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param parameters The new or updated billing profile.
+ * @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 billing profile.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, BillingProfileInner> beginCreateOrUpdate(
+ String billingAccountName, String billingProfileName, BillingProfileInner parameters, Context context);
+
+ /**
+ * Creates or updates a billing profile. The operation is supported for billing accounts with agreement type
+ * Microsoft Customer Agreement or Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param parameters The new or updated billing profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 billing profile.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingProfileInner createOrUpdate(
+ String billingAccountName, String billingProfileName, BillingProfileInner parameters);
+
+ /**
+ * Creates or updates a billing profile. The operation is supported for billing accounts with agreement type
+ * Microsoft Customer Agreement or Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param parameters The new or updated billing profile.
+ * @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 billing profile.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingProfileInner createOrUpdate(
+ String billingAccountName, String billingProfileName, BillingProfileInner parameters, Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPropertiesClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPropertiesClient.java
new file mode 100644
index 000000000000..6fb632b38e70
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPropertiesClient.java
@@ -0,0 +1,65 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.fluent.models.BillingPropertyInner;
+
+/** An instance of this class provides access to all the operations defined in BillingPropertiesClient. */
+public interface BillingPropertiesClient {
+ /**
+ * Get the billing properties for a subscription. This operation is not supported for billing accounts with
+ * agreement type Enterprise Agreement.
+ *
+ * @throws com.azure.core.management.exception.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 billing properties for a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingPropertyInner get();
+
+ /**
+ * Get the billing properties for a subscription. This operation is not supported for billing accounts with
+ * agreement type Enterprise Agreement.
+ *
+ * @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 billing properties for a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(Context context);
+
+ /**
+ * Updates the billing property of a subscription. Currently, cost center can be updated. The operation is supported
+ * only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param parameters Request parameters that are provided to the update billing property 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 billing property.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingPropertyInner update(BillingPropertyInner parameters);
+
+ /**
+ * Updates the billing property of a subscription. Currently, cost center can be updated. The operation is supported
+ * only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param parameters Request parameters that are provided to the update billing property 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 billing property.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(BillingPropertyInner parameters, Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingRoleAssignmentsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingRoleAssignmentsClient.java
new file mode 100644
index 000000000000..35f767918b95
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingRoleAssignmentsClient.java
@@ -0,0 +1,316 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.fluent.models.BillingRoleAssignmentInner;
+
+/** An instance of this class provides access to all the operations defined in BillingRoleAssignmentsClient. */
+public interface BillingRoleAssignmentsClient {
+ /**
+ * Gets a role assignment for the caller on a billing account. The operation is supported for billing accounts with
+ * agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 role assignment for the caller on a billing account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingRoleAssignmentInner getByBillingAccount(String billingAccountName, String billingRoleAssignmentName);
+
+ /**
+ * Gets a role assignment for the caller on a billing account. The operation is supported for billing accounts with
+ * agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment.
+ * @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 role assignment for the caller on a billing account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByBillingAccountWithResponse(
+ String billingAccountName, String billingRoleAssignmentName, Context context);
+
+ /**
+ * Deletes a role assignment for the caller on a billing account. The operation is supported for billing accounts
+ * with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 role assignment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingRoleAssignmentInner deleteByBillingAccount(String billingAccountName, String billingRoleAssignmentName);
+
+ /**
+ * Deletes a role assignment for the caller on a billing account. The operation is supported for billing accounts
+ * with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment.
+ * @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 role assignment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteByBillingAccountWithResponse(
+ String billingAccountName, String billingRoleAssignmentName, Context context);
+
+ /**
+ * Gets a role assignment for the caller on an invoice section. The operation is supported for billing accounts with
+ * agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 role assignment for the caller on an invoice section.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingRoleAssignmentInner getByInvoiceSection(
+ String billingAccountName,
+ String billingProfileName,
+ String invoiceSectionName,
+ String billingRoleAssignmentName);
+
+ /**
+ * Gets a role assignment for the caller on an invoice section. The operation is supported for billing accounts with
+ * agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment.
+ * @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 role assignment for the caller on an invoice section.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByInvoiceSectionWithResponse(
+ String billingAccountName,
+ String billingProfileName,
+ String invoiceSectionName,
+ String billingRoleAssignmentName,
+ Context context);
+
+ /**
+ * Deletes a role assignment for the caller on an invoice section. The operation is supported for billing accounts
+ * with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 role assignment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingRoleAssignmentInner deleteByInvoiceSection(
+ String billingAccountName,
+ String billingProfileName,
+ String invoiceSectionName,
+ String billingRoleAssignmentName);
+
+ /**
+ * Deletes a role assignment for the caller on an invoice section. The operation is supported for billing accounts
+ * with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment.
+ * @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 role assignment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteByInvoiceSectionWithResponse(
+ String billingAccountName,
+ String billingProfileName,
+ String invoiceSectionName,
+ String billingRoleAssignmentName,
+ Context context);
+
+ /**
+ * Gets a role assignment for the caller on a billing profile. The operation is supported for billing accounts with
+ * agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 role assignment for the caller on a billing profile.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingRoleAssignmentInner getByBillingProfile(
+ String billingAccountName, String billingProfileName, String billingRoleAssignmentName);
+
+ /**
+ * Gets a role assignment for the caller on a billing profile. The operation is supported for billing accounts with
+ * agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment.
+ * @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 role assignment for the caller on a billing profile.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByBillingProfileWithResponse(
+ String billingAccountName, String billingProfileName, String billingRoleAssignmentName, Context context);
+
+ /**
+ * Deletes a role assignment for the caller on a billing profile. The operation is supported for billing accounts
+ * with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 role assignment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingRoleAssignmentInner deleteByBillingProfile(
+ String billingAccountName, String billingProfileName, String billingRoleAssignmentName);
+
+ /**
+ * Deletes a role assignment for the caller on a billing profile. The operation is supported for billing accounts
+ * with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment.
+ * @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 role assignment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteByBillingProfileWithResponse(
+ String billingAccountName, String billingProfileName, String billingRoleAssignmentName, Context context);
+
+ /**
+ * Lists the role assignments for the caller on a billing account. The operation is supported for billing accounts
+ * with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of role assignments.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingAccount(String billingAccountName);
+
+ /**
+ * Lists the role assignments for the caller on a billing account. The operation is supported for billing accounts
+ * with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @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 list of role assignments.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingAccount(String billingAccountName, Context context);
+
+ /**
+ * Lists the role assignments for the caller on an invoice section. The operation is supported for billing accounts
+ * with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of role assignments.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByInvoiceSection(
+ String billingAccountName, String billingProfileName, String invoiceSectionName);
+
+ /**
+ * Lists the role assignments for the caller on an invoice section. The operation is supported for billing accounts
+ * with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @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 list of role assignments.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByInvoiceSection(
+ String billingAccountName, String billingProfileName, String invoiceSectionName, Context context);
+
+ /**
+ * Lists the role assignments for the caller on a billing profile. The operation is supported for billing accounts
+ * with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of role assignments.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(
+ String billingAccountName, String billingProfileName);
+
+ /**
+ * Lists the role assignments for the caller on a billing profile. The operation is supported for billing accounts
+ * with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @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 list of role assignments.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(
+ String billingAccountName, String billingProfileName, Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingRoleDefinitionsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingRoleDefinitionsClient.java
new file mode 100644
index 000000000000..ae03cfa9580f
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingRoleDefinitionsClient.java
@@ -0,0 +1,211 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.fluent.models.BillingRoleDefinitionInner;
+
+/** An instance of this class provides access to all the operations defined in BillingRoleDefinitionsClient. */
+public interface BillingRoleDefinitionsClient {
+ /**
+ * Gets the definition for a role on a billing account. The operation is supported for billing accounts with
+ * agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingRoleDefinitionName The ID that uniquely identifies a role definition.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 definition for a role on a billing account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingRoleDefinitionInner getByBillingAccount(String billingAccountName, String billingRoleDefinitionName);
+
+ /**
+ * Gets the definition for a role on a billing account. The operation is supported for billing accounts with
+ * agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingRoleDefinitionName The ID that uniquely identifies a role definition.
+ * @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 definition for a role on a billing account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByBillingAccountWithResponse(
+ String billingAccountName, String billingRoleDefinitionName, Context context);
+
+ /**
+ * Gets the definition for a role on an invoice section. The operation is supported only for billing accounts with
+ * agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @param billingRoleDefinitionName The ID that uniquely identifies a role definition.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 definition for a role on an invoice section.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingRoleDefinitionInner getByInvoiceSection(
+ String billingAccountName,
+ String billingProfileName,
+ String invoiceSectionName,
+ String billingRoleDefinitionName);
+
+ /**
+ * Gets the definition for a role on an invoice section. The operation is supported only for billing accounts with
+ * agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @param billingRoleDefinitionName The ID that uniquely identifies a role definition.
+ * @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 definition for a role on an invoice section.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByInvoiceSectionWithResponse(
+ String billingAccountName,
+ String billingProfileName,
+ String invoiceSectionName,
+ String billingRoleDefinitionName,
+ Context context);
+
+ /**
+ * Gets the definition for a role on a billing profile. The operation is supported for billing accounts with
+ * agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param billingRoleDefinitionName The ID that uniquely identifies a role definition.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 definition for a role on a billing profile.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingRoleDefinitionInner getByBillingProfile(
+ String billingAccountName, String billingProfileName, String billingRoleDefinitionName);
+
+ /**
+ * Gets the definition for a role on a billing profile. The operation is supported for billing accounts with
+ * agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param billingRoleDefinitionName The ID that uniquely identifies a role definition.
+ * @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 definition for a role on a billing profile.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByBillingProfileWithResponse(
+ String billingAccountName, String billingProfileName, String billingRoleDefinitionName, Context context);
+
+ /**
+ * Lists the role definitions for a billing account. The operation is supported for billing accounts with agreement
+ * type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of role definitions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingAccount(String billingAccountName);
+
+ /**
+ * Lists the role definitions for a billing account. The operation is supported for billing accounts with agreement
+ * type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @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 list of role definitions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingAccount(String billingAccountName, Context context);
+
+ /**
+ * Lists the role definitions for an invoice section. The operation is supported for billing accounts with agreement
+ * type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of role definitions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByInvoiceSection(
+ String billingAccountName, String billingProfileName, String invoiceSectionName);
+
+ /**
+ * Lists the role definitions for an invoice section. The operation is supported for billing accounts with agreement
+ * type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @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 list of role definitions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByInvoiceSection(
+ String billingAccountName, String billingProfileName, String invoiceSectionName, Context context);
+
+ /**
+ * Lists the role definitions for a billing profile. The operation is supported for billing accounts with agreement
+ * type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of role definitions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(
+ String billingAccountName, String billingProfileName);
+
+ /**
+ * Lists the role definitions for a billing profile. The operation is supported for billing accounts with agreement
+ * type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @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 list of role definitions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(
+ String billingAccountName, String billingProfileName, Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingSubscriptionsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingSubscriptionsClient.java
new file mode 100644
index 000000000000..d88c471e5f9f
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingSubscriptionsClient.java
@@ -0,0 +1,292 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.billing.fluent.models.BillingSubscriptionInner;
+import com.azure.resourcemanager.billing.fluent.models.ValidateSubscriptionTransferEligibilityResultInner;
+import com.azure.resourcemanager.billing.models.TransferBillingSubscriptionRequestProperties;
+
+/** An instance of this class provides access to all the operations defined in BillingSubscriptionsClient. */
+public interface BillingSubscriptionsClient {
+ /**
+ * Lists the subscriptions for a customer. The operation is supported only for billing accounts with agreement type
+ * Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param customerName The ID that uniquely identifies a customer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of billing subscriptions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCustomer(String billingAccountName, String customerName);
+
+ /**
+ * Lists the subscriptions for a customer. The operation is supported only for billing accounts with agreement type
+ * Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param customerName The ID that uniquely identifies a customer.
+ * @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 list of billing subscriptions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCustomer(
+ String billingAccountName, String customerName, Context context);
+
+ /**
+ * Lists the subscriptions for a billing account. The operation is supported for billing accounts with agreement
+ * type Microsoft Customer Agreement or Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of billing subscriptions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingAccount(String billingAccountName);
+
+ /**
+ * Lists the subscriptions for a billing account. The operation is supported for billing accounts with agreement
+ * type Microsoft Customer Agreement or Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @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 list of billing subscriptions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingAccount(String billingAccountName, Context context);
+
+ /**
+ * Lists the subscriptions that are billed to a billing profile. The operation is supported for billing accounts
+ * with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of billing subscriptions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName);
+
+ /**
+ * Lists the subscriptions that are billed to a billing profile. The operation is supported for billing accounts
+ * with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @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 list of billing subscriptions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(
+ String billingAccountName, String billingProfileName, Context context);
+
+ /**
+ * Lists the subscriptions that are billed to an invoice section. The operation is supported only for billing
+ * accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of billing subscriptions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByInvoiceSection(
+ String billingAccountName, String billingProfileName, String invoiceSectionName);
+
+ /**
+ * Lists the subscriptions that are billed to an invoice section. The operation is supported only for billing
+ * accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @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 list of billing subscriptions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByInvoiceSection(
+ String billingAccountName, String billingProfileName, String invoiceSectionName, Context context);
+
+ /**
+ * Gets a subscription by its ID. The operation is supported for billing accounts with agreement type Microsoft
+ * Customer Agreement and Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 subscription by its ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingSubscriptionInner get(String billingAccountName);
+
+ /**
+ * Gets a subscription by its ID. The operation is supported for billing accounts with agreement type Microsoft
+ * Customer Agreement and Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @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 subscription by its ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String billingAccountName, Context context);
+
+ /**
+ * Updates the properties of a billing subscription. Currently, cost center can be updated. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the update billing subscription 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 billing subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingSubscriptionInner update(String billingAccountName, BillingSubscriptionInner parameters);
+
+ /**
+ * Updates the properties of a billing subscription. Currently, cost center can be updated. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the update billing subscription 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 billing subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String billingAccountName, BillingSubscriptionInner parameters, Context context);
+
+ /**
+ * Moves a subscription's charges to a new invoice section. The new invoice section must belong to the same billing
+ * profile as the existing invoice section. This operation is supported for billing accounts with agreement type
+ * Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the move subscription 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 billing subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, BillingSubscriptionInner> beginMove(
+ String billingAccountName, TransferBillingSubscriptionRequestProperties parameters);
+
+ /**
+ * Moves a subscription's charges to a new invoice section. The new invoice section must belong to the same billing
+ * profile as the existing invoice section. This operation is supported for billing accounts with agreement type
+ * Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the move subscription 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 billing subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, BillingSubscriptionInner> beginMove(
+ String billingAccountName, TransferBillingSubscriptionRequestProperties parameters, Context context);
+
+ /**
+ * Moves a subscription's charges to a new invoice section. The new invoice section must belong to the same billing
+ * profile as the existing invoice section. This operation is supported for billing accounts with agreement type
+ * Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the move subscription 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 billing subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingSubscriptionInner move(String billingAccountName, TransferBillingSubscriptionRequestProperties parameters);
+
+ /**
+ * Moves a subscription's charges to a new invoice section. The new invoice section must belong to the same billing
+ * profile as the existing invoice section. This operation is supported for billing accounts with agreement type
+ * Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the move subscription 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 billing subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingSubscriptionInner move(
+ String billingAccountName, TransferBillingSubscriptionRequestProperties parameters, Context context);
+
+ /**
+ * Validates if a subscription's charges can be moved to a new invoice section. This operation is supported for
+ * billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the validate move eligibility 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 the transfer eligibility validation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ValidateSubscriptionTransferEligibilityResultInner validateMove(
+ String billingAccountName, TransferBillingSubscriptionRequestProperties parameters);
+
+ /**
+ * Validates if a subscription's charges can be moved to a new invoice section. This operation is supported for
+ * billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the validate move eligibility 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 result of the transfer eligibility validation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response validateMoveWithResponse(
+ String billingAccountName, TransferBillingSubscriptionRequestProperties parameters, Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/CustomersClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/CustomersClient.java
new file mode 100644
index 000000000000..0331888c57e6
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/CustomersClient.java
@@ -0,0 +1,110 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.fluent.models.CustomerInner;
+
+/** An instance of this class provides access to all the operations defined in CustomersClient. */
+public interface CustomersClient {
+ /**
+ * Lists the customers that are billed to a billing profile. The operation is supported only for billing accounts
+ * with agreement type Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of customers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName);
+
+ /**
+ * Lists the customers that are billed to a billing profile. The operation is supported only for billing accounts
+ * with agreement type Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param search Used for searching customers by their name. Any customer with name containing the search text will
+ * be included in the response.
+ * @param filter May be used to filter the list of customers.
+ * @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 list of customers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(
+ String billingAccountName, String billingProfileName, String search, String filter, Context context);
+
+ /**
+ * Lists the customers that are billed to a billing account. The operation is supported only for billing accounts
+ * with agreement type Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of customers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingAccount(String billingAccountName);
+
+ /**
+ * Lists the customers that are billed to a billing account. The operation is supported only for billing accounts
+ * with agreement type Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param search Used for searching customers by their name. Any customer with name containing the search text will
+ * be included in the response.
+ * @param filter May be used to filter the list of customers.
+ * @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 list of customers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingAccount(
+ String billingAccountName, String search, String filter, Context context);
+
+ /**
+ * Gets a customer by its ID. The operation is supported only for billing accounts with agreement type Microsoft
+ * Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param customerName The ID that uniquely identifies a customer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 customer by its ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CustomerInner get(String billingAccountName, String customerName);
+
+ /**
+ * Gets a customer by its ID. The operation is supported only for billing accounts with agreement type Microsoft
+ * Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param customerName The ID that uniquely identifies a customer.
+ * @param expand May be used to expand enabledAzurePlans and resellers.
+ * @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 customer by its ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String billingAccountName, String customerName, String expand, Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/EnrollmentAccountsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/EnrollmentAccountsClient.java
new file mode 100644
index 000000000000..5e167c1f147b
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/EnrollmentAccountsClient.java
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.fluent.models.EnrollmentAccountSummaryInner;
+
+/** An instance of this class provides access to all the operations defined in EnrollmentAccountsClient. */
+public interface EnrollmentAccountsClient {
+ /**
+ * Lists the enrollment accounts the caller has access to.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing enrollment accounts.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists the enrollment accounts the caller has access to.
+ *
+ * @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 enrollment accounts.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Gets a enrollment account by name.
+ *
+ * @param name Enrollment Account 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 enrollment account by name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EnrollmentAccountSummaryInner get(String name);
+
+ /**
+ * Gets a enrollment account by name.
+ *
+ * @param name Enrollment Account 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 enrollment account by name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String name, Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InstructionsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InstructionsClient.java
new file mode 100644
index 000000000000..5b8116658c0b
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InstructionsClient.java
@@ -0,0 +1,112 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.fluent.models.InstructionInner;
+
+/** An instance of this class provides access to all the operations defined in InstructionsClient. */
+public interface InstructionsClient {
+ /**
+ * Lists the instructions by billing profile id.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of billing instructions used during invoice generation.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName);
+
+ /**
+ * Lists the instructions by billing profile id.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @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 list of billing instructions used during invoice generation.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(
+ String billingAccountName, String billingProfileName, Context context);
+
+ /**
+ * Get the instruction by name. These are custom billing instructions and are only applicable for certain customers.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param instructionName Instruction 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 instruction by name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InstructionInner get(String billingAccountName, String billingProfileName, String instructionName);
+
+ /**
+ * Get the instruction by name. These are custom billing instructions and are only applicable for certain customers.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param instructionName Instruction 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 instruction by name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String billingAccountName, String billingProfileName, String instructionName, Context context);
+
+ /**
+ * Creates or updates an instruction. These are custom billing instructions and are only applicable for certain
+ * customers.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param instructionName Instruction Name.
+ * @param parameters The new instruction.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an instruction.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InstructionInner put(
+ String billingAccountName, String billingProfileName, String instructionName, InstructionInner parameters);
+
+ /**
+ * Creates or updates an instruction. These are custom billing instructions and are only applicable for certain
+ * customers.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param instructionName Instruction Name.
+ * @param parameters The new instruction.
+ * @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 an instruction.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response putWithResponse(
+ String billingAccountName,
+ String billingProfileName,
+ String instructionName,
+ InstructionInner parameters,
+ Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InvoiceSectionsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InvoiceSectionsClient.java
new file mode 100644
index 000000000000..1012343bf0c5
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InvoiceSectionsClient.java
@@ -0,0 +1,163 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.billing.fluent.models.InvoiceSectionInner;
+
+/** An instance of this class provides access to all the operations defined in InvoiceSectionsClient. */
+public interface InvoiceSectionsClient {
+ /**
+ * Lists the invoice sections that a user has access to. The operation is supported only for billing accounts with
+ * agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of invoice sections.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName);
+
+ /**
+ * Lists the invoice sections that a user has access to. The operation is supported only for billing accounts with
+ * agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @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 list of invoice sections.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(
+ String billingAccountName, String billingProfileName, Context context);
+
+ /**
+ * Gets an invoice section by its ID. The operation is supported only for billing accounts with agreement type
+ * Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an invoice section by its ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InvoiceSectionInner get(String billingAccountName, String billingProfileName, String invoiceSectionName);
+
+ /**
+ * Gets an invoice section by its ID. The operation is supported only for billing accounts with agreement type
+ * Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @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 an invoice section by its ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String billingAccountName, String billingProfileName, String invoiceSectionName, Context context);
+
+ /**
+ * Creates or updates an invoice section. The operation is supported only for billing accounts with agreement type
+ * Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @param parameters The new or updated invoice section.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an invoice section.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, InvoiceSectionInner> beginCreateOrUpdate(
+ String billingAccountName,
+ String billingProfileName,
+ String invoiceSectionName,
+ InvoiceSectionInner parameters);
+
+ /**
+ * Creates or updates an invoice section. The operation is supported only for billing accounts with agreement type
+ * Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @param parameters The new or updated invoice section.
+ * @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 an invoice section.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, InvoiceSectionInner> beginCreateOrUpdate(
+ String billingAccountName,
+ String billingProfileName,
+ String invoiceSectionName,
+ InvoiceSectionInner parameters,
+ Context context);
+
+ /**
+ * Creates or updates an invoice section. The operation is supported only for billing accounts with agreement type
+ * Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @param parameters The new or updated invoice section.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an invoice section.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InvoiceSectionInner createOrUpdate(
+ String billingAccountName,
+ String billingProfileName,
+ String invoiceSectionName,
+ InvoiceSectionInner parameters);
+
+ /**
+ * Creates or updates an invoice section. The operation is supported only for billing accounts with agreement type
+ * Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @param parameters The new or updated invoice section.
+ * @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 an invoice section.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InvoiceSectionInner createOrUpdate(
+ String billingAccountName,
+ String billingProfileName,
+ String invoiceSectionName,
+ InvoiceSectionInner parameters,
+ Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InvoicesClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InvoicesClient.java
new file mode 100644
index 000000000000..14ca1a33b4e9
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InvoicesClient.java
@@ -0,0 +1,438 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.billing.fluent.models.DownloadUrlInner;
+import com.azure.resourcemanager.billing.fluent.models.InvoiceInner;
+import java.util.List;
+
+/** An instance of this class provides access to all the operations defined in InvoicesClient. */
+public interface InvoicesClient {
+ /**
+ * Lists the invoices for a billing account for a given start date and end date. The operation is supported for
+ * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param periodStartDate The start date to fetch the invoices. The date should be specified in MM-DD-YYYY format.
+ * @param periodEndDate The end date to fetch the invoices. The date should be specified in MM-DD-YYYY format.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of invoices.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingAccount(
+ String billingAccountName, String periodStartDate, String periodEndDate);
+
+ /**
+ * Lists the invoices for a billing account for a given start date and end date. The operation is supported for
+ * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param periodStartDate The start date to fetch the invoices. The date should be specified in MM-DD-YYYY format.
+ * @param periodEndDate The end date to fetch the invoices. The date should be specified in MM-DD-YYYY format.
+ * @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 list of invoices.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingAccount(
+ String billingAccountName, String periodStartDate, String periodEndDate, Context context);
+
+ /**
+ * Lists the invoices for a billing profile for a given start date and end date. The operation is supported for
+ * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param periodStartDate The start date to fetch the invoices. The date should be specified in MM-DD-YYYY format.
+ * @param periodEndDate The end date to fetch the invoices. The date should be specified in MM-DD-YYYY format.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of invoices.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(
+ String billingAccountName, String billingProfileName, String periodStartDate, String periodEndDate);
+
+ /**
+ * Lists the invoices for a billing profile for a given start date and end date. The operation is supported for
+ * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param periodStartDate The start date to fetch the invoices. The date should be specified in MM-DD-YYYY format.
+ * @param periodEndDate The end date to fetch the invoices. The date should be specified in MM-DD-YYYY format.
+ * @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 list of invoices.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(
+ String billingAccountName,
+ String billingProfileName,
+ String periodStartDate,
+ String periodEndDate,
+ Context context);
+
+ /**
+ * Gets an invoice by billing account name and ID. The operation is supported for billing accounts with agreement
+ * type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param invoiceName The ID that uniquely identifies an invoice.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an invoice by billing account name and ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InvoiceInner get(String billingAccountName, String invoiceName);
+
+ /**
+ * Gets an invoice by billing account name and ID. The operation is supported for billing accounts with agreement
+ * type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param invoiceName The ID that uniquely identifies an invoice.
+ * @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 an invoice by billing account name and ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String billingAccountName, String invoiceName, Context context);
+
+ /**
+ * Gets an invoice by ID. The operation is supported for billing accounts with agreement type Microsoft Partner
+ * Agreement or Microsoft Customer Agreement.
+ *
+ * @param invoiceName The ID that uniquely identifies an invoice.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an invoice by ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InvoiceInner getById(String invoiceName);
+
+ /**
+ * Gets an invoice by ID. The operation is supported for billing accounts with agreement type Microsoft Partner
+ * Agreement or Microsoft Customer Agreement.
+ *
+ * @param invoiceName The ID that uniquely identifies an invoice.
+ * @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 an invoice by ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByIdWithResponse(String invoiceName, Context context);
+
+ /**
+ * Gets a URL to download an invoice. The operation is supported for billing accounts with agreement type Microsoft
+ * Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param invoiceName The ID that uniquely identifies an invoice.
+ * @param downloadToken Download token with document source and document 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 URL to download an invoice.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, DownloadUrlInner> beginDownloadInvoice(
+ String billingAccountName, String invoiceName, String downloadToken);
+
+ /**
+ * Gets a URL to download an invoice. The operation is supported for billing accounts with agreement type Microsoft
+ * Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param invoiceName The ID that uniquely identifies an invoice.
+ * @param downloadToken Download token with document source and document 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 URL to download an invoice.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, DownloadUrlInner> beginDownloadInvoice(
+ String billingAccountName, String invoiceName, String downloadToken, Context context);
+
+ /**
+ * Gets a URL to download an invoice. The operation is supported for billing accounts with agreement type Microsoft
+ * Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param invoiceName The ID that uniquely identifies an invoice.
+ * @param downloadToken Download token with document source and document 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 URL to download an invoice.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DownloadUrlInner downloadInvoice(String billingAccountName, String invoiceName, String downloadToken);
+
+ /**
+ * Gets a URL to download an invoice. The operation is supported for billing accounts with agreement type Microsoft
+ * Partner Agreement or Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param invoiceName The ID that uniquely identifies an invoice.
+ * @param downloadToken Download token with document source and document 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 URL to download an invoice.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DownloadUrlInner downloadInvoice(
+ String billingAccountName, String invoiceName, String downloadToken, Context context);
+
+ /**
+ * Gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. The
+ * operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer
+ * Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param downloadUrls An array of download urls for individual documents.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, DownloadUrlInner> beginDownloadMultipleBillingProfileInvoices(
+ String billingAccountName, List downloadUrls);
+
+ /**
+ * Gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. The
+ * operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer
+ * Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param downloadUrls An array of download urls for individual documents.
+ * @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 URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, DownloadUrlInner> beginDownloadMultipleBillingProfileInvoices(
+ String billingAccountName, List downloadUrls, Context context);
+
+ /**
+ * Gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. The
+ * operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer
+ * Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param downloadUrls An array of download urls for individual documents.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DownloadUrlInner downloadMultipleBillingProfileInvoices(String billingAccountName, List downloadUrls);
+
+ /**
+ * Gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. The
+ * operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer
+ * Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param downloadUrls An array of download urls for individual documents.
+ * @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 URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DownloadUrlInner downloadMultipleBillingProfileInvoices(
+ String billingAccountName, List downloadUrls, Context context);
+
+ /**
+ * Lists the invoices for a subscription.
+ *
+ * @param periodStartDate Invoice period start date.
+ * @param periodEndDate Invoice period 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 the list of invoices.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingSubscription(String periodStartDate, String periodEndDate);
+
+ /**
+ * Lists the invoices for a subscription.
+ *
+ * @param periodStartDate Invoice period start date.
+ * @param periodEndDate Invoice period 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 the list of invoices.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingSubscription(
+ String periodStartDate, String periodEndDate, Context context);
+
+ /**
+ * Gets an invoice by subscription ID and invoice ID.
+ *
+ * @param invoiceName The ID that uniquely identifies an invoice.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an invoice by subscription ID and invoice ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InvoiceInner getBySubscriptionAndInvoiceId(String invoiceName);
+
+ /**
+ * Gets an invoice by subscription ID and invoice ID.
+ *
+ * @param invoiceName The ID that uniquely identifies an invoice.
+ * @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 an invoice by subscription ID and invoice ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getBySubscriptionAndInvoiceIdWithResponse(String invoiceName, Context context);
+
+ /**
+ * Gets a URL to download an invoice.
+ *
+ * @param invoiceName The ID that uniquely identifies an invoice.
+ * @param downloadToken Download token with document source and document 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 URL to download an invoice.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, DownloadUrlInner> beginDownloadBillingSubscriptionInvoice(
+ String invoiceName, String downloadToken);
+
+ /**
+ * Gets a URL to download an invoice.
+ *
+ * @param invoiceName The ID that uniquely identifies an invoice.
+ * @param downloadToken Download token with document source and document 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 URL to download an invoice.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, DownloadUrlInner> beginDownloadBillingSubscriptionInvoice(
+ String invoiceName, String downloadToken, Context context);
+
+ /**
+ * Gets a URL to download an invoice.
+ *
+ * @param invoiceName The ID that uniquely identifies an invoice.
+ * @param downloadToken Download token with document source and document 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 URL to download an invoice.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DownloadUrlInner downloadBillingSubscriptionInvoice(String invoiceName, String downloadToken);
+
+ /**
+ * Gets a URL to download an invoice.
+ *
+ * @param invoiceName The ID that uniquely identifies an invoice.
+ * @param downloadToken Download token with document source and document 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 URL to download an invoice.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DownloadUrlInner downloadBillingSubscriptionInvoice(String invoiceName, String downloadToken, Context context);
+
+ /**
+ * Gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file.
+ *
+ * @param downloadUrls An array of download urls for individual documents.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, DownloadUrlInner> beginDownloadMultipleBillingSubscriptionInvoices(
+ List downloadUrls);
+
+ /**
+ * Gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file.
+ *
+ * @param downloadUrls An array of download urls for individual documents.
+ * @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 URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, DownloadUrlInner> beginDownloadMultipleBillingSubscriptionInvoices(
+ List downloadUrls, Context context);
+
+ /**
+ * Gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file.
+ *
+ * @param downloadUrls An array of download urls for individual documents.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DownloadUrlInner downloadMultipleBillingSubscriptionInvoices(List downloadUrls);
+
+ /**
+ * Gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file.
+ *
+ * @param downloadUrls An array of download urls for individual documents.
+ * @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 URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DownloadUrlInner downloadMultipleBillingSubscriptionInvoices(List downloadUrls, Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/OperationsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/OperationsClient.java
new file mode 100644
index 000000000000..103f7ad487db
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/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.billing.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.billing.fluent.models.OperationInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * Lists the available billing 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 the list of billing operations and a URL link to get the next set of results.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists the available billing 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 the list of billing operations and a URL link to get the next set of results.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/PoliciesClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/PoliciesClient.java
new file mode 100644
index 000000000000..d6853d3867da
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/PoliciesClient.java
@@ -0,0 +1,139 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.fluent.models.CustomerPolicyInner;
+import com.azure.resourcemanager.billing.fluent.models.PolicyInner;
+
+/** An instance of this class provides access to all the operations defined in PoliciesClient. */
+public interface PoliciesClient {
+ /**
+ * Lists the policies for a billing profile. This operation is supported only for billing accounts with agreement
+ * type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PolicyInner getByBillingProfile(String billingAccountName, String billingProfileName);
+
+ /**
+ * Lists the policies for a billing profile. This operation is supported only for billing accounts with agreement
+ * type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @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 policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByBillingProfileWithResponse(
+ String billingAccountName, String billingProfileName, Context context);
+
+ /**
+ * Updates the policies for a billing profile. This operation is supported only for billing accounts with agreement
+ * type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param parameters Request parameters that are provided to the update policies 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 policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PolicyInner update(String billingAccountName, String billingProfileName, PolicyInner parameters);
+
+ /**
+ * Updates the policies for a billing profile. This operation is supported only for billing accounts with agreement
+ * type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param parameters Request parameters that are provided to the update policies 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 policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String billingAccountName, String billingProfileName, PolicyInner parameters, Context context);
+
+ /**
+ * Lists the policies for a customer. This operation is supported only for billing accounts with agreement type
+ * Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param customerName The ID that uniquely identifies a customer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 customer's Policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CustomerPolicyInner getByCustomer(String billingAccountName, String customerName);
+
+ /**
+ * Lists the policies for a customer. This operation is supported only for billing accounts with agreement type
+ * Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param customerName The ID that uniquely identifies a customer.
+ * @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 customer's Policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByCustomerWithResponse(
+ String billingAccountName, String customerName, Context context);
+
+ /**
+ * Updates the policies for a customer. This operation is supported only for billing accounts with agreement type
+ * Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param customerName The ID that uniquely identifies a customer.
+ * @param parameters Request parameters that are provided to the update policies 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 customer's Policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CustomerPolicyInner updateCustomer(String billingAccountName, String customerName, CustomerPolicyInner parameters);
+
+ /**
+ * Updates the policies for a customer. This operation is supported only for billing accounts with agreement type
+ * Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param customerName The ID that uniquely identifies a customer.
+ * @param parameters Request parameters that are provided to the update policies 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 the customer's Policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateCustomerWithResponse(
+ String billingAccountName, String customerName, CustomerPolicyInner parameters, Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/ProductsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/ProductsClient.java
new file mode 100644
index 000000000000..e583283a5a5f
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/ProductsClient.java
@@ -0,0 +1,279 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.fluent.models.ProductInner;
+import com.azure.resourcemanager.billing.fluent.models.ValidateProductTransferEligibilityResultInner;
+import com.azure.resourcemanager.billing.models.TransferProductRequestProperties;
+
+/** An instance of this class provides access to all the operations defined in ProductsClient. */
+public interface ProductsClient {
+ /**
+ * Lists the products for a customer. These don't include products billed based on usage.The operation is supported
+ * only for billing accounts with agreement type Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param customerName The ID that uniquely identifies a customer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of products.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCustomer(String billingAccountName, String customerName);
+
+ /**
+ * Lists the products for a customer. These don't include products billed based on usage.The operation is supported
+ * only for billing accounts with agreement type Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param customerName The ID that uniquely identifies a customer.
+ * @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 list of products.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCustomer(String billingAccountName, String customerName, Context context);
+
+ /**
+ * Lists the products for a billing account. These don't include products billed based on usage. The operation is
+ * supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of products.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingAccount(String billingAccountName);
+
+ /**
+ * Lists the products for a billing account. These don't include products billed based on usage. The operation is
+ * supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param filter May be used to filter by product type. 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
+ * are 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 the list of products.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingAccount(String billingAccountName, String filter, Context context);
+
+ /**
+ * Lists the products for a billing profile. These don't include products billed based on usage. The operation is
+ * supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of products.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName);
+
+ /**
+ * Lists the products for a billing profile. These don't include products billed based on usage. The operation is
+ * supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param filter May be used to filter by product type. 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
+ * are 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 the list of products.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByBillingProfile(
+ String billingAccountName, String billingProfileName, String filter, Context context);
+
+ /**
+ * Lists the products for an invoice section. These don't include products billed based on usage. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of products.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByInvoiceSection(
+ String billingAccountName, String billingProfileName, String invoiceSectionName);
+
+ /**
+ * Lists the products for an invoice section. These don't include products billed based on usage. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param invoiceSectionName The ID that uniquely identifies an invoice section.
+ * @param filter May be used to filter by product type. 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
+ * are 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 the list of products.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByInvoiceSection(
+ String billingAccountName,
+ String billingProfileName,
+ String invoiceSectionName,
+ String filter,
+ Context context);
+
+ /**
+ * Gets a product by ID. The operation is supported only for billing accounts with agreement type Microsoft Customer
+ * Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param productName The ID that uniquely identifies a product.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 product by ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProductInner get(String billingAccountName, String productName);
+
+ /**
+ * Gets a product by ID. The operation is supported only for billing accounts with agreement type Microsoft Customer
+ * Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param productName The ID that uniquely identifies a product.
+ * @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 product by ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String billingAccountName, String productName, Context context);
+
+ /**
+ * Updates the properties of a Product. Currently, auto renew can be updated. The operation is supported only for
+ * billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param productName The ID that uniquely identifies a product.
+ * @param parameters Request parameters that are provided to the update product 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 product.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProductInner update(String billingAccountName, String productName, ProductInner parameters);
+
+ /**
+ * Updates the properties of a Product. Currently, auto renew can be updated. The operation is supported only for
+ * billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param productName The ID that uniquely identifies a product.
+ * @param parameters Request parameters that are provided to the update product 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 product.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String billingAccountName, String productName, ProductInner parameters, Context context);
+
+ /**
+ * Moves a product's charges to a new invoice section. The new invoice section must belong to the same billing
+ * profile as the existing invoice section. This operation is supported only for products that are purchased with a
+ * recurring charge and for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param productName The ID that uniquely identifies a product.
+ * @param parameters Request parameters that are provided to the move product 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 product.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProductInner move(String billingAccountName, String productName, TransferProductRequestProperties parameters);
+
+ /**
+ * Moves a product's charges to a new invoice section. The new invoice section must belong to the same billing
+ * profile as the existing invoice section. This operation is supported only for products that are purchased with a
+ * recurring charge and for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param productName The ID that uniquely identifies a product.
+ * @param parameters Request parameters that are provided to the move product 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 product.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response moveWithResponse(
+ String billingAccountName, String productName, TransferProductRequestProperties parameters, Context context);
+
+ /**
+ * Validates if a product's charges can be moved to a new invoice section. This operation is supported only for
+ * products that are purchased with a recurring charge and for billing accounts with agreement type Microsoft
+ * Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param productName The ID that uniquely identifies a product.
+ * @param parameters Request parameters that are provided to the validate move eligibility 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 the product transfer eligibility validation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ValidateProductTransferEligibilityResultInner validateMove(
+ String billingAccountName, String productName, TransferProductRequestProperties parameters);
+
+ /**
+ * Validates if a product's charges can be moved to a new invoice section. This operation is supported only for
+ * products that are purchased with a recurring charge and for billing accounts with agreement type Microsoft
+ * Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param productName The ID that uniquely identifies a product.
+ * @param parameters Request parameters that are provided to the validate move eligibility 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 result of the product transfer eligibility validation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response validateMoveWithResponse(
+ String billingAccountName, String productName, TransferProductRequestProperties parameters, Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/TransactionsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/TransactionsClient.java
new file mode 100644
index 000000000000..403f959e8a87
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/TransactionsClient.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.billing.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.billing.fluent.models.TransactionInner;
+
+/** An instance of this class provides access to all the operations defined in TransactionsClient. */
+public interface TransactionsClient {
+ /**
+ * Lists the transactions for an invoice. Transactions include purchases, refunds and Azure usage charges.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param invoiceName The ID that uniquely identifies an invoice.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 list of transactions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByInvoice(String billingAccountName, String invoiceName);
+
+ /**
+ * Lists the transactions for an invoice. Transactions include purchases, refunds and Azure usage charges.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param invoiceName The ID that uniquely identifies an invoice.
+ * @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 list of transactions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByInvoice(String billingAccountName, String invoiceName, Context context);
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AgreementInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AgreementInner.java
new file mode 100644
index 000000000000..a054e2418f26
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AgreementInner.java
@@ -0,0 +1,152 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.models.AcceptanceMode;
+import com.azure.resourcemanager.billing.models.Category;
+import com.azure.resourcemanager.billing.models.Participants;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+
+/** An agreement. */
+@JsonFlatten
+@Fluent
+public class AgreementInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AgreementInner.class);
+
+ /*
+ * The URL to download the agreement.
+ */
+ @JsonProperty(value = "properties.agreementLink", access = JsonProperty.Access.WRITE_ONLY)
+ private String agreementLink;
+
+ /*
+ * The category of the agreement signed by a customer.
+ */
+ @JsonProperty(value = "properties.category", access = JsonProperty.Access.WRITE_ONLY)
+ private Category category;
+
+ /*
+ * The mode of acceptance for an agreement.
+ */
+ @JsonProperty(value = "properties.acceptanceMode", access = JsonProperty.Access.WRITE_ONLY)
+ private AcceptanceMode acceptanceMode;
+
+ /*
+ * The date from which the agreement is effective.
+ */
+ @JsonProperty(value = "properties.effectiveDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime effectiveDate;
+
+ /*
+ * The date when the agreement expires.
+ */
+ @JsonProperty(value = "properties.expirationDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime expirationDate;
+
+ /*
+ * The list of participants that participates in acceptance of an
+ * agreement.
+ */
+ @JsonProperty(value = "properties.participants")
+ private List participants;
+
+ /*
+ * The current status of the agreement.
+ */
+ @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
+ private String status;
+
+ /**
+ * Get the agreementLink property: The URL to download the agreement.
+ *
+ * @return the agreementLink value.
+ */
+ public String agreementLink() {
+ return this.agreementLink;
+ }
+
+ /**
+ * Get the category property: The category of the agreement signed by a customer.
+ *
+ * @return the category value.
+ */
+ public Category category() {
+ return this.category;
+ }
+
+ /**
+ * Get the acceptanceMode property: The mode of acceptance for an agreement.
+ *
+ * @return the acceptanceMode value.
+ */
+ public AcceptanceMode acceptanceMode() {
+ return this.acceptanceMode;
+ }
+
+ /**
+ * Get the effectiveDate property: The date from which the agreement is effective.
+ *
+ * @return the effectiveDate value.
+ */
+ public OffsetDateTime effectiveDate() {
+ return this.effectiveDate;
+ }
+
+ /**
+ * Get the expirationDate property: The date when the agreement expires.
+ *
+ * @return the expirationDate value.
+ */
+ public OffsetDateTime expirationDate() {
+ return this.expirationDate;
+ }
+
+ /**
+ * Get the participants property: The list of participants that participates in acceptance of an agreement.
+ *
+ * @return the participants value.
+ */
+ public List participants() {
+ return this.participants;
+ }
+
+ /**
+ * Set the participants property: The list of participants that participates in acceptance of an agreement.
+ *
+ * @param participants the participants value to set.
+ * @return the AgreementInner object itself.
+ */
+ public AgreementInner withParticipants(List participants) {
+ this.participants = participants;
+ return this;
+ }
+
+ /**
+ * Get the status property: The current status of the agreement.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (participants() != null) {
+ participants().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AvailableBalanceInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AvailableBalanceInner.java
new file mode 100644
index 000000000000..eb47ad9c60ea
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AvailableBalanceInner.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.models.Amount;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The latest Azure credit balance. This is the balance available for pay now. */
+@JsonFlatten
+@Immutable
+public class AvailableBalanceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableBalanceInner.class);
+
+ /*
+ * Balance amount.
+ */
+ @JsonProperty(value = "properties.amount", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount amount;
+
+ /**
+ * Get the amount property: Balance amount.
+ *
+ * @return the amount value.
+ */
+ public Amount amount() {
+ return this.amount;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (amount() != null) {
+ amount().validate();
+ }
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingAccountInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingAccountInner.java
new file mode 100644
index 000000000000..f27fe52e5f2e
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingAccountInner.java
@@ -0,0 +1,264 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.models.AccountStatus;
+import com.azure.resourcemanager.billing.models.AccountType;
+import com.azure.resourcemanager.billing.models.AddressDetails;
+import com.azure.resourcemanager.billing.models.AgreementType;
+import com.azure.resourcemanager.billing.models.BillingProfilesOnExpand;
+import com.azure.resourcemanager.billing.models.Department;
+import com.azure.resourcemanager.billing.models.Enrollment;
+import com.azure.resourcemanager.billing.models.EnrollmentAccount;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A billing account. */
+@JsonFlatten
+@Fluent
+public class BillingAccountInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingAccountInner.class);
+
+ /*
+ * The billing account name.
+ */
+ @JsonProperty(value = "properties.displayName")
+ private String displayName;
+
+ /*
+ * The address of the individual or organization that is responsible for
+ * the billing account.
+ */
+ @JsonProperty(value = "properties.soldTo")
+ private AddressDetails soldTo;
+
+ /*
+ * The type of agreement.
+ */
+ @JsonProperty(value = "properties.agreementType", access = JsonProperty.Access.WRITE_ONLY)
+ private AgreementType agreementType;
+
+ /*
+ * The type of customer.
+ */
+ @JsonProperty(value = "properties.accountType", access = JsonProperty.Access.WRITE_ONLY)
+ private AccountType accountType;
+
+ /*
+ * The current status of the billing account.
+ */
+ @JsonProperty(value = "properties.accountStatus", access = JsonProperty.Access.WRITE_ONLY)
+ private AccountStatus accountStatus;
+
+ /*
+ * The billing profiles associated with the billing account. By default
+ * this is not populated, unless it's specified in $expand.
+ */
+ @JsonProperty(value = "properties.billingProfiles")
+ private BillingProfilesOnExpand billingProfiles;
+
+ /*
+ * The details about the associated legacy enrollment. By default this is
+ * not populated, unless it's specified in $expand.
+ */
+ @JsonProperty(value = "properties.enrollmentDetails", access = JsonProperty.Access.WRITE_ONLY)
+ private Enrollment enrollmentDetails;
+
+ /*
+ * The departments associated to the enrollment.
+ */
+ @JsonProperty(value = "properties.departments")
+ private List departments;
+
+ /*
+ * The accounts associated to the enrollment.
+ */
+ @JsonProperty(value = "properties.enrollmentAccounts")
+ private List enrollmentAccounts;
+
+ /*
+ * Indicates whether user has read access to the billing account.
+ */
+ @JsonProperty(value = "properties.hasReadAccess", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean hasReadAccess;
+
+ /**
+ * Get the displayName property: The billing account name.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: The billing account name.
+ *
+ * @param displayName the displayName value to set.
+ * @return the BillingAccountInner object itself.
+ */
+ public BillingAccountInner withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the soldTo property: The address of the individual or organization that is responsible for the billing
+ * account.
+ *
+ * @return the soldTo value.
+ */
+ public AddressDetails soldTo() {
+ return this.soldTo;
+ }
+
+ /**
+ * Set the soldTo property: The address of the individual or organization that is responsible for the billing
+ * account.
+ *
+ * @param soldTo the soldTo value to set.
+ * @return the BillingAccountInner object itself.
+ */
+ public BillingAccountInner withSoldTo(AddressDetails soldTo) {
+ this.soldTo = soldTo;
+ return this;
+ }
+
+ /**
+ * Get the agreementType property: The type of agreement.
+ *
+ * @return the agreementType value.
+ */
+ public AgreementType agreementType() {
+ return this.agreementType;
+ }
+
+ /**
+ * Get the accountType property: The type of customer.
+ *
+ * @return the accountType value.
+ */
+ public AccountType accountType() {
+ return this.accountType;
+ }
+
+ /**
+ * Get the accountStatus property: The current status of the billing account.
+ *
+ * @return the accountStatus value.
+ */
+ public AccountStatus accountStatus() {
+ return this.accountStatus;
+ }
+
+ /**
+ * Get the billingProfiles property: The billing profiles associated with the billing account. By default this is
+ * not populated, unless it's specified in $expand.
+ *
+ * @return the billingProfiles value.
+ */
+ public BillingProfilesOnExpand billingProfiles() {
+ return this.billingProfiles;
+ }
+
+ /**
+ * Set the billingProfiles property: The billing profiles associated with the billing account. By default this is
+ * not populated, unless it's specified in $expand.
+ *
+ * @param billingProfiles the billingProfiles value to set.
+ * @return the BillingAccountInner object itself.
+ */
+ public BillingAccountInner withBillingProfiles(BillingProfilesOnExpand billingProfiles) {
+ this.billingProfiles = billingProfiles;
+ return this;
+ }
+
+ /**
+ * Get the enrollmentDetails property: The details about the associated legacy enrollment. By default this is not
+ * populated, unless it's specified in $expand.
+ *
+ * @return the enrollmentDetails value.
+ */
+ public Enrollment enrollmentDetails() {
+ return this.enrollmentDetails;
+ }
+
+ /**
+ * Get the departments property: The departments associated to the enrollment.
+ *
+ * @return the departments value.
+ */
+ public List departments() {
+ return this.departments;
+ }
+
+ /**
+ * Set the departments property: The departments associated to the enrollment.
+ *
+ * @param departments the departments value to set.
+ * @return the BillingAccountInner object itself.
+ */
+ public BillingAccountInner withDepartments(List departments) {
+ this.departments = departments;
+ return this;
+ }
+
+ /**
+ * Get the enrollmentAccounts property: The accounts associated to the enrollment.
+ *
+ * @return the enrollmentAccounts value.
+ */
+ public List enrollmentAccounts() {
+ return this.enrollmentAccounts;
+ }
+
+ /**
+ * Set the enrollmentAccounts property: The accounts associated to the enrollment.
+ *
+ * @param enrollmentAccounts the enrollmentAccounts value to set.
+ * @return the BillingAccountInner object itself.
+ */
+ public BillingAccountInner withEnrollmentAccounts(List enrollmentAccounts) {
+ this.enrollmentAccounts = enrollmentAccounts;
+ return this;
+ }
+
+ /**
+ * Get the hasReadAccess property: Indicates whether user has read access to the billing account.
+ *
+ * @return the hasReadAccess value.
+ */
+ public Boolean hasReadAccess() {
+ return this.hasReadAccess;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (soldTo() != null) {
+ soldTo().validate();
+ }
+ if (billingProfiles() != null) {
+ billingProfiles().validate();
+ }
+ if (enrollmentDetails() != null) {
+ enrollmentDetails().validate();
+ }
+ if (departments() != null) {
+ departments().forEach(e -> e.validate());
+ }
+ if (enrollmentAccounts() != null) {
+ enrollmentAccounts().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPeriodInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPeriodInner.java
new file mode 100644
index 000000000000..7a5ddd901e39
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPeriodInner.java
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.time.LocalDate;
+import java.util.List;
+
+/** A billing period resource. */
+@JsonFlatten
+@Immutable
+public class BillingPeriodInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingPeriodInner.class);
+
+ /*
+ * The start of the date range covered by the billing period.
+ */
+ @JsonProperty(value = "properties.billingPeriodStartDate", access = JsonProperty.Access.WRITE_ONLY)
+ private LocalDate billingPeriodStartDate;
+
+ /*
+ * The end of the date range covered by the billing period.
+ */
+ @JsonProperty(value = "properties.billingPeriodEndDate", access = JsonProperty.Access.WRITE_ONLY)
+ private LocalDate billingPeriodEndDate;
+
+ /*
+ * Array of invoice ids that associated with.
+ */
+ @JsonProperty(value = "properties.invoiceIds", access = JsonProperty.Access.WRITE_ONLY)
+ private List invoiceIds;
+
+ /**
+ * Get the billingPeriodStartDate property: The start of the date range covered by the billing period.
+ *
+ * @return the billingPeriodStartDate value.
+ */
+ public LocalDate billingPeriodStartDate() {
+ return this.billingPeriodStartDate;
+ }
+
+ /**
+ * Get the billingPeriodEndDate property: The end of the date range covered by the billing period.
+ *
+ * @return the billingPeriodEndDate value.
+ */
+ public LocalDate billingPeriodEndDate() {
+ return this.billingPeriodEndDate;
+ }
+
+ /**
+ * Get the invoiceIds property: Array of invoice ids that associated with.
+ *
+ * @return the invoiceIds value.
+ */
+ public List invoiceIds() {
+ return this.invoiceIds;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPermissionsPropertiesInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPermissionsPropertiesInner.java
new file mode 100644
index 000000000000..b44d405928f9
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPermissionsPropertiesInner.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.billing.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The set of allowed action and not allowed actions a caller has on a billing account. */
+@Immutable
+public final class BillingPermissionsPropertiesInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingPermissionsPropertiesInner.class);
+
+ /*
+ * The set of actions that the caller is allowed to perform.
+ */
+ @JsonProperty(value = "actions", access = JsonProperty.Access.WRITE_ONLY)
+ private List actions;
+
+ /*
+ * The set of actions that the caller is not allowed to perform.
+ */
+ @JsonProperty(value = "notActions", access = JsonProperty.Access.WRITE_ONLY)
+ private List notActions;
+
+ /**
+ * Get the actions property: The set of actions that the caller is allowed to perform.
+ *
+ * @return the actions value.
+ */
+ public List actions() {
+ return this.actions;
+ }
+
+ /**
+ * Get the notActions property: The set of actions that the caller is not allowed to perform.
+ *
+ * @return the notActions value.
+ */
+ public List notActions() {
+ return this.notActions;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingProfileInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingProfileInner.java
new file mode 100644
index 000000000000..f648f9f027b3
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingProfileInner.java
@@ -0,0 +1,371 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.models.AddressDetails;
+import com.azure.resourcemanager.billing.models.AzurePlan;
+import com.azure.resourcemanager.billing.models.BillingProfileStatus;
+import com.azure.resourcemanager.billing.models.BillingRelationshipType;
+import com.azure.resourcemanager.billing.models.IndirectRelationshipInfo;
+import com.azure.resourcemanager.billing.models.InvoiceSectionsOnExpand;
+import com.azure.resourcemanager.billing.models.SpendingLimit;
+import com.azure.resourcemanager.billing.models.StatusReasonCode;
+import com.azure.resourcemanager.billing.models.TargetCloud;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A billing profile. */
+@JsonFlatten
+@Fluent
+public class BillingProfileInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingProfileInner.class);
+
+ /*
+ * The name of the billing profile.
+ */
+ @JsonProperty(value = "properties.displayName")
+ private String displayName;
+
+ /*
+ * The purchase order name that will appear on the invoices generated for
+ * the billing profile.
+ */
+ @JsonProperty(value = "properties.poNumber")
+ private String poNumber;
+
+ /*
+ * Identifies which services and purchases are paid by a billing profile.
+ */
+ @JsonProperty(value = "properties.billingRelationshipType", access = JsonProperty.Access.WRITE_ONLY)
+ private BillingRelationshipType billingRelationshipType;
+
+ /*
+ * Billing address.
+ */
+ @JsonProperty(value = "properties.billTo")
+ private AddressDetails billTo;
+
+ /*
+ * Identifies the billing profile that is linked to another billing profile
+ * in indirect purchase motion.
+ */
+ @JsonProperty(value = "properties.indirectRelationshipInfo", access = JsonProperty.Access.WRITE_ONLY)
+ private IndirectRelationshipInfo indirectRelationshipInfo;
+
+ /*
+ * Flag controlling whether the invoices for the billing profile are sent
+ * through email.
+ */
+ @JsonProperty(value = "properties.invoiceEmailOptIn")
+ private Boolean invoiceEmailOptIn;
+
+ /*
+ * The day of the month when the invoice for the billing profile is
+ * generated.
+ */
+ @JsonProperty(value = "properties.invoiceDay", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer invoiceDay;
+
+ /*
+ * The currency in which the charges for the billing profile are billed.
+ */
+ @JsonProperty(value = "properties.currency", access = JsonProperty.Access.WRITE_ONLY)
+ private String currency;
+
+ /*
+ * Information about the enabled azure plans.
+ */
+ @JsonProperty(value = "properties.enabledAzurePlans")
+ private List enabledAzurePlans;
+
+ /*
+ * The invoice sections associated to the billing profile. By default this
+ * is not populated, unless it's specified in $expand.
+ */
+ @JsonProperty(value = "properties.invoiceSections")
+ private InvoiceSectionsOnExpand invoiceSections;
+
+ /*
+ * Indicates whether user has read access to the billing profile.
+ */
+ @JsonProperty(value = "properties.hasReadAccess", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean hasReadAccess;
+
+ /*
+ * The system generated unique identifier for a billing profile.
+ */
+ @JsonProperty(value = "properties.systemId", access = JsonProperty.Access.WRITE_ONLY)
+ private String systemId;
+
+ /*
+ * The status of the billing profile.
+ */
+ @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
+ private BillingProfileStatus status;
+
+ /*
+ * Reason for the specified billing profile status.
+ */
+ @JsonProperty(value = "properties.statusReasonCode", access = JsonProperty.Access.WRITE_ONLY)
+ private StatusReasonCode statusReasonCode;
+
+ /*
+ * The billing profile spending limit.
+ */
+ @JsonProperty(value = "properties.spendingLimit", access = JsonProperty.Access.WRITE_ONLY)
+ private SpendingLimit spendingLimit;
+
+ /*
+ * Identifies the cloud environments that are associated with a billing
+ * profile. This is a system managed optional field and gets updated as the
+ * billing profile gets associated with accounts in various clouds.
+ */
+ @JsonProperty(value = "properties.targetClouds", access = JsonProperty.Access.WRITE_ONLY)
+ private List targetClouds;
+
+ /**
+ * Get the displayName property: The name of the billing profile.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: The name of the billing profile.
+ *
+ * @param displayName the displayName value to set.
+ * @return the BillingProfileInner object itself.
+ */
+ public BillingProfileInner withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the poNumber property: The purchase order name that will appear on the invoices generated for the billing
+ * profile.
+ *
+ * @return the poNumber value.
+ */
+ public String poNumber() {
+ return this.poNumber;
+ }
+
+ /**
+ * Set the poNumber property: The purchase order name that will appear on the invoices generated for the billing
+ * profile.
+ *
+ * @param poNumber the poNumber value to set.
+ * @return the BillingProfileInner object itself.
+ */
+ public BillingProfileInner withPoNumber(String poNumber) {
+ this.poNumber = poNumber;
+ return this;
+ }
+
+ /**
+ * Get the billingRelationshipType property: Identifies which services and purchases are paid by a billing profile.
+ *
+ * @return the billingRelationshipType value.
+ */
+ public BillingRelationshipType billingRelationshipType() {
+ return this.billingRelationshipType;
+ }
+
+ /**
+ * Get the billTo property: Billing address.
+ *
+ * @return the billTo value.
+ */
+ public AddressDetails billTo() {
+ return this.billTo;
+ }
+
+ /**
+ * Set the billTo property: Billing address.
+ *
+ * @param billTo the billTo value to set.
+ * @return the BillingProfileInner object itself.
+ */
+ public BillingProfileInner withBillTo(AddressDetails billTo) {
+ this.billTo = billTo;
+ return this;
+ }
+
+ /**
+ * Get the indirectRelationshipInfo property: Identifies the billing profile that is linked to another billing
+ * profile in indirect purchase motion.
+ *
+ * @return the indirectRelationshipInfo value.
+ */
+ public IndirectRelationshipInfo indirectRelationshipInfo() {
+ return this.indirectRelationshipInfo;
+ }
+
+ /**
+ * Get the invoiceEmailOptIn property: Flag controlling whether the invoices for the billing profile are sent
+ * through email.
+ *
+ * @return the invoiceEmailOptIn value.
+ */
+ public Boolean invoiceEmailOptIn() {
+ return this.invoiceEmailOptIn;
+ }
+
+ /**
+ * Set the invoiceEmailOptIn property: Flag controlling whether the invoices for the billing profile are sent
+ * through email.
+ *
+ * @param invoiceEmailOptIn the invoiceEmailOptIn value to set.
+ * @return the BillingProfileInner object itself.
+ */
+ public BillingProfileInner withInvoiceEmailOptIn(Boolean invoiceEmailOptIn) {
+ this.invoiceEmailOptIn = invoiceEmailOptIn;
+ return this;
+ }
+
+ /**
+ * Get the invoiceDay property: The day of the month when the invoice for the billing profile is generated.
+ *
+ * @return the invoiceDay value.
+ */
+ public Integer invoiceDay() {
+ return this.invoiceDay;
+ }
+
+ /**
+ * Get the currency property: The currency in which the charges for the billing profile are billed.
+ *
+ * @return the currency value.
+ */
+ public String currency() {
+ return this.currency;
+ }
+
+ /**
+ * Get the enabledAzurePlans property: Information about the enabled azure plans.
+ *
+ * @return the enabledAzurePlans value.
+ */
+ public List enabledAzurePlans() {
+ return this.enabledAzurePlans;
+ }
+
+ /**
+ * Set the enabledAzurePlans property: Information about the enabled azure plans.
+ *
+ * @param enabledAzurePlans the enabledAzurePlans value to set.
+ * @return the BillingProfileInner object itself.
+ */
+ public BillingProfileInner withEnabledAzurePlans(List enabledAzurePlans) {
+ this.enabledAzurePlans = enabledAzurePlans;
+ return this;
+ }
+
+ /**
+ * Get the invoiceSections property: The invoice sections associated to the billing profile. By default this is not
+ * populated, unless it's specified in $expand.
+ *
+ * @return the invoiceSections value.
+ */
+ public InvoiceSectionsOnExpand invoiceSections() {
+ return this.invoiceSections;
+ }
+
+ /**
+ * Set the invoiceSections property: The invoice sections associated to the billing profile. By default this is not
+ * populated, unless it's specified in $expand.
+ *
+ * @param invoiceSections the invoiceSections value to set.
+ * @return the BillingProfileInner object itself.
+ */
+ public BillingProfileInner withInvoiceSections(InvoiceSectionsOnExpand invoiceSections) {
+ this.invoiceSections = invoiceSections;
+ return this;
+ }
+
+ /**
+ * Get the hasReadAccess property: Indicates whether user has read access to the billing profile.
+ *
+ * @return the hasReadAccess value.
+ */
+ public Boolean hasReadAccess() {
+ return this.hasReadAccess;
+ }
+
+ /**
+ * Get the systemId property: The system generated unique identifier for a billing profile.
+ *
+ * @return the systemId value.
+ */
+ public String systemId() {
+ return this.systemId;
+ }
+
+ /**
+ * Get the status property: The status of the billing profile.
+ *
+ * @return the status value.
+ */
+ public BillingProfileStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Get the statusReasonCode property: Reason for the specified billing profile status.
+ *
+ * @return the statusReasonCode value.
+ */
+ public StatusReasonCode statusReasonCode() {
+ return this.statusReasonCode;
+ }
+
+ /**
+ * Get the spendingLimit property: The billing profile spending limit.
+ *
+ * @return the spendingLimit value.
+ */
+ public SpendingLimit spendingLimit() {
+ return this.spendingLimit;
+ }
+
+ /**
+ * Get the targetClouds property: Identifies the cloud environments that are associated with a billing profile. This
+ * is a system managed optional field and gets updated as the billing profile gets associated with accounts in
+ * various clouds.
+ *
+ * @return the targetClouds value.
+ */
+ public List targetClouds() {
+ return this.targetClouds;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (billTo() != null) {
+ billTo().validate();
+ }
+ if (indirectRelationshipInfo() != null) {
+ indirectRelationshipInfo().validate();
+ }
+ if (enabledAzurePlans() != null) {
+ enabledAzurePlans().forEach(e -> e.validate());
+ }
+ if (invoiceSections() != null) {
+ invoiceSections().validate();
+ }
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPropertyInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPropertyInner.java
new file mode 100644
index 000000000000..1632e77f0864
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPropertyInner.java
@@ -0,0 +1,298 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.models.BillingProfileSpendingLimit;
+import com.azure.resourcemanager.billing.models.BillingProfileStatus;
+import com.azure.resourcemanager.billing.models.BillingProfileStatusReasonCode;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A billing property. */
+@JsonFlatten
+@Fluent
+public class BillingPropertyInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingPropertyInner.class);
+
+ /*
+ * The email address on which the account admin gets all Azure
+ * notifications.
+ */
+ @JsonProperty(value = "properties.accountAdminNotificationEmailAddress", access = JsonProperty.Access.WRITE_ONLY)
+ private String accountAdminNotificationEmailAddress;
+
+ /*
+ * The Azure AD tenant ID of the billing account for the subscription.
+ */
+ @JsonProperty(value = "properties.billingTenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingTenantId;
+
+ /*
+ * The ID of the billing account to which the subscription is billed.
+ */
+ @JsonProperty(value = "properties.billingAccountId", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingAccountId;
+
+ /*
+ * The name of the billing account to which the subscription is billed.
+ */
+ @JsonProperty(value = "properties.billingAccountDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingAccountDisplayName;
+
+ /*
+ * The ID of the billing profile to which the subscription is billed.
+ */
+ @JsonProperty(value = "properties.billingProfileId", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingProfileId;
+
+ /*
+ * The name of the billing profile to which the subscription is billed.
+ */
+ @JsonProperty(value = "properties.billingProfileDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingProfileDisplayName;
+
+ /*
+ * The status of the billing profile.
+ */
+ @JsonProperty(value = "properties.billingProfileStatus", access = JsonProperty.Access.WRITE_ONLY)
+ private BillingProfileStatus billingProfileStatus;
+
+ /*
+ * Reason for the specified billing profile status.
+ */
+ @JsonProperty(value = "properties.billingProfileStatusReasonCode", access = JsonProperty.Access.WRITE_ONLY)
+ private BillingProfileStatusReasonCode billingProfileStatusReasonCode;
+
+ /*
+ * The billing profile spending limit.
+ */
+ @JsonProperty(value = "properties.billingProfileSpendingLimit", access = JsonProperty.Access.WRITE_ONLY)
+ private BillingProfileSpendingLimit billingProfileSpendingLimit;
+
+ /*
+ * The cost center applied to the subscription.
+ */
+ @JsonProperty(value = "properties.costCenter")
+ private String costCenter;
+
+ /*
+ * The ID of the invoice section to which the subscription is billed.
+ */
+ @JsonProperty(value = "properties.invoiceSectionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String invoiceSectionId;
+
+ /*
+ * The name of the invoice section to which the subscription is billed.
+ */
+ @JsonProperty(value = "properties.invoiceSectionDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String invoiceSectionDisplayName;
+
+ /*
+ * Indicates whether user is the account admin.
+ */
+ @JsonProperty(value = "properties.isAccountAdmin", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isAccountAdmin;
+
+ /*
+ * The product ID of the Azure plan.
+ */
+ @JsonProperty(value = "properties.productId", access = JsonProperty.Access.WRITE_ONLY)
+ private String productId;
+
+ /*
+ * The product name of the Azure plan.
+ */
+ @JsonProperty(value = "properties.productName", access = JsonProperty.Access.WRITE_ONLY)
+ private String productName;
+
+ /*
+ * The sku ID of the Azure plan for the subscription.
+ */
+ @JsonProperty(value = "properties.skuId", access = JsonProperty.Access.WRITE_ONLY)
+ private String skuId;
+
+ /*
+ * The sku description of the Azure plan for the subscription.
+ */
+ @JsonProperty(value = "properties.skuDescription", access = JsonProperty.Access.WRITE_ONLY)
+ private String skuDescription;
+
+ /**
+ * Get the accountAdminNotificationEmailAddress property: The email address on which the account admin gets all
+ * Azure notifications.
+ *
+ * @return the accountAdminNotificationEmailAddress value.
+ */
+ public String accountAdminNotificationEmailAddress() {
+ return this.accountAdminNotificationEmailAddress;
+ }
+
+ /**
+ * Get the billingTenantId property: The Azure AD tenant ID of the billing account for the subscription.
+ *
+ * @return the billingTenantId value.
+ */
+ public String billingTenantId() {
+ return this.billingTenantId;
+ }
+
+ /**
+ * Get the billingAccountId property: The ID of the billing account to which the subscription is billed.
+ *
+ * @return the billingAccountId value.
+ */
+ public String billingAccountId() {
+ return this.billingAccountId;
+ }
+
+ /**
+ * Get the billingAccountDisplayName property: The name of the billing account to which the subscription is billed.
+ *
+ * @return the billingAccountDisplayName value.
+ */
+ public String billingAccountDisplayName() {
+ return this.billingAccountDisplayName;
+ }
+
+ /**
+ * Get the billingProfileId property: The ID of the billing profile to which the subscription is billed.
+ *
+ * @return the billingProfileId value.
+ */
+ public String billingProfileId() {
+ return this.billingProfileId;
+ }
+
+ /**
+ * Get the billingProfileDisplayName property: The name of the billing profile to which the subscription is billed.
+ *
+ * @return the billingProfileDisplayName value.
+ */
+ public String billingProfileDisplayName() {
+ return this.billingProfileDisplayName;
+ }
+
+ /**
+ * Get the billingProfileStatus property: The status of the billing profile.
+ *
+ * @return the billingProfileStatus value.
+ */
+ public BillingProfileStatus billingProfileStatus() {
+ return this.billingProfileStatus;
+ }
+
+ /**
+ * Get the billingProfileStatusReasonCode property: Reason for the specified billing profile status.
+ *
+ * @return the billingProfileStatusReasonCode value.
+ */
+ public BillingProfileStatusReasonCode billingProfileStatusReasonCode() {
+ return this.billingProfileStatusReasonCode;
+ }
+
+ /**
+ * Get the billingProfileSpendingLimit property: The billing profile spending limit.
+ *
+ * @return the billingProfileSpendingLimit value.
+ */
+ public BillingProfileSpendingLimit billingProfileSpendingLimit() {
+ return this.billingProfileSpendingLimit;
+ }
+
+ /**
+ * Get the costCenter property: The cost center applied to the subscription.
+ *
+ * @return the costCenter value.
+ */
+ public String costCenter() {
+ return this.costCenter;
+ }
+
+ /**
+ * Set the costCenter property: The cost center applied to the subscription.
+ *
+ * @param costCenter the costCenter value to set.
+ * @return the BillingPropertyInner object itself.
+ */
+ public BillingPropertyInner withCostCenter(String costCenter) {
+ this.costCenter = costCenter;
+ return this;
+ }
+
+ /**
+ * Get the invoiceSectionId property: The ID of the invoice section to which the subscription is billed.
+ *
+ * @return the invoiceSectionId value.
+ */
+ public String invoiceSectionId() {
+ return this.invoiceSectionId;
+ }
+
+ /**
+ * Get the invoiceSectionDisplayName property: The name of the invoice section to which the subscription is billed.
+ *
+ * @return the invoiceSectionDisplayName value.
+ */
+ public String invoiceSectionDisplayName() {
+ return this.invoiceSectionDisplayName;
+ }
+
+ /**
+ * Get the isAccountAdmin property: Indicates whether user is the account admin.
+ *
+ * @return the isAccountAdmin value.
+ */
+ public Boolean isAccountAdmin() {
+ return this.isAccountAdmin;
+ }
+
+ /**
+ * Get the productId property: The product ID of the Azure plan.
+ *
+ * @return the productId value.
+ */
+ public String productId() {
+ return this.productId;
+ }
+
+ /**
+ * Get the productName property: The product name of the Azure plan.
+ *
+ * @return the productName value.
+ */
+ public String productName() {
+ return this.productName;
+ }
+
+ /**
+ * Get the skuId property: The sku ID of the Azure plan for the subscription.
+ *
+ * @return the skuId value.
+ */
+ public String skuId() {
+ return this.skuId;
+ }
+
+ /**
+ * Get the skuDescription property: The sku description of the Azure plan for the subscription.
+ *
+ * @return the skuDescription value.
+ */
+ public String skuDescription() {
+ return this.skuDescription;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleAssignmentInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleAssignmentInner.java
new file mode 100644
index 000000000000..a8dc13c2c9a5
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleAssignmentInner.java
@@ -0,0 +1,232 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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;
+
+/** The role assignment. */
+@JsonFlatten
+@Fluent
+public class BillingRoleAssignmentInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingRoleAssignmentInner.class);
+
+ /*
+ * The date the role assignment was created.
+ */
+ @JsonProperty(value = "properties.createdOn", access = JsonProperty.Access.WRITE_ONLY)
+ private String createdOn;
+
+ /*
+ * The tenant Id of the user who created the role assignment.
+ */
+ @JsonProperty(value = "properties.createdByPrincipalTenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private String createdByPrincipalTenantId;
+
+ /*
+ * The principal Id of the user who created the role assignment.
+ */
+ @JsonProperty(value = "properties.createdByPrincipalId", access = JsonProperty.Access.WRITE_ONLY)
+ private String createdByPrincipalId;
+
+ /*
+ * The email address of the user who created the role assignment.
+ */
+ @JsonProperty(value = "properties.createdByUserEmailAddress", access = JsonProperty.Access.WRITE_ONLY)
+ private String createdByUserEmailAddress;
+
+ /*
+ * The principal id of the user to whom the role was assigned.
+ */
+ @JsonProperty(value = "properties.principalId")
+ private String principalId;
+
+ /*
+ * The principal tenant id of the user to whom the role was assigned.
+ */
+ @JsonProperty(value = "properties.principalTenantId")
+ private String principalTenantId;
+
+ /*
+ * The ID of the role definition.
+ */
+ @JsonProperty(value = "properties.roleDefinitionId")
+ private String roleDefinitionId;
+
+ /*
+ * The scope at which the role was assigned.
+ */
+ @JsonProperty(value = "properties.scope", access = JsonProperty.Access.WRITE_ONLY)
+ private String scope;
+
+ /*
+ * The authentication type.
+ */
+ @JsonProperty(value = "properties.userAuthenticationType")
+ private String userAuthenticationType;
+
+ /*
+ * The email address of the user.
+ */
+ @JsonProperty(value = "properties.userEmailAddress")
+ private String userEmailAddress;
+
+ /**
+ * Get the createdOn property: The date the role assignment was created.
+ *
+ * @return the createdOn value.
+ */
+ public String createdOn() {
+ return this.createdOn;
+ }
+
+ /**
+ * Get the createdByPrincipalTenantId property: The tenant Id of the user who created the role assignment.
+ *
+ * @return the createdByPrincipalTenantId value.
+ */
+ public String createdByPrincipalTenantId() {
+ return this.createdByPrincipalTenantId;
+ }
+
+ /**
+ * Get the createdByPrincipalId property: The principal Id of the user who created the role assignment.
+ *
+ * @return the createdByPrincipalId value.
+ */
+ public String createdByPrincipalId() {
+ return this.createdByPrincipalId;
+ }
+
+ /**
+ * Get the createdByUserEmailAddress property: The email address of the user who created the role assignment.
+ *
+ * @return the createdByUserEmailAddress value.
+ */
+ public String createdByUserEmailAddress() {
+ return this.createdByUserEmailAddress;
+ }
+
+ /**
+ * Get the principalId property: The principal id of the user to whom the role was assigned.
+ *
+ * @return the principalId value.
+ */
+ public String principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Set the principalId property: The principal id of the user to whom the role was assigned.
+ *
+ * @param principalId the principalId value to set.
+ * @return the BillingRoleAssignmentInner object itself.
+ */
+ public BillingRoleAssignmentInner withPrincipalId(String principalId) {
+ this.principalId = principalId;
+ return this;
+ }
+
+ /**
+ * Get the principalTenantId property: The principal tenant id of the user to whom the role was assigned.
+ *
+ * @return the principalTenantId value.
+ */
+ public String principalTenantId() {
+ return this.principalTenantId;
+ }
+
+ /**
+ * Set the principalTenantId property: The principal tenant id of the user to whom the role was assigned.
+ *
+ * @param principalTenantId the principalTenantId value to set.
+ * @return the BillingRoleAssignmentInner object itself.
+ */
+ public BillingRoleAssignmentInner withPrincipalTenantId(String principalTenantId) {
+ this.principalTenantId = principalTenantId;
+ return this;
+ }
+
+ /**
+ * Get the roleDefinitionId property: The ID of the role definition.
+ *
+ * @return the roleDefinitionId value.
+ */
+ public String roleDefinitionId() {
+ return this.roleDefinitionId;
+ }
+
+ /**
+ * Set the roleDefinitionId property: The ID of the role definition.
+ *
+ * @param roleDefinitionId the roleDefinitionId value to set.
+ * @return the BillingRoleAssignmentInner object itself.
+ */
+ public BillingRoleAssignmentInner withRoleDefinitionId(String roleDefinitionId) {
+ this.roleDefinitionId = roleDefinitionId;
+ return this;
+ }
+
+ /**
+ * Get the scope property: The scope at which the role was assigned.
+ *
+ * @return the scope value.
+ */
+ public String scope() {
+ return this.scope;
+ }
+
+ /**
+ * Get the userAuthenticationType property: The authentication type.
+ *
+ * @return the userAuthenticationType value.
+ */
+ public String userAuthenticationType() {
+ return this.userAuthenticationType;
+ }
+
+ /**
+ * Set the userAuthenticationType property: The authentication type.
+ *
+ * @param userAuthenticationType the userAuthenticationType value to set.
+ * @return the BillingRoleAssignmentInner object itself.
+ */
+ public BillingRoleAssignmentInner withUserAuthenticationType(String userAuthenticationType) {
+ this.userAuthenticationType = userAuthenticationType;
+ return this;
+ }
+
+ /**
+ * Get the userEmailAddress property: The email address of the user.
+ *
+ * @return the userEmailAddress value.
+ */
+ public String userEmailAddress() {
+ return this.userEmailAddress;
+ }
+
+ /**
+ * Set the userEmailAddress property: The email address of the user.
+ *
+ * @param userEmailAddress the userEmailAddress value to set.
+ * @return the BillingRoleAssignmentInner object itself.
+ */
+ public BillingRoleAssignmentInner withUserEmailAddress(String userEmailAddress) {
+ this.userEmailAddress = userEmailAddress;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleDefinitionInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleDefinitionInner.java
new file mode 100644
index 000000000000..27dbe8fbd512
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleDefinitionInner.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.billing.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.util.List;
+
+/** The properties of a role definition. */
+@JsonFlatten
+@Fluent
+public class BillingRoleDefinitionInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingRoleDefinitionInner.class);
+
+ /*
+ * The role description
+ */
+ @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY)
+ private String description;
+
+ /*
+ * The billingPermissions the role has
+ */
+ @JsonProperty(value = "properties.permissions")
+ private List permissions;
+
+ /*
+ * The name of the role
+ */
+ @JsonProperty(value = "properties.roleName", access = JsonProperty.Access.WRITE_ONLY)
+ private String roleName;
+
+ /**
+ * Get the description property: The role description.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Get the permissions property: The billingPermissions the role has.
+ *
+ * @return the permissions value.
+ */
+ public List permissions() {
+ return this.permissions;
+ }
+
+ /**
+ * Set the permissions property: The billingPermissions the role has.
+ *
+ * @param permissions the permissions value to set.
+ * @return the BillingRoleDefinitionInner object itself.
+ */
+ public BillingRoleDefinitionInner withPermissions(List permissions) {
+ this.permissions = permissions;
+ return this;
+ }
+
+ /**
+ * Get the roleName property: The name of the role.
+ *
+ * @return the roleName value.
+ */
+ public String roleName() {
+ return this.roleName;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (permissions() != null) {
+ permissions().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingSubscriptionInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingSubscriptionInner.java
new file mode 100644
index 000000000000..123ee76d91bd
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingSubscriptionInner.java
@@ -0,0 +1,304 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.models.Amount;
+import com.azure.resourcemanager.billing.models.BillingSubscriptionStatusType;
+import com.azure.resourcemanager.billing.models.Reseller;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.UUID;
+
+/** A billing subscription. */
+@JsonFlatten
+@Fluent
+public class BillingSubscriptionInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingSubscriptionInner.class);
+
+ /*
+ * The name of the subscription.
+ */
+ @JsonProperty(value = "properties.displayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String displayName;
+
+ /*
+ * The ID of the subscription.
+ */
+ @JsonProperty(value = "properties.subscriptionId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID subscriptionId;
+
+ /*
+ * The current billing status of the subscription.
+ */
+ @JsonProperty(value = "properties.subscriptionBillingStatus")
+ private BillingSubscriptionStatusType subscriptionBillingStatus;
+
+ /*
+ * The last month charges.
+ */
+ @JsonProperty(value = "properties.lastMonthCharges", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount lastMonthCharges;
+
+ /*
+ * The current month to date charges.
+ */
+ @JsonProperty(value = "properties.monthToDateCharges", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount monthToDateCharges;
+
+ /*
+ * The ID of the billing profile to which the subscription is billed.
+ */
+ @JsonProperty(value = "properties.billingProfileId", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingProfileId;
+
+ /*
+ * The name of the billing profile to which the subscription is billed.
+ */
+ @JsonProperty(value = "properties.billingProfileDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingProfileDisplayName;
+
+ /*
+ * The cost center applied to the subscription.
+ */
+ @JsonProperty(value = "properties.costCenter")
+ private String costCenter;
+
+ /*
+ * The ID of the customer for whom the subscription was created. The field
+ * is applicable only for Microsoft Partner Agreement billing account.
+ */
+ @JsonProperty(value = "properties.customerId", access = JsonProperty.Access.WRITE_ONLY)
+ private String customerId;
+
+ /*
+ * The name of the customer for whom the subscription was created. The
+ * field is applicable only for Microsoft Partner Agreement billing
+ * account.
+ */
+ @JsonProperty(value = "properties.customerDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String customerDisplayName;
+
+ /*
+ * The ID of the invoice section to which the subscription is billed.
+ */
+ @JsonProperty(value = "properties.invoiceSectionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String invoiceSectionId;
+
+ /*
+ * The name of the invoice section to which the subscription is billed.
+ */
+ @JsonProperty(value = "properties.invoiceSectionDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String invoiceSectionDisplayName;
+
+ /*
+ * Reseller for this subscription.
+ */
+ @JsonProperty(value = "properties.reseller", access = JsonProperty.Access.WRITE_ONLY)
+ private Reseller reseller;
+
+ /*
+ * The sku ID of the Azure plan for the subscription.
+ */
+ @JsonProperty(value = "properties.skuId")
+ private String skuId;
+
+ /*
+ * The sku description of the Azure plan for the subscription.
+ */
+ @JsonProperty(value = "properties.skuDescription", access = JsonProperty.Access.WRITE_ONLY)
+ private String skuDescription;
+
+ /**
+ * Get the displayName property: The name of the subscription.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Get the subscriptionId property: The ID of the subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ public UUID subscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * Get the subscriptionBillingStatus property: The current billing status of the subscription.
+ *
+ * @return the subscriptionBillingStatus value.
+ */
+ public BillingSubscriptionStatusType subscriptionBillingStatus() {
+ return this.subscriptionBillingStatus;
+ }
+
+ /**
+ * Set the subscriptionBillingStatus property: The current billing status of the subscription.
+ *
+ * @param subscriptionBillingStatus the subscriptionBillingStatus value to set.
+ * @return the BillingSubscriptionInner object itself.
+ */
+ public BillingSubscriptionInner withSubscriptionBillingStatus(
+ BillingSubscriptionStatusType subscriptionBillingStatus) {
+ this.subscriptionBillingStatus = subscriptionBillingStatus;
+ return this;
+ }
+
+ /**
+ * Get the lastMonthCharges property: The last month charges.
+ *
+ * @return the lastMonthCharges value.
+ */
+ public Amount lastMonthCharges() {
+ return this.lastMonthCharges;
+ }
+
+ /**
+ * Get the monthToDateCharges property: The current month to date charges.
+ *
+ * @return the monthToDateCharges value.
+ */
+ public Amount monthToDateCharges() {
+ return this.monthToDateCharges;
+ }
+
+ /**
+ * Get the billingProfileId property: The ID of the billing profile to which the subscription is billed.
+ *
+ * @return the billingProfileId value.
+ */
+ public String billingProfileId() {
+ return this.billingProfileId;
+ }
+
+ /**
+ * Get the billingProfileDisplayName property: The name of the billing profile to which the subscription is billed.
+ *
+ * @return the billingProfileDisplayName value.
+ */
+ public String billingProfileDisplayName() {
+ return this.billingProfileDisplayName;
+ }
+
+ /**
+ * Get the costCenter property: The cost center applied to the subscription.
+ *
+ * @return the costCenter value.
+ */
+ public String costCenter() {
+ return this.costCenter;
+ }
+
+ /**
+ * Set the costCenter property: The cost center applied to the subscription.
+ *
+ * @param costCenter the costCenter value to set.
+ * @return the BillingSubscriptionInner object itself.
+ */
+ public BillingSubscriptionInner withCostCenter(String costCenter) {
+ this.costCenter = costCenter;
+ return this;
+ }
+
+ /**
+ * Get the customerId property: The ID of the customer for whom the subscription was created. The field is
+ * applicable only for Microsoft Partner Agreement billing account.
+ *
+ * @return the customerId value.
+ */
+ public String customerId() {
+ return this.customerId;
+ }
+
+ /**
+ * Get the customerDisplayName property: The name of the customer for whom the subscription was created. The field
+ * is applicable only for Microsoft Partner Agreement billing account.
+ *
+ * @return the customerDisplayName value.
+ */
+ public String customerDisplayName() {
+ return this.customerDisplayName;
+ }
+
+ /**
+ * Get the invoiceSectionId property: The ID of the invoice section to which the subscription is billed.
+ *
+ * @return the invoiceSectionId value.
+ */
+ public String invoiceSectionId() {
+ return this.invoiceSectionId;
+ }
+
+ /**
+ * Get the invoiceSectionDisplayName property: The name of the invoice section to which the subscription is billed.
+ *
+ * @return the invoiceSectionDisplayName value.
+ */
+ public String invoiceSectionDisplayName() {
+ return this.invoiceSectionDisplayName;
+ }
+
+ /**
+ * Get the reseller property: Reseller for this subscription.
+ *
+ * @return the reseller value.
+ */
+ public Reseller reseller() {
+ return this.reseller;
+ }
+
+ /**
+ * Get the skuId property: The sku ID of the Azure plan for the subscription.
+ *
+ * @return the skuId value.
+ */
+ public String skuId() {
+ return this.skuId;
+ }
+
+ /**
+ * Set the skuId property: The sku ID of the Azure plan for the subscription.
+ *
+ * @param skuId the skuId value to set.
+ * @return the BillingSubscriptionInner object itself.
+ */
+ public BillingSubscriptionInner withSkuId(String skuId) {
+ this.skuId = skuId;
+ return this;
+ }
+
+ /**
+ * Get the skuDescription property: The sku description of the Azure plan for the subscription.
+ *
+ * @return the skuDescription value.
+ */
+ public String skuDescription() {
+ return this.skuDescription;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (lastMonthCharges() != null) {
+ lastMonthCharges().validate();
+ }
+ if (monthToDateCharges() != null) {
+ monthToDateCharges().validate();
+ }
+ if (reseller() != null) {
+ reseller().validate();
+ }
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerInner.java
new file mode 100644
index 000000000000..ca617e779cf5
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerInner.java
@@ -0,0 +1,145 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.models.AzurePlan;
+import com.azure.resourcemanager.billing.models.Reseller;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A partner's customer. */
+@JsonFlatten
+@Fluent
+public class CustomerInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomerInner.class);
+
+ /*
+ * The ID of the billing profile for the invoice section.
+ */
+ @JsonProperty(value = "properties.billingProfileId", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingProfileId;
+
+ /*
+ * The name of the billing profile for the invoice section.
+ */
+ @JsonProperty(value = "properties.billingProfileDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingProfileDisplayName;
+
+ /*
+ * The name of the customer.
+ */
+ @JsonProperty(value = "properties.displayName")
+ private String displayName;
+
+ /*
+ * Azure plans enabled for the customer.
+ */
+ @JsonProperty(value = "properties.enabledAzurePlans")
+ private List enabledAzurePlans;
+
+ /*
+ * The list of resellers for which an Azure plan is enabled for the
+ * customer.
+ */
+ @JsonProperty(value = "properties.resellers")
+ private List resellers;
+
+ /**
+ * Get the billingProfileId property: The ID of the billing profile for the invoice section.
+ *
+ * @return the billingProfileId value.
+ */
+ public String billingProfileId() {
+ return this.billingProfileId;
+ }
+
+ /**
+ * Get the billingProfileDisplayName property: The name of the billing profile for the invoice section.
+ *
+ * @return the billingProfileDisplayName value.
+ */
+ public String billingProfileDisplayName() {
+ return this.billingProfileDisplayName;
+ }
+
+ /**
+ * Get the displayName property: The name of the customer.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: The name of the customer.
+ *
+ * @param displayName the displayName value to set.
+ * @return the CustomerInner object itself.
+ */
+ public CustomerInner withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the enabledAzurePlans property: Azure plans enabled for the customer.
+ *
+ * @return the enabledAzurePlans value.
+ */
+ public List enabledAzurePlans() {
+ return this.enabledAzurePlans;
+ }
+
+ /**
+ * Set the enabledAzurePlans property: Azure plans enabled for the customer.
+ *
+ * @param enabledAzurePlans the enabledAzurePlans value to set.
+ * @return the CustomerInner object itself.
+ */
+ public CustomerInner withEnabledAzurePlans(List enabledAzurePlans) {
+ this.enabledAzurePlans = enabledAzurePlans;
+ return this;
+ }
+
+ /**
+ * Get the resellers property: The list of resellers for which an Azure plan is enabled for the customer.
+ *
+ * @return the resellers value.
+ */
+ public List resellers() {
+ return this.resellers;
+ }
+
+ /**
+ * Set the resellers property: The list of resellers for which an Azure plan is enabled for the customer.
+ *
+ * @param resellers the resellers value to set.
+ * @return the CustomerInner object itself.
+ */
+ public CustomerInner withResellers(List resellers) {
+ this.resellers = resellers;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (enabledAzurePlans() != null) {
+ enabledAzurePlans().forEach(e -> e.validate());
+ }
+ if (resellers() != null) {
+ resellers().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerPolicyInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerPolicyInner.java
new file mode 100644
index 000000000000..1afee3cd7082
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerPolicyInner.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.models.ViewCharges;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The customer's Policy. */
+@JsonFlatten
+@Fluent
+public class CustomerPolicyInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomerPolicyInner.class);
+
+ /*
+ * The policy that controls whether the users in customer's organization
+ * can view charges at pay-as-you-go prices.
+ */
+ @JsonProperty(value = "properties.viewCharges")
+ private ViewCharges viewCharges;
+
+ /**
+ * Get the viewCharges property: The policy that controls whether the users in customer's organization can view
+ * charges at pay-as-you-go prices.
+ *
+ * @return the viewCharges value.
+ */
+ public ViewCharges viewCharges() {
+ return this.viewCharges;
+ }
+
+ /**
+ * Set the viewCharges property: The policy that controls whether the users in customer's organization can view
+ * charges at pay-as-you-go prices.
+ *
+ * @param viewCharges the viewCharges value to set.
+ * @return the CustomerPolicyInner object itself.
+ */
+ public CustomerPolicyInner withViewCharges(ViewCharges viewCharges) {
+ this.viewCharges = viewCharges;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/DownloadUrlInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/DownloadUrlInner.java
new file mode 100644
index 000000000000..f8b4bc915aad
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/DownloadUrlInner.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.billing.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** A secure URL that can be used to download a an entity until the URL expires. */
+@Immutable
+public final class DownloadUrlInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DownloadUrlInner.class);
+
+ /*
+ * The time in UTC when the download URL will expire.
+ */
+ @JsonProperty(value = "expiryTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime expiryTime;
+
+ /*
+ * The URL to the PDF file.
+ */
+ @JsonProperty(value = "url", access = JsonProperty.Access.WRITE_ONLY)
+ private String url;
+
+ /**
+ * Get the expiryTime property: The time in UTC when the download URL will expire.
+ *
+ * @return the expiryTime value.
+ */
+ public OffsetDateTime expiryTime() {
+ return this.expiryTime;
+ }
+
+ /**
+ * Get the url property: The URL to the PDF file.
+ *
+ * @return the url value.
+ */
+ public String url() {
+ return this.url;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/EnrollmentAccountSummaryInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/EnrollmentAccountSummaryInner.java
new file mode 100644
index 000000000000..7a6232e5373e
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/EnrollmentAccountSummaryInner.java
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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;
+
+/** An enrollment account resource. */
+@JsonFlatten
+@Immutable
+public class EnrollmentAccountSummaryInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(EnrollmentAccountSummaryInner.class);
+
+ /*
+ * The account owner's principal name.
+ */
+ @JsonProperty(value = "properties.principalName", access = JsonProperty.Access.WRITE_ONLY)
+ private String principalName;
+
+ /**
+ * Get the principalName property: The account owner's principal name.
+ *
+ * @return the principalName value.
+ */
+ public String principalName() {
+ return this.principalName;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InstructionInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InstructionInner.java
new file mode 100644
index 000000000000..7ca04a46c771
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InstructionInner.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.billing.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.time.OffsetDateTime;
+
+/** An instruction. */
+@JsonFlatten
+@Fluent
+public class InstructionInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(InstructionInner.class);
+
+ /*
+ * The amount budgeted for this billing instruction.
+ */
+ @JsonProperty(value = "properties.amount")
+ private Float amount;
+
+ /*
+ * The date this billing instruction goes into effect.
+ */
+ @JsonProperty(value = "properties.startDate")
+ private OffsetDateTime startDate;
+
+ /*
+ * The date this billing instruction is no longer in effect.
+ */
+ @JsonProperty(value = "properties.endDate")
+ private OffsetDateTime endDate;
+
+ /*
+ * The date this billing instruction was created.
+ */
+ @JsonProperty(value = "properties.creationDate")
+ private OffsetDateTime creationDate;
+
+ /**
+ * Get the amount property: The amount budgeted for this billing instruction.
+ *
+ * @return the amount value.
+ */
+ public Float amount() {
+ return this.amount;
+ }
+
+ /**
+ * Set the amount property: The amount budgeted for this billing instruction.
+ *
+ * @param amount the amount value to set.
+ * @return the InstructionInner object itself.
+ */
+ public InstructionInner withAmount(Float amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * Get the startDate property: The date this billing instruction goes into effect.
+ *
+ * @return the startDate value.
+ */
+ public OffsetDateTime startDate() {
+ return this.startDate;
+ }
+
+ /**
+ * Set the startDate property: The date this billing instruction goes into effect.
+ *
+ * @param startDate the startDate value to set.
+ * @return the InstructionInner object itself.
+ */
+ public InstructionInner withStartDate(OffsetDateTime startDate) {
+ this.startDate = startDate;
+ return this;
+ }
+
+ /**
+ * Get the endDate property: The date this billing instruction is no longer in effect.
+ *
+ * @return the endDate value.
+ */
+ public OffsetDateTime endDate() {
+ return this.endDate;
+ }
+
+ /**
+ * Set the endDate property: The date this billing instruction is no longer in effect.
+ *
+ * @param endDate the endDate value to set.
+ * @return the InstructionInner object itself.
+ */
+ public InstructionInner withEndDate(OffsetDateTime endDate) {
+ this.endDate = endDate;
+ return this;
+ }
+
+ /**
+ * Get the creationDate property: The date this billing instruction was created.
+ *
+ * @return the creationDate value.
+ */
+ public OffsetDateTime creationDate() {
+ return this.creationDate;
+ }
+
+ /**
+ * Set the creationDate property: The date this billing instruction was created.
+ *
+ * @param creationDate the creationDate value to set.
+ * @return the InstructionInner object itself.
+ */
+ public InstructionInner withCreationDate(OffsetDateTime creationDate) {
+ this.creationDate = creationDate;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceInner.java
new file mode 100644
index 000000000000..ccfc25617326
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceInner.java
@@ -0,0 +1,475 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.models.Amount;
+import com.azure.resourcemanager.billing.models.Document;
+import com.azure.resourcemanager.billing.models.InvoiceDocumentType;
+import com.azure.resourcemanager.billing.models.InvoiceStatus;
+import com.azure.resourcemanager.billing.models.InvoiceType;
+import com.azure.resourcemanager.billing.models.PaymentProperties;
+import com.azure.resourcemanager.billing.models.RebillDetails;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+import java.util.Map;
+
+/** An invoice. */
+@JsonFlatten
+@Immutable
+public class InvoiceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(InvoiceInner.class);
+
+ /*
+ * The due date for the invoice.
+ */
+ @JsonProperty(value = "properties.dueDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime dueDate;
+
+ /*
+ * The date when the invoice was generated.
+ */
+ @JsonProperty(value = "properties.invoiceDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime invoiceDate;
+
+ /*
+ * The current status of the invoice.
+ */
+ @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
+ private InvoiceStatus status;
+
+ /*
+ * The amount due as of now.
+ */
+ @JsonProperty(value = "properties.amountDue", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount amountDue;
+
+ /*
+ * The amount of Azure prepayment applied to the charges. This field is
+ * applicable to billing accounts with agreement type Microsoft Customer
+ * Agreement.
+ */
+ @JsonProperty(value = "properties.azurePrepaymentApplied", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount azurePrepaymentApplied;
+
+ /*
+ * The total charges for the invoice billing period.
+ */
+ @JsonProperty(value = "properties.billedAmount", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount billedAmount;
+
+ /*
+ * The total refund for returns and cancellations during the invoice
+ * billing period. This field is applicable to billing accounts with
+ * agreement type Microsoft Customer Agreement.
+ */
+ @JsonProperty(value = "properties.creditAmount", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount creditAmount;
+
+ /*
+ * The amount of free Azure credits applied to the charges. This field is
+ * applicable to billing accounts with agreement type Microsoft Customer
+ * Agreement.
+ */
+ @JsonProperty(value = "properties.freeAzureCreditApplied", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount freeAzureCreditApplied;
+
+ /*
+ * The pre-tax amount due. This field is applicable to billing accounts
+ * with agreement type Microsoft Customer Agreement.
+ */
+ @JsonProperty(value = "properties.subTotal", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount subTotal;
+
+ /*
+ * The amount of tax charged for the billing period. This field is
+ * applicable to billing accounts with agreement type Microsoft Customer
+ * Agreement.
+ */
+ @JsonProperty(value = "properties.taxAmount", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount taxAmount;
+
+ /*
+ * The amount due when the invoice was generated. This field is applicable
+ * to billing accounts with agreement type Microsoft Customer Agreement.
+ */
+ @JsonProperty(value = "properties.totalAmount", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount totalAmount;
+
+ /*
+ * The start date of the billing period for which the invoice is generated.
+ */
+ @JsonProperty(value = "properties.invoicePeriodStartDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime invoicePeriodStartDate;
+
+ /*
+ * The end date of the billing period for which the invoice is generated.
+ */
+ @JsonProperty(value = "properties.invoicePeriodEndDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime invoicePeriodEndDate;
+
+ /*
+ * Invoice type.
+ */
+ @JsonProperty(value = "properties.invoiceType", access = JsonProperty.Access.WRITE_ONLY)
+ private InvoiceType invoiceType;
+
+ /*
+ * Specifies if the invoice is generated as part of monthly invoicing cycle
+ * or not. This field is applicable to billing accounts with agreement type
+ * Microsoft Customer Agreement.
+ */
+ @JsonProperty(value = "properties.isMonthlyInvoice", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isMonthlyInvoice;
+
+ /*
+ * The ID of the billing profile for which the invoice is generated.
+ */
+ @JsonProperty(value = "properties.billingProfileId", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingProfileId;
+
+ /*
+ * The name of the billing profile for which the invoice is generated.
+ */
+ @JsonProperty(value = "properties.billingProfileDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingProfileDisplayName;
+
+ /*
+ * An optional purchase order number for the invoice.
+ */
+ @JsonProperty(value = "properties.purchaseOrderNumber", access = JsonProperty.Access.WRITE_ONLY)
+ private String purchaseOrderNumber;
+
+ /*
+ * List of documents available to download such as invoice and tax receipt.
+ */
+ @JsonProperty(value = "properties.documents", access = JsonProperty.Access.WRITE_ONLY)
+ private List documents;
+
+ /*
+ * List of payments.
+ */
+ @JsonProperty(value = "properties.payments", access = JsonProperty.Access.WRITE_ONLY)
+ private List payments;
+
+ /*
+ * Rebill details for an invoice.
+ */
+ @JsonProperty(value = "properties.rebillDetails", access = JsonProperty.Access.WRITE_ONLY)
+ private Map rebillDetails;
+
+ /*
+ * The type of the document.
+ */
+ @JsonProperty(value = "properties.documentType", access = JsonProperty.Access.WRITE_ONLY)
+ private InvoiceDocumentType documentType;
+
+ /*
+ * The Id of the active invoice which is originally billed after this
+ * invoice was voided. This field is applicable to the void invoices only.
+ */
+ @JsonProperty(value = "properties.billedDocumentId", access = JsonProperty.Access.WRITE_ONLY)
+ private String billedDocumentId;
+
+ /*
+ * The Id of the invoice which got voided and this credit note was issued
+ * as a result. This field is applicable to the credit notes only.
+ */
+ @JsonProperty(value = "properties.creditForDocumentId", access = JsonProperty.Access.WRITE_ONLY)
+ private String creditForDocumentId;
+
+ /*
+ * The ID of the subscription for which the invoice is generated.
+ */
+ @JsonProperty(value = "properties.subscriptionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String subscriptionId;
+
+ /**
+ * Get the dueDate property: The due date for the invoice.
+ *
+ * @return the dueDate value.
+ */
+ public OffsetDateTime dueDate() {
+ return this.dueDate;
+ }
+
+ /**
+ * Get the invoiceDate property: The date when the invoice was generated.
+ *
+ * @return the invoiceDate value.
+ */
+ public OffsetDateTime invoiceDate() {
+ return this.invoiceDate;
+ }
+
+ /**
+ * Get the status property: The current status of the invoice.
+ *
+ * @return the status value.
+ */
+ public InvoiceStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Get the amountDue property: The amount due as of now.
+ *
+ * @return the amountDue value.
+ */
+ public Amount amountDue() {
+ return this.amountDue;
+ }
+
+ /**
+ * Get the azurePrepaymentApplied property: The amount of Azure prepayment applied to the charges. This field is
+ * applicable to billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @return the azurePrepaymentApplied value.
+ */
+ public Amount azurePrepaymentApplied() {
+ return this.azurePrepaymentApplied;
+ }
+
+ /**
+ * Get the billedAmount property: The total charges for the invoice billing period.
+ *
+ * @return the billedAmount value.
+ */
+ public Amount billedAmount() {
+ return this.billedAmount;
+ }
+
+ /**
+ * Get the creditAmount property: The total refund for returns and cancellations during the invoice billing period.
+ * This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @return the creditAmount value.
+ */
+ public Amount creditAmount() {
+ return this.creditAmount;
+ }
+
+ /**
+ * Get the freeAzureCreditApplied property: The amount of free Azure credits applied to the charges. This field is
+ * applicable to billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @return the freeAzureCreditApplied value.
+ */
+ public Amount freeAzureCreditApplied() {
+ return this.freeAzureCreditApplied;
+ }
+
+ /**
+ * Get the subTotal property: The pre-tax amount due. This field is applicable to billing accounts with agreement
+ * type Microsoft Customer Agreement.
+ *
+ * @return the subTotal value.
+ */
+ public Amount subTotal() {
+ return this.subTotal;
+ }
+
+ /**
+ * Get the taxAmount property: The amount of tax charged for the billing period. This field is applicable to billing
+ * accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @return the taxAmount value.
+ */
+ public Amount taxAmount() {
+ return this.taxAmount;
+ }
+
+ /**
+ * Get the totalAmount property: The amount due when the invoice was generated. This field is applicable to billing
+ * accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @return the totalAmount value.
+ */
+ public Amount totalAmount() {
+ return this.totalAmount;
+ }
+
+ /**
+ * Get the invoicePeriodStartDate property: The start date of the billing period for which the invoice is generated.
+ *
+ * @return the invoicePeriodStartDate value.
+ */
+ public OffsetDateTime invoicePeriodStartDate() {
+ return this.invoicePeriodStartDate;
+ }
+
+ /**
+ * Get the invoicePeriodEndDate property: The end date of the billing period for which the invoice is generated.
+ *
+ * @return the invoicePeriodEndDate value.
+ */
+ public OffsetDateTime invoicePeriodEndDate() {
+ return this.invoicePeriodEndDate;
+ }
+
+ /**
+ * Get the invoiceType property: Invoice type.
+ *
+ * @return the invoiceType value.
+ */
+ public InvoiceType invoiceType() {
+ return this.invoiceType;
+ }
+
+ /**
+ * Get the isMonthlyInvoice property: Specifies if the invoice is generated as part of monthly invoicing cycle or
+ * not. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @return the isMonthlyInvoice value.
+ */
+ public Boolean isMonthlyInvoice() {
+ return this.isMonthlyInvoice;
+ }
+
+ /**
+ * Get the billingProfileId property: The ID of the billing profile for which the invoice is generated.
+ *
+ * @return the billingProfileId value.
+ */
+ public String billingProfileId() {
+ return this.billingProfileId;
+ }
+
+ /**
+ * Get the billingProfileDisplayName property: The name of the billing profile for which the invoice is generated.
+ *
+ * @return the billingProfileDisplayName value.
+ */
+ public String billingProfileDisplayName() {
+ return this.billingProfileDisplayName;
+ }
+
+ /**
+ * Get the purchaseOrderNumber property: An optional purchase order number for the invoice.
+ *
+ * @return the purchaseOrderNumber value.
+ */
+ public String purchaseOrderNumber() {
+ return this.purchaseOrderNumber;
+ }
+
+ /**
+ * Get the documents property: List of documents available to download such as invoice and tax receipt.
+ *
+ * @return the documents value.
+ */
+ public List documents() {
+ return this.documents;
+ }
+
+ /**
+ * Get the payments property: List of payments.
+ *
+ * @return the payments value.
+ */
+ public List payments() {
+ return this.payments;
+ }
+
+ /**
+ * Get the rebillDetails property: Rebill details for an invoice.
+ *
+ * @return the rebillDetails value.
+ */
+ public Map rebillDetails() {
+ return this.rebillDetails;
+ }
+
+ /**
+ * Get the documentType property: The type of the document.
+ *
+ * @return the documentType value.
+ */
+ public InvoiceDocumentType documentType() {
+ return this.documentType;
+ }
+
+ /**
+ * Get the billedDocumentId property: The Id of the active invoice which is originally billed after this invoice was
+ * voided. This field is applicable to the void invoices only.
+ *
+ * @return the billedDocumentId value.
+ */
+ public String billedDocumentId() {
+ return this.billedDocumentId;
+ }
+
+ /**
+ * Get the creditForDocumentId property: The Id of the invoice which got voided and this credit note was issued as a
+ * result. This field is applicable to the credit notes only.
+ *
+ * @return the creditForDocumentId value.
+ */
+ public String creditForDocumentId() {
+ return this.creditForDocumentId;
+ }
+
+ /**
+ * Get the subscriptionId property: The ID of the subscription for which the invoice is generated.
+ *
+ * @return the subscriptionId value.
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (amountDue() != null) {
+ amountDue().validate();
+ }
+ if (azurePrepaymentApplied() != null) {
+ azurePrepaymentApplied().validate();
+ }
+ if (billedAmount() != null) {
+ billedAmount().validate();
+ }
+ if (creditAmount() != null) {
+ creditAmount().validate();
+ }
+ if (freeAzureCreditApplied() != null) {
+ freeAzureCreditApplied().validate();
+ }
+ if (subTotal() != null) {
+ subTotal().validate();
+ }
+ if (taxAmount() != null) {
+ taxAmount().validate();
+ }
+ if (totalAmount() != null) {
+ totalAmount().validate();
+ }
+ if (documents() != null) {
+ documents().forEach(e -> e.validate());
+ }
+ if (payments() != null) {
+ payments().forEach(e -> e.validate());
+ }
+ if (rebillDetails() != null) {
+ rebillDetails()
+ .values()
+ .forEach(
+ e -> {
+ if (e != null) {
+ e.validate();
+ }
+ });
+ }
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceSectionInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceSectionInner.java
new file mode 100644
index 000000000000..683a8e10f868
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceSectionInner.java
@@ -0,0 +1,131 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.models.InvoiceSectionState;
+import com.azure.resourcemanager.billing.models.TargetCloud;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** An invoice section. */
+@JsonFlatten
+@Fluent
+public class InvoiceSectionInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(InvoiceSectionInner.class);
+
+ /*
+ * The name of the invoice section.
+ */
+ @JsonProperty(value = "properties.displayName")
+ private String displayName;
+
+ /*
+ * Dictionary of metadata associated with the invoice section.
+ */
+ @JsonProperty(value = "properties.labels")
+ private Map labels;
+
+ /*
+ * Identifies the state of an invoice section.
+ */
+ @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY)
+ private InvoiceSectionState state;
+
+ /*
+ * The system generated unique identifier for an invoice section.
+ */
+ @JsonProperty(value = "properties.systemId", access = JsonProperty.Access.WRITE_ONLY)
+ private String systemId;
+
+ /*
+ * Identifies the cloud environments that are associated with an invoice
+ * section. This is a system managed optional field and gets updated as the
+ * invoice section gets associated with accounts in various clouds.
+ */
+ @JsonProperty(value = "properties.targetCloud", access = JsonProperty.Access.WRITE_ONLY)
+ private TargetCloud targetCloud;
+
+ /**
+ * Get the displayName property: The name of the invoice section.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: The name of the invoice section.
+ *
+ * @param displayName the displayName value to set.
+ * @return the InvoiceSectionInner object itself.
+ */
+ public InvoiceSectionInner withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the labels property: Dictionary of metadata associated with the invoice section.
+ *
+ * @return the labels value.
+ */
+ public Map labels() {
+ return this.labels;
+ }
+
+ /**
+ * Set the labels property: Dictionary of metadata associated with the invoice section.
+ *
+ * @param labels the labels value to set.
+ * @return the InvoiceSectionInner object itself.
+ */
+ public InvoiceSectionInner withLabels(Map labels) {
+ this.labels = labels;
+ return this;
+ }
+
+ /**
+ * Get the state property: Identifies the state of an invoice section.
+ *
+ * @return the state value.
+ */
+ public InvoiceSectionState state() {
+ return this.state;
+ }
+
+ /**
+ * Get the systemId property: The system generated unique identifier for an invoice section.
+ *
+ * @return the systemId value.
+ */
+ public String systemId() {
+ return this.systemId;
+ }
+
+ /**
+ * Get the targetCloud property: Identifies the cloud environments that are associated with an invoice section. This
+ * is a system managed optional field and gets updated as the invoice section gets associated with accounts in
+ * various clouds.
+ *
+ * @return the targetCloud value.
+ */
+ public TargetCloud targetCloud() {
+ return this.targetCloud;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceSectionWithCreateSubPermissionInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceSectionWithCreateSubPermissionInner.java
new file mode 100644
index 000000000000..b704b84fb1e8
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceSectionWithCreateSubPermissionInner.java
@@ -0,0 +1,193 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.billing.models.AzurePlan;
+import com.azure.resourcemanager.billing.models.BillingProfileStatus;
+import com.azure.resourcemanager.billing.models.SpendingLimitForBillingProfile;
+import com.azure.resourcemanager.billing.models.StatusReasonCodeForBillingProfile;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Invoice section properties with create subscription permission. */
+@Fluent
+public final class InvoiceSectionWithCreateSubPermissionInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(InvoiceSectionWithCreateSubPermissionInner.class);
+
+ /*
+ * The ID of the invoice section.
+ */
+ @JsonProperty(value = "invoiceSectionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String invoiceSectionId;
+
+ /*
+ * The name of the invoice section.
+ */
+ @JsonProperty(value = "invoiceSectionDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String invoiceSectionDisplayName;
+
+ /*
+ * The system generated unique identifier for an invoice section.
+ */
+ @JsonProperty(value = "invoiceSectionSystemId", access = JsonProperty.Access.WRITE_ONLY)
+ private String invoiceSectionSystemId;
+
+ /*
+ * The ID of the billing profile for the invoice section.
+ */
+ @JsonProperty(value = "billingProfileId", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingProfileId;
+
+ /*
+ * The name of the billing profile for the invoice section.
+ */
+ @JsonProperty(value = "billingProfileDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingProfileDisplayName;
+
+ /*
+ * The status of the billing profile.
+ */
+ @JsonProperty(value = "billingProfileStatus", access = JsonProperty.Access.WRITE_ONLY)
+ private BillingProfileStatus billingProfileStatus;
+
+ /*
+ * Reason for the specified billing profile status.
+ */
+ @JsonProperty(value = "billingProfileStatusReasonCode", access = JsonProperty.Access.WRITE_ONLY)
+ private StatusReasonCodeForBillingProfile billingProfileStatusReasonCode;
+
+ /*
+ * The billing profile spending limit.
+ */
+ @JsonProperty(value = "billingProfileSpendingLimit", access = JsonProperty.Access.WRITE_ONLY)
+ private SpendingLimitForBillingProfile billingProfileSpendingLimit;
+
+ /*
+ * The system generated unique identifier for a billing profile.
+ */
+ @JsonProperty(value = "billingProfileSystemId", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingProfileSystemId;
+
+ /*
+ * Enabled azure plans for the associated billing profile.
+ */
+ @JsonProperty(value = "enabledAzurePlans")
+ private List enabledAzurePlans;
+
+ /**
+ * Get the invoiceSectionId property: The ID of the invoice section.
+ *
+ * @return the invoiceSectionId value.
+ */
+ public String invoiceSectionId() {
+ return this.invoiceSectionId;
+ }
+
+ /**
+ * Get the invoiceSectionDisplayName property: The name of the invoice section.
+ *
+ * @return the invoiceSectionDisplayName value.
+ */
+ public String invoiceSectionDisplayName() {
+ return this.invoiceSectionDisplayName;
+ }
+
+ /**
+ * Get the invoiceSectionSystemId property: The system generated unique identifier for an invoice section.
+ *
+ * @return the invoiceSectionSystemId value.
+ */
+ public String invoiceSectionSystemId() {
+ return this.invoiceSectionSystemId;
+ }
+
+ /**
+ * Get the billingProfileId property: The ID of the billing profile for the invoice section.
+ *
+ * @return the billingProfileId value.
+ */
+ public String billingProfileId() {
+ return this.billingProfileId;
+ }
+
+ /**
+ * Get the billingProfileDisplayName property: The name of the billing profile for the invoice section.
+ *
+ * @return the billingProfileDisplayName value.
+ */
+ public String billingProfileDisplayName() {
+ return this.billingProfileDisplayName;
+ }
+
+ /**
+ * Get the billingProfileStatus property: The status of the billing profile.
+ *
+ * @return the billingProfileStatus value.
+ */
+ public BillingProfileStatus billingProfileStatus() {
+ return this.billingProfileStatus;
+ }
+
+ /**
+ * Get the billingProfileStatusReasonCode property: Reason for the specified billing profile status.
+ *
+ * @return the billingProfileStatusReasonCode value.
+ */
+ public StatusReasonCodeForBillingProfile billingProfileStatusReasonCode() {
+ return this.billingProfileStatusReasonCode;
+ }
+
+ /**
+ * Get the billingProfileSpendingLimit property: The billing profile spending limit.
+ *
+ * @return the billingProfileSpendingLimit value.
+ */
+ public SpendingLimitForBillingProfile billingProfileSpendingLimit() {
+ return this.billingProfileSpendingLimit;
+ }
+
+ /**
+ * Get the billingProfileSystemId property: The system generated unique identifier for a billing profile.
+ *
+ * @return the billingProfileSystemId value.
+ */
+ public String billingProfileSystemId() {
+ return this.billingProfileSystemId;
+ }
+
+ /**
+ * Get the enabledAzurePlans property: Enabled azure plans for the associated billing profile.
+ *
+ * @return the enabledAzurePlans value.
+ */
+ public List enabledAzurePlans() {
+ return this.enabledAzurePlans;
+ }
+
+ /**
+ * Set the enabledAzurePlans property: Enabled azure plans for the associated billing profile.
+ *
+ * @param enabledAzurePlans the enabledAzurePlans value to set.
+ * @return the InvoiceSectionWithCreateSubPermissionInner object itself.
+ */
+ public InvoiceSectionWithCreateSubPermissionInner withEnabledAzurePlans(List enabledAzurePlans) {
+ this.enabledAzurePlans = enabledAzurePlans;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (enabledAzurePlans() != null) {
+ enabledAzurePlans().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/OperationInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..c157c8d508c0
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/OperationInner.java
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.billing.models.OperationDisplay;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A Billing REST API operation. */
+@Fluent
+public final class OperationInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
+
+ /*
+ * 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 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/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/PolicyInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/PolicyInner.java
new file mode 100644
index 000000000000..818b9fd08dfb
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/PolicyInner.java
@@ -0,0 +1,117 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.models.MarketplacePurchasesPolicy;
+import com.azure.resourcemanager.billing.models.ReservationPurchasesPolicy;
+import com.azure.resourcemanager.billing.models.ViewChargesPolicy;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A policy. */
+@JsonFlatten
+@Fluent
+public class PolicyInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PolicyInner.class);
+
+ /*
+ * The policy that controls whether Azure marketplace purchases are allowed
+ * for a billing profile.
+ */
+ @JsonProperty(value = "properties.marketplacePurchases")
+ private MarketplacePurchasesPolicy marketplacePurchases;
+
+ /*
+ * The policy that controls whether Azure reservation purchases are allowed
+ * for a billing profile.
+ */
+ @JsonProperty(value = "properties.reservationPurchases")
+ private ReservationPurchasesPolicy reservationPurchases;
+
+ /*
+ * The policy that controls whether users with Azure RBAC access to a
+ * subscription can view its charges.
+ */
+ @JsonProperty(value = "properties.viewCharges")
+ private ViewChargesPolicy viewCharges;
+
+ /**
+ * Get the marketplacePurchases property: The policy that controls whether Azure marketplace purchases are allowed
+ * for a billing profile.
+ *
+ * @return the marketplacePurchases value.
+ */
+ public MarketplacePurchasesPolicy marketplacePurchases() {
+ return this.marketplacePurchases;
+ }
+
+ /**
+ * Set the marketplacePurchases property: The policy that controls whether Azure marketplace purchases are allowed
+ * for a billing profile.
+ *
+ * @param marketplacePurchases the marketplacePurchases value to set.
+ * @return the PolicyInner object itself.
+ */
+ public PolicyInner withMarketplacePurchases(MarketplacePurchasesPolicy marketplacePurchases) {
+ this.marketplacePurchases = marketplacePurchases;
+ return this;
+ }
+
+ /**
+ * Get the reservationPurchases property: The policy that controls whether Azure reservation purchases are allowed
+ * for a billing profile.
+ *
+ * @return the reservationPurchases value.
+ */
+ public ReservationPurchasesPolicy reservationPurchases() {
+ return this.reservationPurchases;
+ }
+
+ /**
+ * Set the reservationPurchases property: The policy that controls whether Azure reservation purchases are allowed
+ * for a billing profile.
+ *
+ * @param reservationPurchases the reservationPurchases value to set.
+ * @return the PolicyInner object itself.
+ */
+ public PolicyInner withReservationPurchases(ReservationPurchasesPolicy reservationPurchases) {
+ this.reservationPurchases = reservationPurchases;
+ return this;
+ }
+
+ /**
+ * Get the viewCharges property: The policy that controls whether users with Azure RBAC access to a subscription can
+ * view its charges.
+ *
+ * @return the viewCharges value.
+ */
+ public ViewChargesPolicy viewCharges() {
+ return this.viewCharges;
+ }
+
+ /**
+ * Set the viewCharges property: The policy that controls whether users with Azure RBAC access to a subscription can
+ * view its charges.
+ *
+ * @param viewCharges the viewCharges value to set.
+ * @return the PolicyInner object itself.
+ */
+ public PolicyInner withViewCharges(ViewChargesPolicy viewCharges) {
+ this.viewCharges = viewCharges;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ProductInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ProductInner.java
new file mode 100644
index 000000000000..da4d72edfc27
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ProductInner.java
@@ -0,0 +1,406 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.models.Amount;
+import com.azure.resourcemanager.billing.models.AutoRenew;
+import com.azure.resourcemanager.billing.models.BillingFrequency;
+import com.azure.resourcemanager.billing.models.ProductStatusType;
+import com.azure.resourcemanager.billing.models.Reseller;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** A product. */
+@JsonFlatten
+@Fluent
+public class ProductInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ProductInner.class);
+
+ /*
+ * Indicates whether auto renewal is turned on or off for a product.
+ */
+ @JsonProperty(value = "properties.autoRenew")
+ private AutoRenew autoRenew;
+
+ /*
+ * The display name of the product.
+ */
+ @JsonProperty(value = "properties.displayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String displayName;
+
+ /*
+ * The date when the product was purchased.
+ */
+ @JsonProperty(value = "properties.purchaseDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime purchaseDate;
+
+ /*
+ * The ID of the type of product.
+ */
+ @JsonProperty(value = "properties.productTypeId", access = JsonProperty.Access.WRITE_ONLY)
+ private String productTypeId;
+
+ /*
+ * The description of the type of product.
+ */
+ @JsonProperty(value = "properties.productType", access = JsonProperty.Access.WRITE_ONLY)
+ private String productType;
+
+ /*
+ * The current status of the product.
+ */
+ @JsonProperty(value = "properties.status")
+ private ProductStatusType status;
+
+ /*
+ * The date when the product will be renewed or canceled.
+ */
+ @JsonProperty(value = "properties.endDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime endDate;
+
+ /*
+ * The frequency at which the product will be billed.
+ */
+ @JsonProperty(value = "properties.billingFrequency")
+ private BillingFrequency billingFrequency;
+
+ /*
+ * The last month charges.
+ */
+ @JsonProperty(value = "properties.lastCharge", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount lastCharge;
+
+ /*
+ * The date of the last charge.
+ */
+ @JsonProperty(value = "properties.lastChargeDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime lastChargeDate;
+
+ /*
+ * The quantity purchased for the product.
+ */
+ @JsonProperty(value = "properties.quantity", access = JsonProperty.Access.WRITE_ONLY)
+ private Float quantity;
+
+ /*
+ * The sku ID of the product.
+ */
+ @JsonProperty(value = "properties.skuId", access = JsonProperty.Access.WRITE_ONLY)
+ private String skuId;
+
+ /*
+ * The sku description of the product.
+ */
+ @JsonProperty(value = "properties.skuDescription", access = JsonProperty.Access.WRITE_ONLY)
+ private String skuDescription;
+
+ /*
+ * The id of the tenant in which the product is used.
+ */
+ @JsonProperty(value = "properties.tenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private String tenantId;
+
+ /*
+ * The availability of the product.
+ */
+ @JsonProperty(value = "properties.availabilityId", access = JsonProperty.Access.WRITE_ONLY)
+ private String availabilityId;
+
+ /*
+ * The ID of the invoice section to which the product is billed.
+ */
+ @JsonProperty(value = "properties.invoiceSectionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String invoiceSectionId;
+
+ /*
+ * The name of the invoice section to which the product is billed.
+ */
+ @JsonProperty(value = "properties.invoiceSectionDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String invoiceSectionDisplayName;
+
+ /*
+ * The ID of the billing profile to which the product is billed.
+ */
+ @JsonProperty(value = "properties.billingProfileId", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingProfileId;
+
+ /*
+ * The name of the billing profile to which the product is billed.
+ */
+ @JsonProperty(value = "properties.billingProfileDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingProfileDisplayName;
+
+ /*
+ * The ID of the customer for whom the product was purchased. The field is
+ * applicable only for Microsoft Partner Agreement billing account.
+ */
+ @JsonProperty(value = "properties.customerId", access = JsonProperty.Access.WRITE_ONLY)
+ private String customerId;
+
+ /*
+ * The name of the customer for whom the product was purchased. The field
+ * is applicable only for Microsoft Partner Agreement billing account.
+ */
+ @JsonProperty(value = "properties.customerDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String customerDisplayName;
+
+ /*
+ * Reseller for this product.
+ */
+ @JsonProperty(value = "properties.reseller", access = JsonProperty.Access.WRITE_ONLY)
+ private Reseller reseller;
+
+ /**
+ * Get the autoRenew property: Indicates whether auto renewal is turned on or off for a product.
+ *
+ * @return the autoRenew value.
+ */
+ public AutoRenew autoRenew() {
+ return this.autoRenew;
+ }
+
+ /**
+ * Set the autoRenew property: Indicates whether auto renewal is turned on or off for a product.
+ *
+ * @param autoRenew the autoRenew value to set.
+ * @return the ProductInner object itself.
+ */
+ public ProductInner withAutoRenew(AutoRenew autoRenew) {
+ this.autoRenew = autoRenew;
+ return this;
+ }
+
+ /**
+ * Get the displayName property: The display name of the product.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Get the purchaseDate property: The date when the product was purchased.
+ *
+ * @return the purchaseDate value.
+ */
+ public OffsetDateTime purchaseDate() {
+ return this.purchaseDate;
+ }
+
+ /**
+ * Get the productTypeId property: The ID of the type of product.
+ *
+ * @return the productTypeId value.
+ */
+ public String productTypeId() {
+ return this.productTypeId;
+ }
+
+ /**
+ * Get the productType property: The description of the type of product.
+ *
+ * @return the productType value.
+ */
+ public String productType() {
+ return this.productType;
+ }
+
+ /**
+ * Get the status property: The current status of the product.
+ *
+ * @return the status value.
+ */
+ public ProductStatusType status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: The current status of the product.
+ *
+ * @param status the status value to set.
+ * @return the ProductInner object itself.
+ */
+ public ProductInner withStatus(ProductStatusType status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the endDate property: The date when the product will be renewed or canceled.
+ *
+ * @return the endDate value.
+ */
+ public OffsetDateTime endDate() {
+ return this.endDate;
+ }
+
+ /**
+ * Get the billingFrequency property: The frequency at which the product will be billed.
+ *
+ * @return the billingFrequency value.
+ */
+ public BillingFrequency billingFrequency() {
+ return this.billingFrequency;
+ }
+
+ /**
+ * Set the billingFrequency property: The frequency at which the product will be billed.
+ *
+ * @param billingFrequency the billingFrequency value to set.
+ * @return the ProductInner object itself.
+ */
+ public ProductInner withBillingFrequency(BillingFrequency billingFrequency) {
+ this.billingFrequency = billingFrequency;
+ return this;
+ }
+
+ /**
+ * Get the lastCharge property: The last month charges.
+ *
+ * @return the lastCharge value.
+ */
+ public Amount lastCharge() {
+ return this.lastCharge;
+ }
+
+ /**
+ * Get the lastChargeDate property: The date of the last charge.
+ *
+ * @return the lastChargeDate value.
+ */
+ public OffsetDateTime lastChargeDate() {
+ return this.lastChargeDate;
+ }
+
+ /**
+ * Get the quantity property: The quantity purchased for the product.
+ *
+ * @return the quantity value.
+ */
+ public Float quantity() {
+ return this.quantity;
+ }
+
+ /**
+ * Get the skuId property: The sku ID of the product.
+ *
+ * @return the skuId value.
+ */
+ public String skuId() {
+ return this.skuId;
+ }
+
+ /**
+ * Get the skuDescription property: The sku description of the product.
+ *
+ * @return the skuDescription value.
+ */
+ public String skuDescription() {
+ return this.skuDescription;
+ }
+
+ /**
+ * Get the tenantId property: The id of the tenant in which the product is used.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Get the availabilityId property: The availability of the product.
+ *
+ * @return the availabilityId value.
+ */
+ public String availabilityId() {
+ return this.availabilityId;
+ }
+
+ /**
+ * Get the invoiceSectionId property: The ID of the invoice section to which the product is billed.
+ *
+ * @return the invoiceSectionId value.
+ */
+ public String invoiceSectionId() {
+ return this.invoiceSectionId;
+ }
+
+ /**
+ * Get the invoiceSectionDisplayName property: The name of the invoice section to which the product is billed.
+ *
+ * @return the invoiceSectionDisplayName value.
+ */
+ public String invoiceSectionDisplayName() {
+ return this.invoiceSectionDisplayName;
+ }
+
+ /**
+ * Get the billingProfileId property: The ID of the billing profile to which the product is billed.
+ *
+ * @return the billingProfileId value.
+ */
+ public String billingProfileId() {
+ return this.billingProfileId;
+ }
+
+ /**
+ * Get the billingProfileDisplayName property: The name of the billing profile to which the product is billed.
+ *
+ * @return the billingProfileDisplayName value.
+ */
+ public String billingProfileDisplayName() {
+ return this.billingProfileDisplayName;
+ }
+
+ /**
+ * Get the customerId property: The ID of the customer for whom the product was purchased. The field is applicable
+ * only for Microsoft Partner Agreement billing account.
+ *
+ * @return the customerId value.
+ */
+ public String customerId() {
+ return this.customerId;
+ }
+
+ /**
+ * Get the customerDisplayName property: The name of the customer for whom the product was purchased. The field is
+ * applicable only for Microsoft Partner Agreement billing account.
+ *
+ * @return the customerDisplayName value.
+ */
+ public String customerDisplayName() {
+ return this.customerDisplayName;
+ }
+
+ /**
+ * Get the reseller property: Reseller for this product.
+ *
+ * @return the reseller value.
+ */
+ public Reseller reseller() {
+ return this.reseller;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (lastCharge() != null) {
+ lastCharge().validate();
+ }
+ if (reseller() != null) {
+ reseller().validate();
+ }
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/TransactionInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/TransactionInner.java
new file mode 100644
index 000000000000..95d0948f3bf3
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/TransactionInner.java
@@ -0,0 +1,641 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.models.Amount;
+import com.azure.resourcemanager.billing.models.ReservationType;
+import com.azure.resourcemanager.billing.models.TransactionTypeKind;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** A transaction. */
+@JsonFlatten
+@Fluent
+public class TransactionInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(TransactionInner.class);
+
+ /*
+ * The kind of transaction. Options are all or reservation.
+ */
+ @JsonProperty(value = "properties.kind")
+ private TransactionTypeKind kind;
+
+ /*
+ * The date of transaction.
+ */
+ @JsonProperty(value = "properties.date", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime date;
+
+ /*
+ * Invoice on which the transaction was billed or 'pending' if the
+ * transaction is not billed.
+ */
+ @JsonProperty(value = "properties.invoice", access = JsonProperty.Access.WRITE_ONLY)
+ private String invoice;
+
+ /*
+ * The ID of the invoice on which the transaction was billed. This field is
+ * only applicable for transactions which are billed.
+ */
+ @JsonProperty(value = "properties.invoiceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String invoiceId;
+
+ /*
+ * The order ID of the reservation. The field is only applicable for
+ * transaction of kind reservation.
+ */
+ @JsonProperty(value = "properties.orderId", access = JsonProperty.Access.WRITE_ONLY)
+ private String orderId;
+
+ /*
+ * The name of the reservation order. The field is only applicable for
+ * transactions of kind reservation.
+ */
+ @JsonProperty(value = "properties.orderName", access = JsonProperty.Access.WRITE_ONLY)
+ private String orderName;
+
+ /*
+ * The family of the product for which the transaction took place.
+ */
+ @JsonProperty(value = "properties.productFamily", access = JsonProperty.Access.WRITE_ONLY)
+ private String productFamily;
+
+ /*
+ * The ID of the product type for which the transaction took place.
+ */
+ @JsonProperty(value = "properties.productTypeId", access = JsonProperty.Access.WRITE_ONLY)
+ private String productTypeId;
+
+ /*
+ * The type of the product for which the transaction took place.
+ */
+ @JsonProperty(value = "properties.productType", access = JsonProperty.Access.WRITE_ONLY)
+ private String productType;
+
+ /*
+ * The description of the product for which the transaction took place.
+ */
+ @JsonProperty(value = "properties.productDescription", access = JsonProperty.Access.WRITE_ONLY)
+ private String productDescription;
+
+ /*
+ * The type of transaction.
+ */
+ @JsonProperty(value = "properties.transactionType")
+ private ReservationType transactionType;
+
+ /*
+ * The charge associated with the transaction.
+ */
+ @JsonProperty(value = "properties.transactionAmount", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount transactionAmount;
+
+ /*
+ * The quantity purchased in the transaction.
+ */
+ @JsonProperty(value = "properties.quantity", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer quantity;
+
+ /*
+ * The ID of the invoice section which will be billed for the transaction.
+ */
+ @JsonProperty(value = "properties.invoiceSectionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String invoiceSectionId;
+
+ /*
+ * The name of the invoice section which will be billed for the
+ * transaction.
+ */
+ @JsonProperty(value = "properties.invoiceSectionDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String invoiceSectionDisplayName;
+
+ /*
+ * The ID of the billing profile which will be billed for the transaction.
+ */
+ @JsonProperty(value = "properties.billingProfileId", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingProfileId;
+
+ /*
+ * The name of the billing profile which will be billed for the
+ * transaction.
+ */
+ @JsonProperty(value = "properties.billingProfileDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingProfileDisplayName;
+
+ /*
+ * The ID of the customer for which the transaction took place. The field
+ * is applicable only for Microsoft Partner Agreement billing account.
+ */
+ @JsonProperty(value = "properties.customerId", access = JsonProperty.Access.WRITE_ONLY)
+ private String customerId;
+
+ /*
+ * The name of the customer for which the transaction took place. The field
+ * is applicable only for Microsoft Partner Agreement billing account.
+ */
+ @JsonProperty(value = "properties.customerDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String customerDisplayName;
+
+ /*
+ * The ID of the subscription that was used for the transaction. The field
+ * is only applicable for transaction of kind reservation.
+ */
+ @JsonProperty(value = "properties.subscriptionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String subscriptionId;
+
+ /*
+ * The name of the subscription that was used for the transaction. The
+ * field is only applicable for transaction of kind reservation.
+ */
+ @JsonProperty(value = "properties.subscriptionName", access = JsonProperty.Access.WRITE_ONLY)
+ private String subscriptionName;
+
+ /*
+ * The type of azure plan of the subscription that was used for the
+ * transaction.
+ */
+ @JsonProperty(value = "properties.azurePlan", access = JsonProperty.Access.WRITE_ONLY)
+ private String azurePlan;
+
+ /*
+ * The amount of any Azure credits automatically applied to this
+ * transaction.
+ */
+ @JsonProperty(value = "properties.azureCreditApplied", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount azureCreditApplied;
+
+ /*
+ * The ISO 4217 code for the currency in which this transaction is billed.
+ */
+ @JsonProperty(value = "properties.billingCurrency", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingCurrency;
+
+ /*
+ * The percentage discount, if any, applied to this transaction.
+ */
+ @JsonProperty(value = "properties.discount", access = JsonProperty.Access.WRITE_ONLY)
+ private Float discount;
+
+ /*
+ * The price of the product after applying any discounts.
+ */
+ @JsonProperty(value = "properties.effectivePrice", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount effectivePrice;
+
+ /*
+ * The exchange rate used to convert charged amount to billing currency, if
+ * applicable.
+ */
+ @JsonProperty(value = "properties.exchangeRate", access = JsonProperty.Access.WRITE_ONLY)
+ private Float exchangeRate;
+
+ /*
+ * The retail price of the product.
+ */
+ @JsonProperty(value = "properties.marketPrice", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount marketPrice;
+
+ /*
+ * The ISO 4217 code for the currency in which the product is priced.
+ */
+ @JsonProperty(value = "properties.pricingCurrency", access = JsonProperty.Access.WRITE_ONLY)
+ private String pricingCurrency;
+
+ /*
+ * The date of the purchase of the product, or the start date of the month
+ * in which usage started.
+ */
+ @JsonProperty(value = "properties.servicePeriodStartDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime servicePeriodStartDate;
+
+ /*
+ * The end date of the product term, or the end date of the month in which
+ * usage ended.
+ */
+ @JsonProperty(value = "properties.servicePeriodEndDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime servicePeriodEndDate;
+
+ /*
+ * The pre-tax charged amount for the transaction.
+ */
+ @JsonProperty(value = "properties.subTotal", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount subTotal;
+
+ /*
+ * The tax amount applied to the transaction.
+ */
+ @JsonProperty(value = "properties.tax", access = JsonProperty.Access.WRITE_ONLY)
+ private Amount tax;
+
+ /*
+ * The unit of measure used to bill for the product. For example, compute
+ * services are billed per hour.
+ */
+ @JsonProperty(value = "properties.unitOfMeasure", access = JsonProperty.Access.WRITE_ONLY)
+ private String unitOfMeasure;
+
+ /*
+ * The number of units used for a given product.
+ */
+ @JsonProperty(value = "properties.units", access = JsonProperty.Access.WRITE_ONLY)
+ private Float units;
+
+ /*
+ * The description for the unit of measure for a given product.
+ */
+ @JsonProperty(value = "properties.unitType", access = JsonProperty.Access.WRITE_ONLY)
+ private String unitType;
+
+ /**
+ * Get the kind property: The kind of transaction. Options are all or reservation.
+ *
+ * @return the kind value.
+ */
+ public TransactionTypeKind kind() {
+ return this.kind;
+ }
+
+ /**
+ * Set the kind property: The kind of transaction. Options are all or reservation.
+ *
+ * @param kind the kind value to set.
+ * @return the TransactionInner object itself.
+ */
+ public TransactionInner withKind(TransactionTypeKind kind) {
+ this.kind = kind;
+ return this;
+ }
+
+ /**
+ * Get the date property: The date of transaction.
+ *
+ * @return the date value.
+ */
+ public OffsetDateTime date() {
+ return this.date;
+ }
+
+ /**
+ * Get the invoice property: Invoice on which the transaction was billed or 'pending' if the transaction is not
+ * billed.
+ *
+ * @return the invoice value.
+ */
+ public String invoice() {
+ return this.invoice;
+ }
+
+ /**
+ * Get the invoiceId property: The ID of the invoice on which the transaction was billed. This field is only
+ * applicable for transactions which are billed.
+ *
+ * @return the invoiceId value.
+ */
+ public String invoiceId() {
+ return this.invoiceId;
+ }
+
+ /**
+ * Get the orderId property: The order ID of the reservation. The field is only applicable for transaction of kind
+ * reservation.
+ *
+ * @return the orderId value.
+ */
+ public String orderId() {
+ return this.orderId;
+ }
+
+ /**
+ * Get the orderName property: The name of the reservation order. The field is only applicable for transactions of
+ * kind reservation.
+ *
+ * @return the orderName value.
+ */
+ public String orderName() {
+ return this.orderName;
+ }
+
+ /**
+ * Get the productFamily property: The family of the product for which the transaction took place.
+ *
+ * @return the productFamily value.
+ */
+ public String productFamily() {
+ return this.productFamily;
+ }
+
+ /**
+ * Get the productTypeId property: The ID of the product type for which the transaction took place.
+ *
+ * @return the productTypeId value.
+ */
+ public String productTypeId() {
+ return this.productTypeId;
+ }
+
+ /**
+ * Get the productType property: The type of the product for which the transaction took place.
+ *
+ * @return the productType value.
+ */
+ public String productType() {
+ return this.productType;
+ }
+
+ /**
+ * Get the productDescription property: The description of the product for which the transaction took place.
+ *
+ * @return the productDescription value.
+ */
+ public String productDescription() {
+ return this.productDescription;
+ }
+
+ /**
+ * Get the transactionType property: The type of transaction.
+ *
+ * @return the transactionType value.
+ */
+ public ReservationType transactionType() {
+ return this.transactionType;
+ }
+
+ /**
+ * Set the transactionType property: The type of transaction.
+ *
+ * @param transactionType the transactionType value to set.
+ * @return the TransactionInner object itself.
+ */
+ public TransactionInner withTransactionType(ReservationType transactionType) {
+ this.transactionType = transactionType;
+ return this;
+ }
+
+ /**
+ * Get the transactionAmount property: The charge associated with the transaction.
+ *
+ * @return the transactionAmount value.
+ */
+ public Amount transactionAmount() {
+ return this.transactionAmount;
+ }
+
+ /**
+ * Get the quantity property: The quantity purchased in the transaction.
+ *
+ * @return the quantity value.
+ */
+ public Integer quantity() {
+ return this.quantity;
+ }
+
+ /**
+ * Get the invoiceSectionId property: The ID of the invoice section which will be billed for the transaction.
+ *
+ * @return the invoiceSectionId value.
+ */
+ public String invoiceSectionId() {
+ return this.invoiceSectionId;
+ }
+
+ /**
+ * Get the invoiceSectionDisplayName property: The name of the invoice section which will be billed for the
+ * transaction.
+ *
+ * @return the invoiceSectionDisplayName value.
+ */
+ public String invoiceSectionDisplayName() {
+ return this.invoiceSectionDisplayName;
+ }
+
+ /**
+ * Get the billingProfileId property: The ID of the billing profile which will be billed for the transaction.
+ *
+ * @return the billingProfileId value.
+ */
+ public String billingProfileId() {
+ return this.billingProfileId;
+ }
+
+ /**
+ * Get the billingProfileDisplayName property: The name of the billing profile which will be billed for the
+ * transaction.
+ *
+ * @return the billingProfileDisplayName value.
+ */
+ public String billingProfileDisplayName() {
+ return this.billingProfileDisplayName;
+ }
+
+ /**
+ * Get the customerId property: The ID of the customer for which the transaction took place. The field is applicable
+ * only for Microsoft Partner Agreement billing account.
+ *
+ * @return the customerId value.
+ */
+ public String customerId() {
+ return this.customerId;
+ }
+
+ /**
+ * Get the customerDisplayName property: The name of the customer for which the transaction took place. The field is
+ * applicable only for Microsoft Partner Agreement billing account.
+ *
+ * @return the customerDisplayName value.
+ */
+ public String customerDisplayName() {
+ return this.customerDisplayName;
+ }
+
+ /**
+ * Get the subscriptionId property: The ID of the subscription that was used for the transaction. The field is only
+ * applicable for transaction of kind reservation.
+ *
+ * @return the subscriptionId value.
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * Get the subscriptionName property: The name of the subscription that was used for the transaction. The field is
+ * only applicable for transaction of kind reservation.
+ *
+ * @return the subscriptionName value.
+ */
+ public String subscriptionName() {
+ return this.subscriptionName;
+ }
+
+ /**
+ * Get the azurePlan property: The type of azure plan of the subscription that was used for the transaction.
+ *
+ * @return the azurePlan value.
+ */
+ public String azurePlan() {
+ return this.azurePlan;
+ }
+
+ /**
+ * Get the azureCreditApplied property: The amount of any Azure credits automatically applied to this transaction.
+ *
+ * @return the azureCreditApplied value.
+ */
+ public Amount azureCreditApplied() {
+ return this.azureCreditApplied;
+ }
+
+ /**
+ * Get the billingCurrency property: The ISO 4217 code for the currency in which this transaction is billed.
+ *
+ * @return the billingCurrency value.
+ */
+ public String billingCurrency() {
+ return this.billingCurrency;
+ }
+
+ /**
+ * Get the discount property: The percentage discount, if any, applied to this transaction.
+ *
+ * @return the discount value.
+ */
+ public Float discount() {
+ return this.discount;
+ }
+
+ /**
+ * Get the effectivePrice property: The price of the product after applying any discounts.
+ *
+ * @return the effectivePrice value.
+ */
+ public Amount effectivePrice() {
+ return this.effectivePrice;
+ }
+
+ /**
+ * Get the exchangeRate property: The exchange rate used to convert charged amount to billing currency, if
+ * applicable.
+ *
+ * @return the exchangeRate value.
+ */
+ public Float exchangeRate() {
+ return this.exchangeRate;
+ }
+
+ /**
+ * Get the marketPrice property: The retail price of the product.
+ *
+ * @return the marketPrice value.
+ */
+ public Amount marketPrice() {
+ return this.marketPrice;
+ }
+
+ /**
+ * Get the pricingCurrency property: The ISO 4217 code for the currency in which the product is priced.
+ *
+ * @return the pricingCurrency value.
+ */
+ public String pricingCurrency() {
+ return this.pricingCurrency;
+ }
+
+ /**
+ * Get the servicePeriodStartDate property: The date of the purchase of the product, or the start date of the month
+ * in which usage started.
+ *
+ * @return the servicePeriodStartDate value.
+ */
+ public OffsetDateTime servicePeriodStartDate() {
+ return this.servicePeriodStartDate;
+ }
+
+ /**
+ * Get the servicePeriodEndDate property: The end date of the product term, or the end date of the month in which
+ * usage ended.
+ *
+ * @return the servicePeriodEndDate value.
+ */
+ public OffsetDateTime servicePeriodEndDate() {
+ return this.servicePeriodEndDate;
+ }
+
+ /**
+ * Get the subTotal property: The pre-tax charged amount for the transaction.
+ *
+ * @return the subTotal value.
+ */
+ public Amount subTotal() {
+ return this.subTotal;
+ }
+
+ /**
+ * Get the tax property: The tax amount applied to the transaction.
+ *
+ * @return the tax value.
+ */
+ public Amount tax() {
+ return this.tax;
+ }
+
+ /**
+ * Get the unitOfMeasure property: The unit of measure used to bill for the product. For example, compute services
+ * are billed per hour.
+ *
+ * @return the unitOfMeasure value.
+ */
+ public String unitOfMeasure() {
+ return this.unitOfMeasure;
+ }
+
+ /**
+ * Get the units property: The number of units used for a given product.
+ *
+ * @return the units value.
+ */
+ public Float units() {
+ return this.units;
+ }
+
+ /**
+ * Get the unitType property: The description for the unit of measure for a given product.
+ *
+ * @return the unitType value.
+ */
+ public String unitType() {
+ return this.unitType;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (transactionAmount() != null) {
+ transactionAmount().validate();
+ }
+ if (azureCreditApplied() != null) {
+ azureCreditApplied().validate();
+ }
+ if (effectivePrice() != null) {
+ effectivePrice().validate();
+ }
+ if (marketPrice() != null) {
+ marketPrice().validate();
+ }
+ if (subTotal() != null) {
+ subTotal().validate();
+ }
+ if (tax() != null) {
+ tax().validate();
+ }
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateAddressResponseInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateAddressResponseInner.java
new file mode 100644
index 000000000000..fe5e582d9b45
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateAddressResponseInner.java
@@ -0,0 +1,108 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.billing.models.AddressDetails;
+import com.azure.resourcemanager.billing.models.AddressValidationStatus;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Result of the address validation. */
+@Fluent
+public final class ValidateAddressResponseInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidateAddressResponseInner.class);
+
+ /*
+ * status of the address validation.
+ */
+ @JsonProperty(value = "status")
+ private AddressValidationStatus status;
+
+ /*
+ * The list of suggested addresses.
+ */
+ @JsonProperty(value = "suggestedAddresses")
+ private List suggestedAddresses;
+
+ /*
+ * Validation error message.
+ */
+ @JsonProperty(value = "validationMessage")
+ private String validationMessage;
+
+ /**
+ * Get the status property: status of the address validation.
+ *
+ * @return the status value.
+ */
+ public AddressValidationStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: status of the address validation.
+ *
+ * @param status the status value to set.
+ * @return the ValidateAddressResponseInner object itself.
+ */
+ public ValidateAddressResponseInner withStatus(AddressValidationStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the suggestedAddresses property: The list of suggested addresses.
+ *
+ * @return the suggestedAddresses value.
+ */
+ public List suggestedAddresses() {
+ return this.suggestedAddresses;
+ }
+
+ /**
+ * Set the suggestedAddresses property: The list of suggested addresses.
+ *
+ * @param suggestedAddresses the suggestedAddresses value to set.
+ * @return the ValidateAddressResponseInner object itself.
+ */
+ public ValidateAddressResponseInner withSuggestedAddresses(List suggestedAddresses) {
+ this.suggestedAddresses = suggestedAddresses;
+ return this;
+ }
+
+ /**
+ * Get the validationMessage property: Validation error message.
+ *
+ * @return the validationMessage value.
+ */
+ public String validationMessage() {
+ return this.validationMessage;
+ }
+
+ /**
+ * Set the validationMessage property: Validation error message.
+ *
+ * @param validationMessage the validationMessage value to set.
+ * @return the ValidateAddressResponseInner object itself.
+ */
+ public ValidateAddressResponseInner withValidationMessage(String validationMessage) {
+ this.validationMessage = validationMessage;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (suggestedAddresses() != null) {
+ suggestedAddresses().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateProductTransferEligibilityResultInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateProductTransferEligibilityResultInner.java
new file mode 100644
index 000000000000..ec3a1192692a
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateProductTransferEligibilityResultInner.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.billing.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.billing.models.ValidateProductTransferEligibilityError;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Result of the product transfer eligibility validation. */
+@Fluent
+public final class ValidateProductTransferEligibilityResultInner {
+ @JsonIgnore
+ private final ClientLogger logger = new ClientLogger(ValidateProductTransferEligibilityResultInner.class);
+
+ /*
+ * Specifies whether the transfer is eligible or not.
+ */
+ @JsonProperty(value = "isMoveEligible", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isMoveEligible;
+
+ /*
+ * Validation error details.
+ */
+ @JsonProperty(value = "errorDetails")
+ private ValidateProductTransferEligibilityError errorDetails;
+
+ /**
+ * Get the isMoveEligible property: Specifies whether the transfer is eligible or not.
+ *
+ * @return the isMoveEligible value.
+ */
+ public Boolean isMoveEligible() {
+ return this.isMoveEligible;
+ }
+
+ /**
+ * Get the errorDetails property: Validation error details.
+ *
+ * @return the errorDetails value.
+ */
+ public ValidateProductTransferEligibilityError errorDetails() {
+ return this.errorDetails;
+ }
+
+ /**
+ * Set the errorDetails property: Validation error details.
+ *
+ * @param errorDetails the errorDetails value to set.
+ * @return the ValidateProductTransferEligibilityResultInner object itself.
+ */
+ public ValidateProductTransferEligibilityResultInner withErrorDetails(
+ ValidateProductTransferEligibilityError errorDetails) {
+ this.errorDetails = errorDetails;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (errorDetails() != null) {
+ errorDetails().validate();
+ }
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateSubscriptionTransferEligibilityResultInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateSubscriptionTransferEligibilityResultInner.java
new file mode 100644
index 000000000000..8182afc61f4d
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateSubscriptionTransferEligibilityResultInner.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.billing.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.billing.models.ValidateSubscriptionTransferEligibilityError;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Result of the transfer eligibility validation. */
+@Fluent
+public final class ValidateSubscriptionTransferEligibilityResultInner {
+ @JsonIgnore
+ private final ClientLogger logger = new ClientLogger(ValidateSubscriptionTransferEligibilityResultInner.class);
+
+ /*
+ * Specifies whether the subscription is eligible to be transferred.
+ */
+ @JsonProperty(value = "isMoveEligible", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isMoveEligible;
+
+ /*
+ * Validation error details.
+ */
+ @JsonProperty(value = "errorDetails")
+ private ValidateSubscriptionTransferEligibilityError errorDetails;
+
+ /**
+ * Get the isMoveEligible property: Specifies whether the subscription is eligible to be transferred.
+ *
+ * @return the isMoveEligible value.
+ */
+ public Boolean isMoveEligible() {
+ return this.isMoveEligible;
+ }
+
+ /**
+ * Get the errorDetails property: Validation error details.
+ *
+ * @return the errorDetails value.
+ */
+ public ValidateSubscriptionTransferEligibilityError errorDetails() {
+ return this.errorDetails;
+ }
+
+ /**
+ * Set the errorDetails property: Validation error details.
+ *
+ * @param errorDetails the errorDetails value to set.
+ * @return the ValidateSubscriptionTransferEligibilityResultInner object itself.
+ */
+ public ValidateSubscriptionTransferEligibilityResultInner withErrorDetails(
+ ValidateSubscriptionTransferEligibilityError errorDetails) {
+ this.errorDetails = errorDetails;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (errorDetails() != null) {
+ errorDetails().validate();
+ }
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/package-info.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/package-info.java
new file mode 100644
index 000000000000..21d8afb068da
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/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 BillingManagementClient. Billing client provides access to billing
+ * resources for Azure subscriptions.
+ */
+package com.azure.resourcemanager.billing.fluent.models;
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/package-info.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/package-info.java
new file mode 100644
index 000000000000..ff6c7f208f6a
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/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 BillingManagementClient. Billing client provides access to billing
+ * resources for Azure subscriptions.
+ */
+package com.azure.resourcemanager.billing.fluent;
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AddressClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AddressClientImpl.java
new file mode 100644
index 000000000000..771dcbd3cebb
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AddressClientImpl.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.billing.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+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.Post;
+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.billing.fluent.AddressClient;
+import com.azure.resourcemanager.billing.fluent.models.ValidateAddressResponseInner;
+import com.azure.resourcemanager.billing.models.AddressDetails;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in AddressClient. */
+public final class AddressClientImpl implements AddressClient {
+ private final ClientLogger logger = new ClientLogger(AddressClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final AddressService service;
+
+ /** The service client containing this operation class. */
+ private final BillingManagementClientImpl client;
+
+ /**
+ * Initializes an instance of AddressClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AddressClientImpl(BillingManagementClientImpl client) {
+ this.service = RestProxy.create(AddressService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for BillingManagementClientAddress to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "BillingManagementCli")
+ private interface AddressService {
+ @Headers({"Content-Type: application/json"})
+ @Post("/providers/Microsoft.Billing/validateAddress")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> validate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") AddressDetails address,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Validates an address. Use the operation to validate an address before using it as soldTo or a billTo address.
+ *
+ * @param address Address details.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the address validation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> validateWithResponseAsync(AddressDetails address) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (address == null) {
+ return Mono.error(new IllegalArgumentException("Parameter address is required and cannot be null."));
+ } else {
+ address.validate();
+ }
+ final String apiVersion = "2020-05-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.validate(this.client.getEndpoint(), apiVersion, address, accept, context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Validates an address. Use the operation to validate an address before using it as soldTo or a billTo address.
+ *
+ * @param address Address details.
+ * @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 the address validation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> validateWithResponseAsync(
+ AddressDetails address, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (address == null) {
+ return Mono.error(new IllegalArgumentException("Parameter address is required and cannot be null."));
+ } else {
+ address.validate();
+ }
+ final String apiVersion = "2020-05-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.validate(this.client.getEndpoint(), apiVersion, address, accept, context);
+ }
+
+ /**
+ * Validates an address. Use the operation to validate an address before using it as soldTo or a billTo address.
+ *
+ * @param address Address details.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the address validation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono validateAsync(AddressDetails address) {
+ return validateWithResponseAsync(address)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Validates an address. Use the operation to validate an address before using it as soldTo or a billTo address.
+ *
+ * @param address Address details.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the address validation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ValidateAddressResponseInner validate(AddressDetails address) {
+ return validateAsync(address).block();
+ }
+
+ /**
+ * Validates an address. Use the operation to validate an address before using it as soldTo or a billTo address.
+ *
+ * @param address Address details.
+ * @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 the address validation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response validateWithResponse(AddressDetails address, Context context) {
+ return validateWithResponseAsync(address, context).block();
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AddressImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AddressImpl.java
new file mode 100644
index 000000000000..814b6e283a4d
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AddressImpl.java
@@ -0,0 +1,60 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.BillingManager;
+import com.azure.resourcemanager.billing.fluent.AddressClient;
+import com.azure.resourcemanager.billing.fluent.models.ValidateAddressResponseInner;
+import com.azure.resourcemanager.billing.models.Address;
+import com.azure.resourcemanager.billing.models.AddressDetails;
+import com.azure.resourcemanager.billing.models.ValidateAddressResponse;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class AddressImpl implements Address {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AddressImpl.class);
+
+ private final AddressClient innerClient;
+
+ private final BillingManager serviceManager;
+
+ public AddressImpl(AddressClient innerClient, BillingManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public ValidateAddressResponse validate(AddressDetails address) {
+ ValidateAddressResponseInner inner = this.serviceClient().validate(address);
+ if (inner != null) {
+ return new ValidateAddressResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response validateWithResponse(AddressDetails address, Context context) {
+ Response inner = this.serviceClient().validateWithResponse(address, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ValidateAddressResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private AddressClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private BillingManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementImpl.java
new file mode 100644
index 000000000000..0ff3d667f2da
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementImpl.java
@@ -0,0 +1,79 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.implementation;
+
+import com.azure.resourcemanager.billing.BillingManager;
+import com.azure.resourcemanager.billing.fluent.models.AgreementInner;
+import com.azure.resourcemanager.billing.models.AcceptanceMode;
+import com.azure.resourcemanager.billing.models.Agreement;
+import com.azure.resourcemanager.billing.models.Category;
+import com.azure.resourcemanager.billing.models.Participants;
+import java.time.OffsetDateTime;
+import java.util.Collections;
+import java.util.List;
+
+public final class AgreementImpl implements Agreement {
+ private AgreementInner innerObject;
+
+ private final BillingManager serviceManager;
+
+ AgreementImpl(AgreementInner innerObject, BillingManager 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 agreementLink() {
+ return this.innerModel().agreementLink();
+ }
+
+ public Category category() {
+ return this.innerModel().category();
+ }
+
+ public AcceptanceMode acceptanceMode() {
+ return this.innerModel().acceptanceMode();
+ }
+
+ public OffsetDateTime effectiveDate() {
+ return this.innerModel().effectiveDate();
+ }
+
+ public OffsetDateTime expirationDate() {
+ return this.innerModel().expirationDate();
+ }
+
+ public List participants() {
+ List inner = this.innerModel().participants();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public String status() {
+ return this.innerModel().status();
+ }
+
+ public AgreementInner innerModel() {
+ return this.innerObject;
+ }
+
+ private BillingManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementsClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementsClientImpl.java
new file mode 100644
index 000000000000..fcccd7ec7829
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementsClientImpl.java
@@ -0,0 +1,499 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.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.billing.fluent.AgreementsClient;
+import com.azure.resourcemanager.billing.fluent.models.AgreementInner;
+import com.azure.resourcemanager.billing.models.AgreementListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in AgreementsClient. */
+public final class AgreementsClientImpl implements AgreementsClient {
+ private final ClientLogger logger = new ClientLogger(AgreementsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final AgreementsService service;
+
+ /** The service client containing this operation class. */
+ private final BillingManagementClientImpl client;
+
+ /**
+ * Initializes an instance of AgreementsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AgreementsClientImpl(BillingManagementClientImpl client) {
+ this.service =
+ RestProxy.create(AgreementsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for BillingManagementClientAgreements to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "BillingManagementCli")
+ private interface AgreementsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByBillingAccount(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("billingAccountName") String billingAccountName,
+ @QueryParam("$expand") String expand,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements/{agreementName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("billingAccountName") String billingAccountName,
+ @PathParam("agreementName") String agreementName,
+ @QueryParam("$expand") String expand,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByBillingAccountNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists the agreements for a billing account.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param expand May be used to expand the participants.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing agreements.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByBillingAccountSinglePageAsync(
+ String billingAccountName, String expand) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (billingAccountName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
+ }
+ final String apiVersion = "2020-05-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByBillingAccount(
+ this.client.getEndpoint(), apiVersion, billingAccountName, expand, 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 the agreements for a billing account.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param expand May be used to expand the participants.
+ * @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 agreements.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByBillingAccountSinglePageAsync(
+ String billingAccountName, String expand, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (billingAccountName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
+ }
+ final String apiVersion = "2020-05-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByBillingAccount(this.client.getEndpoint(), apiVersion, billingAccountName, expand, accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists the agreements for a billing account.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param expand May be used to expand the participants.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing agreements.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByBillingAccountAsync(String billingAccountName, String expand) {
+ return new PagedFlux<>(
+ () -> listByBillingAccountSinglePageAsync(billingAccountName, expand),
+ nextLink -> listByBillingAccountNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the agreements for a billing account.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing agreements.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByBillingAccountAsync(String billingAccountName) {
+ final String expand = null;
+ return new PagedFlux<>(
+ () -> listByBillingAccountSinglePageAsync(billingAccountName, expand),
+ nextLink -> listByBillingAccountNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the agreements for a billing account.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param expand May be used to expand the participants.
+ * @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 agreements.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByBillingAccountAsync(
+ String billingAccountName, String expand, Context context) {
+ return new PagedFlux<>(
+ () -> listByBillingAccountSinglePageAsync(billingAccountName, expand, context),
+ nextLink -> listByBillingAccountNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists the agreements for a billing account.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing agreements.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByBillingAccount(String billingAccountName) {
+ final String expand = null;
+ return new PagedIterable<>(listByBillingAccountAsync(billingAccountName, expand));
+ }
+
+ /**
+ * Lists the agreements for a billing account.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param expand May be used to expand the participants.
+ * @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 agreements.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByBillingAccount(
+ String billingAccountName, String expand, Context context) {
+ return new PagedIterable<>(listByBillingAccountAsync(billingAccountName, expand, context));
+ }
+
+ /**
+ * Gets an agreement by ID.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param agreementName The ID that uniquely identifies an agreement.
+ * @param expand May be used to expand the participants.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an agreement by ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String billingAccountName, String agreementName, String expand) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (billingAccountName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
+ }
+ if (agreementName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter agreementName is required and cannot be null."));
+ }
+ final String apiVersion = "2020-05-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ apiVersion,
+ billingAccountName,
+ agreementName,
+ expand,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Gets an agreement by ID.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param agreementName The ID that uniquely identifies an agreement.
+ * @param expand May be used to expand the participants.
+ * @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 an agreement by ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String billingAccountName, String agreementName, String expand, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (billingAccountName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
+ }
+ if (agreementName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter agreementName is required and cannot be null."));
+ }
+ final String apiVersion = "2020-05-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(this.client.getEndpoint(), apiVersion, billingAccountName, agreementName, expand, accept, context);
+ }
+
+ /**
+ * Gets an agreement by ID.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param agreementName The ID that uniquely identifies an agreement.
+ * @param expand May be used to expand the participants.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an agreement by ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String billingAccountName, String agreementName, String expand) {
+ return getWithResponseAsync(billingAccountName, agreementName, expand)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets an agreement by ID.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param agreementName The ID that uniquely identifies an agreement.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an agreement by ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String billingAccountName, String agreementName) {
+ final String expand = null;
+ return getWithResponseAsync(billingAccountName, agreementName, expand)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets an agreement by ID.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param agreementName The ID that uniquely identifies an agreement.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an agreement by ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AgreementInner get(String billingAccountName, String agreementName) {
+ final String expand = null;
+ return getAsync(billingAccountName, agreementName, expand).block();
+ }
+
+ /**
+ * Gets an agreement by ID.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param agreementName The ID that uniquely identifies an agreement.
+ * @param expand May be used to expand the participants.
+ * @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 an agreement by ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String billingAccountName, String agreementName, String expand, Context context) {
+ return getWithResponseAsync(billingAccountName, agreementName, expand, 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 agreements.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByBillingAccountNextSinglePageAsync(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.listByBillingAccountNext(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 agreements.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByBillingAccountNextSinglePageAsync(
+ 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
+ .listByBillingAccountNext(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/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementsImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementsImpl.java
new file mode 100644
index 000000000000..03ad2af45345
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementsImpl.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.billing.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.billing.BillingManager;
+import com.azure.resourcemanager.billing.fluent.AgreementsClient;
+import com.azure.resourcemanager.billing.fluent.models.AgreementInner;
+import com.azure.resourcemanager.billing.models.Agreement;
+import com.azure.resourcemanager.billing.models.Agreements;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class AgreementsImpl implements Agreements {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AgreementsImpl.class);
+
+ private final AgreementsClient innerClient;
+
+ private final BillingManager serviceManager;
+
+ public AgreementsImpl(AgreementsClient innerClient, BillingManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByBillingAccount(String billingAccountName) {
+ PagedIterable inner = this.serviceClient().listByBillingAccount(billingAccountName);
+ return inner.mapPage(inner1 -> new AgreementImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByBillingAccount(String billingAccountName, String expand, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByBillingAccount(billingAccountName, expand, context);
+ return inner.mapPage(inner1 -> new AgreementImpl(inner1, this.manager()));
+ }
+
+ public Agreement get(String billingAccountName, String agreementName) {
+ AgreementInner inner = this.serviceClient().get(billingAccountName, agreementName);
+ if (inner != null) {
+ return new AgreementImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String billingAccountName, String agreementName, String expand, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(billingAccountName, agreementName, expand, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new AgreementImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private AgreementsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private BillingManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AvailableBalanceImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AvailableBalanceImpl.java
new file mode 100644
index 000000000000..67773578b30d
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AvailableBalanceImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.implementation;
+
+import com.azure.resourcemanager.billing.BillingManager;
+import com.azure.resourcemanager.billing.fluent.models.AvailableBalanceInner;
+import com.azure.resourcemanager.billing.models.Amount;
+import com.azure.resourcemanager.billing.models.AvailableBalance;
+
+public final class AvailableBalanceImpl implements AvailableBalance {
+ private AvailableBalanceInner innerObject;
+
+ private final BillingManager serviceManager;
+
+ AvailableBalanceImpl(AvailableBalanceInner innerObject, BillingManager 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 Amount amount() {
+ return this.innerModel().amount();
+ }
+
+ public AvailableBalanceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private BillingManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AvailableBalancesClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AvailableBalancesClientImpl.java
new file mode 100644
index 000000000000..0b13489c9040
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AvailableBalancesClientImpl.java
@@ -0,0 +1,214 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.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.billing.fluent.AvailableBalancesClient;
+import com.azure.resourcemanager.billing.fluent.models.AvailableBalanceInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in AvailableBalancesClient. */
+public final class AvailableBalancesClientImpl implements AvailableBalancesClient {
+ private final ClientLogger logger = new ClientLogger(AvailableBalancesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final AvailableBalancesService service;
+
+ /** The service client containing this operation class. */
+ private final BillingManagementClientImpl client;
+
+ /**
+ * Initializes an instance of AvailableBalancesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AvailableBalancesClientImpl(BillingManagementClientImpl client) {
+ this.service =
+ RestProxy.create(AvailableBalancesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for BillingManagementClientAvailableBalances to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "BillingManagementCli")
+ private interface AvailableBalancesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}"
+ + "/availableBalance/default")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("billingAccountName") String billingAccountName,
+ @PathParam("billingProfileName") String billingProfileName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * The available credit balance for a billing profile. This is the balance that can be used for pay now to settle
+ * due or past due invoices. The operation is supported only for billing accounts with agreement type Microsoft
+ * Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 latest Azure credit balance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String billingAccountName, String billingProfileName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (billingAccountName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
+ }
+ if (billingProfileName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingProfileName is required and cannot be null."));
+ }
+ final String apiVersion = "2020-05-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ billingAccountName,
+ billingProfileName,
+ apiVersion,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * The available credit balance for a billing profile. This is the balance that can be used for pay now to settle
+ * due or past due invoices. The operation is supported only for billing accounts with agreement type Microsoft
+ * Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @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 latest Azure credit balance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String billingAccountName, String billingProfileName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (billingAccountName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
+ }
+ if (billingProfileName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingProfileName is required and cannot be null."));
+ }
+ final String apiVersion = "2020-05-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(this.client.getEndpoint(), billingAccountName, billingProfileName, apiVersion, accept, context);
+ }
+
+ /**
+ * The available credit balance for a billing profile. This is the balance that can be used for pay now to settle
+ * due or past due invoices. The operation is supported only for billing accounts with agreement type Microsoft
+ * Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 latest Azure credit balance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String billingAccountName, String billingProfileName) {
+ return getWithResponseAsync(billingAccountName, billingProfileName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * The available credit balance for a billing profile. This is the balance that can be used for pay now to settle
+ * due or past due invoices. The operation is supported only for billing accounts with agreement type Microsoft
+ * Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 latest Azure credit balance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AvailableBalanceInner get(String billingAccountName, String billingProfileName) {
+ return getAsync(billingAccountName, billingProfileName).block();
+ }
+
+ /**
+ * The available credit balance for a billing profile. This is the balance that can be used for pay now to settle
+ * due or past due invoices. The operation is supported only for billing accounts with agreement type Microsoft
+ * Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @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 latest Azure credit balance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String billingAccountName, String billingProfileName, Context context) {
+ return getWithResponseAsync(billingAccountName, billingProfileName, context).block();
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AvailableBalancesImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AvailableBalancesImpl.java
new file mode 100644
index 000000000000..6ef81c2a3444
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AvailableBalancesImpl.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.billing.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.billing.BillingManager;
+import com.azure.resourcemanager.billing.fluent.AvailableBalancesClient;
+import com.azure.resourcemanager.billing.fluent.models.AvailableBalanceInner;
+import com.azure.resourcemanager.billing.models.AvailableBalance;
+import com.azure.resourcemanager.billing.models.AvailableBalances;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class AvailableBalancesImpl implements AvailableBalances {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableBalancesImpl.class);
+
+ private final AvailableBalancesClient innerClient;
+
+ private final BillingManager serviceManager;
+
+ public AvailableBalancesImpl(AvailableBalancesClient innerClient, BillingManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public AvailableBalance get(String billingAccountName, String billingProfileName) {
+ AvailableBalanceInner inner = this.serviceClient().get(billingAccountName, billingProfileName);
+ if (inner != null) {
+ return new AvailableBalanceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String billingAccountName, String billingProfileName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(billingAccountName, billingProfileName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new AvailableBalanceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private AvailableBalancesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private BillingManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingAccountImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingAccountImpl.java
new file mode 100644
index 000000000000..93d97fdf516c
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingAccountImpl.java
@@ -0,0 +1,100 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.implementation;
+
+import com.azure.resourcemanager.billing.BillingManager;
+import com.azure.resourcemanager.billing.fluent.models.BillingAccountInner;
+import com.azure.resourcemanager.billing.models.AccountStatus;
+import com.azure.resourcemanager.billing.models.AccountType;
+import com.azure.resourcemanager.billing.models.AddressDetails;
+import com.azure.resourcemanager.billing.models.AgreementType;
+import com.azure.resourcemanager.billing.models.BillingAccount;
+import com.azure.resourcemanager.billing.models.BillingProfilesOnExpand;
+import com.azure.resourcemanager.billing.models.Department;
+import com.azure.resourcemanager.billing.models.Enrollment;
+import com.azure.resourcemanager.billing.models.EnrollmentAccount;
+import java.util.Collections;
+import java.util.List;
+
+public final class BillingAccountImpl implements BillingAccount {
+ private BillingAccountInner innerObject;
+
+ private final BillingManager serviceManager;
+
+ BillingAccountImpl(BillingAccountInner innerObject, BillingManager 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 displayName() {
+ return this.innerModel().displayName();
+ }
+
+ public AddressDetails soldTo() {
+ return this.innerModel().soldTo();
+ }
+
+ public AgreementType agreementType() {
+ return this.innerModel().agreementType();
+ }
+
+ public AccountType accountType() {
+ return this.innerModel().accountType();
+ }
+
+ public AccountStatus accountStatus() {
+ return this.innerModel().accountStatus();
+ }
+
+ public BillingProfilesOnExpand billingProfiles() {
+ return this.innerModel().billingProfiles();
+ }
+
+ public Enrollment enrollmentDetails() {
+ return this.innerModel().enrollmentDetails();
+ }
+
+ public List departments() {
+ List inner = this.innerModel().departments();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List enrollmentAccounts() {
+ List inner = this.innerModel().enrollmentAccounts();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Boolean hasReadAccess() {
+ return this.innerModel().hasReadAccess();
+ }
+
+ public BillingAccountInner innerModel() {
+ return this.innerObject;
+ }
+
+ private BillingManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingAccountsClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingAccountsClientImpl.java
new file mode 100644
index 000000000000..ccb8c1198bca
--- /dev/null
+++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingAccountsClientImpl.java
@@ -0,0 +1,949 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.billing.implementation;
+
+import com.azure.core.annotation.BodyParam;
+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.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+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.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.billing.fluent.BillingAccountsClient;
+import com.azure.resourcemanager.billing.fluent.models.BillingAccountInner;
+import com.azure.resourcemanager.billing.fluent.models.InvoiceSectionWithCreateSubPermissionInner;
+import com.azure.resourcemanager.billing.models.BillingAccountListResult;
+import com.azure.resourcemanager.billing.models.BillingAccountUpdateRequest;
+import com.azure.resourcemanager.billing.models.InvoiceSectionListWithCreateSubPermissionResult;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in BillingAccountsClient. */
+public final class BillingAccountsClientImpl implements BillingAccountsClient {
+ private final ClientLogger logger = new ClientLogger(BillingAccountsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final BillingAccountsService service;
+
+ /** The service client containing this operation class. */
+ private final BillingManagementClientImpl client;
+
+ /**
+ * Initializes an instance of BillingAccountsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BillingAccountsClientImpl(BillingManagementClientImpl client) {
+ this.service =
+ RestProxy.create(BillingAccountsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for BillingManagementClientBillingAccounts to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "BillingManagementCli")
+ private interface BillingAccountsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.Billing/billingAccounts")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @QueryParam("$expand") String expand,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.Billing/billingAccounts/{billingAccountName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("billingAccountName") String billingAccountName,
+ @QueryParam("$expand") String expand,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch("/providers/Microsoft.Billing/billingAccounts/{billingAccountName}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("billingAccountName") String billingAccountName,
+ @BodyParam("application/json") BillingAccountUpdateRequest parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}"
+ + "/listInvoiceSectionsWithCreateSubscriptionPermission")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>
+ listInvoiceSectionsByCreateSubscriptionPermission(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("billingAccountName") String billingAccountName,
+ @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);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>
+ listInvoiceSectionsByCreateSubscriptionPermissionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists the billing accounts that a user has access to.
+ *
+ * @param expand May be used to expand the soldTo, invoice sections and billing profiles.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 list of billing accounts.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String expand) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String apiVersion = "2020-05-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, expand, 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 the billing accounts that a user has access to.
+ *
+ * @param expand May be used to expand the soldTo, invoice sections and billing profiles.
+ * @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 list of billing accounts.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String expand, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String apiVersion = "2020-05-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), apiVersion, expand, accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists the billing accounts that a user has access to.
+ *
+ * @param expand May be used to expand the soldTo, invoice sections and billing profiles.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 list of billing accounts.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String expand) {
+ return new PagedFlux<>(() -> listSinglePageAsync(expand), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the billing accounts that a user has access to.
+ *
+ * @throws 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 list of billing accounts.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ final String expand = null;
+ return new PagedFlux<>(() -> listSinglePageAsync(expand), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the billing accounts that a user has access to.
+ *
+ * @param expand May be used to expand the soldTo, invoice sections and billing profiles.
+ * @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 list of billing accounts.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String expand, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(expand, context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists the billing accounts that a user has access to.
+ *
+ * @throws 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 list of billing accounts.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ final String expand = null;
+ return new PagedIterable<>(listAsync(expand));
+ }
+
+ /**
+ * Lists the billing accounts that a user has access to.
+ *
+ * @param expand May be used to expand the soldTo, invoice sections and billing profiles.
+ * @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 list of billing accounts.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String expand, Context context) {
+ return new PagedIterable<>(listAsync(expand, context));
+ }
+
+ /**
+ * Gets a billing account by its ID.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param expand May be used to expand the soldTo, invoice sections and billing profiles.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 billing account by its ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String billingAccountName, String expand) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (billingAccountName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
+ }
+ final String apiVersion = "2020-05-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service.get(this.client.getEndpoint(), apiVersion, billingAccountName, expand, accept, context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Gets a billing account by its ID.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param expand May be used to expand the soldTo, invoice sections and billing profiles.
+ * @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 billing account by its ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String billingAccountName, String expand, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (billingAccountName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
+ }
+ final String apiVersion = "2020-05-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), apiVersion, billingAccountName, expand, accept, context);
+ }
+
+ /**
+ * Gets a billing account by its ID.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param expand May be used to expand the soldTo, invoice sections and billing profiles.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 billing account by its ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String billingAccountName, String expand) {
+ return getWithResponseAsync(billingAccountName, expand)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets a billing account by its ID.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 billing account by its ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String billingAccountName) {
+ final String expand = null;
+ return getWithResponseAsync(billingAccountName, expand)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets a billing account by its ID.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 billing account by its ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BillingAccountInner get(String billingAccountName) {
+ final String expand = null;
+ return getAsync(billingAccountName, expand).block();
+ }
+
+ /**
+ * Gets a billing account by its ID.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param expand May be used to expand the soldTo, invoice sections and billing profiles.
+ * @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 billing account by its ID.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String billingAccountName, String expand, Context context) {
+ return getWithResponseAsync(billingAccountName, expand, context).block();
+ }
+
+ /**
+ * Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the update billing account 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 billing account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String billingAccountName, BillingAccountUpdateRequest parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (billingAccountName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingAccountName 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 apiVersion = "2020-05-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(this.client.getEndpoint(), apiVersion, billingAccountName, parameters, accept, context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the update billing account 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 billing account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String billingAccountName, BillingAccountUpdateRequest parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (billingAccountName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingAccountName 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 apiVersion = "2020-05-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.update(this.client.getEndpoint(), apiVersion, billingAccountName, parameters, accept, context);
+ }
+
+ /**
+ * Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the update billing account 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 billing account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, BillingAccountInner> beginUpdateAsync(
+ String billingAccountName, BillingAccountUpdateRequest parameters) {
+ Mono>> mono = updateWithResponseAsync(billingAccountName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ BillingAccountInner.class,
+ BillingAccountInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the update billing account 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 billing account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, BillingAccountInner> beginUpdateAsync(
+ String billingAccountName, BillingAccountUpdateRequest parameters, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = updateWithResponseAsync(billingAccountName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), BillingAccountInner.class, BillingAccountInner.class, context);
+ }
+
+ /**
+ * Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the update billing account 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 billing account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, BillingAccountInner> beginUpdate(
+ String billingAccountName, BillingAccountUpdateRequest parameters) {
+ return beginUpdateAsync(billingAccountName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the update billing account 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 billing account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, BillingAccountInner> beginUpdate(
+ String billingAccountName, BillingAccountUpdateRequest parameters, Context context) {
+ return beginUpdateAsync(billingAccountName, parameters, context).getSyncPoller();
+ }
+
+ /**
+ * Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the update billing account 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 billing account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String billingAccountName, BillingAccountUpdateRequest parameters) {
+ return beginUpdateAsync(billingAccountName, parameters).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the update billing account 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 billing account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String billingAccountName, BillingAccountUpdateRequest parameters, Context context) {
+ return beginUpdateAsync(billingAccountName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the update billing account 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 billing account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BillingAccountInner update(String billingAccountName, BillingAccountUpdateRequest parameters) {
+ return updateAsync(billingAccountName, parameters).block();
+ }
+
+ /**
+ * Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @param parameters Request parameters that are provided to the update billing account 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 billing account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BillingAccountInner update(
+ String billingAccountName, BillingAccountUpdateRequest parameters, Context context) {
+ return updateAsync(billingAccountName, parameters, context).block();
+ }
+
+ /**
+ * Lists the invoice sections for which the user has permission to create Azure subscriptions. The operation is
+ * supported only for billing accounts with agreement type Microsoft Customer Agreement.
+ *
+ * @param billingAccountName The ID that uniquely identifies a billing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 list of invoice section properties with create subscription permission.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono