diff --git a/containerregistry/resource-manager/v2016_06_27_preview/pom.xml b/containerregistry/resource-manager/v2016_06_27_preview/pom.xml
new file mode 100644
index 000000000000..f67dff810592
--- /dev/null
+++ b/containerregistry/resource-manager/v2016_06_27_preview/pom.xml
@@ -0,0 +1,133 @@
+
+
+ 4.0.0
+ com.microsoft.azure.containerregistry.v2016_06_27_preview
+
+ com.microsoft.azure
+ azure-arm-parent
+ 0.0.2-beta
+ ../../../pom.xml
+
+ azure-mgmt-containerregistry
+ 1.0.0-beta
+ jar
+ Microsoft Azure SDK for ContainerRegistry Management
+ This package contains Microsoft ContainerRegistry 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
+ 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/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/Registries.java b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/Registries.java
new file mode 100644
index 000000000000..8c353d803b9d
--- /dev/null
+++ b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/Registries.java
@@ -0,0 +1,54 @@
+/**
+ * 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.containerregistry.v2016_06_27_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.containerregistry.v2016_06_27_preview.implementation.RegistriesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Registries.
+ */
+public interface Registries extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner {
+ /**
+ * Gets the administrator login credentials for the specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getCredentialsAsync(String resourceGroupName, String registryName);
+
+ /**
+ * Regenerates the administrator login credentials for the specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable regenerateCredentialsAsync(String resourceGroupName, String registryName);
+
+ /**
+ * Checks whether the container registry name is available for use. The name must contain only alphanumeric characters, be globally unique, and between 5 and 60 characters in length.
+ *
+ * @param name The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable checkNameAvailabilityAsync(String name);
+
+}
diff --git a/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/Registry.java b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/Registry.java
new file mode 100644
index 000000000000..4d407cfeafbc
--- /dev/null
+++ b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/Registry.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.containerregistry.v2016_06_27_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.containerregistry.v2016_06_27_preview.implementation.ContainerRegistryManager;
+import org.joda.time.DateTime;
+import com.microsoft.azure.management.containerregistry.v2016_06_27_preview.implementation.RegistryInner;
+
+/**
+ * Type representing Registry.
+ */
+public interface Registry extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager {
+ /**
+ * @return the adminUserEnabled value.
+ */
+ Boolean adminUserEnabled();
+
+ /**
+ * @return the creationDate value.
+ */
+ DateTime creationDate();
+
+ /**
+ * @return the loginServer value.
+ */
+ String loginServer();
+
+ /**
+ * @return the storageAccount value.
+ */
+ StorageAccountProperties storageAccount();
+
+ /**
+ * The entirety of the Registry definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithStorageAccount, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of Registry definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a Registry definition.
+ */
+ interface Blank extends GroupableResourceCore.DefinitionWithRegion {
+ }
+
+ /**
+ * The stage of the Registry definition allowing to specify the resource group.
+ */
+ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup {
+ }
+
+ /**
+ * The stage of the registry definition allowing to specify StorageAccount.
+ */
+ interface WithStorageAccount {
+ /**
+ * Specifies storageAccount.
+ */
+ WithCreate withStorageAccount(StorageAccountProperties storageAccount);
+ }
+
+ /**
+ * The stage of the registry update allowing to specify AdminUserEnabled.
+ */
+ interface WithAdminUserEnabled {
+ /**
+ * Specifies adminUserEnabled.
+ */
+ WithCreate withAdminUserEnabled(Boolean adminUserEnabled);
+ }
+
+ /**
+ * 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.WithAdminUserEnabled {
+ }
+ }
+ /**
+ * The template for a Registry update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAdminUserEnabled, UpdateStages.WithStorageAccount {
+ }
+
+ /**
+ * Grouping of Registry update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the registry {0} allowing to specify AdminUserEnabled.
+ */
+ interface WithAdminUserEnabled {
+ /**
+ * Specifies adminUserEnabled.
+ */
+ Update withAdminUserEnabled(Boolean adminUserEnabled);
+ }
+
+ /**
+ * The stage of the registry {0} allowing to specify StorageAccount.
+ */
+ interface WithStorageAccount {
+ /**
+ * Specifies storageAccount.
+ */
+ Update withStorageAccount(StorageAccountProperties storageAccount);
+ }
+
+ }
+}
diff --git a/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/RegistryCredentials.java b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/RegistryCredentials.java
new file mode 100644
index 000000000000..c43a0bbf7bc5
--- /dev/null
+++ b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/RegistryCredentials.java
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.containerregistry.v2016_06_27_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.containerregistry.v2016_06_27_preview.implementation.ContainerRegistryManager;
+import com.microsoft.azure.management.containerregistry.v2016_06_27_preview.implementation.RegistryCredentialsInner;
+
+/**
+ * Type representing RegistryCredentials.
+ */
+public interface RegistryCredentials extends HasInner, HasManager {
+ /**
+ * @return the password value.
+ */
+ String password();
+
+ /**
+ * @return the username value.
+ */
+ String username();
+
+}
diff --git a/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/RegistryNameCheckRequest.java b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/RegistryNameCheckRequest.java
new file mode 100644
index 000000000000..0f5fe706c5be
--- /dev/null
+++ b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/RegistryNameCheckRequest.java
@@ -0,0 +1,78 @@
+/**
+ * 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.containerregistry.v2016_06_27_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * A request to check whether the container registry name is available.
+ */
+public class RegistryNameCheckRequest {
+ /**
+ * The name of the container registry.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * The resource type of the container registry. This field must be set to
+ * "Microsoft.ContainerRegistry/registries".
+ */
+ @JsonProperty(value = "type", required = true)
+ private String type;
+
+ /**
+ * Creates an instance of RegistryNameCheckRequest class.
+ * @param name the name of the container registry.
+ */
+ public RegistryNameCheckRequest() {
+ type = "Microsoft.ContainerRegistry/registries";
+ }
+
+ /**
+ * Get the name of the container registry.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the container registry.
+ *
+ * @param name the name value to set
+ * @return the RegistryNameCheckRequest object itself.
+ */
+ public RegistryNameCheckRequest withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the resource type of the container registry. This field must be set to "Microsoft.ContainerRegistry/registries".
+ *
+ * @return the type value
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set the resource type of the container registry. This field must be set to "Microsoft.ContainerRegistry/registries".
+ *
+ * @param type the type value to set
+ * @return the RegistryNameCheckRequest object itself.
+ */
+ public RegistryNameCheckRequest withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+}
diff --git a/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/RegistryNameStatus.java b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/RegistryNameStatus.java
new file mode 100644
index 000000000000..cf7496dd89be
--- /dev/null
+++ b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/RegistryNameStatus.java
@@ -0,0 +1,35 @@
+/**
+ * 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.containerregistry.v2016_06_27_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.containerregistry.v2016_06_27_preview.implementation.ContainerRegistryManager;
+import com.microsoft.azure.management.containerregistry.v2016_06_27_preview.implementation.RegistryNameStatusInner;
+
+/**
+ * Type representing RegistryNameStatus.
+ */
+public interface RegistryNameStatus extends HasInner, HasManager {
+ /**
+ * @return the message value.
+ */
+ String message();
+
+ /**
+ * @return the nameAvailable value.
+ */
+ Boolean nameAvailable();
+
+ /**
+ * @return the reason value.
+ */
+ String reason();
+
+}
diff --git a/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/RegistryUpdateParameters.java b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/RegistryUpdateParameters.java
new file mode 100644
index 000000000000..a7491eadeeca
--- /dev/null
+++ b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/RegistryUpdateParameters.java
@@ -0,0 +1,101 @@
+/**
+ * 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.containerregistry.v2016_06_27_preview;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * The parameters for updating a container registry.
+ */
+@JsonFlatten
+public class RegistryUpdateParameters {
+ /**
+ * The resource tags for the container registry.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * The value that indicates whether the admin user is enabled. This value
+ * is false by default.
+ */
+ @JsonProperty(value = "properties.adminUserEnabled")
+ private Boolean adminUserEnabled;
+
+ /**
+ * The properties of a storage account for the container registry. If
+ * specified, the storage account must be in the same physical location as
+ * the container registry.
+ */
+ @JsonProperty(value = "properties.storageAccount")
+ private StorageAccountProperties storageAccount;
+
+ /**
+ * Get the resource tags for the container registry.
+ *
+ * @return the tags value
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the resource tags for the container registry.
+ *
+ * @param tags the tags value to set
+ * @return the RegistryUpdateParameters object itself.
+ */
+ public RegistryUpdateParameters withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the value that indicates whether the admin user is enabled. This value is false by default.
+ *
+ * @return the adminUserEnabled value
+ */
+ public Boolean adminUserEnabled() {
+ return this.adminUserEnabled;
+ }
+
+ /**
+ * Set the value that indicates whether the admin user is enabled. This value is false by default.
+ *
+ * @param adminUserEnabled the adminUserEnabled value to set
+ * @return the RegistryUpdateParameters object itself.
+ */
+ public RegistryUpdateParameters withAdminUserEnabled(Boolean adminUserEnabled) {
+ this.adminUserEnabled = adminUserEnabled;
+ return this;
+ }
+
+ /**
+ * Get the properties of a storage account for the container registry. If specified, the storage account must be in the same physical location as the container registry.
+ *
+ * @return the storageAccount value
+ */
+ public StorageAccountProperties storageAccount() {
+ return this.storageAccount;
+ }
+
+ /**
+ * Set the properties of a storage account for the container registry. If specified, the storage account must be in the same physical location as the container registry.
+ *
+ * @param storageAccount the storageAccount value to set
+ * @return the RegistryUpdateParameters object itself.
+ */
+ public RegistryUpdateParameters withStorageAccount(StorageAccountProperties storageAccount) {
+ this.storageAccount = storageAccount;
+ return this;
+ }
+
+}
diff --git a/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/StorageAccountProperties.java b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/StorageAccountProperties.java
new file mode 100644
index 000000000000..126b36fb5504
--- /dev/null
+++ b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/StorageAccountProperties.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.containerregistry.v2016_06_27_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties of a storage account for a container registry.
+ */
+public class StorageAccountProperties {
+ /**
+ * The name of the storage account.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * The access key to the storage account.
+ */
+ @JsonProperty(value = "accessKey", required = true)
+ private String accessKey;
+
+ /**
+ * Get the name of the storage account.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the storage account.
+ *
+ * @param name the name value to set
+ * @return the StorageAccountProperties object itself.
+ */
+ public StorageAccountProperties withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the access key to the storage account.
+ *
+ * @return the accessKey value
+ */
+ public String accessKey() {
+ return this.accessKey;
+ }
+
+ /**
+ * Set the access key to the storage account.
+ *
+ * @param accessKey the accessKey value to set
+ * @return the StorageAccountProperties object itself.
+ */
+ public StorageAccountProperties withAccessKey(String accessKey) {
+ this.accessKey = accessKey;
+ return this;
+ }
+
+}
diff --git a/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/ContainerRegistryManagementClientImpl.java b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/ContainerRegistryManagementClientImpl.java
new file mode 100644
index 000000000000..ede50ef774ed
--- /dev/null
+++ b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/ContainerRegistryManagementClientImpl.java
@@ -0,0 +1,196 @@
+/**
+ * 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.containerregistry.v2016_06_27_preview.implementation;
+
+import com.microsoft.azure.AzureClient;
+import com.microsoft.azure.AzureServiceClient;
+import com.microsoft.rest.credentials.ServiceClientCredentials;
+import com.microsoft.rest.RestClient;
+
+/**
+ * Initializes a new instance of the ContainerRegistryManagementClientImpl class.
+ */
+public class ContainerRegistryManagementClientImpl extends AzureServiceClient {
+ /** the {@link AzureClient} used for long running operations. */
+ private AzureClient azureClient;
+
+ /**
+ * Gets the {@link AzureClient} used for long running operations.
+ * @return the azure client;
+ */
+ public AzureClient getAzureClient() {
+ return this.azureClient;
+ }
+
+ /** The Microsoft Azure subscription ID. */
+ private String subscriptionId;
+
+ /**
+ * Gets The Microsoft Azure subscription ID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * Sets The Microsoft Azure subscription ID.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the service client itself
+ */
+ public ContainerRegistryManagementClientImpl withSubscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /** The client API version. */
+ private String apiVersion;
+
+ /**
+ * Gets The client API version.
+ *
+ * @return the apiVersion value.
+ */
+ public String apiVersion() {
+ return this.apiVersion;
+ }
+
+ /** Gets or sets the preferred language for the response. */
+ private String acceptLanguage;
+
+ /**
+ * Gets Gets or sets the preferred language for the response.
+ *
+ * @return the acceptLanguage value.
+ */
+ public String acceptLanguage() {
+ return this.acceptLanguage;
+ }
+
+ /**
+ * Sets Gets or sets the preferred language for the response.
+ *
+ * @param acceptLanguage the acceptLanguage value.
+ * @return the service client itself
+ */
+ public ContainerRegistryManagementClientImpl withAcceptLanguage(String acceptLanguage) {
+ this.acceptLanguage = acceptLanguage;
+ return this;
+ }
+
+ /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */
+ private int longRunningOperationRetryTimeout;
+
+ /**
+ * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
+ *
+ * @return the longRunningOperationRetryTimeout value.
+ */
+ public int longRunningOperationRetryTimeout() {
+ return this.longRunningOperationRetryTimeout;
+ }
+
+ /**
+ * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
+ *
+ * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value.
+ * @return the service client itself
+ */
+ public ContainerRegistryManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) {
+ this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout;
+ return this;
+ }
+
+ /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */
+ private boolean generateClientRequestId;
+
+ /**
+ * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
+ *
+ * @return the generateClientRequestId value.
+ */
+ public boolean generateClientRequestId() {
+ return this.generateClientRequestId;
+ }
+
+ /**
+ * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
+ *
+ * @param generateClientRequestId the generateClientRequestId value.
+ * @return the service client itself
+ */
+ public ContainerRegistryManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) {
+ this.generateClientRequestId = generateClientRequestId;
+ return this;
+ }
+
+ /**
+ * The RegistriesInner object to access its operations.
+ */
+ private RegistriesInner registries;
+
+ /**
+ * Gets the RegistriesInner object to access its operations.
+ * @return the RegistriesInner object.
+ */
+ public RegistriesInner registries() {
+ return this.registries;
+ }
+
+ /**
+ * Initializes an instance of ContainerRegistryManagementClient client.
+ *
+ * @param credentials the management credentials for Azure
+ */
+ public ContainerRegistryManagementClientImpl(ServiceClientCredentials credentials) {
+ this("https://management.azure.com", credentials);
+ }
+
+ /**
+ * Initializes an instance of ContainerRegistryManagementClient client.
+ *
+ * @param baseUrl the base URL of the host
+ * @param credentials the management credentials for Azure
+ */
+ public ContainerRegistryManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) {
+ super(baseUrl, credentials);
+ initialize();
+ }
+
+ /**
+ * Initializes an instance of ContainerRegistryManagementClient client.
+ *
+ * @param restClient the REST client to connect to Azure.
+ */
+ public ContainerRegistryManagementClientImpl(RestClient restClient) {
+ super(restClient);
+ initialize();
+ }
+
+ protected void initialize() {
+ this.apiVersion = "2016-06-27-preview";
+ this.acceptLanguage = "en-US";
+ this.longRunningOperationRetryTimeout = 30;
+ this.generateClientRequestId = true;
+ this.registries = new RegistriesInner(restClient().retrofit(), this);
+ this.azureClient = new AzureClient(this);
+ }
+
+ /**
+ * Gets the User-Agent header for the client.
+ *
+ * @return the user agent string.
+ */
+ @Override
+ public String userAgent() {
+ return String.format("%s (%s, %s)", super.userAgent(), "ContainerRegistryManagementClient", "2016-06-27-preview");
+ }
+}
diff --git a/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/ContainerRegistryManager.java b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/ContainerRegistryManager.java
new file mode 100644
index 000000000000..912013df7634
--- /dev/null
+++ b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/ContainerRegistryManager.java
@@ -0,0 +1,99 @@
+/**
+ * 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.containerregistry.v2016_06_27_preview.implementation;
+
+import com.microsoft.azure.AzureEnvironment;
+import com.microsoft.azure.AzureResponseBuilder;
+import com.microsoft.azure.credentials.AzureTokenCredentials;
+import com.microsoft.azure.management.apigeneration.Beta;
+import com.microsoft.azure.management.apigeneration.Beta.SinceVersion;
+import com.microsoft.azure.arm.resources.AzureConfigurable;
+import com.microsoft.azure.serializer.AzureJacksonAdapter;
+import com.microsoft.rest.RestClient;
+import com.microsoft.azure.management.containerregistry.v2016_06_27_preview.Registries;
+import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl;
+import com.microsoft.azure.arm.resources.implementation.ManagerCore;
+
+/**
+ * Entry point to Azure ContainerRegistry resource management.
+ */
+public final class ContainerRegistryManager extends ManagerCore {
+ private Registries registries;
+ /**
+ * Get a Configurable instance that can be used to create ContainerRegistryManager with optional configuration.
+ *
+ * @return the instance allowing configurations
+ */
+ public static Configurable configure() {
+ return new ContainerRegistryManager.ConfigurableImpl();
+ }
+ /**
+ * Creates an instance of ContainerRegistryManager that exposes ContainerRegistry resource management API entry points.
+ *
+ * @param credentials the credentials to use
+ * @param subscriptionId the subscription UUID
+ * @return the ContainerRegistryManager
+ */
+ public static ContainerRegistryManager authenticate(AzureTokenCredentials credentials, String subscriptionId) {
+ return new ContainerRegistryManager(new RestClient.Builder()
+ .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER)
+ .withCredentials(credentials)
+ .withSerializerAdapter(new AzureJacksonAdapter())
+ .withResponseBuilderFactory(new AzureResponseBuilder.Factory())
+ .build(), subscriptionId);
+ }
+ /**
+ * Creates an instance of ContainerRegistryManager that exposes ContainerRegistry resource management API entry points.
+ *
+ * @param restClient the RestClient to be used for API calls.
+ * @param subscriptionId the subscription UUID
+ * @return the ContainerRegistryManager
+ */
+ public static ContainerRegistryManager authenticate(RestClient restClient, String subscriptionId) {
+ return new ContainerRegistryManager(restClient, subscriptionId);
+ }
+ /**
+ * The interface allowing configurations to be set.
+ */
+ public interface Configurable extends AzureConfigurable {
+ /**
+ * Creates an instance of ContainerRegistryManager that exposes ContainerRegistry management API entry points.
+ *
+ * @param credentials the credentials to use
+ * @param subscriptionId the subscription UUID
+ * @return the interface exposing ContainerRegistry management API entry points that work across subscriptions
+ */
+ ContainerRegistryManager authenticate(AzureTokenCredentials credentials, String subscriptionId);
+ }
+
+ /**
+ * @return Entry point to manage Registries.
+ */
+ public Registries registries() {
+ if (this.registries == null) {
+ this.registries = new RegistriesImpl(this);
+ }
+ return this.registries;
+ }
+
+ /**
+ * The implementation for Configurable interface.
+ */
+ private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable {
+ public ContainerRegistryManager authenticate(AzureTokenCredentials credentials, String subscriptionId) {
+ return ContainerRegistryManager.authenticate(buildRestClient(credentials), subscriptionId);
+ }
+ }
+ private ContainerRegistryManager(RestClient restClient, String subscriptionId) {
+ super(
+ restClient,
+ subscriptionId,
+ new ContainerRegistryManagementClientImpl(restClient).withSubscriptionId(subscriptionId));
+ }
+}
diff --git a/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/IdParsingUtils.java b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/IdParsingUtils.java
new file mode 100644
index 000000000000..b76946a697a4
--- /dev/null
+++ b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/IdParsingUtils.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.containerregistry.v2016_06_27_preview.implementation;
+import java.util.Arrays;
+import java.util.Iterator;
+
+class IdParsingUtils {
+ public static String getValueFromIdByName(String id, String name) {
+ if (id == null) {
+ return null;
+ }
+ Iterable iterable = Arrays.asList(id.split("/"));
+ Iterator itr = iterable.iterator();
+ while (itr.hasNext()) {
+ String part = itr.next();
+ if (part != null && part.trim() != "") {
+ if (part.equalsIgnoreCase(name)) {
+ if (itr.hasNext()) {
+ return itr.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ public static String getValueFromIdByPosition(String id, int pos) {
+ if (id == null) {
+ return null;
+ }
+ Iterable iterable = Arrays.asList(id.split("/"));
+ Iterator itr = iterable.iterator();
+ int index = 0;
+ while (itr.hasNext()) {
+ String part = itr.next();
+ if (part != null && part.trim() != "") {
+ if (index == pos) {
+ if (itr.hasNext()) {
+ return itr.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ index++;
+ }
+ return null;
+ }
+}
diff --git a/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/PageImpl.java b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/PageImpl.java
new file mode 100644
index 000000000000..8314dbbe98c0
--- /dev/null
+++ b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/PageImpl.java
@@ -0,0 +1,75 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.containerregistry.v2016_06_27_preview.implementation;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.azure.Page;
+import java.util.List;
+
+/**
+ * An instance of this class defines a page of Azure resources and a link to
+ * get the next page of resources, if any.
+ *
+ * @param type of Azure resource
+ */
+public class PageImpl implements Page {
+ /**
+ * The link to the next page.
+ */
+ @JsonProperty("nextLink")
+ private String nextPageLink;
+
+ /**
+ * The list of items.
+ */
+ @JsonProperty("value")
+ private List items;
+
+ /**
+ * Gets the link to the next page.
+ *
+ * @return the link to the next page.
+ */
+ @Override
+ public String nextPageLink() {
+ return this.nextPageLink;
+ }
+
+ /**
+ * Gets the list of items.
+ *
+ * @return the list of items in {@link List}.
+ */
+ @Override
+ public List items() {
+ return items;
+ }
+
+ /**
+ * Sets the link to the next page.
+ *
+ * @param nextPageLink the link to the next page.
+ * @return this Page object itself.
+ */
+ public PageImpl setNextPageLink(String nextPageLink) {
+ this.nextPageLink = nextPageLink;
+ return this;
+ }
+
+ /**
+ * Sets the list of items.
+ *
+ * @param items the list of items in {@link List}.
+ * @return this Page object itself.
+ */
+ public PageImpl setItems(List items) {
+ this.items = items;
+ return this;
+ }
+}
diff --git a/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/RegistriesImpl.java b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/RegistriesImpl.java
new file mode 100644
index 000000000000..04ad5ccf975f
--- /dev/null
+++ b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/RegistriesImpl.java
@@ -0,0 +1,176 @@
+/**
+ * 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.containerregistry.v2016_06_27_preview.implementation;
+
+import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl;
+import com.microsoft.azure.management.containerregistry.v2016_06_27_preview.Registries;
+import com.microsoft.azure.management.containerregistry.v2016_06_27_preview.Registry;
+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;
+import com.microsoft.azure.management.containerregistry.v2016_06_27_preview.RegistryCredentials;
+import com.microsoft.azure.management.containerregistry.v2016_06_27_preview.RegistryNameStatus;
+
+class RegistriesImpl extends GroupableResourcesCoreImpl implements Registries {
+ protected RegistriesImpl(ContainerRegistryManager manager) {
+ super(manager.inner().registries(), manager);
+ }
+
+ @Override
+ protected Observable getInnerAsync(String resourceGroupName, String name) {
+ RegistriesInner client = this.inner();
+ return client.getByResourceGroupAsync(resourceGroupName, name);
+ }
+
+ @Override
+ protected Completable deleteInnerAsync(String resourceGroupName, String name) {
+ RegistriesInner 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) {
+ RegistriesInner client = this.inner();
+ return this.wrapList(client.listByResourceGroup(resourceGroupName));
+ }
+
+ @Override
+ public Observable listByResourceGroupAsync(String resourceGroupName) {
+ RegistriesInner 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 Registry call(RegistryInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public PagedList list() {
+ RegistriesInner client = this.inner();
+ return this.wrapList(client.list());
+ }
+
+ @Override
+ public Observable listAsync() {
+ RegistriesInner client = this.inner();
+ return client.listAsync()
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public Registry call(RegistryInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public RegistryImpl define(String name) {
+ return wrapModel(name);
+ }
+
+ @Override
+ public Observable getCredentialsAsync(String resourceGroupName, String registryName) {
+ RegistriesInner client = this.inner();
+ return client.getCredentialsAsync(resourceGroupName, registryName)
+ .map(new Func1() {
+ @Override
+ public RegistryCredentials call(RegistryCredentialsInner inner) {
+ return new RegistryCredentialsImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable regenerateCredentialsAsync(String resourceGroupName, String registryName) {
+ RegistriesInner client = this.inner();
+ return client.regenerateCredentialsAsync(resourceGroupName, registryName)
+ .map(new Func1() {
+ @Override
+ public RegistryCredentials call(RegistryCredentialsInner inner) {
+ return new RegistryCredentialsImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable checkNameAvailabilityAsync(String name) {
+ RegistriesInner client = this.inner();
+ return client.checkNameAvailabilityAsync(name)
+ .map(new Func1() {
+ @Override
+ public RegistryNameStatus call(RegistryNameStatusInner inner) {
+ return new RegistryNameStatusImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ protected RegistryImpl wrapModel(RegistryInner inner) {
+ return new RegistryImpl(inner.name(), inner, manager());
+ }
+
+ @Override
+ protected RegistryImpl wrapModel(String name) {
+ return new RegistryImpl(name, new RegistryInner(), this.manager());
+ }
+
+}
diff --git a/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/RegistriesInner.java b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/RegistriesInner.java
new file mode 100644
index 000000000000..f19f37d397d8
--- /dev/null
+++ b/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/RegistriesInner.java
@@ -0,0 +1,1175 @@
+/**
+ * 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.containerregistry.v2016_06_27_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.management.containerregistry.v2016_06_27_preview.RegistryNameCheckRequest;
+import com.microsoft.azure.management.containerregistry.v2016_06_27_preview.RegistryUpdateParameters;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.PagedList;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import com.microsoft.rest.Validator;
+import java.io.IOException;
+import java.util.List;
+import okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.HTTP;
+import retrofit2.http.PATCH;
+import retrofit2.http.Path;
+import retrofit2.http.POST;
+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 Registries.
+ */
+public class RegistriesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing {
+ /** The Retrofit service to perform REST calls. */
+ private RegistriesService service;
+ /** The service client containing this operation class. */
+ private ContainerRegistryManagementClientImpl client;
+
+ /**
+ * Initializes an instance of RegistriesInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public RegistriesInner(Retrofit retrofit, ContainerRegistryManagementClientImpl client) {
+ this.service = retrofit.create(RegistriesService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for Registries to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface RegistriesService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.v2016_06_27_preview.Registries checkNameAvailability" })
+ @POST("subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/checkNameAvailability")
+ Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RegistryNameCheckRequest registryNameCheckRequest, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.v2016_06_27_preview.Registries getByResourceGroup" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}")
+ Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @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.containerregistry.v2016_06_27_preview.Registries createOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}")
+ Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Query("api-version") String apiVersion, @Body RegistryInner registry, @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.containerregistry.v2016_06_27_preview.Registries delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @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.containerregistry.v2016_06_27_preview.Registries update" })
+ @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}")
+ Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Query("api-version") String apiVersion, @Body RegistryUpdateParameters registryUpdateParameters, @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.containerregistry.v2016_06_27_preview.Registries listByResourceGroup" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries")
+ 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.containerregistry.v2016_06_27_preview.Registries list" })
+ @GET("subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries")
+ 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.containerregistry.v2016_06_27_preview.Registries getCredentials" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/getCredentials")
+ Observable> getCredentials(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @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.containerregistry.v2016_06_27_preview.Registries regenerateCredentials" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredentials")
+ Observable> regenerateCredentials(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @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.containerregistry.v2016_06_27_preview.Registries listByResourceGroupNext" })
+ @GET
+ Observable> listByResourceGroupNext(@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.containerregistry.v2016_06_27_preview.Registries listNext" })
+ @GET
+ Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Checks whether the container registry name is available for use. The name must contain only alphanumeric characters, be globally unique, and between 5 and 60 characters in length.
+ *
+ * @param name The name of the container registry.
+ * @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 RegistryNameStatusInner object if successful.
+ */
+ public RegistryNameStatusInner checkNameAvailability(String name) {
+ return checkNameAvailabilityWithServiceResponseAsync(name).toBlocking().single().body();
+ }
+
+ /**
+ * Checks whether the container registry name is available for use. The name must contain only alphanumeric characters, be globally unique, and between 5 and 60 characters in length.
+ *
+ * @param name The name of the container registry.
+ * @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 checkNameAvailabilityAsync(String name, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(name), serviceCallback);
+ }
+
+ /**
+ * Checks whether the container registry name is available for use. The name must contain only alphanumeric characters, be globally unique, and between 5 and 60 characters in length.
+ *
+ * @param name The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the RegistryNameStatusInner object
+ */
+ public Observable checkNameAvailabilityAsync(String name) {
+ return checkNameAvailabilityWithServiceResponseAsync(name).map(new Func1, RegistryNameStatusInner>() {
+ @Override
+ public RegistryNameStatusInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Checks whether the container registry name is available for use. The name must contain only alphanumeric characters, be globally unique, and between 5 and 60 characters in length.
+ *
+ * @param name The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the RegistryNameStatusInner object
+ */
+ public Observable> checkNameAvailabilityWithServiceResponseAsync(String name) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ if (name == null) {
+ throw new IllegalArgumentException("Parameter name is required and cannot be null.");
+ }
+ RegistryNameCheckRequest registryNameCheckRequest = new RegistryNameCheckRequest();
+ registryNameCheckRequest.withName(name);
+ return service.checkNameAvailability(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), registryNameCheckRequest, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = checkNameAvailabilityDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse checkNameAvailabilityDelegate(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);
+ }
+
+ /**
+ * Gets the properties of the specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @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 RegistryInner object if successful.
+ */
+ public RegistryInner getByResourceGroup(String resourceGroupName, String registryName) {
+ return getByResourceGroupWithServiceResponseAsync(resourceGroupName, registryName).toBlocking().single().body();
+ }
+
+ /**
+ * Gets the properties of the specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @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 registryName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, registryName), serviceCallback);
+ }
+
+ /**
+ * Gets the properties of the specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the RegistryInner object
+ */
+ public Observable getByResourceGroupAsync(String resourceGroupName, String registryName) {
+ return getByResourceGroupWithServiceResponseAsync(resourceGroupName, registryName).map(new Func1, RegistryInner>() {
+ @Override
+ public RegistryInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets the properties of the specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the RegistryInner object
+ */
+ public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String registryName) {
+ 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 (registryName == null) {
+ throw new IllegalArgumentException("Parameter registryName 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, registryName, 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);
+ }
+
+ /**
+ * Creates or updates a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param registry The parameters for creating or updating a container registry.
+ * @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 RegistryInner object if successful.
+ */
+ public RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner registry) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, registryName, registry).toBlocking().single().body();
+ }
+
+ /**
+ * Creates or updates a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param registry The parameters for creating or updating a container registry.
+ * @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 registryName, RegistryInner registry, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, registryName, registry), serviceCallback);
+ }
+
+ /**
+ * Creates or updates a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param registry The parameters for creating or updating a container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the RegistryInner object
+ */
+ public Observable createOrUpdateAsync(String resourceGroupName, String registryName, RegistryInner registry) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, registryName, registry).map(new Func1, RegistryInner>() {
+ @Override
+ public RegistryInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Creates or updates a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param registry The parameters for creating or updating a container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the RegistryInner object
+ */
+ public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String registryName, RegistryInner registry) {
+ 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 (registryName == null) {
+ throw new IllegalArgumentException("Parameter registryName 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 (registry == null) {
+ throw new IllegalArgumentException("Parameter registry is required and cannot be null.");
+ }
+ Validator.validate(registry);
+ return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, registryName, this.client.apiVersion(), registry, 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(202, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Deletes a container registry.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void delete(String resourceGroupName, String registryName) {
+ deleteWithServiceResponseAsync(resourceGroupName, registryName).toBlocking().single().body();
+ }
+
+ /**
+ * Deletes a container registry.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @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 registryName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, registryName), serviceCallback);
+ }
+
+ /**
+ * Deletes a container registry.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable deleteAsync(String resourceGroupName, String registryName) {
+ return deleteWithServiceResponseAsync(resourceGroupName, registryName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Deletes a container registry.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String registryName) {
+ 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 (registryName == null) {
+ throw new IllegalArgumentException("Parameter registryName 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, registryName, 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);
+ }
+
+ /**
+ * Updates a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param registryUpdateParameters The parameters for updating a container registry.
+ * @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 RegistryInner object if successful.
+ */
+ public RegistryInner update(String resourceGroupName, String registryName, RegistryUpdateParameters registryUpdateParameters) {
+ return updateWithServiceResponseAsync(resourceGroupName, registryName, registryUpdateParameters).toBlocking().single().body();
+ }
+
+ /**
+ * Updates a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param registryUpdateParameters The parameters for updating a container registry.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture updateAsync(String resourceGroupName, String registryName, RegistryUpdateParameters registryUpdateParameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, registryName, registryUpdateParameters), serviceCallback);
+ }
+
+ /**
+ * Updates a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param registryUpdateParameters The parameters for updating a container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the RegistryInner object
+ */
+ public Observable updateAsync(String resourceGroupName, String registryName, RegistryUpdateParameters registryUpdateParameters) {
+ return updateWithServiceResponseAsync(resourceGroupName, registryName, registryUpdateParameters).map(new Func1, RegistryInner>() {
+ @Override
+ public RegistryInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Updates a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param registryUpdateParameters The parameters for updating a container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the RegistryInner object
+ */
+ public Observable> updateWithServiceResponseAsync(String resourceGroupName, String registryName, RegistryUpdateParameters registryUpdateParameters) {
+ 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 (registryName == null) {
+ throw new IllegalArgumentException("Parameter registryName 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 (registryUpdateParameters == null) {
+ throw new IllegalArgumentException("Parameter registryUpdateParameters is required and cannot be null.");
+ }
+ Validator.validate(registryUpdateParameters);
+ return service.update(this.client.subscriptionId(), resourceGroupName, registryName, this.client.apiVersion(), registryUpdateParameters, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = updateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Lists all the available container registries under the specified resource group.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @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<RegistryInner> 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();
+ }
+ };
+ }
+
+ /**
+ * Lists all the available container registries under the specified resource group.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @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);
+ }
+
+ /**
+ * Lists all the available container registries under the specified resource group.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<RegistryInner> object
+ */
+ public Observable> listByResourceGroupAsync(final String resourceGroupName) {
+ return listByResourceGroupWithServiceResponseAsync(resourceGroupName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists all the available container registries under the specified resource group.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<RegistryInner> 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));
+ }
+ });
+ }
+
+ /**
+ * Lists all the available container registries under the specified resource group.
+ *
+ ServiceResponse> * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<RegistryInner> 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);
+ }
+
+ /**
+ * Lists all the available container registries under the specified subscription.
+ *
+ * @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<RegistryInner> object if successful.
+ */
+ public PagedList list() {
+ ServiceResponse> response = listSinglePageAsync().toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists all the available container registries under the specified subscription.
+ *
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listSinglePageAsync(),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists all the available container registries under the specified subscription.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<RegistryInner> object
+ */
+ public Observable> listAsync() {
+ return listWithServiceResponseAsync()
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists all the available container registries under the specified subscription.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<RegistryInner> object
+ */
+ public Observable>> listWithServiceResponseAsync() {
+ return listSinglePageAsync()
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Lists all the available container registries under the specified subscription.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<RegistryInner> 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);
+ }
+
+ /**
+ * Gets the administrator login credentials for the specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @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 RegistryCredentialsInner object if successful.
+ */
+ public RegistryCredentialsInner getCredentials(String resourceGroupName, String registryName) {
+ return getCredentialsWithServiceResponseAsync(resourceGroupName, registryName).toBlocking().single().body();
+ }
+
+ /**
+ * Gets the administrator login credentials for the specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @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 getCredentialsAsync(String resourceGroupName, String registryName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getCredentialsWithServiceResponseAsync(resourceGroupName, registryName), serviceCallback);
+ }
+
+ /**
+ * Gets the administrator login credentials for the specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the RegistryCredentialsInner object
+ */
+ public Observable getCredentialsAsync(String resourceGroupName, String registryName) {
+ return getCredentialsWithServiceResponseAsync(resourceGroupName, registryName).map(new Func1, RegistryCredentialsInner>() {
+ @Override
+ public RegistryCredentialsInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets the administrator login credentials for the specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the RegistryCredentialsInner object
+ */
+ public Observable> getCredentialsWithServiceResponseAsync(String resourceGroupName, String registryName) {
+ 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 (registryName == null) {
+ throw new IllegalArgumentException("Parameter registryName 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.getCredentials(this.client.subscriptionId(), resourceGroupName, registryName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getCredentialsDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getCredentialsDelegate(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);
+ }
+
+ /**
+ * Regenerates the administrator login credentials for the specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @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 RegistryCredentialsInner object if successful.
+ */
+ public RegistryCredentialsInner regenerateCredentials(String resourceGroupName, String registryName) {
+ return regenerateCredentialsWithServiceResponseAsync(resourceGroupName, registryName).toBlocking().single().body();
+ }
+
+ /**
+ * Regenerates the administrator login credentials for the specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @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 regenerateCredentialsAsync(String resourceGroupName, String registryName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(regenerateCredentialsWithServiceResponseAsync(resourceGroupName, registryName), serviceCallback);
+ }
+
+ /**
+ * Regenerates the administrator login credentials for the specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the RegistryCredentialsInner object
+ */
+ public Observable regenerateCredentialsAsync(String resourceGroupName, String registryName) {
+ return regenerateCredentialsWithServiceResponseAsync(resourceGroupName, registryName).map(new Func1, RegistryCredentialsInner>() {
+ @Override
+ public RegistryCredentialsInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Regenerates the administrator login credentials for the specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the RegistryCredentialsInner object
+ */
+ public Observable> regenerateCredentialsWithServiceResponseAsync(String resourceGroupName, String registryName) {
+ 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 (registryName == null) {
+ throw new IllegalArgumentException("Parameter registryName 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.regenerateCredentials(this.client.subscriptionId(), resourceGroupName, registryName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = regenerateCredentialsDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse regenerateCredentialsDelegate(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);
+ }
+
+ /**
+ * Lists all the available container registries under the specified resource group.
+ *
+ * @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<RegistryInner> object if successful.
+ */
+ public PagedList listByResourceGroupNext(final String nextPageLink) {
+ ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page