diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/pom.xml b/sdk/containerregistry/mgmt-v2019_06_01_preview/pom.xml
index a9452a661b88..3c7e9344faaf 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/pom.xml
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/pom.xml
@@ -11,7 +11,7 @@
com.microsoft.azure
azure-arm-parent
- 1.2.0
+ 1.1.0
../../../pom.management.xml
azure-mgmt-containerregistry
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/AgentPool.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/AgentPool.java
new file mode 100644
index 000000000000..b2cad635432d
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/AgentPool.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.containerregistry.v2019_06_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.implementation.AgentPoolInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.implementation.ContainerRegistryManager;
+import java.util.Map;
+
+/**
+ * Type representing AgentPool.
+ */
+public interface AgentPool extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the count value.
+ */
+ Integer count();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the os value.
+ */
+ OS os();
+
+ /**
+ * @return the provisioningState value.
+ */
+ ProvisioningState provisioningState();
+
+ /**
+ * @return the tags value.
+ */
+ Map tags();
+
+ /**
+ * @return the tier value.
+ */
+ String tier();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the virtualNetworkSubnetResourceId value.
+ */
+ String virtualNetworkSubnetResourceId();
+
+ /**
+ * The entirety of the AgentPool definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithRegistry, DefinitionStages.WithLocation, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of AgentPool definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a AgentPool definition.
+ */
+ interface Blank extends WithRegistry {
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify Registry.
+ */
+ interface WithRegistry {
+ /**
+ * Specifies resourceGroupName, registryName.
+ * @param resourceGroupName The name of the resource group to which the container registry belongs
+ * @param registryName The name of the container registry
+ * @return the next definition stage
+ */
+ WithLocation withExistingRegistry(String resourceGroupName, String registryName);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify Location.
+ */
+ interface WithLocation {
+ /**
+ * Specifies location.
+ * @param location The location of the resource. This cannot be changed after the resource is created
+ * @return the next definition stage
+ */
+ WithCreate withLocation(String location);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify Count.
+ */
+ interface WithCount {
+ /**
+ * Specifies count.
+ * @param count The count of agent machine
+ * @return the next definition stage
+ */
+ WithCreate withCount(Integer count);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify Os.
+ */
+ interface WithOs {
+ /**
+ * Specifies os.
+ * @param os The OS of agent machine. Possible values include: 'Windows', 'Linux'
+ * @return the next definition stage
+ */
+ WithCreate withOs(OS os);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify Tags.
+ */
+ interface WithTags {
+ /**
+ * Specifies tags.
+ * @param tags The tags of the resource
+ * @return the next definition stage
+ */
+ WithCreate withTags(Map tags);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify Tier.
+ */
+ interface WithTier {
+ /**
+ * Specifies tier.
+ * @param tier The Tier of agent machine
+ * @return the next definition stage
+ */
+ WithCreate withTier(String tier);
+ }
+
+ /**
+ * The stage of the agentpool definition allowing to specify VirtualNetworkSubnetResourceId.
+ */
+ interface WithVirtualNetworkSubnetResourceId {
+ /**
+ * Specifies virtualNetworkSubnetResourceId.
+ * @param virtualNetworkSubnetResourceId The Virtual Network Subnet Resource Id of the agent machine
+ * @return the next definition stage
+ */
+ WithCreate withVirtualNetworkSubnetResourceId(String virtualNetworkSubnetResourceId);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithCount, DefinitionStages.WithOs, DefinitionStages.WithTags, DefinitionStages.WithTier, DefinitionStages.WithVirtualNetworkSubnetResourceId {
+ }
+ }
+ /**
+ * The template for a AgentPool update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithCount, UpdateStages.WithTags {
+ }
+
+ /**
+ * Grouping of AgentPool update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the agentpool update allowing to specify Count.
+ */
+ interface WithCount {
+ /**
+ * Specifies count.
+ * @param count The count of agent machine
+ * @return the next update stage
+ */
+ Update withCount(Integer count);
+ }
+
+ /**
+ * The stage of the agentpool update allowing to specify Tags.
+ */
+ interface WithTags {
+ /**
+ * Specifies tags.
+ * @param tags The ARM resource tags
+ * @return the next update stage
+ */
+ Update withTags(Map tags);
+ }
+
+ }
+}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/AgentPoolQueueStatus.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/AgentPoolQueueStatus.java
new file mode 100644
index 000000000000..dd867d239e84
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/AgentPoolQueueStatus.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.containerregistry.v2019_06_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.implementation.ContainerRegistryManager;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.implementation.AgentPoolQueueStatusInner;
+
+/**
+ * Type representing AgentPoolQueueStatus.
+ */
+public interface AgentPoolQueueStatus extends HasInner, HasManager {
+ /**
+ * @return the count value.
+ */
+ Integer count();
+
+}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/AgentPoolUpdateParameters.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/AgentPoolUpdateParameters.java
new file mode 100644
index 000000000000..7216315d31d5
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/AgentPoolUpdateParameters.java
@@ -0,0 +1,72 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.containerregistry.v2019_06_01_preview;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * The parameters for updating an agent pool.
+ */
+@JsonFlatten
+public class AgentPoolUpdateParameters {
+ /**
+ * The count of agent machine.
+ */
+ @JsonProperty(value = "properties.count")
+ private Integer count;
+
+ /**
+ * The ARM resource tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * Get the count of agent machine.
+ *
+ * @return the count value
+ */
+ public Integer count() {
+ return this.count;
+ }
+
+ /**
+ * Set the count of agent machine.
+ *
+ * @param count the count value to set
+ * @return the AgentPoolUpdateParameters object itself.
+ */
+ public AgentPoolUpdateParameters withCount(Integer count) {
+ this.count = count;
+ return this;
+ }
+
+ /**
+ * Get the ARM resource tags.
+ *
+ * @return the tags value
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the ARM resource tags.
+ *
+ * @param tags the tags value to set
+ * @return the AgentPoolUpdateParameters object itself.
+ */
+ public AgentPoolUpdateParameters withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/AgentPools.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/AgentPools.java
new file mode 100644
index 000000000000..172f53f38228
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/AgentPools.java
@@ -0,0 +1,64 @@
+/**
+ * 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.v2019_06_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.implementation.AgentPoolsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing AgentPools.
+ */
+public interface AgentPools extends SupportsCreating, HasInner {
+ /**
+ * Gets the count of queued runs for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getQueueStatusAsync(String resourceGroupName, String registryName, String agentPoolName);
+
+ /**
+ * Gets the detailed information for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String registryName, String agentPoolName);
+
+ /**
+ * Lists all the agent pools for a 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 listAsync(final String resourceGroupName, final String registryName);
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String registryName, String agentPoolName);
+
+}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/DockerBuildRequest.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/DockerBuildRequest.java
index 24153a9cc340..aab6bc47c7a4 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/DockerBuildRequest.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/DockerBuildRequest.java
@@ -16,7 +16,7 @@
/**
* The parameters for a docker quick build.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = DockerBuildRequest.class)
@JsonTypeName("DockerBuildRequest")
public class DockerBuildRequest extends RunRequest {
/**
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/DockerBuildStep.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/DockerBuildStep.java
index 0f974218f0fd..e454f453c9d7 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/DockerBuildStep.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/DockerBuildStep.java
@@ -16,7 +16,7 @@
/**
* The Docker build step.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = DockerBuildStep.class)
@JsonTypeName("Docker")
public class DockerBuildStep extends TaskStepProperties {
/**
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/DockerBuildStepUpdateParameters.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/DockerBuildStepUpdateParameters.java
index c10def6386e6..e01d36d462ef 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/DockerBuildStepUpdateParameters.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/DockerBuildStepUpdateParameters.java
@@ -16,7 +16,7 @@
/**
* The properties for updating a docker build step.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = DockerBuildStepUpdateParameters.class)
@JsonTypeName("Docker")
public class DockerBuildStepUpdateParameters extends TaskStepUpdateParameters {
/**
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/EncodedTaskRunRequest.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/EncodedTaskRunRequest.java
index 8b3d349be660..ae26dae84477 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/EncodedTaskRunRequest.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/EncodedTaskRunRequest.java
@@ -16,7 +16,7 @@
/**
* The parameters for a quick task run request.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = EncodedTaskRunRequest.class)
@JsonTypeName("EncodedTaskRunRequest")
public class EncodedTaskRunRequest extends RunRequest {
/**
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/EncodedTaskStep.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/EncodedTaskStep.java
index ce55407fe280..6554c126455d 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/EncodedTaskStep.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/EncodedTaskStep.java
@@ -16,7 +16,7 @@
/**
* The properties of a encoded task step.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = EncodedTaskStep.class)
@JsonTypeName("EncodedTask")
public class EncodedTaskStep extends TaskStepProperties {
/**
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/EncodedTaskStepUpdateParameters.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/EncodedTaskStepUpdateParameters.java
index 771c96b38c40..f88088f5a18a 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/EncodedTaskStepUpdateParameters.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/EncodedTaskStepUpdateParameters.java
@@ -16,7 +16,7 @@
/**
* The properties for updating encoded task step.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = EncodedTaskStepUpdateParameters.class)
@JsonTypeName("EncodedTask")
public class EncodedTaskStepUpdateParameters extends TaskStepUpdateParameters {
/**
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/ErrorResponse.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/ErrorResponse.java
new file mode 100644
index 000000000000..830e6254103a
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/ErrorResponse.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.containerregistry.v2019_06_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * An error response from the Azure Container Registry service.
+ */
+public class ErrorResponse {
+ /**
+ * Azure container registry build API error body.
+ */
+ @JsonProperty(value = "error")
+ private ErrorResponseBody error;
+
+ /**
+ * Get azure container registry build API error body.
+ *
+ * @return the error value
+ */
+ public ErrorResponseBody error() {
+ return this.error;
+ }
+
+ /**
+ * Set azure container registry build API error body.
+ *
+ * @param error the error value to set
+ * @return the ErrorResponse object itself.
+ */
+ public ErrorResponse withError(ErrorResponseBody error) {
+ this.error = error;
+ return this;
+ }
+
+}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/ErrorResponseBody.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/ErrorResponseBody.java
new file mode 100644
index 000000000000..033db1b25da8
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/ErrorResponseBody.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.v2019_06_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * An error response from the Azure Container Registry service.
+ */
+public class ErrorResponseBody {
+ /**
+ * error code.
+ */
+ @JsonProperty(value = "code", required = true)
+ private String code;
+
+ /**
+ * error message.
+ */
+ @JsonProperty(value = "message", required = true)
+ private String message;
+
+ /**
+ * Get error code.
+ *
+ * @return the code value
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Set error code.
+ *
+ * @param code the code value to set
+ * @return the ErrorResponseBody object itself.
+ */
+ public ErrorResponseBody withCode(String code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Get error message.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set error message.
+ *
+ * @param message the message value to set
+ * @return the ErrorResponseBody object itself.
+ */
+ public ErrorResponseBody withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/ErrorResponseException.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/ErrorResponseException.java
new file mode 100644
index 000000000000..a3e4b6db9d60
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/ErrorResponseException.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.containerregistry.v2019_06_01_preview;
+
+import com.microsoft.rest.RestException;
+import okhttp3.ResponseBody;
+import retrofit2.Response;
+
+/**
+ * Exception thrown for an invalid response with ErrorResponse information.
+ */
+public class ErrorResponseException extends RestException {
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ */
+ public ErrorResponseException(final String message, final Response response) {
+ super(message, response);
+ }
+
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ * @param body the deserialized response body
+ */
+ public ErrorResponseException(final String message, final Response response, final ErrorResponse body) {
+ super(message, response, body);
+ }
+
+ @Override
+ public ErrorResponse body() {
+ return (ErrorResponse) super.body();
+ }
+}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/FileTaskRunRequest.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/FileTaskRunRequest.java
index 16855f139bf1..0812454824c5 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/FileTaskRunRequest.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/FileTaskRunRequest.java
@@ -16,7 +16,7 @@
/**
* The request parameters for a scheduling run against a task file.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = FileTaskRunRequest.class)
@JsonTypeName("FileTaskRunRequest")
public class FileTaskRunRequest extends RunRequest {
/**
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/FileTaskStep.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/FileTaskStep.java
index 75f4a8744ccb..01b261784412 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/FileTaskStep.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/FileTaskStep.java
@@ -16,7 +16,7 @@
/**
* The properties of a task step.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = FileTaskStep.class)
@JsonTypeName("FileTask")
public class FileTaskStep extends TaskStepProperties {
/**
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/FileTaskStepUpdateParameters.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/FileTaskStepUpdateParameters.java
index 3b86d4c25efb..8838b330991a 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/FileTaskStepUpdateParameters.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/FileTaskStepUpdateParameters.java
@@ -16,7 +16,7 @@
/**
* The properties of updating a task step.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = FileTaskStepUpdateParameters.class)
@JsonTypeName("FileTask")
public class FileTaskStepUpdateParameters extends TaskStepUpdateParameters {
/**
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/Run.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/Run.java
index 45333905cee9..28cf25cf6b2d 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/Run.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/Run.java
@@ -28,6 +28,11 @@ public interface Run extends HasInner, Indexable, Refreshable, Up
*/
AgentProperties agentConfiguration();
+ /**
+ * @return the agentPoolName value.
+ */
+ String agentPoolName();
+
/**
* @return the createTime value.
*/
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/RunFilter.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/RunFilter.java
index 61b72c29388d..26cbeeead565 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/RunFilter.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/RunFilter.java
@@ -68,6 +68,12 @@ public class RunFilter {
@JsonProperty(value = "taskName")
private String taskName;
+ /**
+ * The name of the agent pool that the run corresponds to.
+ */
+ @JsonProperty(value = "agentPoolName")
+ private String agentPoolName;
+
/**
* Get the unique identifier for the run.
*
@@ -230,4 +236,24 @@ public RunFilter withTaskName(String taskName) {
return this;
}
+ /**
+ * Get the name of the agent pool that the run corresponds to.
+ *
+ * @return the agentPoolName value
+ */
+ public String agentPoolName() {
+ return this.agentPoolName;
+ }
+
+ /**
+ * Set the name of the agent pool that the run corresponds to.
+ *
+ * @param agentPoolName the agentPoolName value to set
+ * @return the RunFilter object itself.
+ */
+ public RunFilter withAgentPoolName(String agentPoolName) {
+ this.agentPoolName = agentPoolName;
+ return this;
+ }
+
}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/RunRequest.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/RunRequest.java
index d9efbd055415..2ce77ada9e00 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/RunRequest.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/RunRequest.java
@@ -16,7 +16,7 @@
/**
* The request parameters for scheduling a run.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = RunRequest.class)
@JsonTypeName("RunRequest")
@JsonSubTypes({
@JsonSubTypes.Type(name = "DockerBuildRequest", value = DockerBuildRequest.class),
@@ -32,6 +32,12 @@ public class RunRequest {
@JsonProperty(value = "isArchiveEnabled")
private Boolean isArchiveEnabled;
+ /**
+ * The dedicated agent pool for the run.
+ */
+ @JsonProperty(value = "agentPoolName")
+ private String agentPoolName;
+
/**
* Get the value that indicates whether archiving is enabled for the run or not.
*
@@ -52,4 +58,24 @@ public RunRequest withIsArchiveEnabled(Boolean isArchiveEnabled) {
return this;
}
+ /**
+ * Get the dedicated agent pool for the run.
+ *
+ * @return the agentPoolName value
+ */
+ public String agentPoolName() {
+ return this.agentPoolName;
+ }
+
+ /**
+ * Set the dedicated agent pool for the run.
+ *
+ * @param agentPoolName the agentPoolName value to set
+ * @return the RunRequest object itself.
+ */
+ public RunRequest withAgentPoolName(String agentPoolName) {
+ this.agentPoolName = agentPoolName;
+ return this;
+ }
+
}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/Task.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/Task.java
index 3f46bdec6bbe..6f925f8d519f 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/Task.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/Task.java
@@ -29,6 +29,11 @@ public interface Task extends HasInner, Indexable, Refreshable,
*/
AgentProperties agentConfiguration();
+ /**
+ * @return the agentPoolName value.
+ */
+ String agentPoolName();
+
/**
* @return the creationDate value.
*/
@@ -176,6 +181,18 @@ interface WithAgentConfiguration {
WithCreate withAgentConfiguration(AgentProperties agentConfiguration);
}
+ /**
+ * The stage of the task definition allowing to specify AgentPoolName.
+ */
+ interface WithAgentPoolName {
+ /**
+ * Specifies agentPoolName.
+ * @param agentPoolName The dedicated agent pool for the task
+ * @return the next definition stage
+ */
+ WithCreate withAgentPoolName(String agentPoolName);
+ }
+
/**
* The stage of the task definition allowing to specify Credentials.
*/
@@ -253,13 +270,13 @@ interface WithTrigger {
* the resource to be created (via {@link WithCreate#create()}), but also allows
* for any other optional settings to be specified.
*/
- interface WithCreate extends Creatable, DefinitionStages.WithAgentConfiguration, DefinitionStages.WithCredentials, DefinitionStages.WithIdentity, DefinitionStages.WithStatus, DefinitionStages.WithTags, DefinitionStages.WithTimeout, DefinitionStages.WithTrigger {
+ interface WithCreate extends Creatable, DefinitionStages.WithAgentConfiguration, DefinitionStages.WithAgentPoolName, DefinitionStages.WithCredentials, DefinitionStages.WithIdentity, DefinitionStages.WithStatus, DefinitionStages.WithTags, DefinitionStages.WithTimeout, DefinitionStages.WithTrigger {
}
}
/**
* The template for a Task update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable, UpdateStages.WithAgentConfiguration, UpdateStages.WithCredentials, UpdateStages.WithIdentity, UpdateStages.WithPlatform, UpdateStages.WithStatus, UpdateStages.WithStep, UpdateStages.WithTags, UpdateStages.WithTimeout, UpdateStages.WithTrigger {
+ interface Update extends Appliable, UpdateStages.WithAgentConfiguration, UpdateStages.WithAgentPoolName, UpdateStages.WithCredentials, UpdateStages.WithIdentity, UpdateStages.WithPlatform, UpdateStages.WithStatus, UpdateStages.WithStep, UpdateStages.WithTags, UpdateStages.WithTimeout, UpdateStages.WithTrigger {
}
/**
@@ -278,6 +295,18 @@ interface WithAgentConfiguration {
Update withAgentConfiguration(AgentProperties agentConfiguration);
}
+ /**
+ * The stage of the task update allowing to specify AgentPoolName.
+ */
+ interface WithAgentPoolName {
+ /**
+ * Specifies agentPoolName.
+ * @param agentPoolName The dedicated agent pool for the task
+ * @return the next update stage
+ */
+ Update withAgentPoolName(String agentPoolName);
+ }
+
/**
* The stage of the task update allowing to specify Credentials.
*/
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskRun.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskRun.java
new file mode 100644
index 000000000000..97e32499b4d0
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskRun.java
@@ -0,0 +1,232 @@
+/**
+ * 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.v2019_06_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.implementation.TaskRunInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.implementation.ContainerRegistryManager;
+import java.util.Map;
+
+/**
+ * Type representing TaskRun.
+ */
+public interface TaskRun extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the forceUpdateTag value.
+ */
+ String forceUpdateTag();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the identity value.
+ */
+ IdentityProperties identity();
+
+ /**
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the provisioningState value.
+ */
+ ProvisioningState provisioningState();
+
+ /**
+ * @return the runRequest value.
+ */
+ RunRequest runRequest();
+
+ /**
+ * @return the runResult value.
+ */
+ Run runResult();
+
+ /**
+ * @return the tags value.
+ */
+ Map tags();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the TaskRun definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithRegistry, DefinitionStages.WithLocation, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of TaskRun definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a TaskRun definition.
+ */
+ interface Blank extends WithRegistry {
+ }
+
+ /**
+ * The stage of the taskrun definition allowing to specify Registry.
+ */
+ interface WithRegistry {
+ /**
+ * Specifies resourceGroupName, registryName.
+ * @param resourceGroupName The name of the resource group to which the container registry belongs
+ * @param registryName The name of the container registry
+ * @return the next definition stage
+ */
+ WithLocation withExistingRegistry(String resourceGroupName, String registryName);
+ }
+
+ /**
+ * The stage of the taskrun definition allowing to specify Location.
+ */
+ interface WithLocation {
+ /**
+ * Specifies location.
+ * @param location The location of the resource. This cannot be changed after the resource is created
+ * @return the next definition stage
+ */
+ WithCreate withLocation(String location);
+ }
+
+ /**
+ * The stage of the taskrun definition allowing to specify ForceUpdateTag.
+ */
+ interface WithForceUpdateTag {
+ /**
+ * Specifies forceUpdateTag.
+ * @param forceUpdateTag How the run should be forced to rerun even if the run request configuration has not changed
+ * @return the next definition stage
+ */
+ WithCreate withForceUpdateTag(String forceUpdateTag);
+ }
+
+ /**
+ * The stage of the taskrun definition allowing to specify Identity.
+ */
+ interface WithIdentity {
+ /**
+ * Specifies identity.
+ * @param identity Identity for the resource
+ * @return the next definition stage
+ */
+ WithCreate withIdentity(IdentityProperties identity);
+ }
+
+ /**
+ * The stage of the taskrun definition allowing to specify RunRequest.
+ */
+ interface WithRunRequest {
+ /**
+ * Specifies runRequest.
+ * @param runRequest The request (parameters) for the run
+ * @return the next definition stage
+ */
+ WithCreate withRunRequest(RunRequest runRequest);
+ }
+
+ /**
+ * The stage of the taskrun definition allowing to specify Tags.
+ */
+ interface WithTags {
+ /**
+ * Specifies tags.
+ * @param tags The tags of the resource
+ * @return the next definition stage
+ */
+ WithCreate withTags(Map tags);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithForceUpdateTag, DefinitionStages.WithIdentity, DefinitionStages.WithRunRequest, DefinitionStages.WithTags {
+ }
+ }
+ /**
+ * The template for a TaskRun update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithForceUpdateTag, UpdateStages.WithIdentity, UpdateStages.WithRunRequest, UpdateStages.WithTags {
+ }
+
+ /**
+ * Grouping of TaskRun update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the taskrun update allowing to specify ForceUpdateTag.
+ */
+ interface WithForceUpdateTag {
+ /**
+ * Specifies forceUpdateTag.
+ * @param forceUpdateTag How the run should be forced to rerun even if the run request configuration has not changed
+ * @return the next update stage
+ */
+ Update withForceUpdateTag(String forceUpdateTag);
+ }
+
+ /**
+ * The stage of the taskrun update allowing to specify Identity.
+ */
+ interface WithIdentity {
+ /**
+ * Specifies identity.
+ * @param identity Identity for the resource
+ * @return the next update stage
+ */
+ Update withIdentity(IdentityProperties identity);
+ }
+
+ /**
+ * The stage of the taskrun update allowing to specify RunRequest.
+ */
+ interface WithRunRequest {
+ /**
+ * Specifies runRequest.
+ * @param runRequest The request (parameters) for the new run
+ * @return the next update stage
+ */
+ Update withRunRequest(RunRequest runRequest);
+ }
+
+ /**
+ * The stage of the taskrun update allowing to specify Tags.
+ */
+ interface WithTags {
+ /**
+ * Specifies tags.
+ * @param tags The ARM resource tags
+ * @return the next update stage
+ */
+ Update withTags(Map tags);
+ }
+
+ }
+}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskRunRequest.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskRunRequest.java
index b735a000f83b..525008ba0d1c 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskRunRequest.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskRunRequest.java
@@ -15,7 +15,7 @@
/**
* The parameters for a task run request.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = TaskRunRequest.class)
@JsonTypeName("TaskRunRequest")
public class TaskRunRequest extends RunRequest {
/**
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskRunUpdateParameters.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskRunUpdateParameters.java
new file mode 100644
index 000000000000..b08774bffa10
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskRunUpdateParameters.java
@@ -0,0 +1,125 @@
+/**
+ * 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.v2019_06_01_preview;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * The parameters for updating a task run.
+ */
+@JsonFlatten
+public class TaskRunUpdateParameters {
+ /**
+ * Identity for the resource.
+ */
+ @JsonProperty(value = "identity")
+ private IdentityProperties identity;
+
+ /**
+ * The request (parameters) for the new run.
+ */
+ @JsonProperty(value = "properties.runRequest")
+ private RunRequest runRequest;
+
+ /**
+ * How the run should be forced to rerun even if the run request
+ * configuration has not changed.
+ */
+ @JsonProperty(value = "properties.forceUpdateTag")
+ private String forceUpdateTag;
+
+ /**
+ * The ARM resource tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * Get identity for the resource.
+ *
+ * @return the identity value
+ */
+ public IdentityProperties identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set identity for the resource.
+ *
+ * @param identity the identity value to set
+ * @return the TaskRunUpdateParameters object itself.
+ */
+ public TaskRunUpdateParameters withIdentity(IdentityProperties identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the request (parameters) for the new run.
+ *
+ * @return the runRequest value
+ */
+ public RunRequest runRequest() {
+ return this.runRequest;
+ }
+
+ /**
+ * Set the request (parameters) for the new run.
+ *
+ * @param runRequest the runRequest value to set
+ * @return the TaskRunUpdateParameters object itself.
+ */
+ public TaskRunUpdateParameters withRunRequest(RunRequest runRequest) {
+ this.runRequest = runRequest;
+ return this;
+ }
+
+ /**
+ * Get how the run should be forced to rerun even if the run request configuration has not changed.
+ *
+ * @return the forceUpdateTag value
+ */
+ public String forceUpdateTag() {
+ return this.forceUpdateTag;
+ }
+
+ /**
+ * Set how the run should be forced to rerun even if the run request configuration has not changed.
+ *
+ * @param forceUpdateTag the forceUpdateTag value to set
+ * @return the TaskRunUpdateParameters object itself.
+ */
+ public TaskRunUpdateParameters withForceUpdateTag(String forceUpdateTag) {
+ this.forceUpdateTag = forceUpdateTag;
+ return this;
+ }
+
+ /**
+ * Get the ARM resource tags.
+ *
+ * @return the tags value
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the ARM resource tags.
+ *
+ * @param tags the tags value to set
+ * @return the TaskRunUpdateParameters object itself.
+ */
+ public TaskRunUpdateParameters withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskRuns.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskRuns.java
new file mode 100644
index 000000000000..473c94abfb00
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskRuns.java
@@ -0,0 +1,64 @@
+/**
+ * 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.v2019_06_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.implementation.TaskRunsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing TaskRuns.
+ */
+public interface TaskRuns extends SupportsCreating, HasInner {
+ /**
+ * Gets the detailed information for a given task run that includes all secrets.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param taskRunName The run request name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getDetailsAsync(String resourceGroupName, String registryName, String taskRunName);
+
+ /**
+ * Gets the detailed information for a given task run.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param taskRunName The run request name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String registryName, String taskRunName);
+
+ /**
+ * Lists all the task runs for a 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 listAsync(final String resourceGroupName, final String registryName);
+
+ /**
+ * Deletes a specified task run resource.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param taskRunName The task run name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String registryName, String taskRunName);
+
+}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskStepProperties.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskStepProperties.java
index bbc3fd09a887..f668f61efa13 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskStepProperties.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskStepProperties.java
@@ -17,7 +17,7 @@
/**
* Base properties for any task step.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = TaskStepProperties.class)
@JsonTypeName("TaskStepProperties")
@JsonSubTypes({
@JsonSubTypes.Type(name = "Docker", value = DockerBuildStep.class),
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskStepUpdateParameters.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskStepUpdateParameters.java
index 64cf2dc8d8f3..1a986e53d52f 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskStepUpdateParameters.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskStepUpdateParameters.java
@@ -16,7 +16,7 @@
/**
* Base properties for updating any task step.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = TaskStepUpdateParameters.class)
@JsonTypeName("TaskStepUpdateParameters")
@JsonSubTypes({
@JsonSubTypes.Type(name = "Docker", value = DockerBuildStepUpdateParameters.class),
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskUpdateParameters.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskUpdateParameters.java
index adfdebb5903e..14d1cf60a9ac 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskUpdateParameters.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/TaskUpdateParameters.java
@@ -42,6 +42,12 @@ public class TaskUpdateParameters {
@JsonProperty(value = "properties.agentConfiguration")
private AgentProperties agentConfiguration;
+ /**
+ * The dedicated agent pool for the task.
+ */
+ @JsonProperty(value = "properties.agentPoolName")
+ private String agentPoolName;
+
/**
* Run timeout in seconds.
*/
@@ -153,6 +159,26 @@ public TaskUpdateParameters withAgentConfiguration(AgentProperties agentConfigur
return this;
}
+ /**
+ * Get the dedicated agent pool for the task.
+ *
+ * @return the agentPoolName value
+ */
+ public String agentPoolName() {
+ return this.agentPoolName;
+ }
+
+ /**
+ * Set the dedicated agent pool for the task.
+ *
+ * @param agentPoolName the agentPoolName value to set
+ * @return the TaskUpdateParameters object itself.
+ */
+ public TaskUpdateParameters withAgentPoolName(String agentPoolName) {
+ this.agentPoolName = agentPoolName;
+ return this;
+ }
+
/**
* Get run timeout in seconds.
*
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/AgentPoolImpl.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/AgentPoolImpl.java
new file mode 100644
index 000000000000..1e269ded8b44
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/AgentPoolImpl.java
@@ -0,0 +1,198 @@
+/**
+ * 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.v2019_06_01_preview.implementation;
+
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.AgentPool;
+import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
+import rx.Observable;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.AgentPoolUpdateParameters;
+import java.util.Map;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.OS;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.ProvisioningState;
+import rx.functions.Func1;
+
+class AgentPoolImpl extends CreatableUpdatableImpl implements AgentPool, AgentPool.Definition, AgentPool.Update {
+ private final ContainerRegistryManager manager;
+ private String resourceGroupName;
+ private String registryName;
+ private String agentPoolName;
+ private AgentPoolUpdateParameters updateParameter;
+
+ AgentPoolImpl(String name, ContainerRegistryManager manager) {
+ super(name, new AgentPoolInner());
+ this.manager = manager;
+ // Set resource name
+ this.agentPoolName = name;
+ //
+ this.updateParameter = new AgentPoolUpdateParameters();
+ }
+
+ AgentPoolImpl(AgentPoolInner inner, ContainerRegistryManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.agentPoolName = inner.name();
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.registryName = IdParsingUtils.getValueFromIdByName(inner.id(), "registries");
+ this.agentPoolName = IdParsingUtils.getValueFromIdByName(inner.id(), "agentPools");
+ //
+ this.updateParameter = new AgentPoolUpdateParameters();
+ }
+
+ @Override
+ public ContainerRegistryManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ AgentPoolsInner client = this.manager().inner().agentPools();
+ return client.createAsync(this.resourceGroupName, this.registryName, this.agentPoolName, this.inner())
+ .map(new Func1() {
+ @Override
+ public AgentPoolInner call(AgentPoolInner resource) {
+ resetCreateUpdateParameters();
+ return resource;
+ }
+ })
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ AgentPoolsInner client = this.manager().inner().agentPools();
+ return client.updateAsync(this.resourceGroupName, this.registryName, this.agentPoolName, this.updateParameter)
+ .map(new Func1() {
+ @Override
+ public AgentPoolInner call(AgentPoolInner resource) {
+ resetCreateUpdateParameters();
+ return resource;
+ }
+ })
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ AgentPoolsInner client = this.manager().inner().agentPools();
+ return client.getAsync(this.resourceGroupName, this.registryName, this.agentPoolName);
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+ private void resetCreateUpdateParameters() {
+ this.updateParameter = new AgentPoolUpdateParameters();
+ }
+
+ @Override
+ public Integer count() {
+ return this.inner().count();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String location() {
+ return this.inner().location();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public OS os() {
+ return this.inner().os();
+ }
+
+ @Override
+ public ProvisioningState provisioningState() {
+ return this.inner().provisioningState();
+ }
+
+ @Override
+ public Map tags() {
+ return this.inner().getTags();
+ }
+
+ @Override
+ public String tier() {
+ return this.inner().tier();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+ @Override
+ public String virtualNetworkSubnetResourceId() {
+ return this.inner().virtualNetworkSubnetResourceId();
+ }
+
+ @Override
+ public AgentPoolImpl withExistingRegistry(String resourceGroupName, String registryName) {
+ this.resourceGroupName = resourceGroupName;
+ this.registryName = registryName;
+ return this;
+ }
+
+ @Override
+ public AgentPoolImpl withLocation(String location) {
+ this.inner().withLocation(location);
+ return this;
+ }
+
+ @Override
+ public AgentPoolImpl withOs(OS os) {
+ this.inner().withOs(os);
+ return this;
+ }
+
+ @Override
+ public AgentPoolImpl withTier(String tier) {
+ this.inner().withTier(tier);
+ return this;
+ }
+
+ @Override
+ public AgentPoolImpl withVirtualNetworkSubnetResourceId(String virtualNetworkSubnetResourceId) {
+ this.inner().withVirtualNetworkSubnetResourceId(virtualNetworkSubnetResourceId);
+ return this;
+ }
+
+ @Override
+ public AgentPoolImpl withCount(Integer count) {
+ if (isInCreateMode()) {
+ this.inner().withCount(count);
+ } else {
+ this.updateParameter.withCount(count);
+ }
+ return this;
+ }
+
+ @Override
+ public AgentPoolImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.inner().withTags(tags);
+ } else {
+ this.updateParameter.withTags(tags);
+ }
+ return this;
+ }
+
+}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/AgentPoolInner.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/AgentPoolInner.java
new file mode 100644
index 000000000000..019baeca5ab3
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/AgentPoolInner.java
@@ -0,0 +1,143 @@
+/**
+ * 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.v2019_06_01_preview.implementation;
+
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.OS;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.Resource;
+
+/**
+ * The agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+@JsonFlatten
+public class AgentPoolInner extends Resource {
+ /**
+ * The count of agent machine.
+ */
+ @JsonProperty(value = "properties.count")
+ private Integer count;
+
+ /**
+ * The Tier of agent machine.
+ */
+ @JsonProperty(value = "properties.tier")
+ private String tier;
+
+ /**
+ * The OS of agent machine. Possible values include: 'Windows', 'Linux'.
+ */
+ @JsonProperty(value = "properties.os")
+ private OS os;
+
+ /**
+ * The Virtual Network Subnet Resource Id of the agent machine.
+ */
+ @JsonProperty(value = "properties.virtualNetworkSubnetResourceId")
+ private String virtualNetworkSubnetResourceId;
+
+ /**
+ * The provisioning state of this agent pool. Possible values include:
+ * 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'.
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Get the count of agent machine.
+ *
+ * @return the count value
+ */
+ public Integer count() {
+ return this.count;
+ }
+
+ /**
+ * Set the count of agent machine.
+ *
+ * @param count the count value to set
+ * @return the AgentPoolInner object itself.
+ */
+ public AgentPoolInner withCount(Integer count) {
+ this.count = count;
+ return this;
+ }
+
+ /**
+ * Get the Tier of agent machine.
+ *
+ * @return the tier value
+ */
+ public String tier() {
+ return this.tier;
+ }
+
+ /**
+ * Set the Tier of agent machine.
+ *
+ * @param tier the tier value to set
+ * @return the AgentPoolInner object itself.
+ */
+ public AgentPoolInner withTier(String tier) {
+ this.tier = tier;
+ return this;
+ }
+
+ /**
+ * Get the OS of agent machine. Possible values include: 'Windows', 'Linux'.
+ *
+ * @return the os value
+ */
+ public OS os() {
+ return this.os;
+ }
+
+ /**
+ * Set the OS of agent machine. Possible values include: 'Windows', 'Linux'.
+ *
+ * @param os the os value to set
+ * @return the AgentPoolInner object itself.
+ */
+ public AgentPoolInner withOs(OS os) {
+ this.os = os;
+ return this;
+ }
+
+ /**
+ * Get the Virtual Network Subnet Resource Id of the agent machine.
+ *
+ * @return the virtualNetworkSubnetResourceId value
+ */
+ public String virtualNetworkSubnetResourceId() {
+ return this.virtualNetworkSubnetResourceId;
+ }
+
+ /**
+ * Set the Virtual Network Subnet Resource Id of the agent machine.
+ *
+ * @param virtualNetworkSubnetResourceId the virtualNetworkSubnetResourceId value to set
+ * @return the AgentPoolInner object itself.
+ */
+ public AgentPoolInner withVirtualNetworkSubnetResourceId(String virtualNetworkSubnetResourceId) {
+ this.virtualNetworkSubnetResourceId = virtualNetworkSubnetResourceId;
+ return this;
+ }
+
+ /**
+ * Get the provisioning state of this agent pool. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'.
+ *
+ * @return the provisioningState value
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/AgentPoolQueueStatusImpl.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/AgentPoolQueueStatusImpl.java
new file mode 100644
index 000000000000..00ef85b85d6e
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/AgentPoolQueueStatusImpl.java
@@ -0,0 +1,31 @@
+/**
+ * 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.v2019_06_01_preview.implementation;
+
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.AgentPoolQueueStatus;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+
+class AgentPoolQueueStatusImpl extends WrapperImpl implements AgentPoolQueueStatus {
+ private final ContainerRegistryManager manager;
+ AgentPoolQueueStatusImpl(AgentPoolQueueStatusInner inner, ContainerRegistryManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public ContainerRegistryManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Integer count() {
+ return this.inner().count();
+ }
+
+}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/AgentPoolQueueStatusInner.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/AgentPoolQueueStatusInner.java
new file mode 100644
index 000000000000..5f9dacc1c588
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/AgentPoolQueueStatusInner.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.containerregistry.v2019_06_01_preview.implementation;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The QueueStatus of Agent Pool.
+ */
+public class AgentPoolQueueStatusInner {
+ /**
+ * The number of pending runs in the queue.
+ */
+ @JsonProperty(value = "count")
+ private Integer count;
+
+ /**
+ * Get the number of pending runs in the queue.
+ *
+ * @return the count value
+ */
+ public Integer count() {
+ return this.count;
+ }
+
+ /**
+ * Set the number of pending runs in the queue.
+ *
+ * @param count the count value to set
+ * @return the AgentPoolQueueStatusInner object itself.
+ */
+ public AgentPoolQueueStatusInner withCount(Integer count) {
+ this.count = count;
+ return this;
+ }
+
+}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/AgentPoolsImpl.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/AgentPoolsImpl.java
new file mode 100644
index 000000000000..7003f1817be7
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/AgentPoolsImpl.java
@@ -0,0 +1,98 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ *
+ */
+
+package com.microsoft.azure.management.containerregistry.v2019_06_01_preview.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.AgentPools;
+import rx.Completable;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.AgentPoolQueueStatus;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.AgentPool;
+
+class AgentPoolsImpl extends WrapperImpl implements AgentPools {
+ private final ContainerRegistryManager manager;
+
+ AgentPoolsImpl(ContainerRegistryManager manager) {
+ super(manager.inner().agentPools());
+ this.manager = manager;
+ }
+
+ public ContainerRegistryManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public AgentPoolImpl define(String name) {
+ return wrapModel(name);
+ }
+
+ private AgentPoolImpl wrapModel(AgentPoolInner inner) {
+ return new AgentPoolImpl(inner, manager());
+ }
+
+ private AgentPoolImpl wrapModel(String name) {
+ return new AgentPoolImpl(name, this.manager());
+ }
+
+ @Override
+ public Observable getQueueStatusAsync(String resourceGroupName, String registryName, String agentPoolName) {
+ AgentPoolsInner client = this.inner();
+ return client.getQueueStatusAsync(resourceGroupName, registryName, agentPoolName)
+ .map(new Func1() {
+ @Override
+ public AgentPoolQueueStatus call(AgentPoolQueueStatusInner inner) {
+ return new AgentPoolQueueStatusImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listAsync(final String resourceGroupName, final String registryName) {
+ AgentPoolsInner client = this.inner();
+ return client.listAsync(resourceGroupName, registryName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public AgentPool call(AgentPoolInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String registryName, String agentPoolName) {
+ AgentPoolsInner client = this.inner();
+ return client.getAsync(resourceGroupName, registryName, agentPoolName)
+ .flatMap(new Func1>() {
+ @Override
+ public Observable call(AgentPoolInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((AgentPool)wrapModel(inner));
+ }
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAsync(String resourceGroupName, String registryName, String agentPoolName) {
+ AgentPoolsInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, registryName, agentPoolName).toCompletable();
+ }
+
+}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/AgentPoolsInner.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/AgentPoolsInner.java
new file mode 100644
index 000000000000..620d4bfb35c0
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/AgentPoolsInner.java
@@ -0,0 +1,1070 @@
+/**
+ * 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.v2019_06_01_preview.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceFuture;
+import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.AgentPoolUpdateParameters;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.ErrorResponseException;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.PagedList;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import 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 AgentPools.
+ */
+public class AgentPoolsInner {
+ /** The Retrofit service to perform REST calls. */
+ private AgentPoolsService service;
+ /** The service client containing this operation class. */
+ private ContainerRegistryManagementClientImpl client;
+
+ /**
+ * Initializes an instance of AgentPoolsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public AgentPoolsInner(Retrofit retrofit, ContainerRegistryManagementClientImpl client) {
+ this.service = retrofit.create(AgentPoolsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AgentPools to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface AgentPoolsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.v2019_06_01_preview.AgentPools get" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}")
+ Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("agentPoolName") String agentPoolName, @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.v2019_06_01_preview.AgentPools create" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}")
+ Observable> create(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("agentPoolName") String agentPoolName, @Query("api-version") String apiVersion, @Body AgentPoolInner agentPool, @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.v2019_06_01_preview.AgentPools beginCreate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}")
+ Observable> beginCreate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("agentPoolName") String agentPoolName, @Query("api-version") String apiVersion, @Body AgentPoolInner agentPool, @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.v2019_06_01_preview.AgentPools delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("agentPoolName") String agentPoolName, @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.v2019_06_01_preview.AgentPools beginDelete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}", method = "DELETE", hasBody = true)
+ Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("agentPoolName") String agentPoolName, @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.v2019_06_01_preview.AgentPools update" })
+ @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}")
+ Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("agentPoolName") String agentPoolName, @Query("api-version") String apiVersion, @Body AgentPoolUpdateParameters updateParameters, @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.v2019_06_01_preview.AgentPools beginUpdate" })
+ @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}")
+ Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("agentPoolName") String agentPoolName, @Query("api-version") String apiVersion, @Body AgentPoolUpdateParameters updateParameters, @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.v2019_06_01_preview.AgentPools list" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools")
+ Observable> list(@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.v2019_06_01_preview.AgentPools getQueueStatus" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}/listQueueStatus")
+ Observable> getQueueStatus(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("agentPoolName") String agentPoolName, @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.v2019_06_01_preview.AgentPools listNext" })
+ @GET
+ Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Gets the detailed information for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the AgentPoolInner object if successful.
+ */
+ public AgentPoolInner get(String resourceGroupName, String registryName, String agentPoolName) {
+ return getWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName).toBlocking().single().body();
+ }
+
+ /**
+ * Gets the detailed information for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture getAsync(String resourceGroupName, String registryName, String agentPoolName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName), serviceCallback);
+ }
+
+ /**
+ * Gets the detailed information for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AgentPoolInner object
+ */
+ public Observable getAsync(String resourceGroupName, String registryName, String agentPoolName) {
+ return getWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName).map(new Func1, AgentPoolInner>() {
+ @Override
+ public AgentPoolInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets the detailed information for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AgentPoolInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String registryName, String agentPoolName) {
+ 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 (agentPoolName == null) {
+ throw new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.get(this.client.subscriptionId(), resourceGroupName, registryName, agentPoolName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Creates an agent pool for 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 agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool that needs to scheduled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the AgentPoolInner object if successful.
+ */
+ public AgentPoolInner create(String resourceGroupName, String registryName, String agentPoolName, AgentPoolInner agentPool) {
+ return createWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName, agentPool).toBlocking().last().body();
+ }
+
+ /**
+ * Creates an agent pool for 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 agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool that needs to scheduled.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture createAsync(String resourceGroupName, String registryName, String agentPoolName, AgentPoolInner agentPool, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName, agentPool), serviceCallback);
+ }
+
+ /**
+ * Creates an agent pool for 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 agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool that needs to scheduled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable createAsync(String resourceGroupName, String registryName, String agentPoolName, AgentPoolInner agentPool) {
+ return createWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName, agentPool).map(new Func1, AgentPoolInner>() {
+ @Override
+ public AgentPoolInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Creates an agent pool for 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 agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool that needs to scheduled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> createWithServiceResponseAsync(String resourceGroupName, String registryName, String agentPoolName, AgentPoolInner agentPool) {
+ 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 (agentPoolName == null) {
+ throw new IllegalArgumentException("Parameter agentPoolName 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 (agentPool == null) {
+ throw new IllegalArgumentException("Parameter agentPool is required and cannot be null.");
+ }
+ Validator.validate(agentPool);
+ Observable> observable = service.create(this.client.subscriptionId(), resourceGroupName, registryName, agentPoolName, this.client.apiVersion(), agentPool, this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Creates an agent pool for 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 agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool that needs to scheduled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the AgentPoolInner object if successful.
+ */
+ public AgentPoolInner beginCreate(String resourceGroupName, String registryName, String agentPoolName, AgentPoolInner agentPool) {
+ return beginCreateWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName, agentPool).toBlocking().single().body();
+ }
+
+ /**
+ * Creates an agent pool for 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 agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool that needs to scheduled.
+ * @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 beginCreateAsync(String resourceGroupName, String registryName, String agentPoolName, AgentPoolInner agentPool, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName, agentPool), serviceCallback);
+ }
+
+ /**
+ * Creates an agent pool for 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 agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool that needs to scheduled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AgentPoolInner object
+ */
+ public Observable beginCreateAsync(String resourceGroupName, String registryName, String agentPoolName, AgentPoolInner agentPool) {
+ return beginCreateWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName, agentPool).map(new Func1, AgentPoolInner>() {
+ @Override
+ public AgentPoolInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Creates an agent pool for 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 agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool that needs to scheduled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AgentPoolInner object
+ */
+ public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String registryName, String agentPoolName, AgentPoolInner agentPool) {
+ 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 (agentPoolName == null) {
+ throw new IllegalArgumentException("Parameter agentPoolName 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 (agentPool == null) {
+ throw new IllegalArgumentException("Parameter agentPool is required and cannot be null.");
+ }
+ Validator.validate(agentPool);
+ return service.beginCreate(this.client.subscriptionId(), resourceGroupName, registryName, agentPoolName, this.client.apiVersion(), agentPool, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = beginCreateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse beginCreateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(201, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void delete(String resourceGroupName, String registryName, String agentPoolName) {
+ deleteWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName).toBlocking().last().body();
+ }
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @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, String agentPoolName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName), serviceCallback);
+ }
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable deleteAsync(String resourceGroupName, String registryName, String agentPoolName) {
+ return deleteWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String registryName, String agentPoolName) {
+ 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 (agentPoolName == null) {
+ throw new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, registryName, agentPoolName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void beginDelete(String resourceGroupName, String registryName, String agentPoolName) {
+ beginDeleteWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName).toBlocking().single().body();
+ }
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @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 beginDeleteAsync(String resourceGroupName, String registryName, String agentPoolName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName), serviceCallback);
+ }
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable beginDeleteAsync(String resourceGroupName, String registryName, String agentPoolName) {
+ return beginDeleteWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String registryName, String agentPoolName) {
+ 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 (agentPoolName == null) {
+ throw new IllegalArgumentException("Parameter agentPoolName 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.beginDelete(this.client.subscriptionId(), resourceGroupName, registryName, agentPoolName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = beginDeleteDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse beginDeleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(202, new TypeToken() { }.getType())
+ .register(204, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Updates an agent pool 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 agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the AgentPoolInner object if successful.
+ */
+ public AgentPoolInner update(String resourceGroupName, String registryName, String agentPoolName, AgentPoolUpdateParameters updateParameters) {
+ return updateWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName, updateParameters).toBlocking().last().body();
+ }
+
+ /**
+ * Updates an agent pool 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 agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @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, String agentPoolName, AgentPoolUpdateParameters updateParameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName, updateParameters), serviceCallback);
+ }
+
+ /**
+ * Updates an agent pool 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 agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable updateAsync(String resourceGroupName, String registryName, String agentPoolName, AgentPoolUpdateParameters updateParameters) {
+ return updateWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName, updateParameters).map(new Func1, AgentPoolInner>() {
+ @Override
+ public AgentPoolInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Updates an agent pool 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 agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> updateWithServiceResponseAsync(String resourceGroupName, String registryName, String agentPoolName, AgentPoolUpdateParameters updateParameters) {
+ 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 (agentPoolName == null) {
+ throw new IllegalArgumentException("Parameter agentPoolName 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 (updateParameters == null) {
+ throw new IllegalArgumentException("Parameter updateParameters is required and cannot be null.");
+ }
+ Validator.validate(updateParameters);
+ Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, registryName, agentPoolName, this.client.apiVersion(), updateParameters, this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Updates an agent pool 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 agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the AgentPoolInner object if successful.
+ */
+ public AgentPoolInner beginUpdate(String resourceGroupName, String registryName, String agentPoolName, AgentPoolUpdateParameters updateParameters) {
+ return beginUpdateWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName, updateParameters).toBlocking().single().body();
+ }
+
+ /**
+ * Updates an agent pool 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 agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @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 beginUpdateAsync(String resourceGroupName, String registryName, String agentPoolName, AgentPoolUpdateParameters updateParameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName, updateParameters), serviceCallback);
+ }
+
+ /**
+ * Updates an agent pool 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 agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AgentPoolInner object
+ */
+ public Observable beginUpdateAsync(String resourceGroupName, String registryName, String agentPoolName, AgentPoolUpdateParameters updateParameters) {
+ return beginUpdateWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName, updateParameters).map(new Func1, AgentPoolInner>() {
+ @Override
+ public AgentPoolInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Updates an agent pool 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 agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AgentPoolInner object
+ */
+ public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String registryName, String agentPoolName, AgentPoolUpdateParameters updateParameters) {
+ 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 (agentPoolName == null) {
+ throw new IllegalArgumentException("Parameter agentPoolName 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 (updateParameters == null) {
+ throw new IllegalArgumentException("Parameter updateParameters is required and cannot be null.");
+ }
+ Validator.validate(updateParameters);
+ return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, registryName, agentPoolName, this.client.apiVersion(), updateParameters, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = beginUpdateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse beginUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(201, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Lists all the agent pools for a 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 ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<AgentPoolInner> object if successful.
+ */
+ public PagedList list(final String resourceGroupName, final String registryName) {
+ ServiceResponse> response = listSinglePageAsync(resourceGroupName, registryName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists all the agent pools for a 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> listAsync(final String resourceGroupName, final String registryName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listSinglePageAsync(resourceGroupName, registryName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists all the agent pools for a 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 PagedList<AgentPoolInner> object
+ */
+ public Observable> listAsync(final String resourceGroupName, final String registryName) {
+ return listWithServiceResponseAsync(resourceGroupName, registryName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists all the agent pools for a 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 PagedList<AgentPoolInner> object
+ */
+ public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String registryName) {
+ return listSinglePageAsync(resourceGroupName, registryName)
+ .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 agent pools for a specified container registry.
+ *
+ ServiceResponse> * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ ServiceResponse> * @param registryName The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<AgentPoolInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listSinglePageAsync(final String resourceGroupName, final 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.list(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> result = listDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets the count of queued runs for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the AgentPoolQueueStatusInner object if successful.
+ */
+ public AgentPoolQueueStatusInner getQueueStatus(String resourceGroupName, String registryName, String agentPoolName) {
+ return getQueueStatusWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName).toBlocking().single().body();
+ }
+
+ /**
+ * Gets the count of queued runs for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @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 getQueueStatusAsync(String resourceGroupName, String registryName, String agentPoolName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getQueueStatusWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName), serviceCallback);
+ }
+
+ /**
+ * Gets the count of queued runs for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AgentPoolQueueStatusInner object
+ */
+ public Observable getQueueStatusAsync(String resourceGroupName, String registryName, String agentPoolName) {
+ return getQueueStatusWithServiceResponseAsync(resourceGroupName, registryName, agentPoolName).map(new Func1, AgentPoolQueueStatusInner>() {
+ @Override
+ public AgentPoolQueueStatusInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets the count of queued runs for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
+ * @param registryName The name of the container registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AgentPoolQueueStatusInner object
+ */
+ public Observable> getQueueStatusWithServiceResponseAsync(String resourceGroupName, String registryName, String agentPoolName) {
+ 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 (agentPoolName == null) {
+ throw new IllegalArgumentException("Parameter agentPoolName 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.getQueueStatus(this.client.subscriptionId(), resourceGroupName, registryName, agentPoolName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getQueueStatusDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getQueueStatusDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Lists all the agent pools for a specified container registry.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<AgentPoolInner> object if successful.
+ */
+ public PagedList listNext(final String nextPageLink) {
+ ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists all the agent pools for a specified container registry.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param serviceFuture the ServiceFuture object tracking the Retrofit calls
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listNextSinglePageAsync(nextPageLink),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists all the agent pools for a specified container registry.
+ *
+ * @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<AgentPoolInner> object
+ */
+ public Observable> listNextAsync(final String nextPageLink) {
+ return listNextWithServiceResponseAsync(nextPageLink)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists all the agent pools for a specified container registry.
+ *
+ * @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<AgentPoolInner> object
+ */
+ public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Lists all the agent pools for a specified container registry.
+ *
+ ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<AgentPoolInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listNextSinglePageAsync(final String nextPageLink) {
+ if (nextPageLink == null) {
+ throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
+ }
+ String nextUrl = String.format("%s", nextPageLink);
+ return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listNextDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/ContainerRegistryManagementClientImpl.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/ContainerRegistryManagementClientImpl.java
index 6fa55f6d9218..0db35ddbfe88 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/ContainerRegistryManagementClientImpl.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/ContainerRegistryManagementClientImpl.java
@@ -132,6 +132,19 @@ public ContainerRegistryManagementClientImpl withGenerateClientRequestId(boolean
return this;
}
+ /**
+ * The AgentPoolsInner object to access its operations.
+ */
+ private AgentPoolsInner agentPools;
+
+ /**
+ * Gets the AgentPoolsInner object to access its operations.
+ * @return the AgentPoolsInner object.
+ */
+ public AgentPoolsInner agentPools() {
+ return this.agentPools;
+ }
+
/**
* The RegistriesInner object to access its operations.
*/
@@ -158,6 +171,19 @@ public RunsInner runs() {
return this.runs;
}
+ /**
+ * The TaskRunsInner object to access its operations.
+ */
+ private TaskRunsInner taskRuns;
+
+ /**
+ * Gets the TaskRunsInner object to access its operations.
+ * @return the TaskRunsInner object.
+ */
+ public TaskRunsInner taskRuns() {
+ return this.taskRuns;
+ }
+
/**
* The TasksInner object to access its operations.
*/
@@ -206,8 +232,10 @@ protected void initialize() {
this.acceptLanguage = "en-US";
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
+ this.agentPools = new AgentPoolsInner(restClient().retrofit(), this);
this.registries = new RegistriesInner(restClient().retrofit(), this);
this.runs = new RunsInner(restClient().retrofit(), this);
+ this.taskRuns = new TaskRunsInner(restClient().retrofit(), this);
this.tasks = new TasksInner(restClient().retrofit(), this);
this.azureClient = new AzureClient(this);
}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/ContainerRegistryManager.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/ContainerRegistryManager.java
index 939e317321f2..91c39f58bb30 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/ContainerRegistryManager.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/ContainerRegistryManager.java
@@ -16,8 +16,10 @@
import com.microsoft.azure.arm.resources.AzureConfigurable;
import com.microsoft.azure.serializer.AzureJacksonAdapter;
import com.microsoft.rest.RestClient;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.AgentPools;
import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.Registries;
import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.Runs;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.TaskRuns;
import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.Tasks;
import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl;
import com.microsoft.azure.arm.resources.implementation.ManagerCore;
@@ -26,8 +28,10 @@
* Entry point to Azure ContainerRegistry resource management.
*/
public final class ContainerRegistryManager extends ManagerCore {
+ private AgentPools agentPools;
private Registries registries;
private Runs runs;
+ private TaskRuns taskRuns;
private Tasks tasks;
/**
* Get a Configurable instance that can be used to create ContainerRegistryManager with optional configuration.
@@ -76,6 +80,16 @@ public interface Configurable extends AzureConfigurable {
ContainerRegistryManager authenticate(AzureTokenCredentials credentials, String subscriptionId);
}
+ /**
+ * @return Entry point to manage AgentPools.
+ */
+ public AgentPools agentPools() {
+ if (this.agentPools == null) {
+ this.agentPools = new AgentPoolsImpl(this);
+ }
+ return this.agentPools;
+ }
+
/**
* @return Entry point to manage Registries.
*/
@@ -96,6 +110,16 @@ public Runs runs() {
return this.runs;
}
+ /**
+ * @return Entry point to manage TaskRuns.
+ */
+ public TaskRuns taskRuns() {
+ if (this.taskRuns == null) {
+ this.taskRuns = new TaskRunsImpl(this);
+ }
+ return this.taskRuns;
+ }
+
/**
* @return Entry point to manage Tasks.
*/
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/RegistriesInner.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/RegistriesInner.java
index e96c5c7e23e3..8a4b1eb14cab 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/RegistriesInner.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/RegistriesInner.java
@@ -10,7 +10,7 @@
import retrofit2.Retrofit;
import com.google.common.reflect.TypeToken;
-import com.microsoft.azure.CloudException;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.ErrorResponseException;
import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.RunRequest;
import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.ServiceFuture;
@@ -75,7 +75,7 @@ interface RegistriesService {
* @param registryName The name of the container registry.
* @param runRequest The parameters of a run that needs to scheduled.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
+ * @throws ErrorResponseException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the RunInner object if successful.
*/
@@ -152,7 +152,7 @@ public Observable> scheduleRunWithServiceResponseAsync
* @param registryName The name of the container registry.
* @param runRequest The parameters of a run that needs to scheduled.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
+ * @throws ErrorResponseException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the RunInner object if successful.
*/
@@ -232,11 +232,11 @@ public Observable> call(Response respons
});
}
- private ServiceResponse beginScheduleRunDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse beginScheduleRunDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
.register(202, new TypeToken