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/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/Error.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/Error.java
new file mode 100644
index 000000000000..4d4820d8c49a
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/Error.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 Error {
+ /**
+ * 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 Error object itself.
+ */
+ public Error 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 Error object itself.
+ */
+ public Error 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/ErrorSchema.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/ErrorSchema.java
new file mode 100644
index 000000000000..338550a917eb
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/ErrorSchema.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 ErrorSchema {
+ /**
+ * Azure container registry build API error body.
+ */
+ @JsonProperty(value = "error")
+ private Error error;
+
+ /**
+ * Get azure container registry build API error body.
+ *
+ * @return the error value
+ */
+ public Error error() {
+ return this.error;
+ }
+
+ /**
+ * Set azure container registry build API error body.
+ *
+ * @param error the error value to set
+ * @return the ErrorSchema object itself.
+ */
+ public ErrorSchema withError(Error 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/ErrorSchemaException.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/ErrorSchemaException.java
new file mode 100644
index 000000000000..e907eba4a873
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/ErrorSchemaException.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 ErrorSchema information.
+ */
+public class ErrorSchemaException extends RestException {
+ /**
+ * Initializes a new instance of the ErrorSchemaException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ */
+ public ErrorSchemaException(final String message, final Response response) {
+ super(message, response);
+ }
+
+ /**
+ * Initializes a new instance of the ErrorSchemaException 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 ErrorSchemaException(final String message, final Response response, final ErrorSchema body) {
+ super(message, response, body);
+ }
+
+ @Override
+ public ErrorSchema body() {
+ return (ErrorSchema) 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/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..6f5e596f4fee 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),
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..1709049ee2be
--- /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,53 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.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.
+ *
+ * @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/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..8e909622b425 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
@@ -158,6 +158,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.
*/
@@ -208,6 +221,7 @@ protected void initialize() {
this.generateClientRequestId = true;
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..e093c34d485b 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
@@ -18,6 +18,7 @@
import com.microsoft.rest.RestClient;
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;
@@ -28,6 +29,7 @@
public final class ContainerRegistryManager extends ManagerCore {
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.
@@ -96,6 +98,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..8f3b1d404277 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.ErrorSchemaException;
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 ErrorSchemaException 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 ErrorSchemaException 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 ErrorSchemaException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
.register(202, new TypeToken() { }.getType())
- .registerError(CloudException.class)
+ .registerError(ErrorSchemaException.class)
.build(response);
}
@@ -246,7 +246,7 @@ private ServiceResponse beginScheduleRunDelegate(Response> call(Response getBuildSourceUploadUrlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse getBuildSourceUploadUrlDelegate(Response response) throws ErrorSchemaException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
- .registerError(CloudException.class)
+ .registerError(ErrorSchemaException.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/RunsInner.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/RunsInner.java
index 971e7de8e320..18788e0051ed 100644
--- a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/RunsInner.java
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/RunsInner.java
@@ -11,8 +11,8 @@
import retrofit2.Retrofit;
import com.google.common.reflect.TypeToken;
import com.microsoft.azure.AzureServiceFuture;
-import com.microsoft.azure.CloudException;
import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.ErrorSchemaException;
import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.RunUpdateParameters;
import com.microsoft.azure.Page;
import com.microsoft.azure.PagedList;
@@ -101,7 +101,7 @@ interface RunsService {
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param registryName The name of the container registry.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
+ * @throws ErrorSchemaException 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<RunInner> object if successful.
*/
@@ -221,7 +221,7 @@ public Observable>> call(Response r
* @param filter The runs filter to apply on the operation. Arithmetic operators are not supported. The allowed string function is 'contains'. All logical operators except 'Not', 'Has', 'All' are allowed.
* @param top $top is supported for get list of runs, which limits the maximum number of runs to return.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
+ * @throws ErrorSchemaException 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<RunInner> object if successful.
*/
@@ -339,10 +339,10 @@ public Observable>> call(Response r
});
}
- private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ private ServiceResponse> listDelegate(Response response) throws ErrorSchemaException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorSchemaException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken>() { }.getType())
- .registerError(CloudException.class)
+ .registerError(ErrorSchemaException.class)
.build(response);
}
@@ -353,7 +353,7 @@ private ServiceResponse> listDelegate(Response
* @param registryName The name of the container registry.
* @param runId The run ID.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
+ * @throws ErrorSchemaException 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.
*/
@@ -432,10 +432,10 @@ public Observable> call(Response respons
});
}
- private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse getDelegate(Response response) throws ErrorSchemaException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
- .registerError(CloudException.class)
+ .registerError(ErrorSchemaException.class)
.build(response);
}
@@ -446,7 +446,7 @@ private ServiceResponse getDelegate(Response response) t
* @param registryName The name of the container registry.
* @param runId The run ID.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
+ * @throws ErrorSchemaException 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.
*/
@@ -525,7 +525,7 @@ public Observable> updateWithServiceResponseAsync(Stri
* @param runId The run ID.
* @param isArchiveEnabled The value that indicates whether archiving is enabled or not.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
+ * @throws ErrorSchemaException 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.
*/
@@ -606,7 +606,7 @@ public Observable> updateWithServiceResponseAsync(Stri
* @param registryName The name of the container registry.
* @param runId The run ID.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
+ * @throws ErrorSchemaException 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.
*/
@@ -696,7 +696,7 @@ public Observable> call(Response respons
* @param runId The run ID.
* @param isArchiveEnabled The value that indicates whether archiving is enabled or not.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
+ * @throws ErrorSchemaException 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.
*/
@@ -780,11 +780,11 @@ public Observable> call(Response respons
});
}
- private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse beginUpdateDelegate(Response response) throws ErrorSchemaException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
.register(201, new TypeToken() { }.getType())
- .registerError(CloudException.class)
+ .registerError(ErrorSchemaException.class)
.build(response);
}
@@ -795,7 +795,7 @@ private ServiceResponse beginUpdateDelegate(Response res
* @param registryName The name of the container registry.
* @param runId The run ID.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
+ * @throws ErrorSchemaException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the RunGetLogResultInner object if successful.
*/
@@ -874,10 +874,10 @@ public Observable> call(Response getLogSasUrlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse getLogSasUrlDelegate(Response response) throws ErrorSchemaException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
- .registerError(CloudException.class)
+ .registerError(ErrorSchemaException.class)
.build(response);
}
@@ -888,7 +888,7 @@ private ServiceResponse getLogSasUrlDelegate(Response> cancelWithServiceResponseAsync(String r
* @param registryName The name of the container registry.
* @param runId The run ID.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
+ * @throws ErrorSchemaException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
*/
public void beginCancel(String resourceGroupName, String registryName, String runId) {
@@ -1041,11 +1041,11 @@ public Observable> call(Response response) {
});
}
- private ServiceResponse beginCancelDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse beginCancelDelegate(Response response) throws ErrorSchemaException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
.register(202, new TypeToken() { }.getType())
- .registerError(CloudException.class)
+ .registerError(ErrorSchemaException.class)
.build(response);
}
@@ -1054,7 +1054,7 @@ private ServiceResponse beginCancelDelegate(Response respons
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
+ * @throws ErrorSchemaException 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<RunInner> object if successful.
*/
@@ -1153,10 +1153,10 @@ public Observable>> call(Response r
});
}
- private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ private ServiceResponse> listNextDelegate(Response response) throws ErrorSchemaException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorSchemaException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken>() { }.getType())
- .registerError(CloudException.class)
+ .registerError(ErrorSchemaException.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/TaskRunImpl.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/TaskRunImpl.java
new file mode 100644
index 000000000000..ca96e149ae25
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/TaskRunImpl.java
@@ -0,0 +1,207 @@
+/**
+ * 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.TaskRun;
+import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
+import rx.Observable;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.TaskRunUpdateParameters;
+import java.util.Map;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.IdentityProperties;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.ProvisioningState;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.RunRequest;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.Run;
+import rx.functions.Func1;
+
+class TaskRunImpl extends CreatableUpdatableImpl implements TaskRun, TaskRun.Definition, TaskRun.Update {
+ private final ContainerRegistryManager manager;
+ private String resourceGroupName;
+ private String registryName;
+ private String taskRunName;
+ private TaskRunUpdateParameters updateParameter;
+
+ TaskRunImpl(String name, ContainerRegistryManager manager) {
+ super(name, new TaskRunInner());
+ this.manager = manager;
+ // Set resource name
+ this.taskRunName = name;
+ //
+ this.updateParameter = new TaskRunUpdateParameters();
+ }
+
+ TaskRunImpl(TaskRunInner inner, ContainerRegistryManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.taskRunName = inner.name();
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.registryName = IdParsingUtils.getValueFromIdByName(inner.id(), "registries");
+ this.taskRunName = IdParsingUtils.getValueFromIdByName(inner.id(), "taskRuns");
+ //
+ this.updateParameter = new TaskRunUpdateParameters();
+ }
+
+ @Override
+ public ContainerRegistryManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ TaskRunsInner client = this.manager().inner().taskRuns();
+ return client.createAsync(this.resourceGroupName, this.registryName, this.taskRunName, this.inner())
+ .map(new Func1() {
+ @Override
+ public TaskRunInner call(TaskRunInner resource) {
+ resetCreateUpdateParameters();
+ return resource;
+ }
+ })
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ TaskRunsInner client = this.manager().inner().taskRuns();
+ return client.updateAsync(this.resourceGroupName, this.registryName, this.taskRunName, this.updateParameter)
+ .map(new Func1() {
+ @Override
+ public TaskRunInner call(TaskRunInner resource) {
+ resetCreateUpdateParameters();
+ return resource;
+ }
+ })
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ TaskRunsInner client = this.manager().inner().taskRuns();
+ return client.getAsync(this.resourceGroupName, this.registryName, this.taskRunName);
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+ private void resetCreateUpdateParameters() {
+ this.updateParameter = new TaskRunUpdateParameters();
+ }
+
+ @Override
+ public String forceUpdateTag() {
+ return this.inner().forceUpdateTag();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public IdentityProperties identity() {
+ return this.inner().identity();
+ }
+
+ @Override
+ public String location() {
+ return this.inner().location();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public ProvisioningState provisioningState() {
+ return this.inner().provisioningState();
+ }
+
+ @Override
+ public RunRequest runRequest() {
+ return this.inner().runRequest();
+ }
+
+ @Override
+ public Run runResult() {
+ RunInner inner = this.inner().runResult();
+ if (inner != null) {
+ return new RunImpl(inner, manager());
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public Map tags() {
+ return this.inner().getTags();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+ @Override
+ public TaskRunImpl withExistingRegistry(String resourceGroupName, String registryName) {
+ this.resourceGroupName = resourceGroupName;
+ this.registryName = registryName;
+ return this;
+ }
+
+ @Override
+ public TaskRunImpl withLocation(String location) {
+ this.inner().withLocation(location);
+ return this;
+ }
+
+ @Override
+ public TaskRunImpl withForceUpdateTag(String forceUpdateTag) {
+ if (isInCreateMode()) {
+ this.inner().withForceUpdateTag(forceUpdateTag);
+ } else {
+ this.updateParameter.withForceUpdateTag(forceUpdateTag);
+ }
+ return this;
+ }
+
+ @Override
+ public TaskRunImpl withIdentity(IdentityProperties identity) {
+ if (isInCreateMode()) {
+ this.inner().withIdentity(identity);
+ } else {
+ this.updateParameter.withIdentity(identity);
+ }
+ return this;
+ }
+
+ @Override
+ public TaskRunImpl withRunRequest(RunRequest runRequest) {
+ if (isInCreateMode()) {
+ this.inner().withRunRequest(runRequest);
+ } else {
+ this.updateParameter.withRunRequest(runRequest);
+ }
+ return this;
+ }
+
+ @Override
+ public TaskRunImpl 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/TaskRunInner.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/TaskRunInner.java
new file mode 100644
index 000000000000..c35a68951b73
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/TaskRunInner.java
@@ -0,0 +1,134 @@
+/**
+ * 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.IdentityProperties;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.ProvisioningState;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.RunRequest;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.Resource;
+
+/**
+ * The task run that has the ARM resource and properties.
+ * The task run will have the information of request and result of a run.
+ */
+@JsonFlatten
+public class TaskRunInner extends Resource {
+ /**
+ * Identity for the resource.
+ */
+ @JsonProperty(value = "identity")
+ private IdentityProperties identity;
+
+ /**
+ * The provisioning state of this task run. Possible values include:
+ * 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'.
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * The request (parameters) for the run.
+ */
+ @JsonProperty(value = "properties.runRequest")
+ private RunRequest runRequest;
+
+ /**
+ * The result of this task run.
+ */
+ @JsonProperty(value = "properties.runResult", access = JsonProperty.Access.WRITE_ONLY)
+ private RunInner runResult;
+
+ /**
+ * How the run should be forced to rerun even if the run request
+ * configuration has not changed.
+ */
+ @JsonProperty(value = "properties.forceUpdateTag")
+ private String forceUpdateTag;
+
+ /**
+ * 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 TaskRunInner object itself.
+ */
+ public TaskRunInner withIdentity(IdentityProperties identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the provisioning state of this task run. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'.
+ *
+ * @return the provisioningState value
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the request (parameters) for the run.
+ *
+ * @return the runRequest value
+ */
+ public RunRequest runRequest() {
+ return this.runRequest;
+ }
+
+ /**
+ * Set the request (parameters) for the run.
+ *
+ * @param runRequest the runRequest value to set
+ * @return the TaskRunInner object itself.
+ */
+ public TaskRunInner withRunRequest(RunRequest runRequest) {
+ this.runRequest = runRequest;
+ return this;
+ }
+
+ /**
+ * Get the result of this task run.
+ *
+ * @return the runResult value
+ */
+ public RunInner runResult() {
+ return this.runResult;
+ }
+
+ /**
+ * 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 TaskRunInner object itself.
+ */
+ public TaskRunInner withForceUpdateTag(String forceUpdateTag) {
+ this.forceUpdateTag = forceUpdateTag;
+ 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/TaskRunsImpl.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/TaskRunsImpl.java
new file mode 100644
index 000000000000..25c8d164656f
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/TaskRunsImpl.java
@@ -0,0 +1,85 @@
+/**
+ * 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.TaskRuns;
+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.TaskRun;
+
+class TaskRunsImpl extends WrapperImpl implements TaskRuns {
+ private final ContainerRegistryManager manager;
+
+ TaskRunsImpl(ContainerRegistryManager manager) {
+ super(manager.inner().taskRuns());
+ this.manager = manager;
+ }
+
+ public ContainerRegistryManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public TaskRunImpl define(String name) {
+ return wrapModel(name);
+ }
+
+ private TaskRunImpl wrapModel(TaskRunInner inner) {
+ return new TaskRunImpl(inner, manager());
+ }
+
+ private TaskRunImpl wrapModel(String name) {
+ return new TaskRunImpl(name, this.manager());
+ }
+
+ @Override
+ public Observable listAsync(final String resourceGroupName, final String registryName) {
+ TaskRunsInner 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 TaskRun call(TaskRunInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String registryName, String taskRunName) {
+ TaskRunsInner client = this.inner();
+ return client.getAsync(resourceGroupName, registryName, taskRunName)
+ .flatMap(new Func1>() {
+ @Override
+ public Observable call(TaskRunInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((TaskRun)wrapModel(inner));
+ }
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAsync(String resourceGroupName, String registryName, String taskRunName) {
+ TaskRunsInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, registryName, taskRunName).toCompletable();
+ }
+
+}
diff --git a/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/TaskRunsInner.java b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/TaskRunsInner.java
new file mode 100644
index 000000000000..8c521a3573cb
--- /dev/null
+++ b/sdk/containerregistry/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2019_06_01_preview/implementation/TaskRunsInner.java
@@ -0,0 +1,972 @@
+/**
+ * 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.ErrorSchemaException;
+import com.microsoft.azure.management.containerregistry.v2019_06_01_preview.TaskRunUpdateParameters;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.PagedList;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import com.microsoft.rest.Validator;
+import java.io.IOException;
+import java.util.List;
+import okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.HTTP;
+import retrofit2.http.PATCH;
+import retrofit2.http.Path;
+import retrofit2.http.PUT;
+import retrofit2.http.Query;
+import retrofit2.http.Url;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in TaskRuns.
+ */
+public class TaskRunsInner {
+ /** The Retrofit service to perform REST calls. */
+ private TaskRunsService service;
+ /** The service client containing this operation class. */
+ private ContainerRegistryManagementClientImpl client;
+
+ /**
+ * Initializes an instance of TaskRunsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public TaskRunsInner(Retrofit retrofit, ContainerRegistryManagementClientImpl client) {
+ this.service = retrofit.create(TaskRunsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for TaskRuns to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface TaskRunsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerregistry.v2019_06_01_preview.TaskRuns get" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}")
+ Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("taskRunName") String taskRunName, @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.TaskRuns create" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}")
+ Observable> create(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("taskRunName") String taskRunName, @Query("api-version") String apiVersion, @Body TaskRunInner taskRun, @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.TaskRuns beginCreate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}")
+ Observable> beginCreate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("taskRunName") String taskRunName, @Query("api-version") String apiVersion, @Body TaskRunInner taskRun, @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.TaskRuns delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("taskRunName") String taskRunName, @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.TaskRuns beginDelete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}", method = "DELETE", hasBody = true)
+ Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("taskRunName") String taskRunName, @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.TaskRuns update" })
+ @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}")
+ Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("taskRunName") String taskRunName, @Query("api-version") String apiVersion, @Body TaskRunUpdateParameters 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.TaskRuns beginUpdate" })
+ @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}")
+ Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("registryName") String registryName, @Path("taskRunName") String taskRunName, @Query("api-version") String apiVersion, @Body TaskRunUpdateParameters 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.TaskRuns list" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns")
+ 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.TaskRuns listNext" })
+ @GET
+ Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * 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
+ * @throws ErrorSchemaException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the TaskRunInner object if successful.
+ */
+ public TaskRunInner get(String resourceGroupName, String registryName, String taskRunName) {
+ return getWithServiceResponseAsync(resourceGroupName, registryName, taskRunName).toBlocking().single().body();
+ }
+
+ /**
+ * 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.
+ * @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 taskRunName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, registryName, taskRunName), serviceCallback);
+ }
+
+ /**
+ * 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 to the TaskRunInner object
+ */
+ public Observable getAsync(String resourceGroupName, String registryName, String taskRunName) {
+ return getWithServiceResponseAsync(resourceGroupName, registryName, taskRunName).map(new Func1, TaskRunInner>() {
+ @Override
+ public TaskRunInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * 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 to the TaskRunInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String registryName, String taskRunName) {
+ 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 (taskRunName == null) {
+ throw new IllegalArgumentException("Parameter taskRunName 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, taskRunName, 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 ErrorSchemaException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorSchemaException.class)
+ .build(response);
+ }
+
+ /**
+ * Creates a task run 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 taskRunName The name of task run.
+ * @param taskRun The parameters of a run that needs to scheduled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorSchemaException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the TaskRunInner object if successful.
+ */
+ public TaskRunInner create(String resourceGroupName, String registryName, String taskRunName, TaskRunInner taskRun) {
+ return createWithServiceResponseAsync(resourceGroupName, registryName, taskRunName, taskRun).toBlocking().last().body();
+ }
+
+ /**
+ * Creates a task run 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 taskRunName The name of task run.
+ * @param taskRun The parameters of a run 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 taskRunName, TaskRunInner taskRun, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, registryName, taskRunName, taskRun), serviceCallback);
+ }
+
+ /**
+ * Creates a task run 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 taskRunName The name of task run.
+ * @param taskRun The parameters of a run 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 taskRunName, TaskRunInner taskRun) {
+ return createWithServiceResponseAsync(resourceGroupName, registryName, taskRunName, taskRun).map(new Func1, TaskRunInner>() {
+ @Override
+ public TaskRunInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Creates a task run 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 taskRunName The name of task run.
+ * @param taskRun The parameters of a run 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 taskRunName, TaskRunInner taskRun) {
+ 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 (taskRunName == null) {
+ throw new IllegalArgumentException("Parameter taskRunName 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 (taskRun == null) {
+ throw new IllegalArgumentException("Parameter taskRun is required and cannot be null.");
+ }
+ Validator.validate(taskRun);
+ Observable> observable = service.create(this.client.subscriptionId(), resourceGroupName, registryName, taskRunName, this.client.apiVersion(), taskRun, this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Creates a task run 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 taskRunName The name of task run.
+ * @param taskRun The parameters of a run that needs to scheduled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorSchemaException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the TaskRunInner object if successful.
+ */
+ public TaskRunInner beginCreate(String resourceGroupName, String registryName, String taskRunName, TaskRunInner taskRun) {
+ return beginCreateWithServiceResponseAsync(resourceGroupName, registryName, taskRunName, taskRun).toBlocking().single().body();
+ }
+
+ /**
+ * Creates a task run 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 taskRunName The name of task run.
+ * @param taskRun The parameters of a run 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 taskRunName, TaskRunInner taskRun, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, registryName, taskRunName, taskRun), serviceCallback);
+ }
+
+ /**
+ * Creates a task run 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 taskRunName The name of task run.
+ * @param taskRun The parameters of a run that needs to scheduled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the TaskRunInner object
+ */
+ public Observable beginCreateAsync(String resourceGroupName, String registryName, String taskRunName, TaskRunInner taskRun) {
+ return beginCreateWithServiceResponseAsync(resourceGroupName, registryName, taskRunName, taskRun).map(new Func1, TaskRunInner>() {
+ @Override
+ public TaskRunInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Creates a task run 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 taskRunName The name of task run.
+ * @param taskRun The parameters of a run that needs to scheduled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the TaskRunInner object
+ */
+ public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String registryName, String taskRunName, TaskRunInner taskRun) {
+ 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 (taskRunName == null) {
+ throw new IllegalArgumentException("Parameter taskRunName 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 (taskRun == null) {
+ throw new IllegalArgumentException("Parameter taskRun is required and cannot be null.");
+ }
+ Validator.validate(taskRun);
+ return service.beginCreate(this.client.subscriptionId(), resourceGroupName, registryName, taskRunName, this.client.apiVersion(), taskRun, 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 ErrorSchemaException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(201, new TypeToken() { }.getType())
+ .registerError(ErrorSchemaException.class)
+ .build(response);
+ }
+
+ /**
+ * 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
+ * @throws ErrorSchemaException 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 taskRunName) {
+ deleteWithServiceResponseAsync(resourceGroupName, registryName, taskRunName).toBlocking().last().body();
+ }
+
+ /**
+ * 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.
+ * @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 taskRunName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, registryName, taskRunName), serviceCallback);
+ }
+
+ /**
+ * 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
+ */
+ public Observable deleteAsync(String resourceGroupName, String registryName, String taskRunName) {
+ return deleteWithServiceResponseAsync(resourceGroupName, registryName, taskRunName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * 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
+ */
+ public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String registryName, String taskRunName) {
+ 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 (taskRunName == null) {
+ throw new IllegalArgumentException("Parameter taskRunName 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, taskRunName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * 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
+ * @throws ErrorSchemaException 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 taskRunName) {
+ beginDeleteWithServiceResponseAsync(resourceGroupName, registryName, taskRunName).toBlocking().single().body();
+ }
+
+ /**
+ * 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.
+ * @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 taskRunName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, registryName, taskRunName), serviceCallback);
+ }
+
+ /**
+ * 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 {@link ServiceResponse} object if successful.
+ */
+ public Observable beginDeleteAsync(String resourceGroupName, String registryName, String taskRunName) {
+ return beginDeleteWithServiceResponseAsync(resourceGroupName, registryName, taskRunName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * 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 {@link ServiceResponse} object if successful.
+ */
+ public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String registryName, String taskRunName) {
+ 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 (taskRunName == null) {
+ throw new IllegalArgumentException("Parameter taskRunName 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, taskRunName, 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 ErrorSchemaException, 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(ErrorSchemaException.class)
+ .build(response);
+ }
+
+ /**
+ * Updates a task run 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 taskRunName The task run name.
+ * @param updateParameters The parameters for updating a task run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorSchemaException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the TaskRunInner object if successful.
+ */
+ public TaskRunInner update(String resourceGroupName, String registryName, String taskRunName, TaskRunUpdateParameters updateParameters) {
+ return updateWithServiceResponseAsync(resourceGroupName, registryName, taskRunName, updateParameters).toBlocking().last().body();
+ }
+
+ /**
+ * Updates a task run 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 taskRunName The task run name.
+ * @param updateParameters The parameters for updating a task run.
+ * @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 taskRunName, TaskRunUpdateParameters updateParameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, registryName, taskRunName, updateParameters), serviceCallback);
+ }
+
+ /**
+ * Updates a task run 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 taskRunName The task run name.
+ * @param updateParameters The parameters for updating a task run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable updateAsync(String resourceGroupName, String registryName, String taskRunName, TaskRunUpdateParameters updateParameters) {
+ return updateWithServiceResponseAsync(resourceGroupName, registryName, taskRunName, updateParameters).map(new Func1, TaskRunInner>() {
+ @Override
+ public TaskRunInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Updates a task run 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 taskRunName The task run name.
+ * @param updateParameters The parameters for updating a task run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> updateWithServiceResponseAsync(String resourceGroupName, String registryName, String taskRunName, TaskRunUpdateParameters 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 (taskRunName == null) {
+ throw new IllegalArgumentException("Parameter taskRunName 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, taskRunName, this.client.apiVersion(), updateParameters, this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Updates a task run 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 taskRunName The task run name.
+ * @param updateParameters The parameters for updating a task run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorSchemaException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the TaskRunInner object if successful.
+ */
+ public TaskRunInner beginUpdate(String resourceGroupName, String registryName, String taskRunName, TaskRunUpdateParameters updateParameters) {
+ return beginUpdateWithServiceResponseAsync(resourceGroupName, registryName, taskRunName, updateParameters).toBlocking().single().body();
+ }
+
+ /**
+ * Updates a task run 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 taskRunName The task run name.
+ * @param updateParameters The parameters for updating a task run.
+ * @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 taskRunName, TaskRunUpdateParameters updateParameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, registryName, taskRunName, updateParameters), serviceCallback);
+ }
+
+ /**
+ * Updates a task run 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 taskRunName The task run name.
+ * @param updateParameters The parameters for updating a task run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the TaskRunInner object
+ */
+ public Observable beginUpdateAsync(String resourceGroupName, String registryName, String taskRunName, TaskRunUpdateParameters updateParameters) {
+ return beginUpdateWithServiceResponseAsync(resourceGroupName, registryName, taskRunName, updateParameters).map(new Func1, TaskRunInner>() {
+ @Override
+ public TaskRunInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Updates a task run 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 taskRunName The task run name.
+ * @param updateParameters The parameters for updating a task run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the TaskRunInner object
+ */
+ public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String registryName, String taskRunName, TaskRunUpdateParameters 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 (taskRunName == null) {
+ throw new IllegalArgumentException("Parameter taskRunName 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, taskRunName, 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 ErrorSchemaException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(201, new TypeToken() { }.getType())
+ .registerError(ErrorSchemaException.class)
+ .build(response);
+ }
+
+ /**
+ * 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
+ * @throws ErrorSchemaException 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<TaskRunInner> 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 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.
+ * @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 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 to the PagedList<TaskRunInner> 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 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 to the PagedList<TaskRunInner> 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 task runs 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<TaskRunInner> 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 ErrorSchemaException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().