diff --git a/containerinstance/resource-manager/v2017_08_01_preview/pom.xml b/containerinstance/resource-manager/v2017_08_01_preview/pom.xml
new file mode 100644
index 0000000000000..ab3cc5dc0b185
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/pom.xml
@@ -0,0 +1,133 @@
+
+
+ 4.0.0
+ com.microsoft.azure.containerinstance.v2017_08_01_preview
+
+ com.microsoft.azure
+ azure-arm-parent
+ 0.0.2-beta
+ ../../../pom.xml
+
+ azure-mgmt-containerinstance
+ 1.0.0-beta
+ jar
+ Microsoft Azure SDK for ContainerInstance Management
+ This package contains Microsoft ContainerInstance Management SDK.
+ https://github.com/Azure/azure-libraries-for-java
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+ scm:git:https://github.com/Azure/azure-libraries-for-java
+ scm:git:git@github.com:Azure/azure-libraries-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
+
+
+ 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/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/AzureFileVolume.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/AzureFileVolume.java
new file mode 100644
index 0000000000000..42236a533fb18
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/AzureFileVolume.java
@@ -0,0 +1,123 @@
+/**
+ * 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.containerinstance.v2017_08_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties of the Azure File volume. Azure File shares are mounted as
+ * volumes.
+ */
+public class AzureFileVolume {
+ /**
+ * The name of the Azure File share to be mounted as a volume.
+ */
+ @JsonProperty(value = "shareName", required = true)
+ private String shareName;
+
+ /**
+ * The flag indicating whether the Azure File shared mounted as a volume is
+ * read-only.
+ */
+ @JsonProperty(value = "readOnly")
+ private Boolean readOnly;
+
+ /**
+ * The name of the storage account that contains the Azure File share.
+ */
+ @JsonProperty(value = "storageAccountName", required = true)
+ private String storageAccountName;
+
+ /**
+ * The storage account access key used to access the Azure File share.
+ */
+ @JsonProperty(value = "storageAccountKey")
+ private String storageAccountKey;
+
+ /**
+ * Get the name of the Azure File share to be mounted as a volume.
+ *
+ * @return the shareName value
+ */
+ public String shareName() {
+ return this.shareName;
+ }
+
+ /**
+ * Set the name of the Azure File share to be mounted as a volume.
+ *
+ * @param shareName the shareName value to set
+ * @return the AzureFileVolume object itself.
+ */
+ public AzureFileVolume withShareName(String shareName) {
+ this.shareName = shareName;
+ return this;
+ }
+
+ /**
+ * Get the flag indicating whether the Azure File shared mounted as a volume is read-only.
+ *
+ * @return the readOnly value
+ */
+ public Boolean readOnly() {
+ return this.readOnly;
+ }
+
+ /**
+ * Set the flag indicating whether the Azure File shared mounted as a volume is read-only.
+ *
+ * @param readOnly the readOnly value to set
+ * @return the AzureFileVolume object itself.
+ */
+ public AzureFileVolume withReadOnly(Boolean readOnly) {
+ this.readOnly = readOnly;
+ return this;
+ }
+
+ /**
+ * Get the name of the storage account that contains the Azure File share.
+ *
+ * @return the storageAccountName value
+ */
+ public String storageAccountName() {
+ return this.storageAccountName;
+ }
+
+ /**
+ * Set the name of the storage account that contains the Azure File share.
+ *
+ * @param storageAccountName the storageAccountName value to set
+ * @return the AzureFileVolume object itself.
+ */
+ public AzureFileVolume withStorageAccountName(String storageAccountName) {
+ this.storageAccountName = storageAccountName;
+ return this;
+ }
+
+ /**
+ * Get the storage account access key used to access the Azure File share.
+ *
+ * @return the storageAccountKey value
+ */
+ public String storageAccountKey() {
+ return this.storageAccountKey;
+ }
+
+ /**
+ * Set the storage account access key used to access the Azure File share.
+ *
+ * @param storageAccountKey the storageAccountKey value to set
+ * @return the AzureFileVolume object itself.
+ */
+ public AzureFileVolume withStorageAccountKey(String storageAccountKey) {
+ this.storageAccountKey = storageAccountKey;
+ return this;
+ }
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/Container.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/Container.java
new file mode 100644
index 0000000000000..a776c562bd5e7
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/Container.java
@@ -0,0 +1,217 @@
+/**
+ * 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.containerinstance.v2017_08_01_preview;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * A container instance.
+ */
+@JsonFlatten
+public class Container {
+ /**
+ * The user-provided name of the container instance.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * The name of the image used to create the container instance.
+ */
+ @JsonProperty(value = "properties.image", required = true)
+ private String image;
+
+ /**
+ * The commands to execute within the container instance in exec form.
+ */
+ @JsonProperty(value = "properties.command")
+ private List command;
+
+ /**
+ * The exposed ports on the container instance.
+ */
+ @JsonProperty(value = "properties.ports")
+ private List ports;
+
+ /**
+ * The environment variables to set in the container instance.
+ */
+ @JsonProperty(value = "properties.environmentVariables")
+ private List environmentVariables;
+
+ /**
+ * The instance view of the container instance. Only valid in response.
+ */
+ @JsonProperty(value = "properties.instanceView", access = JsonProperty.Access.WRITE_ONLY)
+ private ContainerPropertiesInstanceView instanceView;
+
+ /**
+ * The resource requirements of the container instance.
+ */
+ @JsonProperty(value = "properties.resources", required = true)
+ private ResourceRequirements resources;
+
+ /**
+ * The volume mounts available to the container instance.
+ */
+ @JsonProperty(value = "properties.volumeMounts")
+ private List volumeMounts;
+
+ /**
+ * Get the user-provided name of the container instance.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the user-provided name of the container instance.
+ *
+ * @param name the name value to set
+ * @return the Container object itself.
+ */
+ public Container withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the name of the image used to create the container instance.
+ *
+ * @return the image value
+ */
+ public String image() {
+ return this.image;
+ }
+
+ /**
+ * Set the name of the image used to create the container instance.
+ *
+ * @param image the image value to set
+ * @return the Container object itself.
+ */
+ public Container withImage(String image) {
+ this.image = image;
+ return this;
+ }
+
+ /**
+ * Get the commands to execute within the container instance in exec form.
+ *
+ * @return the command value
+ */
+ public List command() {
+ return this.command;
+ }
+
+ /**
+ * Set the commands to execute within the container instance in exec form.
+ *
+ * @param command the command value to set
+ * @return the Container object itself.
+ */
+ public Container withCommand(List command) {
+ this.command = command;
+ return this;
+ }
+
+ /**
+ * Get the exposed ports on the container instance.
+ *
+ * @return the ports value
+ */
+ public List ports() {
+ return this.ports;
+ }
+
+ /**
+ * Set the exposed ports on the container instance.
+ *
+ * @param ports the ports value to set
+ * @return the Container object itself.
+ */
+ public Container withPorts(List ports) {
+ this.ports = ports;
+ return this;
+ }
+
+ /**
+ * Get the environment variables to set in the container instance.
+ *
+ * @return the environmentVariables value
+ */
+ public List environmentVariables() {
+ return this.environmentVariables;
+ }
+
+ /**
+ * Set the environment variables to set in the container instance.
+ *
+ * @param environmentVariables the environmentVariables value to set
+ * @return the Container object itself.
+ */
+ public Container withEnvironmentVariables(List environmentVariables) {
+ this.environmentVariables = environmentVariables;
+ return this;
+ }
+
+ /**
+ * Get the instance view of the container instance. Only valid in response.
+ *
+ * @return the instanceView value
+ */
+ public ContainerPropertiesInstanceView instanceView() {
+ return this.instanceView;
+ }
+
+ /**
+ * Get the resource requirements of the container instance.
+ *
+ * @return the resources value
+ */
+ public ResourceRequirements resources() {
+ return this.resources;
+ }
+
+ /**
+ * Set the resource requirements of the container instance.
+ *
+ * @param resources the resources value to set
+ * @return the Container object itself.
+ */
+ public Container withResources(ResourceRequirements resources) {
+ this.resources = resources;
+ return this;
+ }
+
+ /**
+ * Get the volume mounts available to the container instance.
+ *
+ * @return the volumeMounts value
+ */
+ public List volumeMounts() {
+ return this.volumeMounts;
+ }
+
+ /**
+ * Set the volume mounts available to the container instance.
+ *
+ * @param volumeMounts the volumeMounts value to set
+ * @return the Container object itself.
+ */
+ public Container withVolumeMounts(List volumeMounts) {
+ this.volumeMounts = volumeMounts;
+ return this;
+ }
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerEvent.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerEvent.java
new file mode 100644
index 0000000000000..af2d41ac699f4
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerEvent.java
@@ -0,0 +1,148 @@
+/**
+ * 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.containerinstance.v2017_08_01_preview;
+
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * A container instance event.
+ */
+public class ContainerEvent {
+ /**
+ * The count of the event.
+ */
+ @JsonProperty(value = "count")
+ private Integer count;
+
+ /**
+ * The date-time of the earliest logged event.
+ */
+ @JsonProperty(value = "firstTimestamp")
+ private DateTime firstTimestamp;
+
+ /**
+ * The date-time of the latest logged event.
+ */
+ @JsonProperty(value = "lastTimestamp")
+ private DateTime lastTimestamp;
+
+ /**
+ * The event message.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /**
+ * The event type.
+ */
+ @JsonProperty(value = "type")
+ private String type;
+
+ /**
+ * Get the count of the event.
+ *
+ * @return the count value
+ */
+ public Integer count() {
+ return this.count;
+ }
+
+ /**
+ * Set the count of the event.
+ *
+ * @param count the count value to set
+ * @return the ContainerEvent object itself.
+ */
+ public ContainerEvent withCount(Integer count) {
+ this.count = count;
+ return this;
+ }
+
+ /**
+ * Get the date-time of the earliest logged event.
+ *
+ * @return the firstTimestamp value
+ */
+ public DateTime firstTimestamp() {
+ return this.firstTimestamp;
+ }
+
+ /**
+ * Set the date-time of the earliest logged event.
+ *
+ * @param firstTimestamp the firstTimestamp value to set
+ * @return the ContainerEvent object itself.
+ */
+ public ContainerEvent withFirstTimestamp(DateTime firstTimestamp) {
+ this.firstTimestamp = firstTimestamp;
+ return this;
+ }
+
+ /**
+ * Get the date-time of the latest logged event.
+ *
+ * @return the lastTimestamp value
+ */
+ public DateTime lastTimestamp() {
+ return this.lastTimestamp;
+ }
+
+ /**
+ * Set the date-time of the latest logged event.
+ *
+ * @param lastTimestamp the lastTimestamp value to set
+ * @return the ContainerEvent object itself.
+ */
+ public ContainerEvent withLastTimestamp(DateTime lastTimestamp) {
+ this.lastTimestamp = lastTimestamp;
+ return this;
+ }
+
+ /**
+ * Get the event message.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set the event message.
+ *
+ * @param message the message value to set
+ * @return the ContainerEvent object itself.
+ */
+ public ContainerEvent withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Get the event type.
+ *
+ * @return the type value
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set the event type.
+ *
+ * @param type the type value to set
+ * @return the ContainerEvent object itself.
+ */
+ public ContainerEvent withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerGroup.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerGroup.java
new file mode 100644
index 0000000000000..1bee667287392
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerGroup.java
@@ -0,0 +1,209 @@
+/**
+ * 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.containerinstance.v2017_08_01_preview;
+
+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.containerinstance.v2017_08_01_preview.implementation.ContainerInstanceManager;
+import java.util.List;
+import com.microsoft.azure.management.containerinstance.v2017_08_01_preview.implementation.ContainerGroupInner;
+
+/**
+ * Type representing ContainerGroup.
+ */
+public interface ContainerGroup extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager {
+ /**
+ * @return the containers value.
+ */
+ List containers();
+
+ /**
+ * @return the imageRegistryCredentials value.
+ */
+ List imageRegistryCredentials();
+
+ /**
+ * @return the ipAddress value.
+ */
+ IpAddress ipAddress();
+
+ /**
+ * @return the osType value.
+ */
+ OperatingSystemTypes osType();
+
+ /**
+ * @return the provisioningState value.
+ */
+ String provisioningState();
+
+ /**
+ * @return the restartPolicy value.
+ */
+ ContainerRestartPolicy restartPolicy();
+
+ /**
+ * @return the state value.
+ */
+ String state();
+
+ /**
+ * @return the volumes value.
+ */
+ List volumes();
+
+ /**
+ * The entirety of the ContainerGroup definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithContainers, DefinitionStages.WithOsType, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of ContainerGroup definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a ContainerGroup definition.
+ */
+ interface Blank extends GroupableResourceCore.DefinitionWithRegion {
+ }
+
+ /**
+ * The stage of the ContainerGroup definition allowing to specify the resource group.
+ */
+ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup {
+ }
+
+ /**
+ * The stage of the containergroup definition allowing to specify Containers.
+ */
+ interface WithContainers {
+ /**
+ * Specifies containers.
+ */
+ WithOsType withContainers(List containers);
+ }
+
+ /**
+ * The stage of the containergroup definition allowing to specify OsType.
+ */
+ interface WithOsType {
+ /**
+ * Specifies osType.
+ */
+ WithCreate withOsType(OperatingSystemTypes osType);
+ }
+
+ /**
+ * The stage of the containergroup update allowing to specify ImageRegistryCredentials.
+ */
+ interface WithImageRegistryCredentials {
+ /**
+ * Specifies imageRegistryCredentials.
+ */
+ WithCreate withImageRegistryCredentials(List imageRegistryCredentials);
+ }
+
+ /**
+ * The stage of the containergroup update allowing to specify IpAddress.
+ */
+ interface WithIpAddress {
+ /**
+ * Specifies ipAddress.
+ */
+ WithCreate withIpAddress(IpAddress ipAddress);
+ }
+
+ /**
+ * The stage of the containergroup update allowing to specify RestartPolicy.
+ */
+ interface WithRestartPolicy {
+ /**
+ * Specifies restartPolicy.
+ */
+ WithCreate withRestartPolicy(ContainerRestartPolicy restartPolicy);
+ }
+
+ /**
+ * The stage of the containergroup update allowing to specify Volumes.
+ */
+ interface WithVolumes {
+ /**
+ * Specifies volumes.
+ */
+ WithCreate withVolumes(List volumes);
+ }
+
+ /**
+ * 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.WithImageRegistryCredentials, DefinitionStages.WithIpAddress, DefinitionStages.WithRestartPolicy, DefinitionStages.WithVolumes {
+ }
+ }
+ /**
+ * The template for a ContainerGroup update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithImageRegistryCredentials, UpdateStages.WithIpAddress, UpdateStages.WithRestartPolicy, UpdateStages.WithVolumes {
+ }
+
+ /**
+ * Grouping of ContainerGroup update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the containergroup {0} allowing to specify ImageRegistryCredentials.
+ */
+ interface WithImageRegistryCredentials {
+ /**
+ * Specifies imageRegistryCredentials.
+ */
+ Update withImageRegistryCredentials(List imageRegistryCredentials);
+ }
+
+ /**
+ * The stage of the containergroup {0} allowing to specify IpAddress.
+ */
+ interface WithIpAddress {
+ /**
+ * Specifies ipAddress.
+ */
+ Update withIpAddress(IpAddress ipAddress);
+ }
+
+ /**
+ * The stage of the containergroup {0} allowing to specify RestartPolicy.
+ */
+ interface WithRestartPolicy {
+ /**
+ * Specifies restartPolicy.
+ */
+ Update withRestartPolicy(ContainerRestartPolicy restartPolicy);
+ }
+
+ /**
+ * The stage of the containergroup {0} allowing to specify Volumes.
+ */
+ interface WithVolumes {
+ /**
+ * Specifies volumes.
+ */
+ Update withVolumes(List volumes);
+ }
+
+ }
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerGroupNetworkProtocol.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerGroupNetworkProtocol.java
new file mode 100644
index 0000000000000..67078f97ff501
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerGroupNetworkProtocol.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.containerinstance.v2017_08_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ContainerGroupNetworkProtocol.
+ */
+public final class ContainerGroupNetworkProtocol extends ExpandableStringEnum {
+ /** Static value TCP for ContainerGroupNetworkProtocol. */
+ public static final ContainerGroupNetworkProtocol TCP = fromString("TCP");
+
+ /** Static value UDP for ContainerGroupNetworkProtocol. */
+ public static final ContainerGroupNetworkProtocol UDP = fromString("UDP");
+
+ /**
+ * Creates or finds a ContainerGroupNetworkProtocol from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ContainerGroupNetworkProtocol
+ */
+ @JsonCreator
+ public static ContainerGroupNetworkProtocol fromString(String name) {
+ return fromString(name, ContainerGroupNetworkProtocol.class);
+ }
+
+ /**
+ * @return known ContainerGroupNetworkProtocol values
+ */
+ public static Collection values() {
+ return values(ContainerGroupNetworkProtocol.class);
+ }
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerGroups.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerGroups.java
new file mode 100644
index 0000000000000..9bbab9aa734b2
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerGroups.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.containerinstance.v2017_08_01_preview;
+
+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 com.microsoft.azure.management.containerinstance.v2017_08_01_preview.implementation.ContainerGroupsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing ContainerGroups.
+ */
+public interface ContainerGroups extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner {
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerLogs.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerLogs.java
new file mode 100644
index 0000000000000..d2f2b62861748
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerLogs.java
@@ -0,0 +1,29 @@
+/**
+ * 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.containerinstance.v2017_08_01_preview;
+
+import rx.Observable;
+
+/**
+ * Type representing ContainerLogs.
+ */
+public interface ContainerLogs {
+ /**
+ * Get the logs for a specified container instance.
+ * Get the logs for a specified container instance in a specified resource group and container group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the container instance.
+ * @param containerName The name of the container instance.
+ * @param containerGroupName The name of the container group the container instance belongs to.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync(String resourceGroupName, String containerName, String containerGroupName);
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerPort.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerPort.java
new file mode 100644
index 0000000000000..018e5761143b9
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerPort.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.containerinstance.v2017_08_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The port exposed on the container instance.
+ */
+public class ContainerPort {
+ /**
+ * The port number exposed within the container group.
+ */
+ @JsonProperty(value = "port", required = true)
+ private int port;
+
+ /**
+ * Get the port number exposed within the container group.
+ *
+ * @return the port value
+ */
+ public int port() {
+ return this.port;
+ }
+
+ /**
+ * Set the port number exposed within the container group.
+ *
+ * @param port the port value to set
+ * @return the ContainerPort object itself.
+ */
+ public ContainerPort withPort(int port) {
+ this.port = port;
+ return this;
+ }
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerPropertiesInstanceView.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerPropertiesInstanceView.java
new file mode 100644
index 0000000000000..2b14eb0052223
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerPropertiesInstanceView.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.containerinstance.v2017_08_01_preview;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The instance view of the container instance. Only valid in response.
+ */
+public class ContainerPropertiesInstanceView {
+ /**
+ * The number of times that the container instance has been restarted.
+ */
+ @JsonProperty(value = "restartCount")
+ private Integer restartCount;
+
+ /**
+ * Current container instance state.
+ */
+ @JsonProperty(value = "currentState")
+ private ContainerState currentState;
+
+ /**
+ * Previous container instance state.
+ */
+ @JsonProperty(value = "previousState")
+ private ContainerState previousState;
+
+ /**
+ * The events of the container instance.
+ */
+ @JsonProperty(value = "events")
+ private List events;
+
+ /**
+ * Get the number of times that the container instance has been restarted.
+ *
+ * @return the restartCount value
+ */
+ public Integer restartCount() {
+ return this.restartCount;
+ }
+
+ /**
+ * Set the number of times that the container instance has been restarted.
+ *
+ * @param restartCount the restartCount value to set
+ * @return the ContainerPropertiesInstanceView object itself.
+ */
+ public ContainerPropertiesInstanceView withRestartCount(Integer restartCount) {
+ this.restartCount = restartCount;
+ return this;
+ }
+
+ /**
+ * Get current container instance state.
+ *
+ * @return the currentState value
+ */
+ public ContainerState currentState() {
+ return this.currentState;
+ }
+
+ /**
+ * Set current container instance state.
+ *
+ * @param currentState the currentState value to set
+ * @return the ContainerPropertiesInstanceView object itself.
+ */
+ public ContainerPropertiesInstanceView withCurrentState(ContainerState currentState) {
+ this.currentState = currentState;
+ return this;
+ }
+
+ /**
+ * Get previous container instance state.
+ *
+ * @return the previousState value
+ */
+ public ContainerState previousState() {
+ return this.previousState;
+ }
+
+ /**
+ * Set previous container instance state.
+ *
+ * @param previousState the previousState value to set
+ * @return the ContainerPropertiesInstanceView object itself.
+ */
+ public ContainerPropertiesInstanceView withPreviousState(ContainerState previousState) {
+ this.previousState = previousState;
+ return this;
+ }
+
+ /**
+ * Get the events of the container instance.
+ *
+ * @return the events value
+ */
+ public List events() {
+ return this.events;
+ }
+
+ /**
+ * Set the events of the container instance.
+ *
+ * @param events the events value to set
+ * @return the ContainerPropertiesInstanceView object itself.
+ */
+ public ContainerPropertiesInstanceView withEvents(List events) {
+ this.events = events;
+ return this;
+ }
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerRestartPolicy.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerRestartPolicy.java
new file mode 100644
index 0000000000000..3d48083481699
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerRestartPolicy.java
@@ -0,0 +1,38 @@
+/**
+ * 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.containerinstance.v2017_08_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ContainerRestartPolicy.
+ */
+public final class ContainerRestartPolicy extends ExpandableStringEnum {
+ /** Static value always for ContainerRestartPolicy. */
+ public static final ContainerRestartPolicy ALWAYS = fromString("always");
+
+ /**
+ * Creates or finds a ContainerRestartPolicy from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ContainerRestartPolicy
+ */
+ @JsonCreator
+ public static ContainerRestartPolicy fromString(String name) {
+ return fromString(name, ContainerRestartPolicy.class);
+ }
+
+ /**
+ * @return known ContainerRestartPolicy values
+ */
+ public static Collection values() {
+ return values(ContainerRestartPolicy.class);
+ }
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerState.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerState.java
new file mode 100644
index 0000000000000..a1d08bb7ebe14
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ContainerState.java
@@ -0,0 +1,149 @@
+/**
+ * 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.containerinstance.v2017_08_01_preview;
+
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The container instance state.
+ */
+public class ContainerState {
+ /**
+ * The state of the container instance.
+ */
+ @JsonProperty(value = "state")
+ private String state;
+
+ /**
+ * The date-time when the container instance state started.
+ */
+ @JsonProperty(value = "startTime")
+ private DateTime startTime;
+
+ /**
+ * The container instance exit codes correspond to those from the `docker
+ * run` command.
+ */
+ @JsonProperty(value = "exitCode")
+ private Integer exitCode;
+
+ /**
+ * The date-time when the container instance state finished.
+ */
+ @JsonProperty(value = "finishTime")
+ private DateTime finishTime;
+
+ /**
+ * The human-readable status of the container instance state.
+ */
+ @JsonProperty(value = "detailStatus")
+ private String detailStatus;
+
+ /**
+ * Get the state of the container instance.
+ *
+ * @return the state value
+ */
+ public String state() {
+ return this.state;
+ }
+
+ /**
+ * Set the state of the container instance.
+ *
+ * @param state the state value to set
+ * @return the ContainerState object itself.
+ */
+ public ContainerState withState(String state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * Get the date-time when the container instance state started.
+ *
+ * @return the startTime value
+ */
+ public DateTime startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Set the date-time when the container instance state started.
+ *
+ * @param startTime the startTime value to set
+ * @return the ContainerState object itself.
+ */
+ public ContainerState withStartTime(DateTime startTime) {
+ this.startTime = startTime;
+ return this;
+ }
+
+ /**
+ * Get the container instance exit codes correspond to those from the `docker run` command.
+ *
+ * @return the exitCode value
+ */
+ public Integer exitCode() {
+ return this.exitCode;
+ }
+
+ /**
+ * Set the container instance exit codes correspond to those from the `docker run` command.
+ *
+ * @param exitCode the exitCode value to set
+ * @return the ContainerState object itself.
+ */
+ public ContainerState withExitCode(Integer exitCode) {
+ this.exitCode = exitCode;
+ return this;
+ }
+
+ /**
+ * Get the date-time when the container instance state finished.
+ *
+ * @return the finishTime value
+ */
+ public DateTime finishTime() {
+ return this.finishTime;
+ }
+
+ /**
+ * Set the date-time when the container instance state finished.
+ *
+ * @param finishTime the finishTime value to set
+ * @return the ContainerState object itself.
+ */
+ public ContainerState withFinishTime(DateTime finishTime) {
+ this.finishTime = finishTime;
+ return this;
+ }
+
+ /**
+ * Get the human-readable status of the container instance state.
+ *
+ * @return the detailStatus value
+ */
+ public String detailStatus() {
+ return this.detailStatus;
+ }
+
+ /**
+ * Set the human-readable status of the container instance state.
+ *
+ * @param detailStatus the detailStatus value to set
+ * @return the ContainerState object itself.
+ */
+ public ContainerState withDetailStatus(String detailStatus) {
+ this.detailStatus = detailStatus;
+ return this;
+ }
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/EnvironmentVariable.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/EnvironmentVariable.java
new file mode 100644
index 0000000000000..337b732a0f77c
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/EnvironmentVariable.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.containerinstance.v2017_08_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The environment variable to set within the container instance.
+ */
+public class EnvironmentVariable {
+ /**
+ * The name of the environment variable.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * The value of the environment variable.
+ */
+ @JsonProperty(value = "value", required = true)
+ private String value;
+
+ /**
+ * Get the name of the environment variable.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the environment variable.
+ *
+ * @param name the name value to set
+ * @return the EnvironmentVariable object itself.
+ */
+ public EnvironmentVariable withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the value of the environment variable.
+ *
+ * @return the value value
+ */
+ public String value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value of the environment variable.
+ *
+ * @param value the value value to set
+ * @return the EnvironmentVariable object itself.
+ */
+ public EnvironmentVariable withValue(String value) {
+ this.value = value;
+ return this;
+ }
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ImageRegistryCredential.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ImageRegistryCredential.java
new file mode 100644
index 0000000000000..f00d7f725ee6a
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ImageRegistryCredential.java
@@ -0,0 +1,96 @@
+/**
+ * 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.containerinstance.v2017_08_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Image registry credential.
+ */
+public class ImageRegistryCredential {
+ /**
+ * The Docker image registry server without a protocol such as "http" and
+ * "https".
+ */
+ @JsonProperty(value = "server", required = true)
+ private String server;
+
+ /**
+ * The username for the private registry.
+ */
+ @JsonProperty(value = "username", required = true)
+ private String username;
+
+ /**
+ * The password for the private registry.
+ */
+ @JsonProperty(value = "password")
+ private String password;
+
+ /**
+ * Get the Docker image registry server without a protocol such as "http" and "https".
+ *
+ * @return the server value
+ */
+ public String server() {
+ return this.server;
+ }
+
+ /**
+ * Set the Docker image registry server without a protocol such as "http" and "https".
+ *
+ * @param server the server value to set
+ * @return the ImageRegistryCredential object itself.
+ */
+ public ImageRegistryCredential withServer(String server) {
+ this.server = server;
+ return this;
+ }
+
+ /**
+ * Get the username for the private registry.
+ *
+ * @return the username value
+ */
+ public String username() {
+ return this.username;
+ }
+
+ /**
+ * Set the username for the private registry.
+ *
+ * @param username the username value to set
+ * @return the ImageRegistryCredential object itself.
+ */
+ public ImageRegistryCredential withUsername(String username) {
+ this.username = username;
+ return this;
+ }
+
+ /**
+ * Get the password for the private registry.
+ *
+ * @return the password value
+ */
+ public String password() {
+ return this.password;
+ }
+
+ /**
+ * Set the password for the private registry.
+ *
+ * @param password the password value to set
+ * @return the ImageRegistryCredential object itself.
+ */
+ public ImageRegistryCredential withPassword(String password) {
+ this.password = password;
+ return this;
+ }
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/IpAddress.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/IpAddress.java
new file mode 100644
index 0000000000000..dbe15e035531f
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/IpAddress.java
@@ -0,0 +1,104 @@
+/**
+ * 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.containerinstance.v2017_08_01_preview;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * IP address for the container group.
+ */
+public class IpAddress {
+ /**
+ * The list of ports exposed on the container group.
+ */
+ @JsonProperty(value = "ports", required = true)
+ private List ports;
+
+ /**
+ * Specifies if the IP is exposed to the public internet.
+ */
+ @JsonProperty(value = "type", required = true)
+ private String type;
+
+ /**
+ * The IP exposed to the public internet.
+ */
+ @JsonProperty(value = "ip")
+ private String ip;
+
+ /**
+ * Creates an instance of IpAddress class.
+ * @param ports the list of ports exposed on the container group.
+ */
+ public IpAddress() {
+ type = "Public";
+ }
+
+ /**
+ * Get the list of ports exposed on the container group.
+ *
+ * @return the ports value
+ */
+ public List ports() {
+ return this.ports;
+ }
+
+ /**
+ * Set the list of ports exposed on the container group.
+ *
+ * @param ports the ports value to set
+ * @return the IpAddress object itself.
+ */
+ public IpAddress withPorts(List ports) {
+ this.ports = ports;
+ return this;
+ }
+
+ /**
+ * Get specifies if the IP is exposed to the public internet.
+ *
+ * @return the type value
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set specifies if the IP is exposed to the public internet.
+ *
+ * @param type the type value to set
+ * @return the IpAddress object itself.
+ */
+ public IpAddress withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the IP exposed to the public internet.
+ *
+ * @return the ip value
+ */
+ public String ip() {
+ return this.ip;
+ }
+
+ /**
+ * Set the IP exposed to the public internet.
+ *
+ * @param ip the ip value to set
+ * @return the IpAddress object itself.
+ */
+ public IpAddress withIp(String ip) {
+ this.ip = ip;
+ return this;
+ }
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/Logs.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/Logs.java
new file mode 100644
index 0000000000000..5bc30ba21bdd7
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/Logs.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.containerinstance.v2017_08_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.containerinstance.v2017_08_01_preview.implementation.ContainerInstanceManager;
+import com.microsoft.azure.management.containerinstance.v2017_08_01_preview.implementation.LogsInner;
+
+/**
+ * Type representing Logs.
+ */
+public interface Logs extends HasInner, HasManager {
+ /**
+ * @return the content value.
+ */
+ String content();
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/OperatingSystemTypes.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/OperatingSystemTypes.java
new file mode 100644
index 0000000000000..4f8aa7cc873d0
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/OperatingSystemTypes.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.containerinstance.v2017_08_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for OperatingSystemTypes.
+ */
+public final class OperatingSystemTypes extends ExpandableStringEnum {
+ /** Static value Windows for OperatingSystemTypes. */
+ public static final OperatingSystemTypes WINDOWS = fromString("Windows");
+
+ /** Static value Linux for OperatingSystemTypes. */
+ public static final OperatingSystemTypes LINUX = fromString("Linux");
+
+ /**
+ * Creates or finds a OperatingSystemTypes from its string representation.
+ * @param name a name to look for
+ * @return the corresponding OperatingSystemTypes
+ */
+ @JsonCreator
+ public static OperatingSystemTypes fromString(String name) {
+ return fromString(name, OperatingSystemTypes.class);
+ }
+
+ /**
+ * @return known OperatingSystemTypes values
+ */
+ public static Collection values() {
+ return values(OperatingSystemTypes.class);
+ }
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/Port.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/Port.java
new file mode 100644
index 0000000000000..56698eb99cdc0
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/Port.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.containerinstance.v2017_08_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The port exposed on the container group.
+ */
+public class Port {
+ /**
+ * The protocol associated with the port. Possible values include: 'TCP',
+ * 'UDP'.
+ */
+ @JsonProperty(value = "protocol")
+ private ContainerGroupNetworkProtocol protocol;
+
+ /**
+ * The port number.
+ */
+ @JsonProperty(value = "port", required = true)
+ private int port;
+
+ /**
+ * Get the protocol associated with the port. Possible values include: 'TCP', 'UDP'.
+ *
+ * @return the protocol value
+ */
+ public ContainerGroupNetworkProtocol protocol() {
+ return this.protocol;
+ }
+
+ /**
+ * Set the protocol associated with the port. Possible values include: 'TCP', 'UDP'.
+ *
+ * @param protocol the protocol value to set
+ * @return the Port object itself.
+ */
+ public Port withProtocol(ContainerGroupNetworkProtocol protocol) {
+ this.protocol = protocol;
+ return this;
+ }
+
+ /**
+ * Get the port number.
+ *
+ * @return the port value
+ */
+ public int port() {
+ return this.port;
+ }
+
+ /**
+ * Set the port number.
+ *
+ * @param port the port value to set
+ * @return the Port object itself.
+ */
+ public Port withPort(int port) {
+ this.port = port;
+ return this;
+ }
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ResourceLimits.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ResourceLimits.java
new file mode 100644
index 0000000000000..4c6902b9d1bda
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ResourceLimits.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.containerinstance.v2017_08_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The resource limits.
+ */
+public class ResourceLimits {
+ /**
+ * The memory limit in GB of this container instance.
+ */
+ @JsonProperty(value = "memoryInGB")
+ private Double memoryInGB;
+
+ /**
+ * The CPU limit of this container instance.
+ */
+ @JsonProperty(value = "cpu")
+ private Double cpu;
+
+ /**
+ * Get the memory limit in GB of this container instance.
+ *
+ * @return the memoryInGB value
+ */
+ public Double memoryInGB() {
+ return this.memoryInGB;
+ }
+
+ /**
+ * Set the memory limit in GB of this container instance.
+ *
+ * @param memoryInGB the memoryInGB value to set
+ * @return the ResourceLimits object itself.
+ */
+ public ResourceLimits withMemoryInGB(Double memoryInGB) {
+ this.memoryInGB = memoryInGB;
+ return this;
+ }
+
+ /**
+ * Get the CPU limit of this container instance.
+ *
+ * @return the cpu value
+ */
+ public Double cpu() {
+ return this.cpu;
+ }
+
+ /**
+ * Set the CPU limit of this container instance.
+ *
+ * @param cpu the cpu value to set
+ * @return the ResourceLimits object itself.
+ */
+ public ResourceLimits withCpu(Double cpu) {
+ this.cpu = cpu;
+ return this;
+ }
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ResourceRequests.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ResourceRequests.java
new file mode 100644
index 0000000000000..30688d55d101a
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ResourceRequests.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.containerinstance.v2017_08_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The resource requests.
+ */
+public class ResourceRequests {
+ /**
+ * The memory request in GB of this container instance.
+ */
+ @JsonProperty(value = "memoryInGB", required = true)
+ private double memoryInGB;
+
+ /**
+ * The CPU request of this container instance.
+ */
+ @JsonProperty(value = "cpu", required = true)
+ private double cpu;
+
+ /**
+ * Get the memory request in GB of this container instance.
+ *
+ * @return the memoryInGB value
+ */
+ public double memoryInGB() {
+ return this.memoryInGB;
+ }
+
+ /**
+ * Set the memory request in GB of this container instance.
+ *
+ * @param memoryInGB the memoryInGB value to set
+ * @return the ResourceRequests object itself.
+ */
+ public ResourceRequests withMemoryInGB(double memoryInGB) {
+ this.memoryInGB = memoryInGB;
+ return this;
+ }
+
+ /**
+ * Get the CPU request of this container instance.
+ *
+ * @return the cpu value
+ */
+ public double cpu() {
+ return this.cpu;
+ }
+
+ /**
+ * Set the CPU request of this container instance.
+ *
+ * @param cpu the cpu value to set
+ * @return the ResourceRequests object itself.
+ */
+ public ResourceRequests withCpu(double cpu) {
+ this.cpu = cpu;
+ return this;
+ }
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ResourceRequirements.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ResourceRequirements.java
new file mode 100644
index 0000000000000..995ea36943d79
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/ResourceRequirements.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.containerinstance.v2017_08_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The resource requirements.
+ */
+public class ResourceRequirements {
+ /**
+ * The resource requests of this container instance.
+ */
+ @JsonProperty(value = "requests", required = true)
+ private ResourceRequests requests;
+
+ /**
+ * The resource limits of this container instance.
+ */
+ @JsonProperty(value = "limits")
+ private ResourceLimits limits;
+
+ /**
+ * Get the resource requests of this container instance.
+ *
+ * @return the requests value
+ */
+ public ResourceRequests requests() {
+ return this.requests;
+ }
+
+ /**
+ * Set the resource requests of this container instance.
+ *
+ * @param requests the requests value to set
+ * @return the ResourceRequirements object itself.
+ */
+ public ResourceRequirements withRequests(ResourceRequests requests) {
+ this.requests = requests;
+ return this;
+ }
+
+ /**
+ * Get the resource limits of this container instance.
+ *
+ * @return the limits value
+ */
+ public ResourceLimits limits() {
+ return this.limits;
+ }
+
+ /**
+ * Set the resource limits of this container instance.
+ *
+ * @param limits the limits value to set
+ * @return the ResourceRequirements object itself.
+ */
+ public ResourceRequirements withLimits(ResourceLimits limits) {
+ this.limits = limits;
+ return this;
+ }
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/Volume.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/Volume.java
new file mode 100644
index 0000000000000..f5c80a019a6f0
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/Volume.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.containerinstance.v2017_08_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties of the volume.
+ */
+public class Volume {
+ /**
+ * The name of the volume.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * The name of the Azure File volume.
+ */
+ @JsonProperty(value = "azureFile", required = true)
+ private AzureFileVolume azureFile;
+
+ /**
+ * Get the name of the volume.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the volume.
+ *
+ * @param name the name value to set
+ * @return the Volume object itself.
+ */
+ public Volume withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the name of the Azure File volume.
+ *
+ * @return the azureFile value
+ */
+ public AzureFileVolume azureFile() {
+ return this.azureFile;
+ }
+
+ /**
+ * Set the name of the Azure File volume.
+ *
+ * @param azureFile the azureFile value to set
+ * @return the Volume object itself.
+ */
+ public Volume withAzureFile(AzureFileVolume azureFile) {
+ this.azureFile = azureFile;
+ return this;
+ }
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/VolumeMount.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/VolumeMount.java
new file mode 100644
index 0000000000000..008fcd7feface
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/VolumeMount.java
@@ -0,0 +1,96 @@
+/**
+ * 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.containerinstance.v2017_08_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties of the volume mount.
+ */
+public class VolumeMount {
+ /**
+ * The name of the volume mount.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * The path within the container where the volume should be mounted. Must
+ * not contain colon (:).
+ */
+ @JsonProperty(value = "mountPath", required = true)
+ private String mountPath;
+
+ /**
+ * The flag indicating whether the volume mount is read-only.
+ */
+ @JsonProperty(value = "readOnly")
+ private Boolean readOnly;
+
+ /**
+ * Get the name of the volume mount.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the volume mount.
+ *
+ * @param name the name value to set
+ * @return the VolumeMount object itself.
+ */
+ public VolumeMount withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the path within the container where the volume should be mounted. Must not contain colon (:).
+ *
+ * @return the mountPath value
+ */
+ public String mountPath() {
+ return this.mountPath;
+ }
+
+ /**
+ * Set the path within the container where the volume should be mounted. Must not contain colon (:).
+ *
+ * @param mountPath the mountPath value to set
+ * @return the VolumeMount object itself.
+ */
+ public VolumeMount withMountPath(String mountPath) {
+ this.mountPath = mountPath;
+ return this;
+ }
+
+ /**
+ * Get the flag indicating whether the volume mount is read-only.
+ *
+ * @return the readOnly value
+ */
+ public Boolean readOnly() {
+ return this.readOnly;
+ }
+
+ /**
+ * Set the flag indicating whether the volume mount is read-only.
+ *
+ * @param readOnly the readOnly value to set
+ * @return the VolumeMount object itself.
+ */
+ public VolumeMount withReadOnly(Boolean readOnly) {
+ this.readOnly = readOnly;
+ return this;
+ }
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/implementation/ContainerGroupImpl.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/implementation/ContainerGroupImpl.java
new file mode 100644
index 0000000000000..d48214facdd2b
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/implementation/ContainerGroupImpl.java
@@ -0,0 +1,129 @@
+/**
+ * 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.containerinstance.v2017_08_01_preview.implementation;
+
+import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl;
+import com.microsoft.azure.management.containerinstance.v2017_08_01_preview.ContainerGroup;
+import rx.Observable;
+import java.util.List;
+import com.microsoft.azure.management.containerinstance.v2017_08_01_preview.Container;
+import com.microsoft.azure.management.containerinstance.v2017_08_01_preview.ImageRegistryCredential;
+import com.microsoft.azure.management.containerinstance.v2017_08_01_preview.ContainerRestartPolicy;
+import com.microsoft.azure.management.containerinstance.v2017_08_01_preview.IpAddress;
+import com.microsoft.azure.management.containerinstance.v2017_08_01_preview.OperatingSystemTypes;
+import com.microsoft.azure.management.containerinstance.v2017_08_01_preview.Volume;
+
+class ContainerGroupImpl extends GroupableResourceCoreImpl implements ContainerGroup, ContainerGroup.Definition, ContainerGroup.Update {
+ ContainerGroupImpl(String name, ContainerGroupInner inner, ContainerInstanceManager manager) {
+ super(name, inner, manager);
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ ContainerGroupsInner client = this.manager().inner().containerGroups();
+ return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ ContainerGroupsInner client = this.manager().inner().containerGroups();
+ return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ ContainerGroupsInner client = this.manager().inner().containerGroups();
+ return client.getByResourceGroupAsync(this.resourceGroupName(), this.name());
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+
+ @Override
+ public List containers() {
+ return this.inner().containers();
+ }
+
+ @Override
+ public List imageRegistryCredentials() {
+ return this.inner().imageRegistryCredentials();
+ }
+
+ @Override
+ public IpAddress ipAddress() {
+ return this.inner().ipAddress();
+ }
+
+ @Override
+ public OperatingSystemTypes osType() {
+ return this.inner().osType();
+ }
+
+ @Override
+ public String provisioningState() {
+ return this.inner().provisioningState();
+ }
+
+ @Override
+ public ContainerRestartPolicy restartPolicy() {
+ return this.inner().restartPolicy();
+ }
+
+ @Override
+ public String state() {
+ return this.inner().state();
+ }
+
+ @Override
+ public List volumes() {
+ return this.inner().volumes();
+ }
+
+ @Override
+ public ContainerGroupImpl withContainers(List containers) {
+ this.inner().withContainers(containers);
+ return this;
+ }
+
+ @Override
+ public ContainerGroupImpl withOsType(OperatingSystemTypes osType) {
+ this.inner().withOsType(osType);
+ return this;
+ }
+
+ @Override
+ public ContainerGroupImpl withImageRegistryCredentials(List imageRegistryCredentials) {
+ this.inner().withImageRegistryCredentials(imageRegistryCredentials);
+ return this;
+ }
+
+ @Override
+ public ContainerGroupImpl withIpAddress(IpAddress ipAddress) {
+ this.inner().withIpAddress(ipAddress);
+ return this;
+ }
+
+ @Override
+ public ContainerGroupImpl withRestartPolicy(ContainerRestartPolicy restartPolicy) {
+ this.inner().withRestartPolicy(restartPolicy);
+ return this;
+ }
+
+ @Override
+ public ContainerGroupImpl withVolumes(List volumes) {
+ this.inner().withVolumes(volumes);
+ return this;
+ }
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/implementation/ContainerGroupInner.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/implementation/ContainerGroupInner.java
new file mode 100644
index 0000000000000..a5e022eb42ae0
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/implementation/ContainerGroupInner.java
@@ -0,0 +1,220 @@
+/**
+ * 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.containerinstance.v2017_08_01_preview.implementation;
+
+import java.util.List;
+import com.microsoft.azure.management.containerinstance.v2017_08_01_preview.Container;
+import com.microsoft.azure.management.containerinstance.v2017_08_01_preview.ImageRegistryCredential;
+import com.microsoft.azure.management.containerinstance.v2017_08_01_preview.ContainerRestartPolicy;
+import com.microsoft.azure.management.containerinstance.v2017_08_01_preview.IpAddress;
+import com.microsoft.azure.management.containerinstance.v2017_08_01_preview.OperatingSystemTypes;
+import com.microsoft.azure.management.containerinstance.v2017_08_01_preview.Volume;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.Resource;
+
+/**
+ * A container group.
+ */
+@JsonFlatten
+public class ContainerGroupInner extends Resource {
+ /**
+ * The provisioning state of the container group. This only appears in the
+ * response.
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private String provisioningState;
+
+ /**
+ * The containers within the container group.
+ */
+ @JsonProperty(value = "properties.containers", required = true)
+ private List containers;
+
+ /**
+ * The image registry credentials by which the container group is created
+ * from.
+ */
+ @JsonProperty(value = "properties.imageRegistryCredentials")
+ private List imageRegistryCredentials;
+
+ /**
+ * Restart policy for all containers within the container group. Currently
+ * the only available option is `always`. Possible values include:
+ * 'always'.
+ */
+ @JsonProperty(value = "properties.restartPolicy")
+ private ContainerRestartPolicy restartPolicy;
+
+ /**
+ * The IP address type of the container group.
+ */
+ @JsonProperty(value = "properties.ipAddress")
+ private IpAddress ipAddress;
+
+ /**
+ * The operating system type required by the containers in the container
+ * group. Possible values include: 'Windows', 'Linux'.
+ */
+ @JsonProperty(value = "properties.osType", required = true)
+ private OperatingSystemTypes osType;
+
+ /**
+ * The current state of the container group. This is only valid for the
+ * response.
+ */
+ @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY)
+ private String state;
+
+ /**
+ * The list of volumes that can be mounted by containers in this container
+ * group.
+ */
+ @JsonProperty(value = "properties.volumes")
+ private List volumes;
+
+ /**
+ * Get the provisioning state of the container group. This only appears in the response.
+ *
+ * @return the provisioningState value
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the containers within the container group.
+ *
+ * @return the containers value
+ */
+ public List containers() {
+ return this.containers;
+ }
+
+ /**
+ * Set the containers within the container group.
+ *
+ * @param containers the containers value to set
+ * @return the ContainerGroupInner object itself.
+ */
+ public ContainerGroupInner withContainers(List containers) {
+ this.containers = containers;
+ return this;
+ }
+
+ /**
+ * Get the image registry credentials by which the container group is created from.
+ *
+ * @return the imageRegistryCredentials value
+ */
+ public List imageRegistryCredentials() {
+ return this.imageRegistryCredentials;
+ }
+
+ /**
+ * Set the image registry credentials by which the container group is created from.
+ *
+ * @param imageRegistryCredentials the imageRegistryCredentials value to set
+ * @return the ContainerGroupInner object itself.
+ */
+ public ContainerGroupInner withImageRegistryCredentials(List imageRegistryCredentials) {
+ this.imageRegistryCredentials = imageRegistryCredentials;
+ return this;
+ }
+
+ /**
+ * Get restart policy for all containers within the container group. Currently the only available option is `always`. Possible values include: 'always'.
+ *
+ * @return the restartPolicy value
+ */
+ public ContainerRestartPolicy restartPolicy() {
+ return this.restartPolicy;
+ }
+
+ /**
+ * Set restart policy for all containers within the container group. Currently the only available option is `always`. Possible values include: 'always'.
+ *
+ * @param restartPolicy the restartPolicy value to set
+ * @return the ContainerGroupInner object itself.
+ */
+ public ContainerGroupInner withRestartPolicy(ContainerRestartPolicy restartPolicy) {
+ this.restartPolicy = restartPolicy;
+ return this;
+ }
+
+ /**
+ * Get the IP address type of the container group.
+ *
+ * @return the ipAddress value
+ */
+ public IpAddress ipAddress() {
+ return this.ipAddress;
+ }
+
+ /**
+ * Set the IP address type of the container group.
+ *
+ * @param ipAddress the ipAddress value to set
+ * @return the ContainerGroupInner object itself.
+ */
+ public ContainerGroupInner withIpAddress(IpAddress ipAddress) {
+ this.ipAddress = ipAddress;
+ return this;
+ }
+
+ /**
+ * Get the operating system type required by the containers in the container group. Possible values include: 'Windows', 'Linux'.
+ *
+ * @return the osType value
+ */
+ public OperatingSystemTypes osType() {
+ return this.osType;
+ }
+
+ /**
+ * Set the operating system type required by the containers in the container group. Possible values include: 'Windows', 'Linux'.
+ *
+ * @param osType the osType value to set
+ * @return the ContainerGroupInner object itself.
+ */
+ public ContainerGroupInner withOsType(OperatingSystemTypes osType) {
+ this.osType = osType;
+ return this;
+ }
+
+ /**
+ * Get the current state of the container group. This is only valid for the response.
+ *
+ * @return the state value
+ */
+ public String state() {
+ return this.state;
+ }
+
+ /**
+ * Get the list of volumes that can be mounted by containers in this container group.
+ *
+ * @return the volumes value
+ */
+ public List volumes() {
+ return this.volumes;
+ }
+
+ /**
+ * Set the list of volumes that can be mounted by containers in this container group.
+ *
+ * @param volumes the volumes value to set
+ * @return the ContainerGroupInner object itself.
+ */
+ public ContainerGroupInner withVolumes(List volumes) {
+ this.volumes = volumes;
+ return this;
+ }
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/implementation/ContainerGroupsImpl.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/implementation/ContainerGroupsImpl.java
new file mode 100644
index 0000000000000..a9aef34583c1e
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/implementation/ContainerGroupsImpl.java
@@ -0,0 +1,138 @@
+/**
+ * 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.
+ * def
+ */
+
+package com.microsoft.azure.management.containerinstance.v2017_08_01_preview.implementation;
+
+import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl;
+import com.microsoft.azure.management.containerinstance.v2017_08_01_preview.ContainerGroups;
+import com.microsoft.azure.management.containerinstance.v2017_08_01_preview.ContainerGroup;
+import rx.Observable;
+import rx.Completable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import com.microsoft.azure.arm.resources.ResourceUtilsCore;
+import com.microsoft.azure.arm.utils.RXMapper;
+import rx.functions.Func1;
+import com.microsoft.azure.PagedList;
+import com.microsoft.azure.Page;
+
+class ContainerGroupsImpl extends GroupableResourcesCoreImpl implements ContainerGroups {
+ protected ContainerGroupsImpl(ContainerInstanceManager manager) {
+ super(manager.inner().containerGroups(), manager);
+ }
+
+ @Override
+ protected Observable getInnerAsync(String resourceGroupName, String name) {
+ ContainerGroupsInner client = this.inner();
+ return client.getByResourceGroupAsync(resourceGroupName, name);
+ }
+
+ @Override
+ protected Completable deleteInnerAsync(String resourceGroupName, String name) {
+ ContainerGroupsInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, name).toCompletable();
+ }
+
+ @Override
+ public Observable deleteByIdsAsync(Collection ids) {
+ if (ids == null || ids.isEmpty()) {
+ return Observable.empty();
+ }
+ Collection> observables = new ArrayList<>();
+ for (String id : ids) {
+ final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id);
+ final String name = ResourceUtilsCore.nameFromResourceId(id);
+ Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id);
+ observables.add(o);
+ }
+ return Observable.mergeDelayError(observables);
+ }
+
+ @Override
+ public Observable deleteByIdsAsync(String...ids) {
+ return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids)));
+ }
+
+ @Override
+ public void deleteByIds(Collection ids) {
+ if (ids != null && !ids.isEmpty()) {
+ this.deleteByIdsAsync(ids).toBlocking().last();
+ }
+ }
+
+ @Override
+ public void deleteByIds(String...ids) {
+ this.deleteByIds(new ArrayList(Arrays.asList(ids)));
+ }
+
+ @Override
+ public PagedList listByResourceGroup(String resourceGroupName) {
+ ContainerGroupsInner client = this.inner();
+ return this.wrapList(client.listByResourceGroup(resourceGroupName));
+ }
+
+ @Override
+ public Observable listByResourceGroupAsync(String resourceGroupName) {
+ ContainerGroupsInner client = this.inner();
+ return client.listByResourceGroupAsync(resourceGroupName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public ContainerGroup call(ContainerGroupInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public PagedList list() {
+ ContainerGroupsInner client = this.inner();
+ return this.wrapList(client.list());
+ }
+
+ @Override
+ public Observable listAsync() {
+ ContainerGroupsInner client = this.inner();
+ return client.listAsync()
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public ContainerGroup call(ContainerGroupInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public ContainerGroupImpl define(String name) {
+ return wrapModel(name);
+ }
+
+ @Override
+ protected ContainerGroupImpl wrapModel(ContainerGroupInner inner) {
+ return new ContainerGroupImpl(inner.name(), inner, manager());
+ }
+
+ @Override
+ protected ContainerGroupImpl wrapModel(String name) {
+ return new ContainerGroupImpl(name, new ContainerGroupInner(), this.manager());
+ }
+
+}
diff --git a/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/implementation/ContainerGroupsInner.java b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/implementation/ContainerGroupsInner.java
new file mode 100644
index 0000000000000..a2f8b0fb76aba
--- /dev/null
+++ b/containerinstance/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2017_08_01_preview/implementation/ContainerGroupsInner.java
@@ -0,0 +1,841 @@
+/**
+ * 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.containerinstance.v2017_08_01_preview.implementation;
+
+import com.microsoft.azure.arm.collection.InnerSupportsGet;
+import com.microsoft.azure.arm.collection.InnerSupportsDelete;
+import com.microsoft.azure.arm.collection.InnerSupportsListing;
+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.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.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 ContainerGroups.
+ */
+public class ContainerGroupsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing {
+ /** The Retrofit service to perform REST calls. */
+ private ContainerGroupsService service;
+ /** The service client containing this operation class. */
+ private ContainerInstanceManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ContainerGroupsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public ContainerGroupsInner(Retrofit retrofit, ContainerInstanceManagementClientImpl client) {
+ this.service = retrofit.create(ContainerGroupsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ContainerGroups to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface ContainerGroupsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerinstance.v2017_08_01_preview.ContainerGroups list" })
+ @GET("subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups")
+ Observable> list(@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.containerinstance.v2017_08_01_preview.ContainerGroups listByResourceGroup" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups")
+ Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @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.containerinstance.v2017_08_01_preview.ContainerGroups getByResourceGroup" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}")
+ Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("containerGroupName") String containerGroupName, @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.containerinstance.v2017_08_01_preview.ContainerGroups createOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}")
+ Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("containerGroupName") String containerGroupName, @Query("api-version") String apiVersion, @Body ContainerGroupInner containerGroup, @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.containerinstance.v2017_08_01_preview.ContainerGroups delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("containerGroupName") String containerGroupName, @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.containerinstance.v2017_08_01_preview.ContainerGroups listNext" })
+ @GET
+ Observable> listNext(@Url String nextUrl, @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.containerinstance.v2017_08_01_preview.ContainerGroups listByResourceGroupNext" })
+ @GET
+ Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Get a list of container groups in the specified subscription.
+ * Get a list of container groups in the specified subscription. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @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<ContainerGroupInner> object if successful.
+ */
+ public PagedList list() {
+ ServiceResponse> response = listSinglePageAsync().toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Get a list of container groups in the specified subscription.
+ * Get a list of container groups in the specified subscription. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listSinglePageAsync(),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Get a list of container groups in the specified subscription.
+ * Get a list of container groups in the specified subscription. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ContainerGroupInner> object
+ */
+ public Observable> listAsync() {
+ return listWithServiceResponseAsync()
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get a list of container groups in the specified subscription.
+ * Get a list of container groups in the specified subscription. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ContainerGroupInner> object
+ */
+ public Observable>> listWithServiceResponseAsync() {
+ return listSinglePageAsync()
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Get a list of container groups in the specified subscription.
+ * Get a list of container groups in the specified subscription. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ContainerGroupInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listSinglePageAsync() {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Get a list of container groups in the specified subscription and resource group.
+ * Get a list of container groups in a specified subscription and resource group. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @param resourceGroupName The name of the resource group that contains the container group.
+ * @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<ContainerGroupInner> object if successful.
+ */
+ public PagedList listByResourceGroup(final String resourceGroupName) {
+ ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Get a list of container groups in the specified subscription and resource group.
+ * Get a list of container groups in a specified subscription and resource group. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @param resourceGroupName The name of the resource group that contains the container group.
+ * @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> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByResourceGroupSinglePageAsync(resourceGroupName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByResourceGroupNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Get a list of container groups in the specified subscription and resource group.
+ * Get a list of container groups in a specified subscription and resource group. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @param resourceGroupName The name of the resource group that contains the container group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ContainerGroupInner> object
+ */
+ public Observable> listByResourceGroupAsync(final String resourceGroupName) {
+ return listByResourceGroupWithServiceResponseAsync(resourceGroupName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get a list of container groups in the specified subscription and resource group.
+ * Get a list of container groups in a specified subscription and resource group. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @param resourceGroupName The name of the resource group that contains the container group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ContainerGroupInner> object
+ */
+ public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) {
+ return listByResourceGroupSinglePageAsync(resourceGroupName)
+ .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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Get a list of container groups in the specified subscription and resource group.
+ * Get a list of container groups in a specified subscription and resource group. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ ServiceResponse> * @param resourceGroupName The name of the resource group that contains the container group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ContainerGroupInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName 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.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByResourceGroupDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Get the properties of the specified container group.
+ * Gets the properties of the specified container group in the specified subscription and resource group. The operation returns the properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @param resourceGroupName The name of the resource group that contains the container group.
+ * @param containerGroupName The name of the container group.
+ * @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 ContainerGroupInner object if successful.
+ */
+ public ContainerGroupInner getByResourceGroup(String resourceGroupName, String containerGroupName) {
+ return getByResourceGroupWithServiceResponseAsync(resourceGroupName, containerGroupName).toBlocking().single().body();
+ }
+
+ /**
+ * Get the properties of the specified container group.
+ * Gets the properties of the specified container group in the specified subscription and resource group. The operation returns the properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @param resourceGroupName The name of the resource group that contains the container group.
+ * @param containerGroupName The name of the container group.
+ * @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 getByResourceGroupAsync(String resourceGroupName, String containerGroupName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, containerGroupName), serviceCallback);
+ }
+
+ /**
+ * Get the properties of the specified container group.
+ * Gets the properties of the specified container group in the specified subscription and resource group. The operation returns the properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @param resourceGroupName The name of the resource group that contains the container group.
+ * @param containerGroupName The name of the container group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ContainerGroupInner object
+ */
+ public Observable getByResourceGroupAsync(String resourceGroupName, String containerGroupName) {
+ return getByResourceGroupWithServiceResponseAsync(resourceGroupName, containerGroupName).map(new Func1, ContainerGroupInner>() {
+ @Override
+ public ContainerGroupInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get the properties of the specified container group.
+ * Gets the properties of the specified container group in the specified subscription and resource group. The operation returns the properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @param resourceGroupName The name of the resource group that contains the container group.
+ * @param containerGroupName The name of the container group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ContainerGroupInner object
+ */
+ public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String containerGroupName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (containerGroupName == null) {
+ throw new IllegalArgumentException("Parameter containerGroupName 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.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, containerGroupName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getByResourceGroupDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getByResourceGroupDelegate(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);
+ }
+
+ /**
+ * Create or update container groups.
+ * Create or update container groups with specified configurations.
+ *
+ * @param resourceGroupName The name of the resource group to contain the container group to be created or updated.
+ * @param containerGroupName The name of the container group to be created or updated.
+ * @param containerGroup The properties of the container group to be created or updated.
+ * @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 ContainerGroupInner object if successful.
+ */
+ public ContainerGroupInner createOrUpdate(String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, containerGroupName, containerGroup).toBlocking().single().body();
+ }
+
+ /**
+ * Create or update container groups.
+ * Create or update container groups with specified configurations.
+ *
+ * @param resourceGroupName The name of the resource group to contain the container group to be created or updated.
+ * @param containerGroupName The name of the container group to be created or updated.
+ * @param containerGroup The properties of the container group to be created or updated.
+ * @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 createOrUpdateAsync(String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, containerGroupName, containerGroup), serviceCallback);
+ }
+
+ /**
+ * Create or update container groups.
+ * Create or update container groups with specified configurations.
+ *
+ * @param resourceGroupName The name of the resource group to contain the container group to be created or updated.
+ * @param containerGroupName The name of the container group to be created or updated.
+ * @param containerGroup The properties of the container group to be created or updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ContainerGroupInner object
+ */
+ public Observable createOrUpdateAsync(String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, containerGroupName, containerGroup).map(new Func1, ContainerGroupInner>() {
+ @Override
+ public ContainerGroupInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Create or update container groups.
+ * Create or update container groups with specified configurations.
+ *
+ * @param resourceGroupName The name of the resource group to contain the container group to be created or updated.
+ * @param containerGroupName The name of the container group to be created or updated.
+ * @param containerGroup The properties of the container group to be created or updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ContainerGroupInner object
+ */
+ public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (containerGroupName == null) {
+ throw new IllegalArgumentException("Parameter containerGroupName 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 (containerGroup == null) {
+ throw new IllegalArgumentException("Parameter containerGroup is required and cannot be null.");
+ }
+ Validator.validate(containerGroup);
+ return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, containerGroupName, this.client.apiVersion(), containerGroup, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = createOrUpdateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(201, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Delete the specified container group.
+ * Delete the specified container group in the specified subscription and resource group. The operation does not delete other resources provided by the user, such as volumes.
+ *
+ * @param resourceGroupName The name of the resource group that contains the container group.
+ * @param containerGroupName The name of the container group to be deleted.
+ * @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 ContainerGroupInner object if successful.
+ */
+ public ContainerGroupInner delete(String resourceGroupName, String containerGroupName) {
+ return deleteWithServiceResponseAsync(resourceGroupName, containerGroupName).toBlocking().single().body();
+ }
+
+ /**
+ * Delete the specified container group.
+ * Delete the specified container group in the specified subscription and resource group. The operation does not delete other resources provided by the user, such as volumes.
+ *
+ * @param resourceGroupName The name of the resource group that contains the container group.
+ * @param containerGroupName The name of the container group to be deleted.
+ * @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 containerGroupName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, containerGroupName), serviceCallback);
+ }
+
+ /**
+ * Delete the specified container group.
+ * Delete the specified container group in the specified subscription and resource group. The operation does not delete other resources provided by the user, such as volumes.
+ *
+ * @param resourceGroupName The name of the resource group that contains the container group.
+ * @param containerGroupName The name of the container group to be deleted.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ContainerGroupInner object
+ */
+ public Observable deleteAsync(String resourceGroupName, String containerGroupName) {
+ return deleteWithServiceResponseAsync(resourceGroupName, containerGroupName).map(new Func1, ContainerGroupInner>() {
+ @Override
+ public ContainerGroupInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Delete the specified container group.
+ * Delete the specified container group in the specified subscription and resource group. The operation does not delete other resources provided by the user, such as volumes.
+ *
+ * @param resourceGroupName The name of the resource group that contains the container group.
+ * @param containerGroupName The name of the container group to be deleted.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ContainerGroupInner object
+ */
+ public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String containerGroupName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (containerGroupName == null) {
+ throw new IllegalArgumentException("Parameter containerGroupName 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(this.client.subscriptionId(), resourceGroupName, containerGroupName, 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(200, new TypeToken() { }.getType())
+ .register(204, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Get a list of container groups in the specified subscription.
+ * Get a list of container groups in the specified subscription. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @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<ContainerGroupInner> object if successful.
+ */
+ public PagedList listNext(final String nextPageLink) {
+ ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Get a list of container groups in the specified subscription.
+ * Get a list of container groups in the specified subscription. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param serviceFuture the ServiceFuture object tracking the Retrofit calls
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listNextSinglePageAsync(nextPageLink),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Get a list of container groups in the specified subscription.
+ * Get a list of container groups in the specified subscription. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ContainerGroupInner> object
+ */
+ public Observable> listNextAsync(final String nextPageLink) {
+ return listNextWithServiceResponseAsync(nextPageLink)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get a list of container groups in the specified subscription.
+ * Get a list of container groups in the specified subscription. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ContainerGroupInner> object
+ */
+ public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Get a list of container groups in the specified subscription.
+ * Get a list of container groups in the specified subscription. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ContainerGroupInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listNextSinglePageAsync(final String nextPageLink) {
+ if (nextPageLink == null) {
+ throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
+ }
+ String nextUrl = String.format("%s", nextPageLink);
+ return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listNextDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Get a list of container groups in the specified subscription and resource group.
+ * Get a list of container groups in a specified subscription and resource group. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @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<ContainerGroupInner> object if successful.
+ */
+ public PagedList listByResourceGroupNext(final String nextPageLink) {
+ ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Get a list of container groups in the specified subscription and resource group.
+ * Get a list of container groups in a specified subscription and resource group. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param serviceFuture the ServiceFuture object tracking the Retrofit calls
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByResourceGroupNextSinglePageAsync(nextPageLink),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByResourceGroupNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Get a list of container groups in the specified subscription and resource group.
+ * Get a list of container groups in a specified subscription and resource group. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ContainerGroupInner> object
+ */
+ public Observable> listByResourceGroupNextAsync(final String nextPageLink) {
+ return listByResourceGroupNextWithServiceResponseAsync(nextPageLink)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse