diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ActivityPolicy.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ActivityPolicy.java index bd06b45c7795..71b74ab176eb 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ActivityPolicy.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ActivityPolicy.java @@ -42,6 +42,13 @@ public class ActivityPolicy { @JsonProperty(value = "retryIntervalInSeconds") private Integer retryIntervalInSeconds; + /** + * When set to true, input from activity is considered as secure and will + * not be logged to monitoring. + */ + @JsonProperty(value = "secureInput") + private Boolean secureInput; + /** * When set to true, Output from activity is considered as secure and will * not be logged to monitoring. @@ -129,6 +136,26 @@ public ActivityPolicy withRetryIntervalInSeconds(Integer retryIntervalInSeconds) return this; } + /** + * Get when set to true, input from activity is considered as secure and will not be logged to monitoring. + * + * @return the secureInput value + */ + public Boolean secureInput() { + return this.secureInput; + } + + /** + * Set when set to true, input from activity is considered as secure and will not be logged to monitoring. + * + * @param secureInput the secureInput value to set + * @return the ActivityPolicy object itself. + */ + public ActivityPolicy withSecureInput(Boolean secureInput) { + this.secureInput = secureInput; + return this; + } + /** * Get when set to true, Output from activity is considered as secure and will not be logged to monitoring. * diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/AppendVaraibleActivity.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/AppendVaraibleActivity.java new file mode 100644 index 000000000000..52e85e224c28 --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/AppendVaraibleActivity.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datafactoryv2.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Append value to a array Variable. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("AppendVaraible") +@JsonFlatten +public class AppendVaraibleActivity extends ControlActivity { + /** + * Name of the variable to which value needs to be appended. + */ + @JsonProperty(value = "typeProperties.name", required = true) + private String appendVaraibleActivityName; + + /** + * Value to be appended. Could be a static value or Expression. + */ + @JsonProperty(value = "typeProperties.value", required = true) + private Object value; + + /** + * Get name of the variable to which value needs to be appended. + * + * @return the appendVaraibleActivityName value + */ + public String appendVaraibleActivityName() { + return this.appendVaraibleActivityName; + } + + /** + * Set name of the variable to which value needs to be appended. + * + * @param appendVaraibleActivityName the appendVaraibleActivityName value to set + * @return the AppendVaraibleActivity object itself. + */ + public AppendVaraibleActivity withAppendVaraibleActivityName(String appendVaraibleActivityName) { + this.appendVaraibleActivityName = appendVaraibleActivityName; + return this; + } + + /** + * Get value to be appended. Could be a static value or Expression. + * + * @return the value value + */ + public Object value() { + return this.value; + } + + /** + * Set value to be appended. Could be a static value or Expression. + * + * @param value the value value to set + * @return the AppendVaraibleActivity object itself. + */ + public AppendVaraibleActivity withValue(Object value) { + this.value = value; + return this; + } + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/AppendVariableActivity.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/AppendVariableActivity.java new file mode 100644 index 000000000000..e47c6c30041c --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/AppendVariableActivity.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datafactoryv2.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Append value to a array Variable. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("AppendVariable") +@JsonFlatten +public class AppendVariableActivity extends ControlActivity { + /** + * Name of the variable to which value needs to be appended. + */ + @JsonProperty(value = "typeProperties.name", required = true) + private String appendVariableActivityName; + + /** + * Value to be appended. Could be a static value or Expression. + */ + @JsonProperty(value = "typeProperties.value", required = true) + private Object value; + + /** + * Get name of the variable to which value needs to be appended. + * + * @return the appendVariableActivityName value + */ + public String appendVariableActivityName() { + return this.appendVariableActivityName; + } + + /** + * Set name of the variable to which value needs to be appended. + * + * @param appendVariableActivityName the appendVariableActivityName value to set + * @return the AppendVariableActivity object itself. + */ + public AppendVariableActivity withAppendVariableActivityName(String appendVariableActivityName) { + this.appendVariableActivityName = appendVariableActivityName; + return this; + } + + /** + * Get value to be appended. Could be a static value or Expression. + * + * @return the value value + */ + public Object value() { + return this.value; + } + + /** + * Set value to be appended. Could be a static value or Expression. + * + * @param value the value value to set + * @return the AppendVariableActivity object itself. + */ + public AppendVariableActivity withValue(Object value) { + this.value = value; + return this; + } + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/AzureDatabricksLinkedService.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/AzureDatabricksLinkedService.java index 5b0fc8cb1bb9..0b0d14116d32 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/AzureDatabricksLinkedService.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/AzureDatabricksLinkedService.java @@ -68,11 +68,18 @@ public class AzureDatabricksLinkedService extends LinkedServiceInner { private Object newClusterNodeType; /** - * a set of optional, user-specified Spark configuration key-value pairs. + * A set of optional, user-specified Spark configuration key-value pairs. */ @JsonProperty(value = "typeProperties.newClusterSparkConf") private Map newClusterSparkConf; + /** + * A set of optional, user-specified Spark environment variables key-value + * pairs. + */ + @JsonProperty(value = "typeProperties.newClusterSparkEnvVars") + private Map newClusterSparkEnvVars; + /** * Additional tags for cluster resources. */ @@ -227,6 +234,26 @@ public AzureDatabricksLinkedService withNewClusterSparkConf(Map return this; } + /** + * Get a set of optional, user-specified Spark environment variables key-value pairs. + * + * @return the newClusterSparkEnvVars value + */ + public Map newClusterSparkEnvVars() { + return this.newClusterSparkEnvVars; + } + + /** + * Set a set of optional, user-specified Spark environment variables key-value pairs. + * + * @param newClusterSparkEnvVars the newClusterSparkEnvVars value to set + * @return the AzureDatabricksLinkedService object itself. + */ + public AzureDatabricksLinkedService withNewClusterSparkEnvVars(Map newClusterSparkEnvVars) { + this.newClusterSparkEnvVars = newClusterSparkEnvVars; + return this; + } + /** * Get additional tags for cluster resources. * diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ControlActivity.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ControlActivity.java index 632dbf967a28..7eaddec8aea2 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ControlActivity.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ControlActivity.java @@ -18,6 +18,8 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("Container") @JsonSubTypes({ + @JsonSubTypes.Type(name = "AppendVariable", value = AppendVariableActivity.class), + @JsonSubTypes.Type(name = "SetVariable", value = SetVariableActivity.class), @JsonSubTypes.Type(name = "Filter", value = FilterActivity.class), @JsonSubTypes.Type(name = "Until", value = UntilActivity.class), @JsonSubTypes.Type(name = "Wait", value = WaitActivity.class), diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/Factories.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/Factories.java index d229a116e6a7..0cc2c74ea0f6 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/Factories.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/Factories.java @@ -22,6 +22,17 @@ * Type representing Factories. */ public interface Factories extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Get GitHub Access Token. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param gitHubAccessTokenRequest Get GitHub access token request definition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getGitHubAccessTokenAsync(String resourceGroupName, String factoryName, GitHubAccessTokenRequest gitHubAccessTokenRequest); + /** * Updates a factory's repo information. * diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/GitHubAccessTokenRequest.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/GitHubAccessTokenRequest.java new file mode 100644 index 000000000000..d442ad80f224 --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/GitHubAccessTokenRequest.java @@ -0,0 +1,95 @@ +/** + * 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.datafactoryv2.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Get GitHub access token request definition. + */ +public class GitHubAccessTokenRequest { + /** + * GitHub access code. + */ + @JsonProperty(value = "gitHubAccessCode", required = true) + private String gitHubAccessCode; + + /** + * GitHub application client ID. + */ + @JsonProperty(value = "gitHubClientId") + private String gitHubClientId; + + /** + * GitHub access token base URL. + */ + @JsonProperty(value = "gitHubAccessTokenBaseUrl", required = true) + private String gitHubAccessTokenBaseUrl; + + /** + * Get gitHub access code. + * + * @return the gitHubAccessCode value + */ + public String gitHubAccessCode() { + return this.gitHubAccessCode; + } + + /** + * Set gitHub access code. + * + * @param gitHubAccessCode the gitHubAccessCode value to set + * @return the GitHubAccessTokenRequest object itself. + */ + public GitHubAccessTokenRequest withGitHubAccessCode(String gitHubAccessCode) { + this.gitHubAccessCode = gitHubAccessCode; + return this; + } + + /** + * Get gitHub application client ID. + * + * @return the gitHubClientId value + */ + public String gitHubClientId() { + return this.gitHubClientId; + } + + /** + * Set gitHub application client ID. + * + * @param gitHubClientId the gitHubClientId value to set + * @return the GitHubAccessTokenRequest object itself. + */ + public GitHubAccessTokenRequest withGitHubClientId(String gitHubClientId) { + this.gitHubClientId = gitHubClientId; + return this; + } + + /** + * Get gitHub access token base URL. + * + * @return the gitHubAccessTokenBaseUrl value + */ + public String gitHubAccessTokenBaseUrl() { + return this.gitHubAccessTokenBaseUrl; + } + + /** + * Set gitHub access token base URL. + * + * @param gitHubAccessTokenBaseUrl the gitHubAccessTokenBaseUrl value to set + * @return the GitHubAccessTokenRequest object itself. + */ + public GitHubAccessTokenRequest withGitHubAccessTokenBaseUrl(String gitHubAccessTokenBaseUrl) { + this.gitHubAccessTokenBaseUrl = gitHubAccessTokenBaseUrl; + return this; + } + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/GitHubAccessTokenResponse.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/GitHubAccessTokenResponse.java new file mode 100644 index 000000000000..142ce29dc59b --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/GitHubAccessTokenResponse.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datafactoryv2.v2018_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.implementation.DataFactoryManager; +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.implementation.GitHubAccessTokenResponseInner; + +/** + * Type representing GitHubAccessTokenResponse. + */ +public interface GitHubAccessTokenResponse extends HasInner, HasManager { + /** + * @return the gitHubAccessToken value. + */ + String gitHubAccessToken(); + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/PipelineResource.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/PipelineResource.java index b4c84e88dc7d..8a8142e36cc4 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/PipelineResource.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/PipelineResource.java @@ -79,6 +79,11 @@ public interface PipelineResource extends HasInner, Index */ String type(); + /** + * @return the variables value. + */ + Map variables(); + /** * The entirety of the PipelineResource definition. */ @@ -175,18 +180,28 @@ interface WithParameters { WithCreate withParameters(Map parameters); } + /** + * The stage of the pipelineresource definition allowing to specify Variables. + */ + interface WithVariables { + /** + * Specifies variables. + */ + WithCreate withVariables(Map variables); + } + /** * 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.WithActivities, DefinitionStages.WithAdditionalProperties, DefinitionStages.WithAnnotations, DefinitionStages.WithConcurrency, DefinitionStages.WithDescription, DefinitionStages.WithFolder, DefinitionStages.WithParameters { + interface WithCreate extends Creatable, DefinitionStages.WithActivities, DefinitionStages.WithAdditionalProperties, DefinitionStages.WithAnnotations, DefinitionStages.WithConcurrency, DefinitionStages.WithDescription, DefinitionStages.WithFolder, DefinitionStages.WithParameters, DefinitionStages.WithVariables { } } /** * The template for a PipelineResource update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, UpdateStages.WithActivities, UpdateStages.WithAdditionalProperties, UpdateStages.WithAnnotations, UpdateStages.WithConcurrency, UpdateStages.WithDescription, UpdateStages.WithFolder, UpdateStages.WithParameters { + interface Update extends Appliable, UpdateStages.WithActivities, UpdateStages.WithAdditionalProperties, UpdateStages.WithAnnotations, UpdateStages.WithConcurrency, UpdateStages.WithDescription, UpdateStages.WithFolder, UpdateStages.WithParameters, UpdateStages.WithVariables { } /** @@ -263,5 +278,15 @@ interface WithParameters { Update withParameters(Map parameters); } + /** + * The stage of the pipelineresource update allowing to specify Variables. + */ + interface WithVariables { + /** + * Specifies variables. + */ + Update withVariables(Map variables); + } + } } diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SetVaraibleActivity.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SetVaraibleActivity.java new file mode 100644 index 000000000000..7ca7b32cf377 --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SetVaraibleActivity.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datafactoryv2.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Set value for a Variable. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("SetVaraible") +@JsonFlatten +public class SetVaraibleActivity extends ControlActivity { + /** + * Name of the variable whose value needs to be set. + */ + @JsonProperty(value = "typeProperties.name", required = true) + private String setVaraibleActivityName; + + /** + * Value to be set. Could be a static value or Expression. + */ + @JsonProperty(value = "typeProperties.value", required = true) + private Object value; + + /** + * Get name of the variable whose value needs to be set. + * + * @return the setVaraibleActivityName value + */ + public String setVaraibleActivityName() { + return this.setVaraibleActivityName; + } + + /** + * Set name of the variable whose value needs to be set. + * + * @param setVaraibleActivityName the setVaraibleActivityName value to set + * @return the SetVaraibleActivity object itself. + */ + public SetVaraibleActivity withSetVaraibleActivityName(String setVaraibleActivityName) { + this.setVaraibleActivityName = setVaraibleActivityName; + return this; + } + + /** + * Get value to be set. Could be a static value or Expression. + * + * @return the value value + */ + public Object value() { + return this.value; + } + + /** + * Set value to be set. Could be a static value or Expression. + * + * @param value the value value to set + * @return the SetVaraibleActivity object itself. + */ + public SetVaraibleActivity withValue(Object value) { + this.value = value; + return this; + } + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SetVariableActivity.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SetVariableActivity.java new file mode 100644 index 000000000000..5ee8b8e0150e --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SetVariableActivity.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datafactoryv2.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Set value for a Variable. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("SetVariable") +@JsonFlatten +public class SetVariableActivity extends ControlActivity { + /** + * Name of the variable whose value needs to be set. + */ + @JsonProperty(value = "typeProperties.name", required = true) + private String setVariableActivityName; + + /** + * Value to be set. Could be a static value or Expression. + */ + @JsonProperty(value = "typeProperties.value", required = true) + private Object value; + + /** + * Get name of the variable whose value needs to be set. + * + * @return the setVariableActivityName value + */ + public String setVariableActivityName() { + return this.setVariableActivityName; + } + + /** + * Set name of the variable whose value needs to be set. + * + * @param setVariableActivityName the setVariableActivityName value to set + * @return the SetVariableActivity object itself. + */ + public SetVariableActivity withSetVariableActivityName(String setVariableActivityName) { + this.setVariableActivityName = setVariableActivityName; + return this; + } + + /** + * Get value to be set. Could be a static value or Expression. + * + * @return the value value + */ + public Object value() { + return this.value; + } + + /** + * Set value to be set. Could be a static value or Expression. + * + * @param value the value value to set + * @return the SetVariableActivity object itself. + */ + public SetVariableActivity withValue(Object value) { + this.value = value; + return this; + } + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/VariableSpecification.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/VariableSpecification.java new file mode 100644 index 000000000000..42f2ce0143f4 --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/VariableSpecification.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.datafactoryv2.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Definition of a single variable for an pipeline. + */ +public class VariableSpecification { + /** + * Variable type. Possible values include: 'String', 'Bool', 'Array'. + */ + @JsonProperty(value = "type", required = true) + private VariableType type; + + /** + * Default value of variable. + */ + @JsonProperty(value = "defaultValue") + private Object defaultValue; + + /** + * Get variable type. Possible values include: 'String', 'Bool', 'Array'. + * + * @return the type value + */ + public VariableType type() { + return this.type; + } + + /** + * Set variable type. Possible values include: 'String', 'Bool', 'Array'. + * + * @param type the type value to set + * @return the VariableSpecification object itself. + */ + public VariableSpecification withType(VariableType type) { + this.type = type; + return this; + } + + /** + * Get default value of variable. + * + * @return the defaultValue value + */ + public Object defaultValue() { + return this.defaultValue; + } + + /** + * Set default value of variable. + * + * @param defaultValue the defaultValue value to set + * @return the VariableSpecification object itself. + */ + public VariableSpecification withDefaultValue(Object defaultValue) { + this.defaultValue = defaultValue; + return this; + } + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/VariableType.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/VariableType.java new file mode 100644 index 000000000000..4f51d0909910 --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/VariableType.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.datafactoryv2.v2018_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VariableType. + */ +public final class VariableType extends ExpandableStringEnum { + /** Static value String for VariableType. */ + public static final VariableType STRING = fromString("String"); + + /** Static value Bool for VariableType. */ + public static final VariableType BOOL = fromString("Bool"); + + /** Static value Array for VariableType. */ + public static final VariableType ARRAY = fromString("Array"); + + /** + * Creates or finds a VariableType from its string representation. + * @param name a name to look for + * @return the corresponding VariableType + */ + @JsonCreator + public static VariableType fromString(String name) { + return fromString(name, VariableType.class); + } + + /** + * @return known VariableType values + */ + public static Collection values() { + return values(VariableType.class); + } +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/FactoriesImpl.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/FactoriesImpl.java index 263acffb447e..505504c54fa3 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/FactoriesImpl.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/FactoriesImpl.java @@ -22,6 +22,8 @@ import rx.functions.Func1; import com.microsoft.azure.PagedList; import com.microsoft.azure.Page; +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.GitHubAccessTokenResponse; +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.GitHubAccessTokenRequest; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.FactoryRepoUpdate; class FactoriesImpl extends GroupableResourcesCoreImpl implements Factories { @@ -126,6 +128,18 @@ public FactoryImpl define(String name) { return wrapModel(name); } + @Override + public Observable getGitHubAccessTokenAsync(String resourceGroupName, String factoryName, GitHubAccessTokenRequest gitHubAccessTokenRequest) { + FactoriesInner client = this.inner(); + return client.getGitHubAccessTokenAsync(resourceGroupName, factoryName, gitHubAccessTokenRequest) + .map(new Func1() { + @Override + public GitHubAccessTokenResponse call(GitHubAccessTokenResponseInner inner) { + return new GitHubAccessTokenResponseImpl(inner, manager()); + } + }); + } + @Override protected FactoryImpl wrapModel(FactoryInner inner) { return new FactoryImpl(inner.name(), inner, manager()); diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/FactoriesInner.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/FactoriesInner.java index 549b3a6889a7..08b35850ab9a 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/FactoriesInner.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/FactoriesInner.java @@ -18,6 +18,7 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.FactoryRepoUpdate; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.FactoryUpdateParameters; +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.GitHubAccessTokenRequest; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -96,6 +97,10 @@ interface FactoriesService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}", method = "DELETE", hasBody = true) Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @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.datafactoryv2.v2018_06_01.Factories getGitHubAccessToken" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getGitHubAccessToken") + Observable> getGitHubAccessToken(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Query("api-version") String apiVersion, @Body GitHubAccessTokenRequest gitHubAccessTokenRequest, @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.datafactoryv2.v2018_06_01.Factories listNext" }) @GET Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -952,6 +957,100 @@ private ServiceResponse deleteDelegate(Response response) th .build(response); } + /** + * Get GitHub Access Token. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param gitHubAccessTokenRequest Get GitHub access token request definition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GitHubAccessTokenResponseInner object if successful. + */ + public GitHubAccessTokenResponseInner getGitHubAccessToken(String resourceGroupName, String factoryName, GitHubAccessTokenRequest gitHubAccessTokenRequest) { + return getGitHubAccessTokenWithServiceResponseAsync(resourceGroupName, factoryName, gitHubAccessTokenRequest).toBlocking().single().body(); + } + + /** + * Get GitHub Access Token. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param gitHubAccessTokenRequest Get GitHub access token request definition. + * @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 getGitHubAccessTokenAsync(String resourceGroupName, String factoryName, GitHubAccessTokenRequest gitHubAccessTokenRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getGitHubAccessTokenWithServiceResponseAsync(resourceGroupName, factoryName, gitHubAccessTokenRequest), serviceCallback); + } + + /** + * Get GitHub Access Token. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param gitHubAccessTokenRequest Get GitHub access token request definition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GitHubAccessTokenResponseInner object + */ + public Observable getGitHubAccessTokenAsync(String resourceGroupName, String factoryName, GitHubAccessTokenRequest gitHubAccessTokenRequest) { + return getGitHubAccessTokenWithServiceResponseAsync(resourceGroupName, factoryName, gitHubAccessTokenRequest).map(new Func1, GitHubAccessTokenResponseInner>() { + @Override + public GitHubAccessTokenResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get GitHub Access Token. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param gitHubAccessTokenRequest Get GitHub access token request definition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GitHubAccessTokenResponseInner object + */ + public Observable> getGitHubAccessTokenWithServiceResponseAsync(String resourceGroupName, String factoryName, GitHubAccessTokenRequest gitHubAccessTokenRequest) { + 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 (factoryName == null) { + throw new IllegalArgumentException("Parameter factoryName 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 (gitHubAccessTokenRequest == null) { + throw new IllegalArgumentException("Parameter gitHubAccessTokenRequest is required and cannot be null."); + } + Validator.validate(gitHubAccessTokenRequest); + return service.getGitHubAccessToken(this.client.subscriptionId(), resourceGroupName, factoryName, this.client.apiVersion(), gitHubAccessTokenRequest, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getGitHubAccessTokenDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getGitHubAccessTokenDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Lists factories under the specified subscription. * diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/GitHubAccessTokenResponseImpl.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/GitHubAccessTokenResponseImpl.java new file mode 100644 index 000000000000..c88d5912e013 --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/GitHubAccessTokenResponseImpl.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datafactoryv2.v2018_06_01.implementation; + +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.GitHubAccessTokenResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class GitHubAccessTokenResponseImpl extends WrapperImpl implements GitHubAccessTokenResponse { + private final DataFactoryManager manager; + GitHubAccessTokenResponseImpl(GitHubAccessTokenResponseInner inner, DataFactoryManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataFactoryManager manager() { + return this.manager; + } + + @Override + public String gitHubAccessToken() { + return this.inner().gitHubAccessToken(); + } + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/GitHubAccessTokenResponseInner.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/GitHubAccessTokenResponseInner.java new file mode 100644 index 000000000000..c8fe13875fb6 --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/GitHubAccessTokenResponseInner.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.datafactoryv2.v2018_06_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Get GitHub access token response definition. + */ +public class GitHubAccessTokenResponseInner { + /** + * GitHub access token. + */ + @JsonProperty(value = "gitHubAccessToken") + private String gitHubAccessToken; + + /** + * Get gitHub access token. + * + * @return the gitHubAccessToken value + */ + public String gitHubAccessToken() { + return this.gitHubAccessToken; + } + + /** + * Set gitHub access token. + * + * @param gitHubAccessToken the gitHubAccessToken value to set + * @return the GitHubAccessTokenResponseInner object itself. + */ + public GitHubAccessTokenResponseInner withGitHubAccessToken(String gitHubAccessToken) { + this.gitHubAccessToken = gitHubAccessToken; + return this; + } + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/PipelineResourceImpl.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/PipelineResourceImpl.java index b473e0bfb650..aae74f690163 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/PipelineResourceImpl.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/PipelineResourceImpl.java @@ -15,6 +15,7 @@ import java.util.List; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.Activity; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.ParameterSpecification; +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.VariableSpecification; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.PipelineFolder; class PipelineResourceImpl extends CreatableUpdatableImpl implements PipelineResource, PipelineResource.Definition, PipelineResource.Update { @@ -129,6 +130,11 @@ public String type() { return this.inner().type(); } + @Override + public Map variables() { + return this.inner().variables(); + } + @Override public PipelineResourceImpl withExistingFactory(String resourceGroupName, String factoryName) { this.resourceGroupName = resourceGroupName; @@ -178,4 +184,10 @@ public PipelineResourceImpl withParameters(Map p return this; } + @Override + public PipelineResourceImpl withVariables(Map variables) { + this.inner().withVariables(variables); + return this; + } + } diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/PipelineResourceInner.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/PipelineResourceInner.java index 88e259325de9..87484ea181e5 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/PipelineResourceInner.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/PipelineResourceInner.java @@ -12,6 +12,7 @@ import java.util.List; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.Activity; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.ParameterSpecification; +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.VariableSpecification; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.PipelineFolder; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; @@ -46,6 +47,12 @@ public class PipelineResourceInner extends SubResource { @JsonProperty(value = "properties.parameters") private Map parameters; + /** + * List of variables for pipeline. + */ + @JsonProperty(value = "properties.variables") + private Map variables; + /** * The max number of concurrent runs for the pipeline. */ @@ -163,6 +170,26 @@ public PipelineResourceInner withParameters(Map return this; } + /** + * Get list of variables for pipeline. + * + * @return the variables value + */ + public Map variables() { + return this.variables; + } + + /** + * Set list of variables for pipeline. + * + * @param variables the variables value to set + * @return the PipelineResourceInner object itself. + */ + public PipelineResourceInner withVariables(Map variables) { + this.variables = variables; + return this; + } + /** * Get the max number of concurrent runs for the pipeline. * diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/PipelineRunsInner.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/PipelineRunsInner.java index a4fdf15c5d2c..1bccb1a0e8f1 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/PipelineRunsInner.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/PipelineRunsInner.java @@ -65,7 +65,7 @@ interface PipelineRunsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datafactoryv2.v2018_06_01.PipelineRuns cancel" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}/cancel") - Observable> cancel(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Path("runId") String runId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> cancel(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Path("runId") String runId, @Query("isRecursive") Boolean isRecursive, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } @@ -327,7 +327,97 @@ public Observable> cancelWithServiceResponseAsync(String r if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } - return service.cancel(this.client.subscriptionId(), resourceGroupName, factoryName, runId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final Boolean isRecursive = null; + return service.cancel(this.client.subscriptionId(), resourceGroupName, factoryName, runId, isRecursive, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = cancelDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Cancel a pipeline run by its run ID. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param runId The pipeline run identifier. + * @param isRecursive If true, cancel all the Child pipelines that are triggered by the current pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void cancel(String resourceGroupName, String factoryName, String runId, Boolean isRecursive) { + cancelWithServiceResponseAsync(resourceGroupName, factoryName, runId, isRecursive).toBlocking().single().body(); + } + + /** + * Cancel a pipeline run by its run ID. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param runId The pipeline run identifier. + * @param isRecursive If true, cancel all the Child pipelines that are triggered by the current pipeline. + * @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 cancelAsync(String resourceGroupName, String factoryName, String runId, Boolean isRecursive, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(cancelWithServiceResponseAsync(resourceGroupName, factoryName, runId, isRecursive), serviceCallback); + } + + /** + * Cancel a pipeline run by its run ID. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param runId The pipeline run identifier. + * @param isRecursive If true, cancel all the Child pipelines that are triggered by the current pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable cancelAsync(String resourceGroupName, String factoryName, String runId, Boolean isRecursive) { + return cancelWithServiceResponseAsync(resourceGroupName, factoryName, runId, isRecursive).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Cancel a pipeline run by its run ID. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param runId The pipeline run identifier. + * @param isRecursive If true, cancel all the Child pipelines that are triggered by the current pipeline. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> cancelWithServiceResponseAsync(String resourceGroupName, String factoryName, String runId, Boolean isRecursive) { + 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 (factoryName == null) { + throw new IllegalArgumentException("Parameter factoryName is required and cannot be null."); + } + if (runId == null) { + throw new IllegalArgumentException("Parameter runId 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.cancel(this.client.subscriptionId(), resourceGroupName, factoryName, runId, isRecursive, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) {