diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/Factories.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/Factories.java index df78b1e7841f..5becc5b4e75c 100644 --- a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/Factories.java +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/Factories.java @@ -23,6 +23,26 @@ * Type representing Factories. */ public interface Factories extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * List data factories which the given data factory has access. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listSharedFactoriesAsync(final String resourceGroupName, final String factoryName); + + /** + * List integration runtimes which the given data factory has access. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listSharedIntegrationRuntimesAsync(final String resourceGroupName, final String factoryName); + /** * Cancel a pipeline run by its run ID. * diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/IntegrationRuntimePermissionRequest.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/IntegrationRuntimePermissionRequest.java new file mode 100644 index 000000000000..fcfd11ee9afa --- /dev/null +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/IntegrationRuntimePermissionRequest.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.v2017_09_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Grant or revoke access to integration runtime request. + */ +public class IntegrationRuntimePermissionRequest { + /** + * The data factory name. + */ + @JsonProperty(value = "factoryName") + private String factoryName; + + /** + * The data factory identity. + */ + @JsonProperty(value = "factoryIdentity", required = true) + private String factoryIdentity; + + /** + * Get the data factory name. + * + * @return the factoryName value + */ + public String factoryName() { + return this.factoryName; + } + + /** + * Set the data factory name. + * + * @param factoryName the factoryName value to set + * @return the IntegrationRuntimePermissionRequest object itself. + */ + public IntegrationRuntimePermissionRequest withFactoryName(String factoryName) { + this.factoryName = factoryName; + return this; + } + + /** + * Get the data factory identity. + * + * @return the factoryIdentity value + */ + public String factoryIdentity() { + return this.factoryIdentity; + } + + /** + * Set the data factory identity. + * + * @param factoryIdentity the factoryIdentity value to set + * @return the IntegrationRuntimePermissionRequest object itself. + */ + public IntegrationRuntimePermissionRequest withFactoryIdentity(String factoryIdentity) { + this.factoryIdentity = factoryIdentity; + return this; + } + +} diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/IntegrationRuntimePermissionResponse.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/IntegrationRuntimePermissionResponse.java new file mode 100644 index 000000000000..41e7c00fba2b --- /dev/null +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/IntegrationRuntimePermissionResponse.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.v2017_09_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.implementation.DataFactoryManager; +import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.implementation.IntegrationRuntimePermissionResponseInner; + +/** + * Type representing IntegrationRuntimePermissionResponse. + */ +public interface IntegrationRuntimePermissionResponse extends HasInner, HasManager { + /** + * @return the sharedIntegrationRuntimeCount value. + */ + Integer sharedIntegrationRuntimeCount(); + +} diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/IntegrationRuntimeState.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/IntegrationRuntimeState.java index af46ece8bc38..dfca26b93a74 100644 --- a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/IntegrationRuntimeState.java +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/IntegrationRuntimeState.java @@ -43,6 +43,9 @@ public final class IntegrationRuntimeState extends ExpandableStringEnum additionalProperties; - /** * The data factory name which the integration runtime belong to. */ @@ -39,31 +32,11 @@ public class IntegrationRuntimeStatus { /** * The state of integration runtime. Possible values include: 'Initial', * 'Stopped', 'Started', 'Starting', 'Stopping', 'NeedRegistration', - * 'Online', 'Limited', 'Offline'. + * 'Online', 'Limited', 'Offline', 'AccessDenied'. */ @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private IntegrationRuntimeState state; - /** - * Get unmatched properties from the message are deserialized this collection. - * - * @return the additionalProperties value - */ - public Map additionalProperties() { - return this.additionalProperties; - } - - /** - * Set unmatched properties from the message are deserialized this collection. - * - * @param additionalProperties the additionalProperties value to set - * @return the IntegrationRuntimeStatus object itself. - */ - public IntegrationRuntimeStatus withAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - return this; - } - /** * Get the data factory name which the integration runtime belong to. * @@ -74,7 +47,7 @@ public String dataFactoryName() { } /** - * Get the state of integration runtime. Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline'. + * Get the state of integration runtime. Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied'. * * @return the state value */ diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/IntegrationRuntimes.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/IntegrationRuntimes.java index d9bf06517737..c2aa572e5e87 100644 --- a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/IntegrationRuntimes.java +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/IntegrationRuntimes.java @@ -129,6 +129,30 @@ public interface IntegrationRuntimes extends SupportsCreating addIdentityAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, IntegrationRuntimePermissionRequest integrationRuntimePermissionRequest); + + /** + * Revoke the integration runtime access from other data factory. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param integrationRuntimeName The integration runtime name. + * @param integrationRuntimePermissionRequest The data factory identity which will be revoked the access to given integration runtime. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable removeIdentityAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, IntegrationRuntimePermissionRequest integrationRuntimePermissionRequest); + /** * Gets an integration runtime. * diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/LinkedIntegrationRuntimeKey.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/LinkedIntegrationRuntimeKey.java index d98136591a7d..2022f615aab9 100644 --- a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/LinkedIntegrationRuntimeKey.java +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/LinkedIntegrationRuntimeKey.java @@ -13,19 +13,19 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** - * The base definition of a secret type. + * The key authorization type. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authorizationType") @JsonTypeName("Key") public class LinkedIntegrationRuntimeKey extends LinkedIntegrationRuntimeProperties { /** - * Type of the secret. + * The key used for authorization. */ @JsonProperty(value = "key", required = true) private SecureString key; /** - * Get type of the secret. + * Get the key used for authorization. * * @return the key value */ @@ -34,7 +34,7 @@ public SecureString key() { } /** - * Set type of the secret. + * Set the key used for authorization. * * @param key the key value to set * @return the LinkedIntegrationRuntimeKey object itself. diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/LinkedIntegrationRuntimeProperties.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/LinkedIntegrationRuntimeProperties.java index ed0539de332a..9702ea45c577 100644 --- a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/LinkedIntegrationRuntimeProperties.java +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/LinkedIntegrationRuntimeProperties.java @@ -13,7 +13,7 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; /** - * The base definition of a secret type. + * The base definition of a linked integration runtime properties. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authorizationType") @JsonTypeName("LinkedIntegrationRuntimeProperties") diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/LinkedIntegrationRuntimeRbac.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/LinkedIntegrationRuntimeRbac.java index b5f9e5157634..71db972743f6 100644 --- a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/LinkedIntegrationRuntimeRbac.java +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/LinkedIntegrationRuntimeRbac.java @@ -13,19 +13,19 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** - * The base definition of a secret type. + * The role based access control (RBAC) authorization type. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authorizationType") @JsonTypeName("RBAC") public class LinkedIntegrationRuntimeRbac extends LinkedIntegrationRuntimeProperties { /** - * The resource ID of the integration runtime to be shared. + * The resource identifier of the integration runtime to be shared. */ @JsonProperty(value = "resourceId", required = true) private String resourceId; /** - * Get the resource ID of the integration runtime to be shared. + * Get the resource identifier of the integration runtime to be shared. * * @return the resourceId value */ @@ -34,7 +34,7 @@ public String resourceId() { } /** - * Set the resource ID of the integration runtime to be shared. + * Set the resource identifier of the integration runtime to be shared. * * @param resourceId the resourceId value to set * @return the LinkedIntegrationRuntimeRbac object itself. diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/ManagedIntegrationRuntime.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/ManagedIntegrationRuntime.java index 20767f992693..967f2b5701c1 100644 --- a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/ManagedIntegrationRuntime.java +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/ManagedIntegrationRuntime.java @@ -26,7 +26,7 @@ public class ManagedIntegrationRuntime extends IntegrationRuntimeInner { * Integration runtime state, only valid for managed dedicated integration * runtime. Possible values include: 'Initial', 'Stopped', 'Started', * 'Starting', 'Stopping', 'NeedRegistration', 'Online', 'Limited', - * 'Offline'. + * 'Offline', 'AccessDenied'. */ @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private IntegrationRuntimeState state; @@ -44,7 +44,7 @@ public class ManagedIntegrationRuntime extends IntegrationRuntimeInner { private IntegrationRuntimeSsisProperties ssisProperties; /** - * Get integration runtime state, only valid for managed dedicated integration runtime. Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline'. + * Get integration runtime state, only valid for managed dedicated integration runtime. Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied'. * * @return the state value */ diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/ManagedIntegrationRuntimeStatus.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/ManagedIntegrationRuntimeStatus.java index c4781587e4be..3fa07fcbcf8e 100644 --- a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/ManagedIntegrationRuntimeStatus.java +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/ManagedIntegrationRuntimeStatus.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview; +import java.util.Map; import org.joda.time.DateTime; import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; @@ -22,6 +23,12 @@ @JsonTypeName("Managed") @JsonFlatten public class ManagedIntegrationRuntimeStatus extends IntegrationRuntimeStatus { + /** + * Unmatched properties from the message are deserialized this collection. + */ + @JsonProperty(value = "typeProperties.") + private Map additionalProperties; + /** * The time at which the integration runtime was created, in ISO8601 * format. @@ -47,6 +54,26 @@ public class ManagedIntegrationRuntimeStatus extends IntegrationRuntimeStatus { @JsonProperty(value = "typeProperties.lastOperation", access = JsonProperty.Access.WRITE_ONLY) private ManagedIntegrationRuntimeOperationResult lastOperation; + /** + * Get unmatched properties from the message are deserialized this collection. + * + * @return the additionalProperties value + */ + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set unmatched properties from the message are deserialized this collection. + * + * @param additionalProperties the additionalProperties value to set + * @return the ManagedIntegrationRuntimeStatus object itself. + */ + public ManagedIntegrationRuntimeStatus withAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + /** * Get the time at which the integration runtime was created, in ISO8601 format. * diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/SelfHostedIntegrationRuntimeStatus.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/SelfHostedIntegrationRuntimeStatus.java index a4e50c992f47..6a1d43257982 100644 --- a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/SelfHostedIntegrationRuntimeStatus.java +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/SelfHostedIntegrationRuntimeStatus.java @@ -8,10 +8,10 @@ package com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview; +import java.util.Map; import org.joda.time.DateTime; import java.util.List; import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.implementation.SelfHostedIntegrationRuntimeNodeInner; -import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -24,6 +24,12 @@ @JsonTypeName("SelfHosted") @JsonFlatten public class SelfHostedIntegrationRuntimeStatus extends IntegrationRuntimeStatus { + /** + * Unmatched properties from the message are deserialized this collection. + */ + @JsonProperty(value = "typeProperties.") + private Map additionalProperties; + /** * The time at which the integration runtime was created, in ISO8601 * format. @@ -110,6 +116,45 @@ public class SelfHostedIntegrationRuntimeStatus extends IntegrationRuntimeStatus @JsonProperty(value = "typeProperties.links") private List links; + /** + * The MSI-s of the data factories to which the integration runtime is + * shared. + */ + @JsonProperty(value = "typeProperties.sharedWithFactories", access = JsonProperty.Access.WRITE_ONLY) + private List sharedWithFactories; + + /** + * The version that the integration runtime is going to update to. + */ + @JsonProperty(value = "typeProperties.pushedVersion", access = JsonProperty.Access.WRITE_ONLY) + private String pushedVersion; + + /** + * The latest version on download center. + */ + @JsonProperty(value = "typeProperties.latestVersion", access = JsonProperty.Access.WRITE_ONLY) + private String latestVersion; + + /** + * Get unmatched properties from the message are deserialized this collection. + * + * @return the additionalProperties value + */ + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set unmatched properties from the message are deserialized this collection. + * + * @param additionalProperties the additionalProperties value to set + * @return the SelfHostedIntegrationRuntimeStatus object itself. + */ + public SelfHostedIntegrationRuntimeStatus withAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + /** * Get the time at which the integration runtime was created, in ISO8601 format. * @@ -249,4 +294,31 @@ public SelfHostedIntegrationRuntimeStatus withLinks(List sharedWithFactories() { + return this.sharedWithFactories; + } + + /** + * Get the version that the integration runtime is going to update to. + * + * @return the pushedVersion value + */ + public String pushedVersion() { + return this.pushedVersion; + } + + /** + * Get the latest version on download center. + * + * @return the latestVersion value + */ + public String latestVersion() { + return this.latestVersion; + } + } diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/FactoriesImpl.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/FactoriesImpl.java index 5846f6f0353a..6b1dd5966111 100644 --- a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/FactoriesImpl.java +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/FactoriesImpl.java @@ -22,6 +22,7 @@ import rx.functions.Func1; import com.microsoft.azure.PagedList; import com.microsoft.azure.Page; +import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.IntegrationRuntimeResource; import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.FactoryRepoUpdate; class FactoriesImpl extends GroupableResourcesCoreImpl implements Factories { @@ -126,6 +127,42 @@ public FactoryImpl define(String name) { return wrapModel(name); } + @Override + public Observable listSharedFactoriesAsync(final String resourceGroupName, final String factoryName) { + FactoriesInner client = this.inner(); + return client.listSharedFactoriesAsync(resourceGroupName, factoryName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Factory call(FactoryInner inner) { + return new FactoryImpl(inner.name(), inner, manager()); + } + }); + } + + @Override + public Observable listSharedIntegrationRuntimesAsync(final String resourceGroupName, final String factoryName) { + FactoriesInner client = this.inner(); + return client.listSharedIntegrationRuntimesAsync(resourceGroupName, factoryName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public IntegrationRuntimeResource call(IntegrationRuntimeResourceInner inner) { + return new IntegrationRuntimeResourceImpl(inner, manager()); + } + }); + } + @Override public Completable cancelPipelineRunAsync(String resourceGroupName, String factoryName, String runId) { FactoriesInner client = this.inner(); diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/FactoriesInner.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/FactoriesInner.java index 0e8ccbcde1cd..09e7721baf71 100644 --- a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/FactoriesInner.java +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/FactoriesInner.java @@ -96,6 +96,14 @@ 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.v2017_09_01_preview.Factories listSharedFactories" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/listSharedFactories") + Observable> listSharedFactories(@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.v2017_09_01_preview.Factories listSharedIntegrationRuntimes" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/listSharedIntegrationRuntimes") + Observable> listSharedIntegrationRuntimes(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Query("dataFactoryResourceId") String dataFactoryResourceId, @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.v2017_09_01_preview.Factories cancelPipelineRun" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/cancelpipelinerun/{runId}") Observable> cancelPipelineRun(@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); @@ -108,6 +116,14 @@ interface FactoriesService { @GET Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.Factories listSharedFactoriesNext" }) + @GET + Observable> listSharedFactoriesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.Factories listSharedIntegrationRuntimesNext" }) + @GET + Observable> listSharedIntegrationRuntimesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -779,6 +795,374 @@ private ServiceResponse deleteDelegate(Response response) th .build(response); } + /** + * List data factories which the given data factory has access. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<FactoryInner> object if successful. + */ + public PagedList listSharedFactories(final String resourceGroupName, final String factoryName) { + ServiceResponse> response = listSharedFactoriesSinglePageAsync(resourceGroupName, factoryName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSharedFactoriesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List data factories which the given data factory has access. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory 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> listSharedFactoriesAsync(final String resourceGroupName, final String factoryName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSharedFactoriesSinglePageAsync(resourceGroupName, factoryName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSharedFactoriesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List data factories which the given data factory has access. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FactoryInner> object + */ + public Observable> listSharedFactoriesAsync(final String resourceGroupName, final String factoryName) { + return listSharedFactoriesWithServiceResponseAsync(resourceGroupName, factoryName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List data factories which the given data factory has access. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FactoryInner> object + */ + public Observable>> listSharedFactoriesWithServiceResponseAsync(final String resourceGroupName, final String factoryName) { + return listSharedFactoriesSinglePageAsync(resourceGroupName, factoryName) + .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(listSharedFactoriesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List data factories which the given data factory has access. + * + ServiceResponse> * @param resourceGroupName The resource group name. + ServiceResponse> * @param factoryName The factory name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FactoryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSharedFactoriesSinglePageAsync(final String resourceGroupName, final String factoryName) { + 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."); + } + return service.listSharedFactories(this.client.subscriptionId(), resourceGroupName, factoryName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSharedFactoriesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSharedFactoriesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * List integration runtimes which the given data factory has access. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<IntegrationRuntimeResourceInner> object if successful. + */ + public PagedList listSharedIntegrationRuntimes(final String resourceGroupName, final String factoryName) { + ServiceResponse> response = listSharedIntegrationRuntimesSinglePageAsync(resourceGroupName, factoryName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSharedIntegrationRuntimesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List integration runtimes which the given data factory has access. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory 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> listSharedIntegrationRuntimesAsync(final String resourceGroupName, final String factoryName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSharedIntegrationRuntimesSinglePageAsync(resourceGroupName, factoryName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSharedIntegrationRuntimesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List integration runtimes which the given data factory has access. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IntegrationRuntimeResourceInner> object + */ + public Observable> listSharedIntegrationRuntimesAsync(final String resourceGroupName, final String factoryName) { + return listSharedIntegrationRuntimesWithServiceResponseAsync(resourceGroupName, factoryName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List integration runtimes which the given data factory has access. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IntegrationRuntimeResourceInner> object + */ + public Observable>> listSharedIntegrationRuntimesWithServiceResponseAsync(final String resourceGroupName, final String factoryName) { + return listSharedIntegrationRuntimesSinglePageAsync(resourceGroupName, factoryName) + .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(listSharedIntegrationRuntimesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List integration runtimes which the given data factory has access. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IntegrationRuntimeResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSharedIntegrationRuntimesSinglePageAsync(final String resourceGroupName, final String factoryName) { + 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."); + } + final String dataFactoryResourceId = null; + return service.listSharedIntegrationRuntimes(this.client.subscriptionId(), resourceGroupName, factoryName, dataFactoryResourceId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSharedIntegrationRuntimesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * List integration runtimes which the given data factory has access. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param dataFactoryResourceId The factory resource identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<IntegrationRuntimeResourceInner> object if successful. + */ + public PagedList listSharedIntegrationRuntimes(final String resourceGroupName, final String factoryName, final String dataFactoryResourceId) { + ServiceResponse> response = listSharedIntegrationRuntimesSinglePageAsync(resourceGroupName, factoryName, dataFactoryResourceId).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSharedIntegrationRuntimesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List integration runtimes which the given data factory has access. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param dataFactoryResourceId The factory resource identifier. + * @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> listSharedIntegrationRuntimesAsync(final String resourceGroupName, final String factoryName, final String dataFactoryResourceId, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSharedIntegrationRuntimesSinglePageAsync(resourceGroupName, factoryName, dataFactoryResourceId), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSharedIntegrationRuntimesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List integration runtimes which the given data factory has access. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param dataFactoryResourceId The factory resource identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IntegrationRuntimeResourceInner> object + */ + public Observable> listSharedIntegrationRuntimesAsync(final String resourceGroupName, final String factoryName, final String dataFactoryResourceId) { + return listSharedIntegrationRuntimesWithServiceResponseAsync(resourceGroupName, factoryName, dataFactoryResourceId) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List integration runtimes which the given data factory has access. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param dataFactoryResourceId The factory resource identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IntegrationRuntimeResourceInner> object + */ + public Observable>> listSharedIntegrationRuntimesWithServiceResponseAsync(final String resourceGroupName, final String factoryName, final String dataFactoryResourceId) { + return listSharedIntegrationRuntimesSinglePageAsync(resourceGroupName, factoryName, dataFactoryResourceId) + .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(listSharedIntegrationRuntimesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List integration runtimes which the given data factory has access. + * + ServiceResponse> * @param resourceGroupName The resource group name. + ServiceResponse> * @param factoryName The factory name. + ServiceResponse> * @param dataFactoryResourceId The factory resource identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IntegrationRuntimeResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSharedIntegrationRuntimesSinglePageAsync(final String resourceGroupName, final String factoryName, final String dataFactoryResourceId) { + 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."); + } + return service.listSharedIntegrationRuntimes(this.client.subscriptionId(), resourceGroupName, factoryName, dataFactoryResourceId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSharedIntegrationRuntimesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSharedIntegrationRuntimesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + /** * Cancel a pipeline run by its run ID. * @@ -1093,4 +1477,226 @@ private ServiceResponse> listByResourceGroupNextDelegate( .build(response); } + /** + * List data factories which the given data factory has access. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<FactoryInner> object if successful. + */ + public PagedList listSharedFactoriesNext(final String nextPageLink) { + ServiceResponse> response = listSharedFactoriesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSharedFactoriesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List data factories which the given data factory has access. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSharedFactoriesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSharedFactoriesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSharedFactoriesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List data factories which the given data factory has access. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FactoryInner> object + */ + public Observable> listSharedFactoriesNextAsync(final String nextPageLink) { + return listSharedFactoriesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List data factories which the given data factory has access. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<FactoryInner> object + */ + public Observable>> listSharedFactoriesNextWithServiceResponseAsync(final String nextPageLink) { + return listSharedFactoriesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSharedFactoriesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List data factories which the given data factory has access. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<FactoryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSharedFactoriesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listSharedFactoriesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSharedFactoriesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSharedFactoriesNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * List integration runtimes which the given data factory has access. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<IntegrationRuntimeResourceInner> object if successful. + */ + public PagedList listSharedIntegrationRuntimesNext(final String nextPageLink) { + ServiceResponse> response = listSharedIntegrationRuntimesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSharedIntegrationRuntimesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List integration runtimes which the given data factory has access. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSharedIntegrationRuntimesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSharedIntegrationRuntimesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSharedIntegrationRuntimesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List integration runtimes which the given data factory has access. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IntegrationRuntimeResourceInner> object + */ + public Observable> listSharedIntegrationRuntimesNextAsync(final String nextPageLink) { + return listSharedIntegrationRuntimesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List integration runtimes which the given data factory has access. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IntegrationRuntimeResourceInner> object + */ + public Observable>> listSharedIntegrationRuntimesNextWithServiceResponseAsync(final String nextPageLink) { + return listSharedIntegrationRuntimesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSharedIntegrationRuntimesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List integration runtimes which the given data factory has access. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IntegrationRuntimeResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSharedIntegrationRuntimesNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listSharedIntegrationRuntimesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSharedIntegrationRuntimesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSharedIntegrationRuntimesNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + } diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/IntegrationRuntimePermissionResponseImpl.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/IntegrationRuntimePermissionResponseImpl.java new file mode 100644 index 000000000000..318ff32318c3 --- /dev/null +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/IntegrationRuntimePermissionResponseImpl.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.v2017_09_01_preview.implementation; + +import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.IntegrationRuntimePermissionResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class IntegrationRuntimePermissionResponseImpl extends WrapperImpl implements IntegrationRuntimePermissionResponse { + private final DataFactoryManager manager; + IntegrationRuntimePermissionResponseImpl(IntegrationRuntimePermissionResponseInner inner, DataFactoryManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataFactoryManager manager() { + return this.manager; + } + + @Override + public Integer sharedIntegrationRuntimeCount() { + return this.inner().sharedIntegrationRuntimeCount(); + } + +} diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/IntegrationRuntimePermissionResponseInner.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/IntegrationRuntimePermissionResponseInner.java new file mode 100644 index 000000000000..fe70c74a8efb --- /dev/null +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/IntegrationRuntimePermissionResponseInner.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.v2017_09_01_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The response of granting/revoking integration runtime permission operation. + */ +public class IntegrationRuntimePermissionResponseInner { + /** + * The number of the integration runtimes to which the given data factory + * has been granted access. + */ + @JsonProperty(value = "sharedIntegrationRuntimeCount") + private Integer sharedIntegrationRuntimeCount; + + /** + * Get the number of the integration runtimes to which the given data factory has been granted access. + * + * @return the sharedIntegrationRuntimeCount value + */ + public Integer sharedIntegrationRuntimeCount() { + return this.sharedIntegrationRuntimeCount; + } + + /** + * Set the number of the integration runtimes to which the given data factory has been granted access. + * + * @param sharedIntegrationRuntimeCount the sharedIntegrationRuntimeCount value to set + * @return the IntegrationRuntimePermissionResponseInner object itself. + */ + public IntegrationRuntimePermissionResponseInner withSharedIntegrationRuntimeCount(Integer sharedIntegrationRuntimeCount) { + this.sharedIntegrationRuntimeCount = sharedIntegrationRuntimeCount; + return this; + } + +} diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/IntegrationRuntimesImpl.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/IntegrationRuntimesImpl.java index 5164c3533002..400c845144a9 100644 --- a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/IntegrationRuntimesImpl.java +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/IntegrationRuntimesImpl.java @@ -19,7 +19,9 @@ import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.IntegrationRuntimeConnectionInfo; import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.IntegrationRuntimeAuthKeys; import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.IntegrationRuntimeMonitoringData; +import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.IntegrationRuntimePermissionResponse; import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.IntegrationRuntimeRemoveNodeRequest; +import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.IntegrationRuntimePermissionRequest; import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.IntegrationRuntimeResource; class IntegrationRuntimesImpl extends WrapperImpl implements IntegrationRuntimes { @@ -143,6 +145,30 @@ public Completable upgradeAsync(String resourceGroupName, String factoryName, St return client.upgradeAsync(resourceGroupName, factoryName, integrationRuntimeName).toCompletable(); } + @Override + public Observable addIdentityAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, IntegrationRuntimePermissionRequest integrationRuntimePermissionRequest) { + IntegrationRuntimesInner client = this.inner(); + return client.addIdentityAsync(resourceGroupName, factoryName, integrationRuntimeName, integrationRuntimePermissionRequest) + .map(new Func1() { + @Override + public IntegrationRuntimePermissionResponse call(IntegrationRuntimePermissionResponseInner inner) { + return new IntegrationRuntimePermissionResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable removeIdentityAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, IntegrationRuntimePermissionRequest integrationRuntimePermissionRequest) { + IntegrationRuntimesInner client = this.inner(); + return client.removeIdentityAsync(resourceGroupName, factoryName, integrationRuntimeName, integrationRuntimePermissionRequest) + .map(new Func1() { + @Override + public IntegrationRuntimePermissionResponse call(IntegrationRuntimePermissionResponseInner inner) { + return new IntegrationRuntimePermissionResponseImpl(inner, manager()); + } + }); + } + @Override public Observable listByFactoryAsync(final String resourceGroupName, final String factoryName) { IntegrationRuntimesInner client = this.inner(); diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/IntegrationRuntimesInner.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/IntegrationRuntimesInner.java index bdde5ebe88bd..fd33dbf5f9f0 100644 --- a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/IntegrationRuntimesInner.java +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/implementation/IntegrationRuntimesInner.java @@ -14,6 +14,7 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.ErrorResponseException; import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.IntegrationRuntimeAuthKeyName; +import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.IntegrationRuntimePermissionRequest; import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.IntegrationRuntimeRegenerateKeyParameters; import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.IntegrationRuntimeRemoveNodeRequest; import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.UpdateIntegrationRuntimeRequest; @@ -135,6 +136,14 @@ interface IntegrationRuntimesService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/upgrade") Observable> upgrade(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Path("integrationRuntimeName") String integrationRuntimeName, @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.v2017_09_01_preview.IntegrationRuntimes addIdentity" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/addIdentity") + Observable> addIdentity(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Path("integrationRuntimeName") String integrationRuntimeName, @Query("api-version") String apiVersion, @Body IntegrationRuntimePermissionRequest integrationRuntimePermissionRequest, @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.v2017_09_01_preview.IntegrationRuntimes removeIdentity" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/removeIdentity") + Observable> removeIdentity(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Path("integrationRuntimeName") String integrationRuntimeName, @Query("api-version") String apiVersion, @Body IntegrationRuntimePermissionRequest integrationRuntimePermissionRequest, @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.v2017_09_01_preview.IntegrationRuntimes listByFactoryNext" }) @GET Observable> listByFactoryNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -1938,6 +1947,208 @@ private ServiceResponse upgradeDelegate(Response response) t .build(response); } + /** + * Grant integration runtime access to other data factory. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param integrationRuntimeName The integration runtime name. + * @param integrationRuntimePermissionRequest The data factory identity which will be granted the access to given integration runtime. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the IntegrationRuntimePermissionResponseInner object if successful. + */ + public IntegrationRuntimePermissionResponseInner addIdentity(String resourceGroupName, String factoryName, String integrationRuntimeName, IntegrationRuntimePermissionRequest integrationRuntimePermissionRequest) { + return addIdentityWithServiceResponseAsync(resourceGroupName, factoryName, integrationRuntimeName, integrationRuntimePermissionRequest).toBlocking().single().body(); + } + + /** + * Grant integration runtime access to other data factory. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param integrationRuntimeName The integration runtime name. + * @param integrationRuntimePermissionRequest The data factory identity which will be granted the access to given integration runtime. + * @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 addIdentityAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, IntegrationRuntimePermissionRequest integrationRuntimePermissionRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addIdentityWithServiceResponseAsync(resourceGroupName, factoryName, integrationRuntimeName, integrationRuntimePermissionRequest), serviceCallback); + } + + /** + * Grant integration runtime access to other data factory. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param integrationRuntimeName The integration runtime name. + * @param integrationRuntimePermissionRequest The data factory identity which will be granted the access to given integration runtime. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IntegrationRuntimePermissionResponseInner object + */ + public Observable addIdentityAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, IntegrationRuntimePermissionRequest integrationRuntimePermissionRequest) { + return addIdentityWithServiceResponseAsync(resourceGroupName, factoryName, integrationRuntimeName, integrationRuntimePermissionRequest).map(new Func1, IntegrationRuntimePermissionResponseInner>() { + @Override + public IntegrationRuntimePermissionResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Grant integration runtime access to other data factory. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param integrationRuntimeName The integration runtime name. + * @param integrationRuntimePermissionRequest The data factory identity which will be granted the access to given integration runtime. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IntegrationRuntimePermissionResponseInner object + */ + public Observable> addIdentityWithServiceResponseAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, IntegrationRuntimePermissionRequest integrationRuntimePermissionRequest) { + 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 (integrationRuntimeName == null) { + throw new IllegalArgumentException("Parameter integrationRuntimeName 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 (integrationRuntimePermissionRequest == null) { + throw new IllegalArgumentException("Parameter integrationRuntimePermissionRequest is required and cannot be null."); + } + Validator.validate(integrationRuntimePermissionRequest); + return service.addIdentity(this.client.subscriptionId(), resourceGroupName, factoryName, integrationRuntimeName, this.client.apiVersion(), integrationRuntimePermissionRequest, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addIdentityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse addIdentityDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Revoke the integration runtime access from other data factory. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param integrationRuntimeName The integration runtime name. + * @param integrationRuntimePermissionRequest The data factory identity which will be revoked the access to given integration runtime. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the IntegrationRuntimePermissionResponseInner object if successful. + */ + public IntegrationRuntimePermissionResponseInner removeIdentity(String resourceGroupName, String factoryName, String integrationRuntimeName, IntegrationRuntimePermissionRequest integrationRuntimePermissionRequest) { + return removeIdentityWithServiceResponseAsync(resourceGroupName, factoryName, integrationRuntimeName, integrationRuntimePermissionRequest).toBlocking().single().body(); + } + + /** + * Revoke the integration runtime access from other data factory. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param integrationRuntimeName The integration runtime name. + * @param integrationRuntimePermissionRequest The data factory identity which will be revoked the access to given integration runtime. + * @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 removeIdentityAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, IntegrationRuntimePermissionRequest integrationRuntimePermissionRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(removeIdentityWithServiceResponseAsync(resourceGroupName, factoryName, integrationRuntimeName, integrationRuntimePermissionRequest), serviceCallback); + } + + /** + * Revoke the integration runtime access from other data factory. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param integrationRuntimeName The integration runtime name. + * @param integrationRuntimePermissionRequest The data factory identity which will be revoked the access to given integration runtime. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IntegrationRuntimePermissionResponseInner object + */ + public Observable removeIdentityAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, IntegrationRuntimePermissionRequest integrationRuntimePermissionRequest) { + return removeIdentityWithServiceResponseAsync(resourceGroupName, factoryName, integrationRuntimeName, integrationRuntimePermissionRequest).map(new Func1, IntegrationRuntimePermissionResponseInner>() { + @Override + public IntegrationRuntimePermissionResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Revoke the integration runtime access from other data factory. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param integrationRuntimeName The integration runtime name. + * @param integrationRuntimePermissionRequest The data factory identity which will be revoked the access to given integration runtime. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IntegrationRuntimePermissionResponseInner object + */ + public Observable> removeIdentityWithServiceResponseAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, IntegrationRuntimePermissionRequest integrationRuntimePermissionRequest) { + 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 (integrationRuntimeName == null) { + throw new IllegalArgumentException("Parameter integrationRuntimeName 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 (integrationRuntimePermissionRequest == null) { + throw new IllegalArgumentException("Parameter integrationRuntimePermissionRequest is required and cannot be null."); + } + Validator.validate(integrationRuntimePermissionRequest); + return service.removeIdentity(this.client.subscriptionId(), resourceGroupName, factoryName, integrationRuntimeName, this.client.apiVersion(), integrationRuntimePermissionRequest, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = removeIdentityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse removeIdentityDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + /** * Lists integration runtimes. *