diff --git a/batch/resource-manager/v2015_12_01/pom.xml b/batch/resource-manager/v2015_12_01/pom.xml
new file mode 100644
index 000000000000..5479a693eb55
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/pom.xml
@@ -0,0 +1,133 @@
+
+
+ 4.0.0
+ com.microsoft.azure.batch.v2015_12_01
+
+ com.microsoft.azure
+ azure-arm-parent
+ 0.0.3-beta
+ ../../../pom.xml
+
+ azure-mgmt-batch
+ 1.0.0-beta
+ jar
+ Microsoft Azure SDK for Batch Management
+ This package contains Microsoft Batch 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/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/AccountKeyType.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/AccountKeyType.java
new file mode 100644
index 000000000000..a3468874cdf9
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/AccountKeyType.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.batch.v2015_12_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for AccountKeyType.
+ */
+public enum AccountKeyType {
+ /** Enum value Primary. */
+ PRIMARY("Primary"),
+
+ /** Enum value Secondary. */
+ SECONDARY("Secondary");
+
+ /** The actual serialized value for a AccountKeyType instance. */
+ private String value;
+
+ AccountKeyType(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a AccountKeyType instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed AccountKeyType object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static AccountKeyType fromString(String value) {
+ AccountKeyType[] items = AccountKeyType.values();
+ for (AccountKeyType item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/ActivateApplicationPackageParameters.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/ActivateApplicationPackageParameters.java
new file mode 100644
index 000000000000..63b3c36a486a
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/ActivateApplicationPackageParameters.java
@@ -0,0 +1,43 @@
+/**
+ * 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.batch.v2015_12_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Parameters for an ApplicationOperations.ActivateApplicationPackage request.
+ */
+public class ActivateApplicationPackageParameters {
+ /**
+ * The format of the application package binary file.
+ */
+ @JsonProperty(value = "format", required = true)
+ private String format;
+
+ /**
+ * Get the format of the application package binary file.
+ *
+ * @return the format value
+ */
+ public String format() {
+ return this.format;
+ }
+
+ /**
+ * Set the format of the application package binary file.
+ *
+ * @param format the format value to set
+ * @return the ActivateApplicationPackageParameters object itself.
+ */
+ public ActivateApplicationPackageParameters withFormat(String format) {
+ this.format = format;
+ return this;
+ }
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/AddApplicationParameters.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/AddApplicationParameters.java
new file mode 100644
index 000000000000..57015d21d4b0
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/AddApplicationParameters.java
@@ -0,0 +1,70 @@
+/**
+ * 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.batch.v2015_12_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Parameters for an ApplicationOperations.AddApplication request.
+ */
+public class AddApplicationParameters {
+ /**
+ * A value indicating whether packages within the application may be
+ * overwritten using the same version string.
+ */
+ @JsonProperty(value = "allowUpdates")
+ private Boolean allowUpdates;
+
+ /**
+ * The display name for the application.
+ */
+ @JsonProperty(value = "displayName")
+ private String displayName;
+
+ /**
+ * Get a value indicating whether packages within the application may be overwritten using the same version string.
+ *
+ * @return the allowUpdates value
+ */
+ public Boolean allowUpdates() {
+ return this.allowUpdates;
+ }
+
+ /**
+ * Set a value indicating whether packages within the application may be overwritten using the same version string.
+ *
+ * @param allowUpdates the allowUpdates value to set
+ * @return the AddApplicationParameters object itself.
+ */
+ public AddApplicationParameters withAllowUpdates(Boolean allowUpdates) {
+ this.allowUpdates = allowUpdates;
+ return this;
+ }
+
+ /**
+ * Get the display name for the application.
+ *
+ * @return the displayName value
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the display name for the application.
+ *
+ * @param displayName the displayName value to set
+ * @return the AddApplicationParameters object itself.
+ */
+ public AddApplicationParameters withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/Application.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/Application.java
new file mode 100644
index 000000000000..8dcdd32c6486
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/Application.java
@@ -0,0 +1,48 @@
+/**
+ * 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.batch.v2015_12_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.batch.v2015_12_01.implementation.ApplicationInner;
+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.batch.v2015_12_01.implementation.BatchManager;
+import java.util.List;
+
+/**
+ * Type representing Application.
+ */
+public interface Application extends HasInner, Indexable, Refreshable, HasManager {
+ /**
+ * @return the allowUpdates value.
+ */
+ Boolean allowUpdates();
+
+ /**
+ * @return the defaultVersion value.
+ */
+ String defaultVersion();
+
+ /**
+ * @return the displayName value.
+ */
+ String displayName();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the packages value.
+ */
+ List packages();
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/ApplicationPackage.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/ApplicationPackage.java
new file mode 100644
index 000000000000..3228b0f6abb2
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/ApplicationPackage.java
@@ -0,0 +1,58 @@
+/**
+ * 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.batch.v2015_12_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.batch.v2015_12_01.implementation.ApplicationPackageInner;
+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.batch.v2015_12_01.implementation.BatchManager;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing ApplicationPackage.
+ */
+public interface ApplicationPackage extends HasInner, Indexable, Refreshable, HasManager {
+ /**
+ * @return the format value.
+ */
+ String format();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the lastActivationTime value.
+ */
+ DateTime lastActivationTime();
+
+ /**
+ * @return the state value.
+ */
+ PackageState state();
+
+ /**
+ * @return the storageUrl value.
+ */
+ String storageUrl();
+
+ /**
+ * @return the storageUrlExpiry value.
+ */
+ DateTime storageUrlExpiry();
+
+ /**
+ * @return the version value.
+ */
+ String version();
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/ApplicationPackages.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/ApplicationPackages.java
new file mode 100644
index 000000000000..dfebc5039dde
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/ApplicationPackages.java
@@ -0,0 +1,69 @@
+/**
+ * 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.batch.v2015_12_01;
+
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.batch.v2015_12_01.implementation.ApplicationPackagesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing ApplicationPackages.
+ */
+public interface ApplicationPackages extends HasInner {
+ /**
+ * Activates the specified application package.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application to activate.
+ * @param format The format of the application package binary file.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable activateAsync(String resourceGroupName, String accountName, String applicationId, String version, String format);
+
+ /**
+ * Creates an application package record.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable createAsync(String resourceGroupName, String accountName, String applicationId, String version);
+
+ /**
+ * Gets information about the specified application package.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String accountName, String applicationId, String version);
+
+ /**
+ * Deletes an application package record and its associated binary file.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application to delete.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String accountName, String applicationId, String version);
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/Applications.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/Applications.java
new file mode 100644
index 000000000000..bec2e320dab5
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/Applications.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.batch.v2015_12_01;
+
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.batch.v2015_12_01.implementation.ApplicationsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Applications.
+ */
+public interface Applications extends HasInner {
+ /**
+ * Adds an application to the specified Batch account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable createAsync(String resourceGroupName, String accountName, String applicationId);
+
+ /**
+ * Updates settings for the specified application.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param parameters The parameters for the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable updateAsync(String resourceGroupName, String accountName, String applicationId, UpdateApplicationParameters parameters);
+
+ /**
+ * Gets information about the specified application.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String accountName, String applicationId);
+
+ /**
+ * Lists all of the applications in the specified account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync(final String resourceGroupName, final String accountName);
+
+ /**
+ * Deletes an application.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String accountName, String applicationId);
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/AutoStorageBaseProperties.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/AutoStorageBaseProperties.java
new file mode 100644
index 000000000000..5c8fdcb1a745
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/AutoStorageBaseProperties.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.batch.v2015_12_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties related to auto storage account.
+ */
+public class AutoStorageBaseProperties {
+ /**
+ * The resource ID of the storage account to be used for auto storage
+ * account.
+ */
+ @JsonProperty(value = "storageAccountId", required = true)
+ private String storageAccountId;
+
+ /**
+ * Get the resource ID of the storage account to be used for auto storage account.
+ *
+ * @return the storageAccountId value
+ */
+ public String storageAccountId() {
+ return this.storageAccountId;
+ }
+
+ /**
+ * Set the resource ID of the storage account to be used for auto storage account.
+ *
+ * @param storageAccountId the storageAccountId value to set
+ * @return the AutoStorageBaseProperties object itself.
+ */
+ public AutoStorageBaseProperties withStorageAccountId(String storageAccountId) {
+ this.storageAccountId = storageAccountId;
+ return this;
+ }
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/AutoStorageProperties.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/AutoStorageProperties.java
new file mode 100644
index 000000000000..346a728d0e70
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/AutoStorageProperties.java
@@ -0,0 +1,73 @@
+/**
+ * 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.batch.v2015_12_01;
+
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Contains information about the auto storage account associated with a Batch
+ * account.
+ */
+public class AutoStorageProperties {
+ /**
+ * The resource ID of the storage account to be used for auto storage
+ * account.
+ */
+ @JsonProperty(value = "storageAccountId", required = true)
+ private String storageAccountId;
+
+ /**
+ * The UTC time at which storage keys were last synchronized with the Batch
+ * account.
+ */
+ @JsonProperty(value = "lastKeySync", required = true)
+ private DateTime lastKeySync;
+
+ /**
+ * Get the resource ID of the storage account to be used for auto storage account.
+ *
+ * @return the storageAccountId value
+ */
+ public String storageAccountId() {
+ return this.storageAccountId;
+ }
+
+ /**
+ * Set the resource ID of the storage account to be used for auto storage account.
+ *
+ * @param storageAccountId the storageAccountId value to set
+ * @return the AutoStorageProperties object itself.
+ */
+ public AutoStorageProperties withStorageAccountId(String storageAccountId) {
+ this.storageAccountId = storageAccountId;
+ return this;
+ }
+
+ /**
+ * Get the UTC time at which storage keys were last synchronized with the Batch account.
+ *
+ * @return the lastKeySync value
+ */
+ public DateTime lastKeySync() {
+ return this.lastKeySync;
+ }
+
+ /**
+ * Set the UTC time at which storage keys were last synchronized with the Batch account.
+ *
+ * @param lastKeySync the lastKeySync value to set
+ * @return the AutoStorageProperties object itself.
+ */
+ public AutoStorageProperties withLastKeySync(DateTime lastKeySync) {
+ this.lastKeySync = lastKeySync;
+ return this;
+ }
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccount.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccount.java
new file mode 100644
index 000000000000..fa6dc6d79e36
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccount.java
@@ -0,0 +1,122 @@
+/**
+ * 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.batch.v2015_12_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.Resource;
+import com.microsoft.azure.arm.resources.models.GroupableResourceCore;
+import com.microsoft.azure.arm.resources.models.HasResourceGroup;
+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.batch.v2015_12_01.implementation.BatchManager;
+import com.microsoft.azure.management.batch.v2015_12_01.implementation.BatchAccountInner;
+
+/**
+ * Type representing BatchAccount.
+ */
+public interface BatchAccount extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager {
+ /**
+ * @return the accountEndpoint value.
+ */
+ String accountEndpoint();
+
+ /**
+ * @return the activeJobAndJobScheduleQuota value.
+ */
+ int activeJobAndJobScheduleQuota();
+
+ /**
+ * @return the autoStorage value.
+ */
+ AutoStorageProperties autoStorage();
+
+ /**
+ * @return the coreQuota value.
+ */
+ int coreQuota();
+
+ /**
+ * @return the poolQuota value.
+ */
+ int poolQuota();
+
+ /**
+ * @return the provisioningState value.
+ */
+ ProvisioningState provisioningState();
+
+ /**
+ * The entirety of the BatchAccount definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of BatchAccount definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a BatchAccount definition.
+ */
+ interface Blank extends GroupableResourceCore.DefinitionWithRegion {
+ }
+
+ /**
+ * The stage of the BatchAccount definition allowing to specify the resource group.
+ */
+ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup {
+ }
+
+ /**
+ * The stage of the batchaccount definition allowing to specify AutoStorage.
+ */
+ interface WithAutoStorage {
+ /**
+ * Specifies autoStorage.
+ * @param autoStorage The properties related to auto storage account
+ * @return the next definition stage
+ */
+ WithCreate withAutoStorage(AutoStorageBaseProperties autoStorage);
+ }
+
+ /**
+ * 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, Resource.DefinitionWithTags, DefinitionStages.WithAutoStorage {
+ }
+ }
+ /**
+ * The template for a BatchAccount update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAutoStorage {
+ }
+
+ /**
+ * Grouping of BatchAccount update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the batchaccount update allowing to specify AutoStorage.
+ */
+ interface WithAutoStorage {
+ /**
+ * Specifies autoStorage.
+ * @param autoStorage The properties related to auto storage account
+ * @return the next update stage
+ */
+ Update withAutoStorage(AutoStorageBaseProperties autoStorage);
+ }
+
+ }
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccountCreateHeaders.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccountCreateHeaders.java
new file mode 100644
index 000000000000..9d6c06b237b6
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccountCreateHeaders.java
@@ -0,0 +1,71 @@
+/**
+ * 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.batch.v2015_12_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Defines headers for Create operation.
+ */
+public class BatchAccountCreateHeaders {
+ /**
+ * The URL of the resource used to check the status of the asynchronous
+ * operation.
+ */
+ @JsonProperty(value = "Location")
+ private String location;
+
+ /**
+ * Suggested delay to check the status of the asynchronous operation. The
+ * value is an integer that represents the seconds.
+ */
+ @JsonProperty(value = "Retry-After")
+ private Integer retryAfter;
+
+ /**
+ * Get the URL of the resource used to check the status of the asynchronous operation.
+ *
+ * @return the location value
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the URL of the resource used to check the status of the asynchronous operation.
+ *
+ * @param location the location value to set
+ * @return the BatchAccountCreateHeaders object itself.
+ */
+ public BatchAccountCreateHeaders withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get suggested delay to check the status of the asynchronous operation. The value is an integer that represents the seconds.
+ *
+ * @return the retryAfter value
+ */
+ public Integer retryAfter() {
+ return this.retryAfter;
+ }
+
+ /**
+ * Set suggested delay to check the status of the asynchronous operation. The value is an integer that represents the seconds.
+ *
+ * @param retryAfter the retryAfter value to set
+ * @return the BatchAccountCreateHeaders object itself.
+ */
+ public BatchAccountCreateHeaders withRetryAfter(Integer retryAfter) {
+ this.retryAfter = retryAfter;
+ return this;
+ }
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccountCreateParameters.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccountCreateParameters.java
new file mode 100644
index 000000000000..38f47bb9e70c
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccountCreateParameters.java
@@ -0,0 +1,98 @@
+/**
+ * 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.batch.v2015_12_01;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * Parameters supplied to the Create operation.
+ */
+@JsonFlatten
+public class BatchAccountCreateParameters {
+ /**
+ * The region in which to create the account.
+ */
+ @JsonProperty(value = "location", required = true)
+ private String location;
+
+ /**
+ * The user specified tags associated with the account.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * The properties related to auto storage account.
+ */
+ @JsonProperty(value = "properties.autoStorage")
+ private AutoStorageBaseProperties autoStorage;
+
+ /**
+ * Get the region in which to create the account.
+ *
+ * @return the location value
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the region in which to create the account.
+ *
+ * @param location the location value to set
+ * @return the BatchAccountCreateParameters object itself.
+ */
+ public BatchAccountCreateParameters withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the user specified tags associated with the account.
+ *
+ * @return the tags value
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the user specified tags associated with the account.
+ *
+ * @param tags the tags value to set
+ * @return the BatchAccountCreateParameters object itself.
+ */
+ public BatchAccountCreateParameters withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the properties related to auto storage account.
+ *
+ * @return the autoStorage value
+ */
+ public AutoStorageBaseProperties autoStorage() {
+ return this.autoStorage;
+ }
+
+ /**
+ * Set the properties related to auto storage account.
+ *
+ * @param autoStorage the autoStorage value to set
+ * @return the BatchAccountCreateParameters object itself.
+ */
+ public BatchAccountCreateParameters withAutoStorage(AutoStorageBaseProperties autoStorage) {
+ this.autoStorage = autoStorage;
+ return this;
+ }
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccountDeleteHeaders.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccountDeleteHeaders.java
new file mode 100644
index 000000000000..b02d519001e3
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccountDeleteHeaders.java
@@ -0,0 +1,71 @@
+/**
+ * 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.batch.v2015_12_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Defines headers for Delete operation.
+ */
+public class BatchAccountDeleteHeaders {
+ /**
+ * The URL of the resource used to check the status of the asynchronous
+ * operation.
+ */
+ @JsonProperty(value = "Location")
+ private String location;
+
+ /**
+ * Suggested delay to check the status of the asynchronous operation. The
+ * value is an integer that represents the seconds.
+ */
+ @JsonProperty(value = "Retry-After")
+ private Integer retryAfter;
+
+ /**
+ * Get the URL of the resource used to check the status of the asynchronous operation.
+ *
+ * @return the location value
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the URL of the resource used to check the status of the asynchronous operation.
+ *
+ * @param location the location value to set
+ * @return the BatchAccountDeleteHeaders object itself.
+ */
+ public BatchAccountDeleteHeaders withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get suggested delay to check the status of the asynchronous operation. The value is an integer that represents the seconds.
+ *
+ * @return the retryAfter value
+ */
+ public Integer retryAfter() {
+ return this.retryAfter;
+ }
+
+ /**
+ * Set suggested delay to check the status of the asynchronous operation. The value is an integer that represents the seconds.
+ *
+ * @param retryAfter the retryAfter value to set
+ * @return the BatchAccountDeleteHeaders object itself.
+ */
+ public BatchAccountDeleteHeaders withRetryAfter(Integer retryAfter) {
+ this.retryAfter = retryAfter;
+ return this;
+ }
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccountKeys.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccountKeys.java
new file mode 100644
index 000000000000..7f083ed8b3c0
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccountKeys.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.batch.v2015_12_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.batch.v2015_12_01.implementation.BatchManager;
+import com.microsoft.azure.management.batch.v2015_12_01.implementation.BatchAccountKeysInner;
+
+/**
+ * Type representing BatchAccountKeys.
+ */
+public interface BatchAccountKeys extends HasInner, HasManager {
+ /**
+ * @return the primary value.
+ */
+ String primary();
+
+ /**
+ * @return the secondary value.
+ */
+ String secondary();
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccountRegenerateKeyParameters.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccountRegenerateKeyParameters.java
new file mode 100644
index 000000000000..18414b40802c
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccountRegenerateKeyParameters.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.batch.v2015_12_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Parameters supplied to the RegenerateKey operation.
+ */
+public class BatchAccountRegenerateKeyParameters {
+ /**
+ * The type of account key to regenerate. Possible values include:
+ * 'Primary', 'Secondary'.
+ */
+ @JsonProperty(value = "keyName", required = true)
+ private AccountKeyType keyName;
+
+ /**
+ * Get the type of account key to regenerate. Possible values include: 'Primary', 'Secondary'.
+ *
+ * @return the keyName value
+ */
+ public AccountKeyType keyName() {
+ return this.keyName;
+ }
+
+ /**
+ * Set the type of account key to regenerate. Possible values include: 'Primary', 'Secondary'.
+ *
+ * @param keyName the keyName value to set
+ * @return the BatchAccountRegenerateKeyParameters object itself.
+ */
+ public BatchAccountRegenerateKeyParameters withKeyName(AccountKeyType keyName) {
+ this.keyName = keyName;
+ return this;
+ }
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccountUpdateParameters.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccountUpdateParameters.java
new file mode 100644
index 000000000000..5691f758a25b
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccountUpdateParameters.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.batch.v2015_12_01;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * Parameters supplied to the Update operation.
+ */
+@JsonFlatten
+public class BatchAccountUpdateParameters {
+ /**
+ * The user specified tags associated with the account.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * The properties related to auto storage account.
+ */
+ @JsonProperty(value = "properties.autoStorage")
+ private AutoStorageBaseProperties autoStorage;
+
+ /**
+ * Get the user specified tags associated with the account.
+ *
+ * @return the tags value
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the user specified tags associated with the account.
+ *
+ * @param tags the tags value to set
+ * @return the BatchAccountUpdateParameters object itself.
+ */
+ public BatchAccountUpdateParameters withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the properties related to auto storage account.
+ *
+ * @return the autoStorage value
+ */
+ public AutoStorageBaseProperties autoStorage() {
+ return this.autoStorage;
+ }
+
+ /**
+ * Set the properties related to auto storage account.
+ *
+ * @param autoStorage the autoStorage value to set
+ * @return the BatchAccountUpdateParameters object itself.
+ */
+ public BatchAccountUpdateParameters withAutoStorage(AutoStorageBaseProperties autoStorage) {
+ this.autoStorage = autoStorage;
+ return this;
+ }
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccounts.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccounts.java
new file mode 100644
index 000000000000..4f67f040291a
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchAccounts.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.batch.v2015_12_01;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup;
+import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion;
+import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup;
+import rx.Observable;
+import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup;
+import com.microsoft.azure.arm.collection.SupportsListing;
+import rx.Completable;
+import com.microsoft.azure.management.batch.v2015_12_01.implementation.BatchAccountsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing BatchAccounts.
+ */
+public interface BatchAccounts extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner {
+ /**
+ * Synchronizes access keys for the auto storage account configured for the specified Batch account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable synchronizeAutoStorageKeysAsync(String resourceGroupName, String accountName);
+
+ /**
+ * Regenerates the specified account key for the Batch account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the account.
+ * @param keyName The type of account key to regenerate. Possible values include: 'Primary', 'Secondary'
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable regenerateKeyAsync(String resourceGroupName, String accountName, AccountKeyType keyName);
+
+ /**
+ * Gets the account keys for the specified Batch account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getKeysAsync(String resourceGroupName, String accountName);
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchLocationQuota.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchLocationQuota.java
new file mode 100644
index 000000000000..f3f9aca6cd95
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/BatchLocationQuota.java
@@ -0,0 +1,25 @@
+/**
+ * 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.batch.v2015_12_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.batch.v2015_12_01.implementation.BatchManager;
+import com.microsoft.azure.management.batch.v2015_12_01.implementation.BatchLocationQuotaInner;
+
+/**
+ * Type representing BatchLocationQuota.
+ */
+public interface BatchLocationQuota extends HasInner, HasManager {
+ /**
+ * @return the accountQuota value.
+ */
+ Integer accountQuota();
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/Locations.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/Locations.java
new file mode 100644
index 000000000000..f5c8d9c904af
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/Locations.java
@@ -0,0 +1,26 @@
+/**
+ * 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.batch.v2015_12_01;
+
+import rx.Observable;
+
+/**
+ * Type representing Locations.
+ */
+public interface Locations {
+ /**
+ * Gets the Batch service quotas for the specified subscription at the given location.
+ *
+ * @param locationName The desired region for the quotas.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getQuotasAsync(String locationName);
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/PackageState.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/PackageState.java
new file mode 100644
index 000000000000..8797275c37a4
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/PackageState.java
@@ -0,0 +1,56 @@
+/**
+ * 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.batch.v2015_12_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for PackageState.
+ */
+public enum PackageState {
+ /** Enum value pending. */
+ PENDING("pending"),
+
+ /** Enum value active. */
+ ACTIVE("active"),
+
+ /** Enum value unmapped. */
+ UNMAPPED("unmapped");
+
+ /** The actual serialized value for a PackageState instance. */
+ private String value;
+
+ PackageState(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a PackageState instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed PackageState object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static PackageState fromString(String value) {
+ PackageState[] items = PackageState.values();
+ for (PackageState item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/ProvisioningState.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/ProvisioningState.java
new file mode 100644
index 000000000000..84be5374dc79
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/ProvisioningState.java
@@ -0,0 +1,65 @@
+/**
+ * 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.batch.v2015_12_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for ProvisioningState.
+ */
+public enum ProvisioningState {
+ /** Enum value Invalid. */
+ INVALID("Invalid"),
+
+ /** Enum value Creating. */
+ CREATING("Creating"),
+
+ /** Enum value Deleting. */
+ DELETING("Deleting"),
+
+ /** Enum value Succeeded. */
+ SUCCEEDED("Succeeded"),
+
+ /** Enum value Failed. */
+ FAILED("Failed"),
+
+ /** Enum value Cancelled. */
+ CANCELLED("Cancelled");
+
+ /** The actual serialized value for a ProvisioningState instance. */
+ private String value;
+
+ ProvisioningState(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a ProvisioningState instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed ProvisioningState object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static ProvisioningState fromString(String value) {
+ ProvisioningState[] items = ProvisioningState.values();
+ for (ProvisioningState item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/UpdateApplicationParameters.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/UpdateApplicationParameters.java
new file mode 100644
index 000000000000..bd6f0e7b0b7b
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/UpdateApplicationParameters.java
@@ -0,0 +1,97 @@
+/**
+ * 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.batch.v2015_12_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Parameters for an ApplicationOperations.UpdateApplication request.
+ */
+public class UpdateApplicationParameters {
+ /**
+ * A value indicating whether packages within the application may be
+ * overwritten using the same version string.
+ */
+ @JsonProperty(value = "allowUpdates")
+ private Boolean allowUpdates;
+
+ /**
+ * The package to use if a client requests the application but does not
+ * specify a version.
+ */
+ @JsonProperty(value = "defaultVersion")
+ private String defaultVersion;
+
+ /**
+ * The display name for the application.
+ */
+ @JsonProperty(value = "displayName")
+ private String displayName;
+
+ /**
+ * Get a value indicating whether packages within the application may be overwritten using the same version string.
+ *
+ * @return the allowUpdates value
+ */
+ public Boolean allowUpdates() {
+ return this.allowUpdates;
+ }
+
+ /**
+ * Set a value indicating whether packages within the application may be overwritten using the same version string.
+ *
+ * @param allowUpdates the allowUpdates value to set
+ * @return the UpdateApplicationParameters object itself.
+ */
+ public UpdateApplicationParameters withAllowUpdates(Boolean allowUpdates) {
+ this.allowUpdates = allowUpdates;
+ return this;
+ }
+
+ /**
+ * Get the package to use if a client requests the application but does not specify a version.
+ *
+ * @return the defaultVersion value
+ */
+ public String defaultVersion() {
+ return this.defaultVersion;
+ }
+
+ /**
+ * Set the package to use if a client requests the application but does not specify a version.
+ *
+ * @param defaultVersion the defaultVersion value to set
+ * @return the UpdateApplicationParameters object itself.
+ */
+ public UpdateApplicationParameters withDefaultVersion(String defaultVersion) {
+ this.defaultVersion = defaultVersion;
+ return this;
+ }
+
+ /**
+ * Get the display name for the application.
+ *
+ * @return the displayName value
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the display name for the application.
+ *
+ * @param displayName the displayName value to set
+ * @return the UpdateApplicationParameters object itself.
+ */
+ public UpdateApplicationParameters withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationImpl.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationImpl.java
new file mode 100644
index 000000000000..58dd44100dc5
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationImpl.java
@@ -0,0 +1,77 @@
+/**
+ * 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.batch.v2015_12_01.implementation;
+
+import com.microsoft.azure.management.batch.v2015_12_01.Application;
+import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl;
+import rx.Observable;
+import java.util.ArrayList;
+import com.microsoft.azure.management.batch.v2015_12_01.ApplicationPackage;
+import java.util.List;
+
+class ApplicationImpl extends IndexableRefreshableWrapperImpl implements Application {
+ private final BatchManager manager;
+ private String resourceGroupName;
+ private String accountName;
+ private String applicationId;
+
+ ApplicationImpl(ApplicationInner inner, BatchManager manager) {
+ super(null, inner);
+ this.manager = manager;
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "batchAccounts");
+ this.applicationId = IdParsingUtils.getValueFromIdByName(inner.id(), "applications");
+ }
+
+ @Override
+ public BatchManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ ApplicationsInner client = this.manager().inner().applications();
+ return client.getAsync(this.resourceGroupName, this.accountName, this.applicationId);
+ }
+
+
+
+ @Override
+ public Boolean allowUpdates() {
+ return this.inner().allowUpdates();
+ }
+
+ @Override
+ public String defaultVersion() {
+ return this.inner().defaultVersion();
+ }
+
+ @Override
+ public String displayName() {
+ return this.inner().displayName();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public List packages() {
+ List lst = new ArrayList();
+ if (this.inner().packages() != null) {
+ for (ApplicationPackageInner inner : this.inner().packages()) {
+ lst.add( new ApplicationPackageImpl(inner, manager()));
+ }
+ }
+ return lst;
+ }
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationInner.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationInner.java
new file mode 100644
index 000000000000..079c2eecf4a6
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationInner.java
@@ -0,0 +1,150 @@
+/**
+ * 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.batch.v2015_12_01.implementation;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Contains information about an application in a Batch account.
+ */
+public class ApplicationInner {
+ /**
+ * A string that uniquely identifies the application within the account.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /**
+ * The display name for the application.
+ */
+ @JsonProperty(value = "displayName")
+ private String displayName;
+
+ /**
+ * The list of packages under this application.
+ */
+ @JsonProperty(value = "packages")
+ private List packages;
+
+ /**
+ * A value indicating whether packages within the application may be
+ * overwritten using the same version string.
+ */
+ @JsonProperty(value = "allowUpdates")
+ private Boolean allowUpdates;
+
+ /**
+ * The package to use if a client requests the application but does not
+ * specify a version.
+ */
+ @JsonProperty(value = "defaultVersion")
+ private String defaultVersion;
+
+ /**
+ * Get a string that uniquely identifies the application within the account.
+ *
+ * @return the id value
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set a string that uniquely identifies the application within the account.
+ *
+ * @param id the id value to set
+ * @return the ApplicationInner object itself.
+ */
+ public ApplicationInner withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the display name for the application.
+ *
+ * @return the displayName value
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the display name for the application.
+ *
+ * @param displayName the displayName value to set
+ * @return the ApplicationInner object itself.
+ */
+ public ApplicationInner withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the list of packages under this application.
+ *
+ * @return the packages value
+ */
+ public List packages() {
+ return this.packages;
+ }
+
+ /**
+ * Set the list of packages under this application.
+ *
+ * @param packages the packages value to set
+ * @return the ApplicationInner object itself.
+ */
+ public ApplicationInner withPackages(List packages) {
+ this.packages = packages;
+ return this;
+ }
+
+ /**
+ * Get a value indicating whether packages within the application may be overwritten using the same version string.
+ *
+ * @return the allowUpdates value
+ */
+ public Boolean allowUpdates() {
+ return this.allowUpdates;
+ }
+
+ /**
+ * Set a value indicating whether packages within the application may be overwritten using the same version string.
+ *
+ * @param allowUpdates the allowUpdates value to set
+ * @return the ApplicationInner object itself.
+ */
+ public ApplicationInner withAllowUpdates(Boolean allowUpdates) {
+ this.allowUpdates = allowUpdates;
+ return this;
+ }
+
+ /**
+ * Get the package to use if a client requests the application but does not specify a version.
+ *
+ * @return the defaultVersion value
+ */
+ public String defaultVersion() {
+ return this.defaultVersion;
+ }
+
+ /**
+ * Set the package to use if a client requests the application but does not specify a version.
+ *
+ * @param defaultVersion the defaultVersion value to set
+ * @return the ApplicationInner object itself.
+ */
+ public ApplicationInner withDefaultVersion(String defaultVersion) {
+ this.defaultVersion = defaultVersion;
+ return this;
+ }
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationPackageImpl.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationPackageImpl.java
new file mode 100644
index 000000000000..99cec8c7ff7b
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationPackageImpl.java
@@ -0,0 +1,82 @@
+/**
+ * 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.batch.v2015_12_01.implementation;
+
+import com.microsoft.azure.management.batch.v2015_12_01.ApplicationPackage;
+import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl;
+import rx.Observable;
+import org.joda.time.DateTime;
+import com.microsoft.azure.management.batch.v2015_12_01.PackageState;
+
+class ApplicationPackageImpl extends IndexableRefreshableWrapperImpl implements ApplicationPackage {
+ private final BatchManager manager;
+ private String resourceGroupName;
+ private String accountName;
+ private String applicationId;
+ private String version;
+
+ ApplicationPackageImpl(ApplicationPackageInner inner, BatchManager manager) {
+ super(null, inner);
+ this.manager = manager;
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "batchAccounts");
+ this.applicationId = IdParsingUtils.getValueFromIdByName(inner.id(), "applications");
+ this.version = IdParsingUtils.getValueFromIdByName(inner.id(), "versions");
+ }
+
+ @Override
+ public BatchManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ ApplicationPackagesInner client = this.manager().inner().applicationPackages();
+ return client.getAsync(this.resourceGroupName, this.accountName, this.applicationId, this.version);
+ }
+
+
+
+ @Override
+ public String format() {
+ return this.inner().format();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public DateTime lastActivationTime() {
+ return this.inner().lastActivationTime();
+ }
+
+ @Override
+ public PackageState state() {
+ return this.inner().state();
+ }
+
+ @Override
+ public String storageUrl() {
+ return this.inner().storageUrl();
+ }
+
+ @Override
+ public DateTime storageUrlExpiry() {
+ return this.inner().storageUrlExpiry();
+ }
+
+ @Override
+ public String version() {
+ return this.inner().version();
+ }
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationPackageInner.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationPackageInner.java
new file mode 100644
index 000000000000..ebc4098d1fc5
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationPackageInner.java
@@ -0,0 +1,204 @@
+/**
+ * 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.batch.v2015_12_01.implementation;
+
+import com.microsoft.azure.management.batch.v2015_12_01.PackageState;
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * An application package which represents a particular version of an
+ * application.
+ */
+public class ApplicationPackageInner {
+ /**
+ * The ID of the application.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /**
+ * The version of the application package.
+ */
+ @JsonProperty(value = "version")
+ private String version;
+
+ /**
+ * The current state of the application package. Possible values include:
+ * 'pending', 'active', 'unmapped'.
+ */
+ @JsonProperty(value = "state")
+ private PackageState state;
+
+ /**
+ * The format of the application package, if the package is active.
+ */
+ @JsonProperty(value = "format")
+ private String format;
+
+ /**
+ * The storage URL at which the application package is stored.
+ */
+ @JsonProperty(value = "storageUrl")
+ private String storageUrl;
+
+ /**
+ * The UTC time at which the storage URL will expire.
+ */
+ @JsonProperty(value = "storageUrlExpiry")
+ private DateTime storageUrlExpiry;
+
+ /**
+ * The time at which the package was last activated, if the package is
+ * active.
+ */
+ @JsonProperty(value = "lastActivationTime")
+ private DateTime lastActivationTime;
+
+ /**
+ * Get the ID of the application.
+ *
+ * @return the id value
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the ID of the application.
+ *
+ * @param id the id value to set
+ * @return the ApplicationPackageInner object itself.
+ */
+ public ApplicationPackageInner withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the version of the application package.
+ *
+ * @return the version value
+ */
+ public String version() {
+ return this.version;
+ }
+
+ /**
+ * Set the version of the application package.
+ *
+ * @param version the version value to set
+ * @return the ApplicationPackageInner object itself.
+ */
+ public ApplicationPackageInner withVersion(String version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Get the current state of the application package. Possible values include: 'pending', 'active', 'unmapped'.
+ *
+ * @return the state value
+ */
+ public PackageState state() {
+ return this.state;
+ }
+
+ /**
+ * Set the current state of the application package. Possible values include: 'pending', 'active', 'unmapped'.
+ *
+ * @param state the state value to set
+ * @return the ApplicationPackageInner object itself.
+ */
+ public ApplicationPackageInner withState(PackageState state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * Get the format of the application package, if the package is active.
+ *
+ * @return the format value
+ */
+ public String format() {
+ return this.format;
+ }
+
+ /**
+ * Set the format of the application package, if the package is active.
+ *
+ * @param format the format value to set
+ * @return the ApplicationPackageInner object itself.
+ */
+ public ApplicationPackageInner withFormat(String format) {
+ this.format = format;
+ return this;
+ }
+
+ /**
+ * Get the storage URL at which the application package is stored.
+ *
+ * @return the storageUrl value
+ */
+ public String storageUrl() {
+ return this.storageUrl;
+ }
+
+ /**
+ * Set the storage URL at which the application package is stored.
+ *
+ * @param storageUrl the storageUrl value to set
+ * @return the ApplicationPackageInner object itself.
+ */
+ public ApplicationPackageInner withStorageUrl(String storageUrl) {
+ this.storageUrl = storageUrl;
+ return this;
+ }
+
+ /**
+ * Get the UTC time at which the storage URL will expire.
+ *
+ * @return the storageUrlExpiry value
+ */
+ public DateTime storageUrlExpiry() {
+ return this.storageUrlExpiry;
+ }
+
+ /**
+ * Set the UTC time at which the storage URL will expire.
+ *
+ * @param storageUrlExpiry the storageUrlExpiry value to set
+ * @return the ApplicationPackageInner object itself.
+ */
+ public ApplicationPackageInner withStorageUrlExpiry(DateTime storageUrlExpiry) {
+ this.storageUrlExpiry = storageUrlExpiry;
+ return this;
+ }
+
+ /**
+ * Get the time at which the package was last activated, if the package is active.
+ *
+ * @return the lastActivationTime value
+ */
+ public DateTime lastActivationTime() {
+ return this.lastActivationTime;
+ }
+
+ /**
+ * Set the time at which the package was last activated, if the package is active.
+ *
+ * @param lastActivationTime the lastActivationTime value to set
+ * @return the ApplicationPackageInner object itself.
+ */
+ public ApplicationPackageInner withLastActivationTime(DateTime lastActivationTime) {
+ this.lastActivationTime = lastActivationTime;
+ return this;
+ }
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationPackagesImpl.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationPackagesImpl.java
new file mode 100644
index 000000000000..a7184b7e3727
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationPackagesImpl.java
@@ -0,0 +1,71 @@
+/**
+ * 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.batch.v2015_12_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.batch.v2015_12_01.ApplicationPackages;
+import rx.Completable;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.management.batch.v2015_12_01.ApplicationPackage;
+
+class ApplicationPackagesImpl extends WrapperImpl implements ApplicationPackages {
+ private final BatchManager manager;
+
+ ApplicationPackagesImpl(BatchManager manager) {
+ super(manager.inner().applicationPackages());
+ this.manager = manager;
+ }
+
+ public BatchManager manager() {
+ return this.manager;
+ }
+
+ private ApplicationPackageImpl wrapModel(ApplicationPackageInner inner) {
+ return new ApplicationPackageImpl(inner, manager());
+ }
+
+ @Override
+ public Completable activateAsync(String resourceGroupName, String accountName, String applicationId, String version, String format) {
+ ApplicationPackagesInner client = this.inner();
+ return client.activateAsync(resourceGroupName, accountName, applicationId, version, format).toCompletable();
+ }
+
+ @Override
+ public Observable createAsync(String resourceGroupName, String accountName, String applicationId, String version) {
+ ApplicationPackagesInner client = this.inner();
+ return client.createAsync(resourceGroupName, accountName, applicationId, version)
+ .map(new Func1() {
+ @Override
+ public ApplicationPackage call(ApplicationPackageInner inner) {
+ return new ApplicationPackageImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String accountName, String applicationId, String version) {
+ ApplicationPackagesInner client = this.inner();
+ return client.getAsync(resourceGroupName, accountName, applicationId, version)
+ .map(new Func1() {
+ @Override
+ public ApplicationPackage call(ApplicationPackageInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAsync(String resourceGroupName, String accountName, String applicationId, String version) {
+ ApplicationPackagesInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, accountName, applicationId, version).toCompletable();
+ }
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationPackagesInner.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationPackagesInner.java
new file mode 100644
index 000000000000..6f276fc19b84
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationPackagesInner.java
@@ -0,0 +1,484 @@
+/**
+ * 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.batch.v2015_12_01.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.CloudException;
+import com.microsoft.azure.management.batch.v2015_12_01.ActivateApplicationPackageParameters;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import java.io.IOException;
+import okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.HTTP;
+import retrofit2.http.Path;
+import retrofit2.http.POST;
+import retrofit2.http.PUT;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in ApplicationPackages.
+ */
+public class ApplicationPackagesInner {
+ /** The Retrofit service to perform REST calls. */
+ private ApplicationPackagesService service;
+ /** The service client containing this operation class. */
+ private BatchManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ApplicationPackagesInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public ApplicationPackagesInner(Retrofit retrofit, BatchManagementClientImpl client) {
+ this.service = retrofit.create(ApplicationPackagesService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ApplicationPackages to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface ApplicationPackagesService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2015_12_01.ApplicationPackages activate" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}/versions/{version}/activate")
+ Observable> activate(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationId") String applicationId, @Path("version") String version, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ActivateApplicationPackageParameters parameters, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2015_12_01.ApplicationPackages create" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}/versions/{version}")
+ Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationId") String applicationId, @Path("version") String version, @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.batch.v2015_12_01.ApplicationPackages delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}/versions/{version}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationId") String applicationId, @Path("version") String version, @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.batch.v2015_12_01.ApplicationPackages get" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}/versions/{version}")
+ Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationId") String applicationId, @Path("version") String version, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Activates the specified application package.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application to activate.
+ * @param format The format of the application package binary file.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void activate(String resourceGroupName, String accountName, String applicationId, String version, String format) {
+ activateWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version, format).toBlocking().single().body();
+ }
+
+ /**
+ * Activates the specified application package.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application to activate.
+ * @param format The format of the application package binary file.
+ * @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 activateAsync(String resourceGroupName, String accountName, String applicationId, String version, String format, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(activateWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version, format), serviceCallback);
+ }
+
+ /**
+ * Activates the specified application package.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application to activate.
+ * @param format The format of the application package binary file.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable activateAsync(String resourceGroupName, String accountName, String applicationId, String version, String format) {
+ return activateWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version, format).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Activates the specified application package.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application to activate.
+ * @param format The format of the application package binary file.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> activateWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId, String version, String format) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (applicationId == null) {
+ throw new IllegalArgumentException("Parameter applicationId is required and cannot be null.");
+ }
+ if (version == null) {
+ throw new IllegalArgumentException("Parameter version is required and cannot be null.");
+ }
+ 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.");
+ }
+ if (format == null) {
+ throw new IllegalArgumentException("Parameter format is required and cannot be null.");
+ }
+ ActivateApplicationPackageParameters parameters = new ActivateApplicationPackageParameters();
+ parameters.withFormat(format);
+ return service.activate(resourceGroupName, accountName, applicationId, version, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = activateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse activateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(204, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Creates an application package record.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the ApplicationPackageInner object if successful.
+ */
+ public ApplicationPackageInner create(String resourceGroupName, String accountName, String applicationId, String version) {
+ return createWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version).toBlocking().single().body();
+ }
+
+ /**
+ * Creates an application package record.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application.
+ * @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 createAsync(String resourceGroupName, String accountName, String applicationId, String version, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version), serviceCallback);
+ }
+
+ /**
+ * Creates an application package record.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ApplicationPackageInner object
+ */
+ public Observable createAsync(String resourceGroupName, String accountName, String applicationId, String version) {
+ return createWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version).map(new Func1, ApplicationPackageInner>() {
+ @Override
+ public ApplicationPackageInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Creates an application package record.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ApplicationPackageInner object
+ */
+ public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId, String version) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (applicationId == null) {
+ throw new IllegalArgumentException("Parameter applicationId is required and cannot be null.");
+ }
+ if (version == null) {
+ throw new IllegalArgumentException("Parameter version is required and cannot be null.");
+ }
+ 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.create(resourceGroupName, accountName, applicationId, version, 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 = createDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse createDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(201, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Deletes an application package record and its associated binary file.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application to delete.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void delete(String resourceGroupName, String accountName, String applicationId, String version) {
+ deleteWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version).toBlocking().single().body();
+ }
+
+ /**
+ * Deletes an application package record and its associated binary file.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application to delete.
+ * @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 deleteAsync(String resourceGroupName, String accountName, String applicationId, String version, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version), serviceCallback);
+ }
+
+ /**
+ * Deletes an application package record and its associated binary file.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application to delete.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable deleteAsync(String resourceGroupName, String accountName, String applicationId, String version) {
+ return deleteWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Deletes an application package record and its associated binary file.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application to delete.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId, String version) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (applicationId == null) {
+ throw new IllegalArgumentException("Parameter applicationId is required and cannot be null.");
+ }
+ if (version == null) {
+ throw new IllegalArgumentException("Parameter version is required and cannot be null.");
+ }
+ 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.delete(resourceGroupName, accountName, applicationId, version, 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 = deleteDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(204, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets information about the specified application package.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the ApplicationPackageInner object if successful.
+ */
+ public ApplicationPackageInner get(String resourceGroupName, String accountName, String applicationId, String version) {
+ return getWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version).toBlocking().single().body();
+ }
+
+ /**
+ * Gets information about the specified application package.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application.
+ * @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 resourceGroupName, String accountName, String applicationId, String version, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version), serviceCallback);
+ }
+
+ /**
+ * Gets information about the specified application package.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ApplicationPackageInner object
+ */
+ public Observable getAsync(String resourceGroupName, String accountName, String applicationId, String version) {
+ return getWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version).map(new Func1, ApplicationPackageInner>() {
+ @Override
+ public ApplicationPackageInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets information about the specified application package.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param version The version of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ApplicationPackageInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId, String version) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (applicationId == null) {
+ throw new IllegalArgumentException("Parameter applicationId is required and cannot be null.");
+ }
+ if (version == null) {
+ throw new IllegalArgumentException("Parameter version is required and cannot be null.");
+ }
+ 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.get(resourceGroupName, accountName, applicationId, version, 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 = getDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationsImpl.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationsImpl.java
new file mode 100644
index 000000000000..171b59659f68
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationsImpl.java
@@ -0,0 +1,91 @@
+/**
+ * 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.batch.v2015_12_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.batch.v2015_12_01.Applications;
+import rx.Completable;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.batch.v2015_12_01.Application;
+import com.microsoft.azure.management.batch.v2015_12_01.UpdateApplicationParameters;
+
+class ApplicationsImpl extends WrapperImpl implements Applications {
+ private final BatchManager manager;
+
+ ApplicationsImpl(BatchManager manager) {
+ super(manager.inner().applications());
+ this.manager = manager;
+ }
+
+ public BatchManager manager() {
+ return this.manager;
+ }
+
+ private ApplicationImpl wrapModel(ApplicationInner inner) {
+ return new ApplicationImpl(inner, manager());
+ }
+
+ @Override
+ public Observable createAsync(String resourceGroupName, String accountName, String applicationId) {
+ ApplicationsInner client = this.inner();
+ return client.createAsync(resourceGroupName, accountName, applicationId)
+ .map(new Func1() {
+ @Override
+ public Application call(ApplicationInner inner) {
+ return new ApplicationImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Completable updateAsync(String resourceGroupName, String accountName, String applicationId, UpdateApplicationParameters parameters) {
+ ApplicationsInner client = this.inner();
+ return client.updateAsync(resourceGroupName, accountName, applicationId, parameters).toCompletable();
+ }
+
+ @Override
+ public Observable listAsync(final String resourceGroupName, final String accountName) {
+ ApplicationsInner client = this.inner();
+ return client.listAsync(resourceGroupName, accountName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public Application call(ApplicationInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String accountName, String applicationId) {
+ ApplicationsInner client = this.inner();
+ return client.getAsync(resourceGroupName, accountName, applicationId)
+ .map(new Func1() {
+ @Override
+ public Application call(ApplicationInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAsync(String resourceGroupName, String accountName, String applicationId) {
+ ApplicationsInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, accountName, applicationId).toCompletable();
+ }
+
+}
diff --git a/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationsInner.java b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationsInner.java
new file mode 100644
index 000000000000..af4d43de9c1e
--- /dev/null
+++ b/batch/resource-manager/v2015_12_01/src/main/java/com/microsoft/azure/management/batch/v2015_12_01/implementation/ApplicationsInner.java
@@ -0,0 +1,919 @@
+/**
+ * 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.batch.v2015_12_01.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceFuture;
+import com.microsoft.azure.CloudException;
+import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.management.batch.v2015_12_01.AddApplicationParameters;
+import com.microsoft.azure.management.batch.v2015_12_01.UpdateApplicationParameters;
+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 com.microsoft.rest.Validator;
+import java.io.IOException;
+import java.util.List;
+import okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.HTTP;
+import retrofit2.http.PATCH;
+import retrofit2.http.Path;
+import retrofit2.http.PUT;
+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 Applications.
+ */
+public class ApplicationsInner {
+ /** The Retrofit service to perform REST calls. */
+ private ApplicationsService service;
+ /** The service client containing this operation class. */
+ private BatchManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ApplicationsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public ApplicationsInner(Retrofit retrofit, BatchManagementClientImpl client) {
+ this.service = retrofit.create(ApplicationsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for Applications to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface ApplicationsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2015_12_01.Applications create" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}")
+ Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationId") String applicationId, @Path("subscriptionId") String subscriptionId, @Body AddApplicationParameters parameters, @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.batch.v2015_12_01.Applications delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationId") String applicationId, @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.batch.v2015_12_01.Applications get" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}")
+ Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationId") String applicationId, @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.batch.v2015_12_01.Applications update" })
+ @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}")
+ Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationId") String applicationId, @Path("subscriptionId") String subscriptionId, @Body UpdateApplicationParameters parameters, @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.batch.v2015_12_01.Applications list" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications")
+ Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("maxresults") Integer maxresults, @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.batch.v2015_12_01.Applications listNext" })
+ @GET
+ Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Adds an application to the specified Batch account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the ApplicationInner object if successful.
+ */
+ public ApplicationInner create(String resourceGroupName, String accountName, String applicationId) {
+ return createWithServiceResponseAsync(resourceGroupName, accountName, applicationId).toBlocking().single().body();
+ }
+
+ /**
+ * Adds an application to the specified Batch account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @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 createAsync(String resourceGroupName, String accountName, String applicationId, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, applicationId), serviceCallback);
+ }
+
+ /**
+ * Adds an application to the specified Batch account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ApplicationInner object
+ */
+ public Observable createAsync(String resourceGroupName, String accountName, String applicationId) {
+ return createWithServiceResponseAsync(resourceGroupName, accountName, applicationId).map(new Func1, ApplicationInner>() {
+ @Override
+ public ApplicationInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Adds an application to the specified Batch account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ApplicationInner object
+ */
+ public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (applicationId == null) {
+ throw new IllegalArgumentException("Parameter applicationId is required and cannot be null.");
+ }
+ 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 AddApplicationParameters parameters = null;
+ return service.create(resourceGroupName, accountName, applicationId, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = createDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * Adds an application to the specified Batch account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param parameters The parameters for the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the ApplicationInner object if successful.
+ */
+ public ApplicationInner create(String resourceGroupName, String accountName, String applicationId, AddApplicationParameters parameters) {
+ return createWithServiceResponseAsync(resourceGroupName, accountName, applicationId, parameters).toBlocking().single().body();
+ }
+
+ /**
+ * Adds an application to the specified Batch account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param parameters The parameters for the request.
+ * @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 createAsync(String resourceGroupName, String accountName, String applicationId, AddApplicationParameters parameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, applicationId, parameters), serviceCallback);
+ }
+
+ /**
+ * Adds an application to the specified Batch account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param parameters The parameters for the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ApplicationInner object
+ */
+ public Observable createAsync(String resourceGroupName, String accountName, String applicationId, AddApplicationParameters parameters) {
+ return createWithServiceResponseAsync(resourceGroupName, accountName, applicationId, parameters).map(new Func1, ApplicationInner>() {
+ @Override
+ public ApplicationInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Adds an application to the specified Batch account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param parameters The parameters for the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ApplicationInner object
+ */
+ public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId, AddApplicationParameters parameters) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (applicationId == null) {
+ throw new IllegalArgumentException("Parameter applicationId is required and cannot be null.");
+ }
+ 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.");
+ }
+ Validator.validate(parameters);
+ return service.create(resourceGroupName, accountName, applicationId, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = createDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse createDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(201, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Deletes an application.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void delete(String resourceGroupName, String accountName, String applicationId) {
+ deleteWithServiceResponseAsync(resourceGroupName, accountName, applicationId).toBlocking().single().body();
+ }
+
+ /**
+ * Deletes an application.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @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 deleteAsync(String resourceGroupName, String accountName, String applicationId, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, applicationId), serviceCallback);
+ }
+
+ /**
+ * Deletes an application.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable deleteAsync(String resourceGroupName, String accountName, String applicationId) {
+ return deleteWithServiceResponseAsync(resourceGroupName, accountName, applicationId).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Deletes an application.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (applicationId == null) {
+ throw new IllegalArgumentException("Parameter applicationId is required and cannot be null.");
+ }
+ 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.delete(resourceGroupName, accountName, applicationId, 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 = deleteDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(204, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets information about the specified application.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the ApplicationInner object if successful.
+ */
+ public ApplicationInner get(String resourceGroupName, String accountName, String applicationId) {
+ return getWithServiceResponseAsync(resourceGroupName, accountName, applicationId).toBlocking().single().body();
+ }
+
+ /**
+ * Gets information about the specified application.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @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 resourceGroupName, String accountName, String applicationId, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, applicationId), serviceCallback);
+ }
+
+ /**
+ * Gets information about the specified application.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ApplicationInner object
+ */
+ public Observable getAsync(String resourceGroupName, String accountName, String applicationId) {
+ return getWithServiceResponseAsync(resourceGroupName, accountName, applicationId).map(new Func1, ApplicationInner>() {
+ @Override
+ public ApplicationInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets information about the specified application.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ApplicationInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (applicationId == null) {
+ throw new IllegalArgumentException("Parameter applicationId is required and cannot be null.");
+ }
+ 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.get(resourceGroupName, accountName, applicationId, 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 = getDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Updates settings for the specified application.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param parameters The parameters for the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void update(String resourceGroupName, String accountName, String applicationId, UpdateApplicationParameters parameters) {
+ updateWithServiceResponseAsync(resourceGroupName, accountName, applicationId, parameters).toBlocking().single().body();
+ }
+
+ /**
+ * Updates settings for the specified application.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param parameters The parameters for the request.
+ * @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 updateAsync(String resourceGroupName, String accountName, String applicationId, UpdateApplicationParameters parameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, applicationId, parameters), serviceCallback);
+ }
+
+ /**
+ * Updates settings for the specified application.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param parameters The parameters for the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable updateAsync(String resourceGroupName, String accountName, String applicationId, UpdateApplicationParameters parameters) {
+ return updateWithServiceResponseAsync(resourceGroupName, accountName, applicationId, parameters).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Updates settings for the specified application.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param applicationId The ID of the application.
+ * @param parameters The parameters for the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId, UpdateApplicationParameters parameters) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (applicationId == null) {
+ throw new IllegalArgumentException("Parameter applicationId is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (parameters == null) {
+ throw new IllegalArgumentException("Parameter parameters is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(parameters);
+ return service.update(resourceGroupName, accountName, applicationId, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = updateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(204, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Lists all of the applications in the specified account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException 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<ApplicationInner> object if successful.
+ */
+ public PagedList list(final String resourceGroupName, final String accountName) {
+ ServiceResponse> response = listSinglePageAsync(resourceGroupName, accountName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists all of the applications in the specified account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @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 resourceGroupName, final String accountName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listSinglePageAsync(resourceGroupName, accountName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists all of the applications in the specified account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ApplicationInner> object
+ */
+ public Observable> listAsync(final String resourceGroupName, final String accountName) {
+ return listWithServiceResponseAsync(resourceGroupName, accountName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists all of the applications in the specified account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ApplicationInner> object
+ */
+ public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String accountName) {
+ return listSinglePageAsync(resourceGroupName, accountName)
+ .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 applications in the specified account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ApplicationInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listSinglePageAsync(final String resourceGroupName, final String accountName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ 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 Integer maxresults = null;
+ return service.list(resourceGroupName, accountName, this.client.subscriptionId(), maxresults, 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 all of the applications in the specified account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param maxresults The maximum number of items to return in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException 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<ApplicationInner> object if successful.
+ */
+ public PagedList list(final String resourceGroupName, final String accountName, final Integer maxresults) {
+ ServiceResponse> response = listSinglePageAsync(resourceGroupName, accountName, maxresults).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists all of the applications in the specified account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param maxresults The maximum number of items to return in the response.
+ * @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 resourceGroupName, final String accountName, final Integer maxresults, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listSinglePageAsync(resourceGroupName, accountName, maxresults),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists all of the applications in the specified account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param maxresults The maximum number of items to return in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ApplicationInner> object
+ */
+ public Observable> listAsync(final String resourceGroupName, final String accountName, final Integer maxresults) {
+ return listWithServiceResponseAsync(resourceGroupName, accountName, maxresults)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists all of the applications in the specified account.
+ *
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
+ * @param accountName The name of the Batch account.
+ * @param maxresults The maximum number of items to return in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ApplicationInner> object
+ */
+ public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String accountName, final Integer maxresults) {
+ return listSinglePageAsync(resourceGroupName, accountName, maxresults)
+ .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 applications in the specified account.
+ *
+ ServiceResponse> * @param resourceGroupName The name of the resource group that contains the Batch account.
+ ServiceResponse