diff --git a/.azure-pipelines/docs.yml b/.azure-pipelines/docs.yml
index f83f220ff14d..a66d7513ec1d 100644
--- a/.azure-pipelines/docs.yml
+++ b/.azure-pipelines/docs.yml
@@ -11,7 +11,7 @@ jobs:
skipComponentGovernanceDetection: true
timeoutInMinutes: 120
pool:
- vmImage: 'vs2017-win2016'
+ vmImage: 'windows-2019'
steps:
- powershell: |
@@ -79,7 +79,7 @@ jobs:
skipComponentGovernanceDetection: true
timeoutInMinutes: 120
pool:
- vmImage: 'vs2017-win2016'
+ vmImage: 'windows-2019'
steps:
# We `install` separately from running `site:site site:stage` so that the `install` brings in the non-shipping-modules,
@@ -96,6 +96,18 @@ jobs:
publishJUnitResults: false
goals: 'install'
+ - task: Maven@3
+ displayName: 'Install azure-sdk-parent'
+ inputs:
+ mavenPomFile: parent/pom.xml
+ options: '$(DefaultOptions) -DskipTests -Dgpg.skip'
+ mavenOptions: '$(LoggingOptions)'
+ javaHomeOption: 'JDKVersion'
+ jdkVersionOption: '1.11'
+ jdkArchitectureOption: 'x64'
+ publishJUnitResults: false
+ goals: 'install'
+
- task: Maven@3
displayName: 'Install Data Packages'
inputs:
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 3352c4744a3b..f3a1a4beab5d 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -10,6 +10,7 @@
# Service teams
/sdk/appconfiguration/ @alzimmermsft @conniey @sima-zhu
+/sdk/batch/ @xingwu1 @bgklein @matthchr
/sdk/core/ @alzimmermsft @jianghaolu @srnagar @hemanttanwar
/sdk/cosmos/ @moderakh @christopheranderson @kushagraThapar
/sdk/eventhubs/ @conniey @srnagar @mssfang
@@ -18,7 +19,7 @@
/sdk/servicebus/ @yvgopal @nemakam
/sdk/tracing/ @samvaity @alzimmermsft
-/sdk/storage/ @rickle-msft @jaschrep-msft @alzimmermsft @sima-zhu
+/sdk/storage/ @rickle-msft @jaschrep-msft @gapra-msft @alzimmermsft @sima-zhu
# Management Plane
/**/resource-manager/ @yaohaizh
@@ -28,5 +29,8 @@
###########
/eng/ @weshaggard @mitchdenny @danieljurek
/eng/code-quality-reports/ @mssfang @JonathanGiles
+/eng/jacoco-test-coverage/ @srnagar @JonathanGiles
+/eng/spotbugs-aggregate-report/ @srnagar @JonathanGiles
+
/**/tests.yml @danieljurek
/**/ci.yml @mitchdenny
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 2ef9810e8c56..f3baa1c0ba4a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,5 +1,49 @@
# How to contribute
-If you encounter any bugs with the library please file an issue in the [Issues](https://github.com/Azure/azure-sdk-for-java/issues) section of the project.
+Thank you for your interest in contributing to Azure SDK for Java.
-If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft Azure Projects Contribution Guidelines](http://azure.github.com/guidelines.html).
\ No newline at end of file
+## About Azure SDK for java project
+
+- For reporting bugs, requesting features or asking for support, please file an issue in the [issues](https://github.com/Azure/azure-sdk-for-java/issues) section of the project.
+
+- If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft Azure Projects Contribution Guidelines](http://azure.github.com/guidelines.html).
+
+- To make code changes, or contribute something new, please follow the [GitHub Forks / Pull requests model](https://help.github.com/articles/fork-a-repo/): Fork the repo, make the change and propose it back by submitting a pull request.
+
+- Refer to the [wiki](https://github.com/Azure/azure-sdk-for-java/wiki/Building#testing-for-spotbugs-and-checkstyle-issues) to learn about how Azure SDK for java generates CheckStyle, SpotBugs, Jacoco, and JavaDoc reports.
+
+- There are two Maven projects in the repo. Refer to the [wiki](https://github.com/Azure/azure-sdk-for-java/wiki/Building#pomclientxml-vs-pomdataxml) to learn about project structure for each.
+
+## Developer Guide
+
+### Pre-requisites
+- Install Java Development Kit 8
+ - add `JAVA_HOME` to environment variables
+- Install [Maven](http://maven.apache.org/download.cgi)
+ - add `MAVEN_HOME` to environment variables
+
+
+>**Note:** If you are on `Windows`, enable paths longer than 260 characters by:
+1.- Run this as Administrator on a command prompt:
+`REG ADD HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1` *(might need to type `yes` to override key if it already exists)*
+2.- Set up `git` by running: `git config --system core.longpaths true`
+
+### Building and Testing
+The easiest way to build is by running the following command from the root folder:
+```
+mvn -f pom.client.xml -Dgpg.skip -DskipTests clean install
+```
+- `-f pom.client.xml`: tells maven to target latest Azure SDK for Java project.
+- `-Dgpg.skip`: disables [gpg](https://mran.microsoft.com/snapshot/2016-12-19/web/packages/gpg/vignettes/intro.html) signing.
+- `-DskipTests:` Building without running unit tests would speed operation up, however, make sure all tests pass before creating a new PR.
+- `clean:` will remove any previous generated output.
+- `install:` compiles project and installs it in the local Maven cache.
+
+>**Note**: Refer to [wiki](https://github.com/Azure/azure-sdk-for-java/wiki/Building) for learning about how to build using Java 11
+
+### Compiling one project only
+```
+mvn -f sdk/{projectForlderDir}/pom.xml -Dgpg.skip clean install
+
+//example: mvn -f sdk/keyvault/azure-keyvault-keys/pom.xml clean install
+```
diff --git a/README.md b/README.md
index 3a89fec4d97e..8d01aaa910b2 100644
--- a/README.md
+++ b/README.md
@@ -14,27 +14,31 @@ To get started with a specific library, see the **README.md** file located in th
For tutorials, samples, quick starts and other documentation, visit [Azure for Java Developers](https://docs.microsoft.com/java/azure/).
### Prerequisites
-Java 8 or later is required to use the July 2019 client preview libraries, otherwise Java 7 or later is required.
+Java 8 or later is required to use the September 2019 client preview libraries, otherwise Java 7 or later is required.
## Packages available
Each service might have a number of libraries available from each of the following categories:
-* [Client - July 2019 Preview](#Client-July-2019-Preview)
+* [Client - September 2019 Preview](#Client-September-2019-Preview)
* [Client - Stable](#Client-Stable)
* [Management](#Management)
-### Client: July 2019 Preview
-New wave of packages that we are currently releasing in **preview**. These libraries follow the [Azure SDK Design Guidelines for Java](https://azuresdkspecs.z5.web.core.windows.net/JavaSpec.html) and share a number of core features such as HTTP retries, logging, transport protocols, authentication protocols, etc., so that once you learn how to use these features in one client library, you will know how to use them in other client libraries. You can learn about these shared features [here](core).
+### Client: September 2019 Preview
+New wave of packages that we are currently releasing in **preview**. These libraries follow the [Azure SDK Design Guidelines for Java](https://azure.github.io/azure-sdk/java/guidelines/) and share a number of core features such as HTTP retries, logging, transport protocols, authentication protocols, etc., so that once you learn how to use these features in one client library, you will know how to use them in other client libraries. You can learn about these shared features [here](core).
These preview libraries can be easily identified by their folder, package, and namespaces names starting with `azure-`, e.g. `azure-keyvault`.
-The libraries released in the July 2019 preview:
+The libraries released in the September 2019 preview:
- [App Configuration](sdk/appconfiguration/azure-data-appconfiguration/README.md)
- [Event Hubs](sdk/eventhubs/azure-messaging-eventhubs/README.md)
+- [Event Hubs Checkpoint Store](sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/README.md)
- [Identity](sdk/identity/azure-identity/README.md)
+- [Key Vault Certificates](sdk/keyvault/azure-keyvault-certificates/README.md)
- [Key Vault Keys](sdk/keyvault/azure-keyvault-keys/README.md)
-- [Key Vault Secrets](sdk/keyvault/client/azure-keyvault-secrets/README.md)
+- [Key Vault Secrets](sdk/keyvault/azure-keyvault-secrets/README.md)
- [Storage Blobs](sdk/storage/azure-storage-blob/README.md)
+- [Storage Files](sdk/storage/azure-storage-file/README.md)
+- [Storage Queues](sdk/storage/azure-storage-queue/README.md)
>NOTE: If you need to ensure your code is ready for production, use one of the stable libraries.
diff --git a/api-specs.json b/api-specs.json
index bd963d00995b..0166ab5c4fdb 100644
--- a/api-specs.json
+++ b/api-specs.json
@@ -34,6 +34,10 @@
"source": "specification/authorization/resource-manager/readme.md",
"args": "--multiapi --fluent"
},
+ "azure-kusto/resource-manager": {
+ "source": "specification/azure-kusto/resource-manager/readme.md",
+ "args": "--multiapi --fluent"
+ },
"azurestack/resource-manager": {
"source": "specification/azurestack/resource-manager/readme.md",
"args": "--multiapi --fluent"
@@ -272,6 +276,10 @@
"source": "specification/storage/resource-manager/readme.md",
"args": "--multiapi --fluent"
},
+ "storagecache/resource-manager": {
+ "source": "specification/storagecache/resource-manager/readme.md",
+ "args": "--multiapi --fluent"
+ },
"storageimportexport/resource-manager": {
"source": "specification/storageimportexport/resource-manager/readme.md",
"args": "--multiapi --fluent"
diff --git a/billing/resource-manager/v2017_02_27_preview/pom.xml b/billing/resource-manager/v2017_02_27_preview/pom.xml
new file mode 100644
index 000000000000..9db22d20663f
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/pom.xml
@@ -0,0 +1,133 @@
+
+
+ 4.0.0
+ com.microsoft.azure.billing.v2017_02_27_preview
+
+ com.microsoft.azure
+ azure-arm-parent
+ 0.0.3-beta
+ ../../../pom.xml
+
+ azure-mgmt-billing
+ 1.0.0-beta
+ jar
+ Microsoft Azure SDK for Billing Management
+ This package contains Microsoft Billing Management SDK.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+ UTF-8
+
+
+
+
+ microsoft
+ Microsoft
+
+
+
+
+ com.microsoft.azure
+ azure-client-runtime
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+
+
+ junit
+ junit
+ test
+
+
+ com.microsoft.azure
+ azure-client-authentication
+ test
+
+
+ com.microsoft.azure
+ azure-mgmt-resources
+ test
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+ test-jar
+ test
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ true
+ true
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.1
+
+ 1.7
+ 1.7
+
+
+ com.microsoft.azure.management.apigeneration.LangDefinitionProcessor
+
+
+ true
+ true
+
+ true
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.8
+
+ *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
+
+
+ /**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+ ]]>
+
+
+
+
+
+
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/DownloadUrl.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/DownloadUrl.java
new file mode 100644
index 000000000000..25dd79e95319
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/DownloadUrl.java
@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview;
+
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * A secure URL that can be used to download a PDF invoice until the URL
+ * expires.
+ */
+public class DownloadUrl {
+ /**
+ * The time in UTC at which this download URL will expire.
+ */
+ @JsonProperty(value = "expiryTime", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime expiryTime;
+
+ /**
+ * The URL to the PDF file.
+ */
+ @JsonProperty(value = "url", access = JsonProperty.Access.WRITE_ONLY)
+ private String url;
+
+ /**
+ * Get the time in UTC at which this download URL will expire.
+ *
+ * @return the expiryTime value
+ */
+ public DateTime expiryTime() {
+ return this.expiryTime;
+ }
+
+ /**
+ * Get the URL to the PDF file.
+ *
+ * @return the url value
+ */
+ public String url() {
+ return this.url;
+ }
+
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/ErrorDetails.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/ErrorDetails.java
new file mode 100644
index 000000000000..f29943ab0e83
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/ErrorDetails.java
@@ -0,0 +1,62 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The details of the error.
+ */
+public class ErrorDetails {
+ /**
+ * Error code.
+ */
+ @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY)
+ private String code;
+
+ /**
+ * Error message indicating why the operation failed.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
+ /**
+ * The target of the particular error.
+ */
+ @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY)
+ private String target;
+
+ /**
+ * Get error code.
+ *
+ * @return the code value
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Get error message indicating why the operation failed.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Get the target of the particular error.
+ *
+ * @return the target value
+ */
+ public String target() {
+ return this.target;
+ }
+
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/ErrorResponse.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/ErrorResponse.java
new file mode 100644
index 000000000000..2f58153b1991
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/ErrorResponse.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Error response indicates that the service is not able to process the
+ * incoming request. The reason is provided in the error message.
+ */
+public class ErrorResponse {
+ /**
+ * The error property.
+ */
+ @JsonProperty(value = "error")
+ private ErrorDetails error;
+
+ /**
+ * Get the error value.
+ *
+ * @return the error value
+ */
+ public ErrorDetails error() {
+ return this.error;
+ }
+
+ /**
+ * Set the error value.
+ *
+ * @param error the error value to set
+ * @return the ErrorResponse object itself.
+ */
+ public ErrorResponse withError(ErrorDetails error) {
+ this.error = error;
+ return this;
+ }
+
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/ErrorResponseException.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/ErrorResponseException.java
new file mode 100644
index 000000000000..749c77d54031
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/ErrorResponseException.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview;
+
+import com.microsoft.rest.RestException;
+import okhttp3.ResponseBody;
+import retrofit2.Response;
+
+/**
+ * Exception thrown for an invalid response with ErrorResponse information.
+ */
+public class ErrorResponseException extends RestException {
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ */
+ public ErrorResponseException(final String message, final Response response) {
+ super(message, response);
+ }
+
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ * @param body the deserialized response body
+ */
+ public ErrorResponseException(final String message, final Response response, final ErrorResponse body) {
+ super(message, response, body);
+ }
+
+ @Override
+ public ErrorResponse body() {
+ return (ErrorResponse) super.body();
+ }
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/Invoice.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/Invoice.java
new file mode 100644
index 000000000000..5612f9952e53
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/Invoice.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.billing.v2017_02_27_preview.implementation.InvoiceInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.billing.v2017_02_27_preview.implementation.BillingManager;
+import org.joda.time.LocalDate;
+
+/**
+ * Type representing Invoice.
+ */
+public interface Invoice extends HasInner, Indexable, Refreshable, HasManager {
+ /**
+ * @return the downloadUrl value.
+ */
+ DownloadUrl downloadUrl();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the invoicePeriodEndDate value.
+ */
+ LocalDate invoicePeriodEndDate();
+
+ /**
+ * @return the invoicePeriodStartDate value.
+ */
+ LocalDate invoicePeriodStartDate();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/Invoices.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/Invoices.java
new file mode 100644
index 000000000000..87ebab77f800
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/Invoices.java
@@ -0,0 +1,37 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview;
+
+import com.microsoft.azure.arm.collection.SupportsListing;
+import rx.Observable;
+import com.microsoft.azure.management.billing.v2017_02_27_preview.implementation.InvoicesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Invoices.
+ */
+public interface Invoices extends SupportsListing, HasInner {
+ /**
+ * Gets a named invoice resource. When getting a single invoice, the downloadUrl property is expanded automatically.
+ *
+ * @param invoiceName The name of an invoice resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String invoiceName);
+
+ /**
+ * Gets the most recent invoice. When getting a single invoice, the downloadUrl property is expanded automatically.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getLatestAsync();
+
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/Operation.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/Operation.java
new file mode 100644
index 000000000000..d50c81d585c9
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/Operation.java
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.billing.v2017_02_27_preview.implementation.BillingManager;
+import com.microsoft.azure.management.billing.v2017_02_27_preview.implementation.OperationInner;
+
+/**
+ * Type representing Operation.
+ */
+public interface Operation extends HasInner, HasManager {
+ /**
+ * @return the display value.
+ */
+ OperationDisplay display();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/OperationDisplay.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/OperationDisplay.java
new file mode 100644
index 000000000000..8c583bb7c593
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/OperationDisplay.java
@@ -0,0 +1,62 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The object that represents the operation.
+ */
+public class OperationDisplay {
+ /**
+ * Service provider: Microsoft.Billing.
+ */
+ @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY)
+ private String provider;
+
+ /**
+ * Resource on which the operation is performed: Invoice, etc.
+ */
+ @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY)
+ private String resource;
+
+ /**
+ * Operation type: Read, write, delete, etc.
+ */
+ @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY)
+ private String operation;
+
+ /**
+ * Get service provider: Microsoft.Billing.
+ *
+ * @return the provider value
+ */
+ public String provider() {
+ return this.provider;
+ }
+
+ /**
+ * Get resource on which the operation is performed: Invoice, etc.
+ *
+ * @return the resource value
+ */
+ public String resource() {
+ return this.resource;
+ }
+
+ /**
+ * Get operation type: Read, write, delete, etc.
+ *
+ * @return the operation value
+ */
+ public String operation() {
+ return this.operation;
+ }
+
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/Operations.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/Operations.java
new file mode 100644
index 000000000000..4f38907de0e0
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/Operations.java
@@ -0,0 +1,27 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview;
+
+import rx.Observable;
+import com.microsoft.azure.management.billing.v2017_02_27_preview.implementation.OperationsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Operations.
+ */
+public interface Operations extends HasInner {
+ /**
+ * Lists all of the available billing REST API operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/BillingClientImpl.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/BillingClientImpl.java
new file mode 100644
index 000000000000..7a87c5582584
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/BillingClientImpl.java
@@ -0,0 +1,210 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview.implementation;
+
+import com.microsoft.azure.AzureClient;
+import com.microsoft.azure.AzureServiceClient;
+import com.microsoft.rest.credentials.ServiceClientCredentials;
+import com.microsoft.rest.RestClient;
+
+/**
+ * Initializes a new instance of the BillingClientImpl class.
+ */
+public class BillingClientImpl extends AzureServiceClient {
+ /** the {@link AzureClient} used for long running operations. */
+ private AzureClient azureClient;
+
+ /**
+ * Gets the {@link AzureClient} used for long running operations.
+ * @return the azure client;
+ */
+ public AzureClient getAzureClient() {
+ return this.azureClient;
+ }
+
+ /** Version of the API to be used with the client request. The current version is 2017-02-27-preview. */
+ private String apiVersion;
+
+ /**
+ * Gets Version of the API to be used with the client request. The current version is 2017-02-27-preview.
+ *
+ * @return the apiVersion value.
+ */
+ public String apiVersion() {
+ return this.apiVersion;
+ }
+
+ /** Azure Subscription ID. */
+ private String subscriptionId;
+
+ /**
+ * Gets Azure Subscription ID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * Sets Azure Subscription ID.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the service client itself
+ */
+ public BillingClientImpl withSubscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /** The preferred language for the response. */
+ private String acceptLanguage;
+
+ /**
+ * Gets The preferred language for the response.
+ *
+ * @return the acceptLanguage value.
+ */
+ public String acceptLanguage() {
+ return this.acceptLanguage;
+ }
+
+ /**
+ * Sets The preferred language for the response.
+ *
+ * @param acceptLanguage the acceptLanguage value.
+ * @return the service client itself
+ */
+ public BillingClientImpl withAcceptLanguage(String acceptLanguage) {
+ this.acceptLanguage = acceptLanguage;
+ return this;
+ }
+
+ /** The retry timeout in seconds for Long Running Operations. Default value is 30. */
+ private int longRunningOperationRetryTimeout;
+
+ /**
+ * Gets The retry timeout in seconds for Long Running Operations. Default value is 30.
+ *
+ * @return the longRunningOperationRetryTimeout value.
+ */
+ public int longRunningOperationRetryTimeout() {
+ return this.longRunningOperationRetryTimeout;
+ }
+
+ /**
+ * Sets The retry timeout in seconds for Long Running Operations. Default value is 30.
+ *
+ * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value.
+ * @return the service client itself
+ */
+ public BillingClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) {
+ this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout;
+ return this;
+ }
+
+ /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */
+ private boolean generateClientRequestId;
+
+ /**
+ * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
+ *
+ * @return the generateClientRequestId value.
+ */
+ public boolean generateClientRequestId() {
+ return this.generateClientRequestId;
+ }
+
+ /**
+ * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
+ *
+ * @param generateClientRequestId the generateClientRequestId value.
+ * @return the service client itself
+ */
+ public BillingClientImpl withGenerateClientRequestId(boolean generateClientRequestId) {
+ this.generateClientRequestId = generateClientRequestId;
+ return this;
+ }
+
+ /**
+ * The InvoicesInner object to access its operations.
+ */
+ private InvoicesInner invoices;
+
+ /**
+ * Gets the InvoicesInner object to access its operations.
+ * @return the InvoicesInner object.
+ */
+ public InvoicesInner invoices() {
+ return this.invoices;
+ }
+
+ /**
+ * The OperationsInner object to access its operations.
+ */
+ private OperationsInner operations;
+
+ /**
+ * Gets the OperationsInner object to access its operations.
+ * @return the OperationsInner object.
+ */
+ public OperationsInner operations() {
+ return this.operations;
+ }
+
+ /**
+ * Initializes an instance of BillingClient client.
+ *
+ * @param credentials the management credentials for Azure
+ */
+ public BillingClientImpl(ServiceClientCredentials credentials) {
+ this("https://management.azure.com", credentials);
+ }
+
+ /**
+ * Initializes an instance of BillingClient client.
+ *
+ * @param baseUrl the base URL of the host
+ * @param credentials the management credentials for Azure
+ */
+ public BillingClientImpl(String baseUrl, ServiceClientCredentials credentials) {
+ super(baseUrl, credentials);
+ initialize();
+ }
+
+ /**
+ * Initializes an instance of BillingClient client.
+ *
+ * @param restClient the REST client to connect to Azure.
+ */
+ public BillingClientImpl(RestClient restClient) {
+ super(restClient);
+ initialize();
+ }
+
+ protected void initialize() {
+ this.apiVersion = "2017-02-27-preview";
+ this.acceptLanguage = "en-US";
+ this.longRunningOperationRetryTimeout = 30;
+ this.generateClientRequestId = true;
+ this.invoices = new InvoicesInner(restClient().retrofit(), this);
+ this.operations = new OperationsInner(restClient().retrofit(), this);
+ this.azureClient = new AzureClient(this);
+ }
+
+ /**
+ * Gets the User-Agent header for the client.
+ *
+ * @return the user agent string.
+ */
+ @Override
+ public String userAgent() {
+ return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "BillingClient", "2017-02-27-preview");
+ }
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/BillingManager.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/BillingManager.java
new file mode 100644
index 000000000000..974c93ed70cd
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/BillingManager.java
@@ -0,0 +1,111 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview.implementation;
+
+import com.microsoft.azure.AzureEnvironment;
+import com.microsoft.azure.AzureResponseBuilder;
+import com.microsoft.azure.credentials.AzureTokenCredentials;
+import com.microsoft.azure.management.apigeneration.Beta;
+import com.microsoft.azure.management.apigeneration.Beta.SinceVersion;
+import com.microsoft.azure.arm.resources.AzureConfigurable;
+import com.microsoft.azure.serializer.AzureJacksonAdapter;
+import com.microsoft.rest.RestClient;
+import com.microsoft.azure.management.billing.v2017_02_27_preview.Invoices;
+import com.microsoft.azure.management.billing.v2017_02_27_preview.Operations;
+import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl;
+import com.microsoft.azure.arm.resources.implementation.ManagerCore;
+
+/**
+ * Entry point to Azure Billing resource management.
+ */
+public final class BillingManager extends ManagerCore {
+ private Invoices invoices;
+ private Operations operations;
+ /**
+ * Get a Configurable instance that can be used to create BillingManager with optional configuration.
+ *
+ * @return the instance allowing configurations
+ */
+ public static Configurable configure() {
+ return new BillingManager.ConfigurableImpl();
+ }
+ /**
+ * Creates an instance of BillingManager that exposes Billing resource management API entry points.
+ *
+ * @param credentials the credentials to use
+ * @param subscriptionId the subscription UUID
+ * @return the BillingManager
+ */
+ public static BillingManager authenticate(AzureTokenCredentials credentials, String subscriptionId) {
+ return new BillingManager(new RestClient.Builder()
+ .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER)
+ .withCredentials(credentials)
+ .withSerializerAdapter(new AzureJacksonAdapter())
+ .withResponseBuilderFactory(new AzureResponseBuilder.Factory())
+ .build(), subscriptionId);
+ }
+ /**
+ * Creates an instance of BillingManager that exposes Billing resource management API entry points.
+ *
+ * @param restClient the RestClient to be used for API calls.
+ * @param subscriptionId the subscription UUID
+ * @return the BillingManager
+ */
+ public static BillingManager authenticate(RestClient restClient, String subscriptionId) {
+ return new BillingManager(restClient, subscriptionId);
+ }
+ /**
+ * The interface allowing configurations to be set.
+ */
+ public interface Configurable extends AzureConfigurable {
+ /**
+ * Creates an instance of BillingManager that exposes Billing management API entry points.
+ *
+ * @param credentials the credentials to use
+ * @param subscriptionId the subscription UUID
+ * @return the interface exposing Billing management API entry points that work across subscriptions
+ */
+ BillingManager authenticate(AzureTokenCredentials credentials, String subscriptionId);
+ }
+
+ /**
+ * @return Entry point to manage Invoices.
+ */
+ public Invoices invoices() {
+ if (this.invoices == null) {
+ this.invoices = new InvoicesImpl(this);
+ }
+ return this.invoices;
+ }
+
+ /**
+ * @return Entry point to manage Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(this);
+ }
+ return this.operations;
+ }
+
+ /**
+ * The implementation for Configurable interface.
+ */
+ private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable {
+ public BillingManager authenticate(AzureTokenCredentials credentials, String subscriptionId) {
+ return BillingManager.authenticate(buildRestClient(credentials), subscriptionId);
+ }
+ }
+ private BillingManager(RestClient restClient, String subscriptionId) {
+ super(
+ restClient,
+ subscriptionId,
+ new BillingClientImpl(restClient).withSubscriptionId(subscriptionId));
+ }
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/IdParsingUtils.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/IdParsingUtils.java
new file mode 100644
index 000000000000..815c2fdab6c1
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/IdParsingUtils.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview.implementation;
+import java.util.Arrays;
+import java.util.Iterator;
+
+class IdParsingUtils {
+ public static String getValueFromIdByName(String id, String name) {
+ if (id == null) {
+ return null;
+ }
+ Iterable iterable = Arrays.asList(id.split("/"));
+ Iterator itr = iterable.iterator();
+ while (itr.hasNext()) {
+ String part = itr.next();
+ if (part != null && part.trim() != "") {
+ if (part.equalsIgnoreCase(name)) {
+ if (itr.hasNext()) {
+ return itr.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ public static String getValueFromIdByPosition(String id, int pos) {
+ if (id == null) {
+ return null;
+ }
+ Iterable iterable = Arrays.asList(id.split("/"));
+ Iterator itr = iterable.iterator();
+ int index = 0;
+ while (itr.hasNext()) {
+ String part = itr.next();
+ if (part != null && part.trim() != "") {
+ if (index == pos) {
+ if (itr.hasNext()) {
+ return itr.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ index++;
+ }
+ return null;
+ }
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/InvoiceImpl.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/InvoiceImpl.java
new file mode 100644
index 000000000000..e0e127dc2a71
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/InvoiceImpl.java
@@ -0,0 +1,72 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ *
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview.implementation;
+
+import com.microsoft.azure.management.billing.v2017_02_27_preview.Invoice;
+import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl;
+import rx.Observable;
+import com.microsoft.azure.management.billing.v2017_02_27_preview.DownloadUrl;
+import org.joda.time.LocalDate;
+
+class InvoiceImpl extends IndexableRefreshableWrapperImpl implements Invoice {
+ private String invoiceName;
+ private final BillingManager manager;
+
+ InvoiceImpl(InvoiceInner inner, BillingManager manager) {
+ super(null, inner);
+ this.manager = manager;
+ // set resource ancestor and positional variables
+ this.invoiceName = IdParsingUtils.getValueFromIdByName(inner.id(), "invoices");
+ }
+
+ @Override
+ public BillingManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ InvoicesInner client = this.manager().inner().invoices();
+ return client.getAsync(this.invoiceName);
+ }
+
+
+
+ @Override
+ public DownloadUrl downloadUrl() {
+ return this.inner().downloadUrl();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public LocalDate invoicePeriodEndDate() {
+ return this.inner().invoicePeriodEndDate();
+ }
+
+ @Override
+ public LocalDate invoicePeriodStartDate() {
+ return this.inner().invoicePeriodStartDate();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/InvoiceInner.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/InvoiceInner.java
new file mode 100644
index 000000000000..2b29ddb0f69d
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/InvoiceInner.java
@@ -0,0 +1,79 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview.implementation;
+
+import org.joda.time.LocalDate;
+import com.microsoft.azure.management.billing.v2017_02_27_preview.DownloadUrl;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * An invoice resource can be used download a PDF version of an invoice.
+ */
+@JsonFlatten
+public class InvoiceInner extends ProxyResource {
+ /**
+ * The start of the date range covered by the invoice.
+ */
+ @JsonProperty(value = "properties.invoicePeriodStartDate", access = JsonProperty.Access.WRITE_ONLY)
+ private LocalDate invoicePeriodStartDate;
+
+ /**
+ * The end of the date range covered by the invoice.
+ */
+ @JsonProperty(value = "properties.invoicePeriodEndDate", access = JsonProperty.Access.WRITE_ONLY)
+ private LocalDate invoicePeriodEndDate;
+
+ /**
+ * A secure link to download the PDF version of an invoice. The link will
+ * cease to work after its expiry time is reached.
+ */
+ @JsonProperty(value = "properties.downloadUrl")
+ private DownloadUrl downloadUrl;
+
+ /**
+ * Get the start of the date range covered by the invoice.
+ *
+ * @return the invoicePeriodStartDate value
+ */
+ public LocalDate invoicePeriodStartDate() {
+ return this.invoicePeriodStartDate;
+ }
+
+ /**
+ * Get the end of the date range covered by the invoice.
+ *
+ * @return the invoicePeriodEndDate value
+ */
+ public LocalDate invoicePeriodEndDate() {
+ return this.invoicePeriodEndDate;
+ }
+
+ /**
+ * Get a secure link to download the PDF version of an invoice. The link will cease to work after its expiry time is reached.
+ *
+ * @return the downloadUrl value
+ */
+ public DownloadUrl downloadUrl() {
+ return this.downloadUrl;
+ }
+
+ /**
+ * Set a secure link to download the PDF version of an invoice. The link will cease to work after its expiry time is reached.
+ *
+ * @param downloadUrl the downloadUrl value to set
+ * @return the InvoiceInner object itself.
+ */
+ public InvoiceInner withDownloadUrl(DownloadUrl downloadUrl) {
+ this.downloadUrl = downloadUrl;
+ return this;
+ }
+
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/InvoicesImpl.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/InvoicesImpl.java
new file mode 100644
index 000000000000..988869488b2a
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/InvoicesImpl.java
@@ -0,0 +1,92 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * jkl
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.billing.v2017_02_27_preview.Invoices;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.PagedList;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.billing.v2017_02_27_preview.Invoice;
+import com.microsoft.azure.arm.utils.PagedListConverter;
+
+class InvoicesImpl extends WrapperImpl implements Invoices {
+ private PagedListConverter converter;
+ private final BillingManager manager;
+
+ InvoicesImpl(BillingManager manager) {
+ super(manager.inner().invoices());
+ this.manager = manager;
+ this.converter = new PagedListConverter() {
+ @Override
+ public Observable typeConvertAsync(InvoiceInner inner) {
+ return Observable.just((Invoice) wrapModel(inner));
+ }
+ };
+ }
+
+ public BillingManager manager() {
+ return this.manager;
+ }
+
+ private InvoiceImpl wrapModel(InvoiceInner inner) {
+ return new InvoiceImpl(inner, manager());
+ }
+
+ @Override
+ public Observable getAsync(String invoiceName) {
+ InvoicesInner client = this.inner();
+ return client.getAsync(invoiceName)
+ .map(new Func1() {
+ @Override
+ public Invoice call(InvoiceInner inner) {
+ return new InvoiceImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable getLatestAsync() {
+ InvoicesInner client = this.inner();
+ return client.getLatestAsync()
+ .map(new Func1() {
+ @Override
+ public Invoice call(InvoiceInner inner) {
+ return new InvoiceImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public PagedList list() {
+ InvoicesInner client = this.inner();
+ return converter.convert(client.list());
+ }
+
+ @Override
+ public Observable listAsync() {
+ InvoicesInner client = this.inner();
+ return client.listAsync()
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public Invoice call(InvoiceInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/InvoicesInner.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/InvoicesInner.java
new file mode 100644
index 000000000000..d03109e68107
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/InvoicesInner.java
@@ -0,0 +1,571 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceFuture;
+import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.management.billing.v2017_02_27_preview.ErrorResponseException;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.PagedList;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import java.io.IOException;
+import java.util.List;
+import okhttp3.ResponseBody;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.Path;
+import retrofit2.http.Query;
+import retrofit2.http.Url;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in Invoices.
+ */
+public class InvoicesInner {
+ /** The Retrofit service to perform REST calls. */
+ private InvoicesService service;
+ /** The service client containing this operation class. */
+ private BillingClientImpl client;
+
+ /**
+ * Initializes an instance of InvoicesInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public InvoicesInner(Retrofit retrofit, BillingClientImpl client) {
+ this.service = retrofit.create(InvoicesService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for Invoices to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface InvoicesService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.v2017_02_27_preview.Invoices list" })
+ @GET("subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices")
+ Observable> list(@Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$skiptoken") String skiptoken, @Query("$top") Integer top, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.v2017_02_27_preview.Invoices get" })
+ @GET("subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/{invoiceName}")
+ Observable> get(@Path("subscriptionId") String subscriptionId, @Path("invoiceName") String invoiceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.v2017_02_27_preview.Invoices getLatest" })
+ @GET("subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/latest")
+ Observable> getLatest(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.v2017_02_27_preview.Invoices listNext" })
+ @GET
+ Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<InvoiceInner> object if successful.
+ */
+ public PagedList list() {
+ ServiceResponse> response = listSinglePageAsync().toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later.
+ *
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listSinglePageAsync(),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<InvoiceInner> object
+ */
+ public Observable> listAsync() {
+ return listWithServiceResponseAsync()
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<InvoiceInner> object
+ */
+ public Observable>> listWithServiceResponseAsync() {
+ return listSinglePageAsync()
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<InvoiceInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listSinglePageAsync() {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final String expand = null;
+ final String filter = null;
+ final String skiptoken = null;
+ final Integer top = null;
+ return service.list(this.client.subscriptionId(), expand, filter, skiptoken, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later.
+ *
+ * @param expand May be used to expand the downloadUrl property within a list of invoices. This enables download links to be generated for multiple invoices at once. By default, downloadURLs are not included when listing invoices.
+ * @param filter May be used to filter invoices by invoicePeriodEndDate. 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 invoices.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<InvoiceInner> object if successful.
+ */
+ public PagedList list(final String expand, final String filter, final String skiptoken, final Integer top) {
+ ServiceResponse> response = listSinglePageAsync(expand, filter, skiptoken, top).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later.
+ *
+ * @param expand May be used to expand the downloadUrl property within a list of invoices. This enables download links to be generated for multiple invoices at once. By default, downloadURLs are not included when listing invoices.
+ * @param filter May be used to filter invoices by invoicePeriodEndDate. 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 invoices.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listAsync(final String expand, final String filter, final String skiptoken, final Integer top, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listSinglePageAsync(expand, filter, skiptoken, top),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later.
+ *
+ * @param expand May be used to expand the downloadUrl property within a list of invoices. This enables download links to be generated for multiple invoices at once. By default, downloadURLs are not included when listing invoices.
+ * @param filter May be used to filter invoices by invoicePeriodEndDate. 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 invoices.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<InvoiceInner> object
+ */
+ public Observable> listAsync(final String expand, final String filter, final String skiptoken, final Integer top) {
+ return listWithServiceResponseAsync(expand, filter, skiptoken, top)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later.
+ *
+ * @param expand May be used to expand the downloadUrl property within a list of invoices. This enables download links to be generated for multiple invoices at once. By default, downloadURLs are not included when listing invoices.
+ * @param filter May be used to filter invoices by invoicePeriodEndDate. 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 invoices.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<InvoiceInner> object
+ */
+ public Observable>> listWithServiceResponseAsync(final String expand, final String filter, final String skiptoken, final Integer top) {
+ return listSinglePageAsync(expand, filter, skiptoken, top)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later.
+ *
+ ServiceResponse> * @param expand May be used to expand the downloadUrl property within a list of invoices. This enables download links to be generated for multiple invoices at once. By default, downloadURLs are not included when listing invoices.
+ ServiceResponse> * @param filter May be used to filter invoices by invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'
+ ServiceResponse> * @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.
+ ServiceResponse> * @param top May be used to limit the number of results to the most recent N invoices.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<InvoiceInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listSinglePageAsync(final String expand, final String filter, final String skiptoken, final Integer top) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.list(this.client.subscriptionId(), expand, filter, skiptoken, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets a named invoice resource. When getting a single invoice, the downloadUrl property is expanded automatically.
+ *
+ * @param invoiceName The name of an invoice resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the InvoiceInner object if successful.
+ */
+ public InvoiceInner get(String invoiceName) {
+ return getWithServiceResponseAsync(invoiceName).toBlocking().single().body();
+ }
+
+ /**
+ * Gets a named invoice resource. When getting a single invoice, the downloadUrl property is expanded automatically.
+ *
+ * @param invoiceName The name of an invoice resource.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture getAsync(String invoiceName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(invoiceName), serviceCallback);
+ }
+
+ /**
+ * Gets a named invoice resource. When getting a single invoice, the downloadUrl property is expanded automatically.
+ *
+ * @param invoiceName The name of an invoice resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the InvoiceInner object
+ */
+ public Observable getAsync(String invoiceName) {
+ return getWithServiceResponseAsync(invoiceName).map(new Func1, InvoiceInner>() {
+ @Override
+ public InvoiceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets a named invoice resource. When getting a single invoice, the downloadUrl property is expanded automatically.
+ *
+ * @param invoiceName The name of an invoice resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the InvoiceInner object
+ */
+ public Observable> getWithServiceResponseAsync(String invoiceName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (invoiceName == null) {
+ throw new IllegalArgumentException("Parameter invoiceName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.get(this.client.subscriptionId(), invoiceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets the most recent invoice. When getting a single invoice, the downloadUrl property is expanded automatically.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the InvoiceInner object if successful.
+ */
+ public InvoiceInner getLatest() {
+ return getLatestWithServiceResponseAsync().toBlocking().single().body();
+ }
+
+ /**
+ * Gets the most recent invoice. When getting a single invoice, the downloadUrl property is expanded automatically.
+ *
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture getLatestAsync(final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getLatestWithServiceResponseAsync(), serviceCallback);
+ }
+
+ /**
+ * Gets the most recent invoice. When getting a single invoice, the downloadUrl property is expanded automatically.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the InvoiceInner object
+ */
+ public Observable getLatestAsync() {
+ return getLatestWithServiceResponseAsync().map(new Func1, InvoiceInner>() {
+ @Override
+ public InvoiceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets the most recent invoice. When getting a single invoice, the downloadUrl property is expanded automatically.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the InvoiceInner object
+ */
+ public Observable> getLatestWithServiceResponseAsync() {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.getLatest(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getLatestDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getLatestDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<InvoiceInner> object if successful.
+ */
+ public PagedList listNext(final String nextPageLink) {
+ ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param serviceFuture the ServiceFuture object tracking the Retrofit calls
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listNextSinglePageAsync(nextPageLink),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<InvoiceInner> object
+ */
+ public Observable> listNextAsync(final String nextPageLink) {
+ return listNextWithServiceResponseAsync(nextPageLink)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<InvoiceInner> object
+ */
+ public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later.
+ *
+ ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<InvoiceInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listNextSinglePageAsync(final String nextPageLink) {
+ if (nextPageLink == null) {
+ throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
+ }
+ String nextUrl = String.format("%s", nextPageLink);
+ return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listNextDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/OperationImpl.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/OperationImpl.java
new file mode 100644
index 000000000000..ae62e8d8796d
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/OperationImpl.java
@@ -0,0 +1,37 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview.implementation;
+
+import com.microsoft.azure.management.billing.v2017_02_27_preview.Operation;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.billing.v2017_02_27_preview.OperationDisplay;
+
+class OperationImpl extends WrapperImpl implements Operation {
+ private final BillingManager manager;
+ OperationImpl(OperationInner inner, BillingManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public BillingManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public OperationDisplay display() {
+ return this.inner().display();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/OperationInner.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/OperationInner.java
new file mode 100644
index 000000000000..0a9010e1cb04
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/OperationInner.java
@@ -0,0 +1,59 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview.implementation;
+
+import com.microsoft.azure.management.billing.v2017_02_27_preview.OperationDisplay;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * A Billing REST API operation.
+ */
+public class OperationInner {
+ /**
+ * 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 operation name: {provider}/{resource}/{operation}.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the object that represents the operation.
+ *
+ * @return the display value
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set 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;
+ }
+
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/OperationsImpl.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/OperationsImpl.java
new file mode 100644
index 000000000000..86e77ad137da
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/OperationsImpl.java
@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * abc
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.billing.v2017_02_27_preview.Operations;
+import rx.functions.Func1;
+import rx.Observable;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.billing.v2017_02_27_preview.Operation;
+
+class OperationsImpl extends WrapperImpl implements Operations {
+ private final BillingManager manager;
+
+ OperationsImpl(BillingManager manager) {
+ super(manager.inner().operations());
+ this.manager = manager;
+ }
+
+ public BillingManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable listAsync() {
+ OperationsInner client = this.inner();
+ return client.listAsync()
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public Operation call(OperationInner inner) {
+ return new OperationImpl(inner, manager());
+ }
+ });
+ }
+
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/OperationsInner.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/OperationsInner.java
new file mode 100644
index 000000000000..81ce5ddd79d4
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/OperationsInner.java
@@ -0,0 +1,283 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceFuture;
+import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.management.billing.v2017_02_27_preview.ErrorResponseException;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.PagedList;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import java.io.IOException;
+import java.util.List;
+import okhttp3.ResponseBody;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.Query;
+import retrofit2.http.Url;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in Operations.
+ */
+public class OperationsInner {
+ /** The Retrofit service to perform REST calls. */
+ private OperationsService service;
+ /** The service client containing this operation class. */
+ private BillingClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public OperationsInner(Retrofit retrofit, BillingClientImpl client) {
+ this.service = retrofit.create(OperationsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for Operations to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface OperationsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.v2017_02_27_preview.Operations list" })
+ @GET("providers/Microsoft.Billing/operations")
+ Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.v2017_02_27_preview.Operations listNext" })
+ @GET
+ Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Lists all of the available billing REST API operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<OperationInner> object if successful.
+ */
+ public PagedList list() {
+ ServiceResponse> response = listSinglePageAsync().toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists all of the available billing REST API operations.
+ *
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listSinglePageAsync(),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists all of the available billing REST API operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<OperationInner> object
+ */
+ public Observable> listAsync() {
+ return listWithServiceResponseAsync()
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists all of the available billing REST API operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<OperationInner> object
+ */
+ public Observable>> listWithServiceResponseAsync() {
+ return listSinglePageAsync()
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Lists all of the available billing REST API operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listSinglePageAsync() {
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Lists all of the available billing REST API operations.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<OperationInner> object if successful.
+ */
+ public PagedList listNext(final String nextPageLink) {
+ ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists all of the available billing REST API operations.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param serviceFuture the ServiceFuture object tracking the Retrofit calls
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listNextSinglePageAsync(nextPageLink),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists all of the available billing REST API operations.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<OperationInner> object
+ */
+ public Observable> listNextAsync(final String nextPageLink) {
+ return listNextWithServiceResponseAsync(nextPageLink)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists all of the available billing REST API operations.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<OperationInner> object
+ */
+ public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Lists all of the available billing REST API operations.
+ *
+ ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listNextSinglePageAsync(final String nextPageLink) {
+ if (nextPageLink == null) {
+ throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
+ }
+ String nextUrl = String.format("%s", nextPageLink);
+ return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listNextDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/PageImpl.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/PageImpl.java
new file mode 100644
index 000000000000..c54a0edb560a
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/PageImpl.java
@@ -0,0 +1,75 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.billing.v2017_02_27_preview.implementation;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.azure.Page;
+import java.util.List;
+
+/**
+ * An instance of this class defines a page of Azure resources and a link to
+ * get the next page of resources, if any.
+ *
+ * @param type of Azure resource
+ */
+public class PageImpl implements Page {
+ /**
+ * The link to the next page.
+ */
+ @JsonProperty("nextLink")
+ private String nextPageLink;
+
+ /**
+ * The list of items.
+ */
+ @JsonProperty("value")
+ private List items;
+
+ /**
+ * Gets the link to the next page.
+ *
+ * @return the link to the next page.
+ */
+ @Override
+ public String nextPageLink() {
+ return this.nextPageLink;
+ }
+
+ /**
+ * Gets the list of items.
+ *
+ * @return the list of items in {@link List}.
+ */
+ @Override
+ public List items() {
+ return items;
+ }
+
+ /**
+ * Sets the link to the next page.
+ *
+ * @param nextPageLink the link to the next page.
+ * @return this Page object itself.
+ */
+ public PageImpl setNextPageLink(String nextPageLink) {
+ this.nextPageLink = nextPageLink;
+ return this;
+ }
+
+ /**
+ * Sets the list of items.
+ *
+ * @param items the list of items in {@link List}.
+ * @return this Page object itself.
+ */
+ public PageImpl setItems(List items) {
+ this.items = items;
+ return this;
+ }
+}
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/package-info.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/package-info.java
new file mode 100644
index 000000000000..6d3919af3465
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/implementation/package-info.java
@@ -0,0 +1,11 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * This package contains the implementation classes for BillingClient.
+ * Billing client provides access to billing resources 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.
+ */
+package com.microsoft.azure.management.billing.v2017_02_27_preview.implementation;
diff --git a/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/package-info.java b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/package-info.java
new file mode 100644
index 000000000000..df517c7f94f1
--- /dev/null
+++ b/billing/resource-manager/v2017_02_27_preview/src/main/java/com/microsoft/azure/management/billing/v2017_02_27_preview/package-info.java
@@ -0,0 +1,11 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * This package contains the classes for BillingClient.
+ * Billing client provides access to billing resources 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.
+ */
+package com.microsoft.azure.management.billing.v2017_02_27_preview;
diff --git a/containerservice/resource-manager/v2019_08_01/pom.xml b/containerservice/resource-manager/v2019_08_01/pom.xml
new file mode 100644
index 000000000000..9fe51ff4ffd3
--- /dev/null
+++ b/containerservice/resource-manager/v2019_08_01/pom.xml
@@ -0,0 +1,135 @@
+
+
+ 4.0.0
+ com.microsoft.azure.containerservice.v2019_08_01
+
+ com.microsoft.azure
+ azure-arm-parent
+ 1.1.0
+ ../../../pom.management.xml
+
+ azure-mgmt-containerservice
+ 1.0.0-beta
+ jar
+ Microsoft Azure SDK for ContainerService Management
+ This package contains Microsoft ContainerService Management SDK.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+ UTF-8
+
+
+
+
+ microsoft
+ Microsoft
+
+
+
+
+ com.microsoft.azure
+ azure-client-runtime
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+
+
+ junit
+ junit
+ test
+
+
+ com.microsoft.azure
+ azure-client-authentication
+ test
+
+
+ com.microsoft.azure
+ azure-mgmt-resources
+ test
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+ test-jar
+ test
+
+ 1.6.5
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ true
+ true
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.1
+
+ 1.7
+ 1.7
+
+
+ com.microsoft.azure.management.apigeneration.LangDefinitionProcessor
+
+
+ true
+ true
+
+ true
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.8
+
+ *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
+
+
+ /**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+ ]]>
+
+
+
+
+
+
diff --git a/containerservice/resource-manager/v2019_08_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_08_01/AgentPool.java b/containerservice/resource-manager/v2019_08_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_08_01/AgentPool.java
new file mode 100644
index 000000000000..3f4d900add37
--- /dev/null
+++ b/containerservice/resource-manager/v2019_08_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_08_01/AgentPool.java
@@ -0,0 +1,534 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.containerservice.v2019_08_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.containerservice.v2019_08_01.implementation.AgentPoolInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.containerservice.v2019_08_01.implementation.ContainerServiceManager;
+import java.util.List;
+
+/**
+ * Type representing AgentPool.
+ */
+public interface AgentPool extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the agentPoolType value.
+ */
+ AgentPoolType agentPoolType();
+
+ /**
+ * @return the availabilityZones value.
+ */
+ List availabilityZones();
+
+ /**
+ * @return the count value.
+ */
+ int count();
+
+ /**
+ * @return the enableAutoScaling value.
+ */
+ Boolean enableAutoScaling();
+
+ /**
+ * @return the enableNodePublicIP value.
+ */
+ Boolean enableNodePublicIP();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the maxCount value.
+ */
+ Integer maxCount();
+
+ /**
+ * @return the maxPods value.
+ */
+ Integer maxPods();
+
+ /**
+ * @return the minCount value.
+ */
+ Integer minCount();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the nodeTaints value.
+ */
+ List nodeTaints();
+
+ /**
+ * @return the orchestratorVersion value.
+ */
+ String orchestratorVersion();
+
+ /**
+ * @return the osDiskSizeGB value.
+ */
+ Integer osDiskSizeGB();
+
+ /**
+ * @return the osType value.
+ */
+ OSType osType();
+
+ /**
+ * @return the provisioningState value.
+ */
+ String provisioningState();
+
+ /**
+ * @return the scaleSetEvictionPolicy value.
+ */
+ ScaleSetEvictionPolicy scaleSetEvictionPolicy();
+
+ /**
+ * @return the scaleSetPriority value.
+ */
+ ScaleSetPriority scaleSetPriority();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the vmSize value.
+ */
+ ContainerServiceVMSizeTypes vmSize();
+
+ /**
+ * @return the vnetSubnetID value.
+ */
+ String vnetSubnetID();
+
+ /**
+ * The entirety of the AgentPool definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithManagedCluster, DefinitionStages.WithCount, DefinitionStages.WithVmSize, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of AgentPool definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a AgentPool definition.
+ */
+ interface Blank extends WithManagedCluster {
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify ManagedCluster.
+ */
+ interface WithManagedCluster {
+ /**
+ * Specifies resourceGroupName, resourceName.
+ * @param resourceGroupName The name of the resource group
+ * @param resourceName The name of the managed cluster resource
+ * @return the next definition stage
+ */
+ WithCount withExistingManagedCluster(String resourceGroupName, String resourceName);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify Count.
+ */
+ interface WithCount {
+ /**
+ * Specifies count.
+ * @param count Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1
+ * @return the next definition stage
+ */
+ WithVmSize withCount(int count);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify VmSize.
+ */
+ interface WithVmSize {
+ /**
+ * Specifies vmSize.
+ * @param vmSize Size of agent VMs. Possible values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6'
+ * @return the next definition stage
+ */
+ WithCreate withVmSize(ContainerServiceVMSizeTypes vmSize);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify AgentPoolType.
+ */
+ interface WithAgentPoolType {
+ /**
+ * Specifies agentPoolType.
+ * @param agentPoolType AgentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet'
+ * @return the next definition stage
+ */
+ WithCreate withAgentPoolType(AgentPoolType agentPoolType);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify AvailabilityZones.
+ */
+ interface WithAvailabilityZones {
+ /**
+ * Specifies availabilityZones.
+ * @param availabilityZones (PREVIEW) Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType
+ * @return the next definition stage
+ */
+ WithCreate withAvailabilityZones(List availabilityZones);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify EnableAutoScaling.
+ */
+ interface WithEnableAutoScaling {
+ /**
+ * Specifies enableAutoScaling.
+ * @param enableAutoScaling Whether to enable auto-scaler
+ * @return the next definition stage
+ */
+ WithCreate withEnableAutoScaling(Boolean enableAutoScaling);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify EnableNodePublicIP.
+ */
+ interface WithEnableNodePublicIP {
+ /**
+ * Specifies enableNodePublicIP.
+ * @param enableNodePublicIP Enable public IP for nodes
+ * @return the next definition stage
+ */
+ WithCreate withEnableNodePublicIP(Boolean enableNodePublicIP);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify MaxCount.
+ */
+ interface WithMaxCount {
+ /**
+ * Specifies maxCount.
+ * @param maxCount Maximum number of nodes for auto-scaling
+ * @return the next definition stage
+ */
+ WithCreate withMaxCount(Integer maxCount);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify MaxPods.
+ */
+ interface WithMaxPods {
+ /**
+ * Specifies maxPods.
+ * @param maxPods Maximum number of pods that can run on a node
+ * @return the next definition stage
+ */
+ WithCreate withMaxPods(Integer maxPods);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify MinCount.
+ */
+ interface WithMinCount {
+ /**
+ * Specifies minCount.
+ * @param minCount Minimum number of nodes for auto-scaling
+ * @return the next definition stage
+ */
+ WithCreate withMinCount(Integer minCount);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify NodeTaints.
+ */
+ interface WithNodeTaints {
+ /**
+ * Specifies nodeTaints.
+ * @param nodeTaints Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule
+ * @return the next definition stage
+ */
+ WithCreate withNodeTaints(List nodeTaints);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify OrchestratorVersion.
+ */
+ interface WithOrchestratorVersion {
+ /**
+ * Specifies orchestratorVersion.
+ * @param orchestratorVersion Version of orchestrator specified when creating the managed cluster
+ * @return the next definition stage
+ */
+ WithCreate withOrchestratorVersion(String orchestratorVersion);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify OsDiskSizeGB.
+ */
+ interface WithOsDiskSizeGB {
+ /**
+ * Specifies osDiskSizeGB.
+ * @param osDiskSizeGB OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified
+ * @return the next definition stage
+ */
+ WithCreate withOsDiskSizeGB(Integer osDiskSizeGB);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify OsType.
+ */
+ interface WithOsType {
+ /**
+ * Specifies osType.
+ * @param osType OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'
+ * @return the next definition stage
+ */
+ WithCreate withOsType(OSType osType);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify ScaleSetEvictionPolicy.
+ */
+ interface WithScaleSetEvictionPolicy {
+ /**
+ * Specifies scaleSetEvictionPolicy.
+ * @param scaleSetEvictionPolicy ScaleSetEvictionPolicy to be used to specify eviction policy for low priority virtual machine scale set. Default to Delete. Possible values include: 'Delete', 'Deallocate'
+ * @return the next definition stage
+ */
+ WithCreate withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify ScaleSetPriority.
+ */
+ interface WithScaleSetPriority {
+ /**
+ * Specifies scaleSetPriority.
+ * @param scaleSetPriority ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. Possible values include: 'Low', 'Regular'
+ * @return the next definition stage
+ */
+ WithCreate withScaleSetPriority(ScaleSetPriority scaleSetPriority);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify VnetSubnetID.
+ */
+ interface WithVnetSubnetID {
+ /**
+ * Specifies vnetSubnetID.
+ * @param vnetSubnetID VNet SubnetID specifies the VNet's subnet identifier
+ * @return the next definition stage
+ */
+ WithCreate withVnetSubnetID(String vnetSubnetID);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithAgentPoolType, DefinitionStages.WithAvailabilityZones, DefinitionStages.WithEnableAutoScaling, DefinitionStages.WithEnableNodePublicIP, DefinitionStages.WithMaxCount, DefinitionStages.WithMaxPods, DefinitionStages.WithMinCount, DefinitionStages.WithNodeTaints, DefinitionStages.WithOrchestratorVersion, DefinitionStages.WithOsDiskSizeGB, DefinitionStages.WithOsType, DefinitionStages.WithScaleSetEvictionPolicy, DefinitionStages.WithScaleSetPriority, DefinitionStages.WithVnetSubnetID {
+ }
+ }
+ /**
+ * The template for a AgentPool update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithAgentPoolType, UpdateStages.WithAvailabilityZones, UpdateStages.WithEnableAutoScaling, UpdateStages.WithEnableNodePublicIP, UpdateStages.WithMaxCount, UpdateStages.WithMaxPods, UpdateStages.WithMinCount, UpdateStages.WithNodeTaints, UpdateStages.WithOrchestratorVersion, UpdateStages.WithOsDiskSizeGB, UpdateStages.WithOsType, UpdateStages.WithScaleSetEvictionPolicy, UpdateStages.WithScaleSetPriority, UpdateStages.WithVnetSubnetID {
+ }
+
+ /**
+ * Grouping of AgentPool update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the agentpool update allowing to specify AgentPoolType.
+ */
+ interface WithAgentPoolType {
+ /**
+ * Specifies agentPoolType.
+ * @param agentPoolType AgentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet'
+ * @return the next update stage
+ */
+ Update withAgentPoolType(AgentPoolType agentPoolType);
+ }
+
+ /**
+ * The stage of the agentpool update allowing to specify AvailabilityZones.
+ */
+ interface WithAvailabilityZones {
+ /**
+ * Specifies availabilityZones.
+ * @param availabilityZones (PREVIEW) Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType
+ * @return the next update stage
+ */
+ Update withAvailabilityZones(List availabilityZones);
+ }
+
+ /**
+ * The stage of the agentpool update allowing to specify EnableAutoScaling.
+ */
+ interface WithEnableAutoScaling {
+ /**
+ * Specifies enableAutoScaling.
+ * @param enableAutoScaling Whether to enable auto-scaler
+ * @return the next update stage
+ */
+ Update withEnableAutoScaling(Boolean enableAutoScaling);
+ }
+
+ /**
+ * The stage of the agentpool update allowing to specify EnableNodePublicIP.
+ */
+ interface WithEnableNodePublicIP {
+ /**
+ * Specifies enableNodePublicIP.
+ * @param enableNodePublicIP Enable public IP for nodes
+ * @return the next update stage
+ */
+ Update withEnableNodePublicIP(Boolean enableNodePublicIP);
+ }
+
+ /**
+ * The stage of the agentpool update allowing to specify MaxCount.
+ */
+ interface WithMaxCount {
+ /**
+ * Specifies maxCount.
+ * @param maxCount Maximum number of nodes for auto-scaling
+ * @return the next update stage
+ */
+ Update withMaxCount(Integer maxCount);
+ }
+
+ /**
+ * The stage of the agentpool update allowing to specify MaxPods.
+ */
+ interface WithMaxPods {
+ /**
+ * Specifies maxPods.
+ * @param maxPods Maximum number of pods that can run on a node
+ * @return the next update stage
+ */
+ Update withMaxPods(Integer maxPods);
+ }
+
+ /**
+ * The stage of the agentpool update allowing to specify MinCount.
+ */
+ interface WithMinCount {
+ /**
+ * Specifies minCount.
+ * @param minCount Minimum number of nodes for auto-scaling
+ * @return the next update stage
+ */
+ Update withMinCount(Integer minCount);
+ }
+
+ /**
+ * The stage of the agentpool update allowing to specify NodeTaints.
+ */
+ interface WithNodeTaints {
+ /**
+ * Specifies nodeTaints.
+ * @param nodeTaints Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule
+ * @return the next update stage
+ */
+ Update withNodeTaints(List nodeTaints);
+ }
+
+ /**
+ * The stage of the agentpool update allowing to specify OrchestratorVersion.
+ */
+ interface WithOrchestratorVersion {
+ /**
+ * Specifies orchestratorVersion.
+ * @param orchestratorVersion Version of orchestrator specified when creating the managed cluster
+ * @return the next update stage
+ */
+ Update withOrchestratorVersion(String orchestratorVersion);
+ }
+
+ /**
+ * The stage of the agentpool update allowing to specify OsDiskSizeGB.
+ */
+ interface WithOsDiskSizeGB {
+ /**
+ * Specifies osDiskSizeGB.
+ * @param osDiskSizeGB OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified
+ * @return the next update stage
+ */
+ Update withOsDiskSizeGB(Integer osDiskSizeGB);
+ }
+
+ /**
+ * The stage of the agentpool update allowing to specify OsType.
+ */
+ interface WithOsType {
+ /**
+ * Specifies osType.
+ * @param osType OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'
+ * @return the next update stage
+ */
+ Update withOsType(OSType osType);
+ }
+
+ /**
+ * The stage of the agentpool update allowing to specify ScaleSetEvictionPolicy.
+ */
+ interface WithScaleSetEvictionPolicy {
+ /**
+ * Specifies scaleSetEvictionPolicy.
+ * @param scaleSetEvictionPolicy ScaleSetEvictionPolicy to be used to specify eviction policy for low priority virtual machine scale set. Default to Delete. Possible values include: 'Delete', 'Deallocate'
+ * @return the next update stage
+ */
+ Update withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy);
+ }
+
+ /**
+ * The stage of the agentpool update allowing to specify ScaleSetPriority.
+ */
+ interface WithScaleSetPriority {
+ /**
+ * Specifies scaleSetPriority.
+ * @param scaleSetPriority ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. Possible values include: 'Low', 'Regular'
+ * @return the next update stage
+ */
+ Update withScaleSetPriority(ScaleSetPriority scaleSetPriority);
+ }
+
+ /**
+ * The stage of the agentpool update allowing to specify VnetSubnetID.
+ */
+ interface WithVnetSubnetID {
+ /**
+ * Specifies vnetSubnetID.
+ * @param vnetSubnetID VNet SubnetID specifies the VNet's subnet identifier
+ * @return the next update stage
+ */
+ Update withVnetSubnetID(String vnetSubnetID);
+ }
+
+ }
+}
diff --git a/containerservice/resource-manager/v2019_08_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_08_01/AgentPoolAvailableVersions.java b/containerservice/resource-manager/v2019_08_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_08_01/AgentPoolAvailableVersions.java
new file mode 100644
index 000000000000..d2023548caf6
--- /dev/null
+++ b/containerservice/resource-manager/v2019_08_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_08_01/AgentPoolAvailableVersions.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.containerservice.v2019_08_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.containerservice.v2019_08_01.implementation.ContainerServiceManager;
+import com.microsoft.azure.management.containerservice.v2019_08_01.implementation.AgentPoolAvailableVersionsInner;
+import java.util.List;
+
+/**
+ * Type representing AgentPoolAvailableVersions.
+ */
+public interface AgentPoolAvailableVersions extends HasInner, HasManager {
+ /**
+ * @return the agentPoolVersions value.
+ */
+ List agentPoolVersions();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/containerservice/resource-manager/v2019_08_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_08_01/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java b/containerservice/resource-manager/v2019_08_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_08_01/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java
new file mode 100644
index 000000000000..8cebcf840f03
--- /dev/null
+++ b/containerservice/resource-manager/v2019_08_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_08_01/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java
@@ -0,0 +1,95 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.containerservice.v2019_08_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem model.
+ */
+public class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem {
+ /**
+ * Whether this version is the default agent pool version.
+ */
+ @JsonProperty(value = "default")
+ private Boolean defaultProperty;
+
+ /**
+ * Kubernetes version (major, minor, patch).
+ */
+ @JsonProperty(value = "kubernetesVersion")
+ private String kubernetesVersion;
+
+ /**
+ * Whether Kubernetes version is currently in preview.
+ */
+ @JsonProperty(value = "isPreview")
+ private Boolean isPreview;
+
+ /**
+ * Get whether this version is the default agent pool version.
+ *
+ * @return the defaultProperty value
+ */
+ public Boolean defaultProperty() {
+ return this.defaultProperty;
+ }
+
+ /**
+ * Set whether this version is the default agent pool version.
+ *
+ * @param defaultProperty the defaultProperty value to set
+ * @return the AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem object itself.
+ */
+ public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem withDefaultProperty(Boolean defaultProperty) {
+ this.defaultProperty = defaultProperty;
+ return this;
+ }
+
+ /**
+ * Get kubernetes version (major, minor, patch).
+ *
+ * @return the kubernetesVersion value
+ */
+ public String kubernetesVersion() {
+ return this.kubernetesVersion;
+ }
+
+ /**
+ * Set kubernetes version (major, minor, patch).
+ *
+ * @param kubernetesVersion the kubernetesVersion value to set
+ * @return the AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem object itself.
+ */
+ public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem withKubernetesVersion(String kubernetesVersion) {
+ this.kubernetesVersion = kubernetesVersion;
+ return this;
+ }
+
+ /**
+ * Get whether Kubernetes version is currently in preview.
+ *
+ * @return the isPreview value
+ */
+ public Boolean isPreview() {
+ return this.isPreview;
+ }
+
+ /**
+ * Set whether Kubernetes version is currently in preview.
+ *
+ * @param isPreview the isPreview value to set
+ * @return the AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem object itself.
+ */
+ public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem withIsPreview(Boolean isPreview) {
+ this.isPreview = isPreview;
+ return this;
+ }
+
+}
diff --git a/containerservice/resource-manager/v2019_08_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_08_01/AgentPoolType.java b/containerservice/resource-manager/v2019_08_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_08_01/AgentPoolType.java
new file mode 100644
index 000000000000..8ec122af9c1e
--- /dev/null
+++ b/containerservice/resource-manager/v2019_08_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_08_01/AgentPoolType.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.containerservice.v2019_08_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for AgentPoolType.
+ */
+public final class AgentPoolType extends ExpandableStringEnum {
+ /** Static value VirtualMachineScaleSets for AgentPoolType. */
+ public static final AgentPoolType VIRTUAL_MACHINE_SCALE_SETS = fromString("VirtualMachineScaleSets");
+
+ /** Static value AvailabilitySet for AgentPoolType. */
+ public static final AgentPoolType AVAILABILITY_SET = fromString("AvailabilitySet");
+
+ /**
+ * Creates or finds a AgentPoolType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding AgentPoolType
+ */
+ @JsonCreator
+ public static AgentPoolType fromString(String name) {
+ return fromString(name, AgentPoolType.class);
+ }
+
+ /**
+ * @return known AgentPoolType values
+ */
+ public static Collection