diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/CreateLinkedIntegrationRuntimeRequest.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/CreateLinkedIntegrationRuntimeRequest.java new file mode 100644 index 000000000000..e6a36bf3ced7 --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/CreateLinkedIntegrationRuntimeRequest.java @@ -0,0 +1,124 @@ +/** + * 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; + +/** + * The linked integration runtime information. + */ +public class CreateLinkedIntegrationRuntimeRequest { + /** + * The name of the linked integration runtime. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The ID of the subscription that the linked integration runtime belongs + * to. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /** + * The name of the data factory that the linked integration runtime belongs + * to. + */ + @JsonProperty(value = "dataFactoryName") + private String dataFactoryName; + + /** + * The location of the data factory that the linked integration runtime + * belongs to. + */ + @JsonProperty(value = "dataFactoryLocation") + private String dataFactoryLocation; + + /** + * Get the name of the linked integration runtime. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the linked integration runtime. + * + * @param name the name value to set + * @return the CreateLinkedIntegrationRuntimeRequest object itself. + */ + public CreateLinkedIntegrationRuntimeRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the ID of the subscription that the linked integration runtime belongs to. + * + * @return the subscriptionId value + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the ID of the subscription that the linked integration runtime belongs to. + * + * @param subscriptionId the subscriptionId value to set + * @return the CreateLinkedIntegrationRuntimeRequest object itself. + */ + public CreateLinkedIntegrationRuntimeRequest withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the name of the data factory that the linked integration runtime belongs to. + * + * @return the dataFactoryName value + */ + public String dataFactoryName() { + return this.dataFactoryName; + } + + /** + * Set the name of the data factory that the linked integration runtime belongs to. + * + * @param dataFactoryName the dataFactoryName value to set + * @return the CreateLinkedIntegrationRuntimeRequest object itself. + */ + public CreateLinkedIntegrationRuntimeRequest withDataFactoryName(String dataFactoryName) { + this.dataFactoryName = dataFactoryName; + return this; + } + + /** + * Get the location of the data factory that the linked integration runtime belongs to. + * + * @return the dataFactoryLocation value + */ + public String dataFactoryLocation() { + return this.dataFactoryLocation; + } + + /** + * Set the location of the data factory that the linked integration runtime belongs to. + * + * @param dataFactoryLocation the dataFactoryLocation value to set + * @return the CreateLinkedIntegrationRuntimeRequest object itself. + */ + public CreateLinkedIntegrationRuntimeRequest withDataFactoryLocation(String dataFactoryLocation) { + this.dataFactoryLocation = dataFactoryLocation; + return this; + } + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/IntegrationRuntimeNodes.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/IntegrationRuntimeNodes.java index ed0256650900..093538f517c1 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/IntegrationRuntimeNodes.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/IntegrationRuntimeNodes.java @@ -41,6 +41,18 @@ public interface IntegrationRuntimeNodes extends HasInner getIpAddressAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, String nodeName); + /** + * Gets a self-hosted integration runtime node. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param integrationRuntimeName The integration runtime name. + * @param nodeName The integration runtime node name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, String nodeName); + /** * Deletes a self-hosted integration runtime node. * diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/IntegrationRuntimeUpdateResult.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/IntegrationRuntimeUpdateResult.java index 41b99ea4c9e3..7c871cf9c19d 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/IntegrationRuntimeUpdateResult.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/IntegrationRuntimeUpdateResult.java @@ -16,6 +16,9 @@ * Defines values for IntegrationRuntimeUpdateResult. */ public final class IntegrationRuntimeUpdateResult extends ExpandableStringEnum { + /** Static value None for IntegrationRuntimeUpdateResult. */ + public static final IntegrationRuntimeUpdateResult NONE = fromString("None"); + /** Static value Succeed for IntegrationRuntimeUpdateResult. */ public static final IntegrationRuntimeUpdateResult SUCCEED = fromString("Succeed"); diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/IntegrationRuntimes.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/IntegrationRuntimes.java index 0926baef0de8..c7792bb6a9b8 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/IntegrationRuntimes.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/IntegrationRuntimes.java @@ -129,6 +129,18 @@ public interface IntegrationRuntimes extends SupportsCreating createLinkedIntegrationRuntimeAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, CreateLinkedIntegrationRuntimeRequest createLinkedIntegrationRuntimeRequest); + /** * Gets an integration runtime. * diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SelfHostedIntegrationRuntimeNode.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SelfHostedIntegrationRuntimeNode.java index 8577f1f36b44..f4794cd33417 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SelfHostedIntegrationRuntimeNode.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SelfHostedIntegrationRuntimeNode.java @@ -9,9 +9,9 @@ package com.microsoft.azure.management.datafactoryv2.v2018_06_01; import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.implementation.SelfHostedIntegrationRuntimeNodeInner; 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.SelfHostedIntegrationRuntimeNodeInner; import java.util.Map; import org.joda.time.DateTime; diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SelfHostedIntegrationRuntimeStatus.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SelfHostedIntegrationRuntimeStatus.java index bf2473ab8f78..54c57d266b3d 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SelfHostedIntegrationRuntimeStatus.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SelfHostedIntegrationRuntimeStatus.java @@ -122,6 +122,13 @@ public class SelfHostedIntegrationRuntimeStatus extends IntegrationRuntimeStatus @JsonProperty(value = "typeProperties.latestVersion", access = JsonProperty.Access.WRITE_ONLY) private String latestVersion; + /** + * The estimated time when the self-hosted integration runtime will be + * updated. + */ + @JsonProperty(value = "typeProperties.autoUpdateETA", access = JsonProperty.Access.WRITE_ONLY) + private DateTime autoUpdateETA; + /** * Get the time at which the integration runtime was created, in ISO8601 format. * @@ -279,4 +286,13 @@ public String latestVersion() { return this.latestVersion; } + /** + * Get the estimated time when the self-hosted integration runtime will be updated. + * + * @return the autoUpdateETA value + */ + public DateTime autoUpdateETA() { + return this.autoUpdateETA; + } + } diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/IntegrationRuntimeNodesImpl.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/IntegrationRuntimeNodesImpl.java index eaa367aa2b1d..c2a7ce66168a 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/IntegrationRuntimeNodesImpl.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/IntegrationRuntimeNodesImpl.java @@ -4,15 +4,16 @@ * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * abc + * */ package com.microsoft.azure.management.datafactoryv2.v2018_06_01.implementation; import com.microsoft.azure.arm.model.implementation.WrapperImpl; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.IntegrationRuntimeNodes; -import rx.functions.Func1; +import rx.Completable; import rx.Observable; +import rx.functions.Func1; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.SelfHostedIntegrationRuntimeNode; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.IntegrationRuntimeNodeIpAddress; @@ -28,6 +29,10 @@ public DataFactoryManager manager() { return this.manager; } + private SelfHostedIntegrationRuntimeNodeImpl wrapModel(SelfHostedIntegrationRuntimeNodeInner inner) { + return new SelfHostedIntegrationRuntimeNodeImpl(inner, manager()); + } + @Override public Observable updateAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, String nodeName) { IntegrationRuntimeNodesInner client = this.inner(); @@ -52,4 +57,22 @@ public IntegrationRuntimeNodeIpAddress call(IntegrationRuntimeNodeIpAddressInner }); } + @Override + public Observable getAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, String nodeName) { + IntegrationRuntimeNodesInner client = this.inner(); + return client.getAsync(resourceGroupName, factoryName, integrationRuntimeName, nodeName) + .map(new Func1() { + @Override + public SelfHostedIntegrationRuntimeNode call(SelfHostedIntegrationRuntimeNodeInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, String nodeName) { + IntegrationRuntimeNodesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, factoryName, integrationRuntimeName, nodeName).toCompletable(); + } + } diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/IntegrationRuntimeNodesInner.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/IntegrationRuntimeNodesInner.java index 20c63396ac4a..504f4904c8dc 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/IntegrationRuntimeNodesInner.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/IntegrationRuntimeNodesInner.java @@ -18,6 +18,7 @@ import java.io.IOException; import okhttp3.ResponseBody; import retrofit2.http.Body; +import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; @@ -55,6 +56,10 @@ public IntegrationRuntimeNodesInner(Retrofit retrofit, DataFactoryManagementClie * used by Retrofit to perform actually REST calls. */ interface IntegrationRuntimeNodesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datafactoryv2.v2018_06_01.IntegrationRuntimeNodes get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Path("integrationRuntimeName") String integrationRuntimeName, @Path("nodeName") String nodeName, @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.IntegrationRuntimeNodes delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}", method = "DELETE", hasBody = true) Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Path("integrationRuntimeName") String integrationRuntimeName, @Path("nodeName") String nodeName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -69,6 +74,106 @@ interface IntegrationRuntimeNodesService { } + /** + * Gets a self-hosted integration runtime node. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param integrationRuntimeName The integration runtime name. + * @param nodeName The integration runtime node name. + * @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 SelfHostedIntegrationRuntimeNodeInner object if successful. + */ + public SelfHostedIntegrationRuntimeNodeInner get(String resourceGroupName, String factoryName, String integrationRuntimeName, String nodeName) { + return getWithServiceResponseAsync(resourceGroupName, factoryName, integrationRuntimeName, nodeName).toBlocking().single().body(); + } + + /** + * Gets a self-hosted integration runtime node. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param integrationRuntimeName The integration runtime name. + * @param nodeName The integration runtime node name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, String nodeName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, factoryName, integrationRuntimeName, nodeName), serviceCallback); + } + + /** + * Gets a self-hosted integration runtime node. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param integrationRuntimeName The integration runtime name. + * @param nodeName The integration runtime node name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SelfHostedIntegrationRuntimeNodeInner object + */ + public Observable getAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, String nodeName) { + return getWithServiceResponseAsync(resourceGroupName, factoryName, integrationRuntimeName, nodeName).map(new Func1, SelfHostedIntegrationRuntimeNodeInner>() { + @Override + public SelfHostedIntegrationRuntimeNodeInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a self-hosted integration runtime node. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param integrationRuntimeName The integration runtime name. + * @param nodeName The integration runtime node name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SelfHostedIntegrationRuntimeNodeInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, String nodeName) { + 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 (nodeName == null) { + throw new IllegalArgumentException("Parameter nodeName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, factoryName, integrationRuntimeName, nodeName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Deletes a self-hosted integration runtime node. * diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/IntegrationRuntimesImpl.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/IntegrationRuntimesImpl.java index 4860b1aabe98..afe178a28509 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/IntegrationRuntimesImpl.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/IntegrationRuntimesImpl.java @@ -19,6 +19,7 @@ import com.microsoft.azure.management.datafactoryv2.v2018_06_01.IntegrationRuntimeConnectionInfo; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.IntegrationRuntimeAuthKeys; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.IntegrationRuntimeMonitoringData; +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.CreateLinkedIntegrationRuntimeRequest; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.IntegrationRuntimeResource; class IntegrationRuntimesImpl extends WrapperImpl implements IntegrationRuntimes { @@ -142,6 +143,18 @@ public Completable removeLinksAsync(String resourceGroupName, String factoryName return client.removeLinksAsync(resourceGroupName, factoryName, integrationRuntimeName, linkedFactoryName).toCompletable(); } + @Override + public Observable createLinkedIntegrationRuntimeAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, CreateLinkedIntegrationRuntimeRequest createLinkedIntegrationRuntimeRequest) { + IntegrationRuntimesInner client = this.inner(); + return client.createLinkedIntegrationRuntimeAsync(resourceGroupName, factoryName, integrationRuntimeName, createLinkedIntegrationRuntimeRequest) + .map(new Func1() { + @Override + public IntegrationRuntimeStatusResponse call(IntegrationRuntimeStatusResponseInner inner) { + return new IntegrationRuntimeStatusResponseImpl(inner, manager()); + } + }); + } + @Override public Observable listByFactoryAsync(final String resourceGroupName, final String factoryName) { IntegrationRuntimesInner client = this.inner(); diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/IntegrationRuntimesInner.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/IntegrationRuntimesInner.java index 2070ffeb1713..fa4f3a8b9562 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/IntegrationRuntimesInner.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/IntegrationRuntimesInner.java @@ -13,6 +13,7 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.CreateLinkedIntegrationRuntimeRequest; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.IntegrationRuntimeAuthKeyName; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.IntegrationRuntimeRegenerateKeyParameters; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.LinkedIntegrationRuntimeRequest; @@ -135,6 +136,10 @@ interface IntegrationRuntimesService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/removeLinks") Observable> removeLinks(@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, @Body LinkedIntegrationRuntimeRequest linkedIntegrationRuntimeRequest, @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.IntegrationRuntimes createLinkedIntegrationRuntime" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/linkedIntegrationRuntime") + Observable> createLinkedIntegrationRuntime(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Path("integrationRuntimeName") String integrationRuntimeName, @Query("api-version") String apiVersion, @Body CreateLinkedIntegrationRuntimeRequest createLinkedIntegrationRuntimeRequest, @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.IntegrationRuntimes listByFactoryNext" }) @GET Observable> listByFactoryNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -2030,6 +2035,107 @@ private ServiceResponse removeLinksDelegate(Response respons .build(response); } + /** + * Create a linked integration runtime entry in a shared integration runtime. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param integrationRuntimeName The integration runtime name. + * @param createLinkedIntegrationRuntimeRequest The linked integration runtime properties. + * @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 IntegrationRuntimeStatusResponseInner object if successful. + */ + public IntegrationRuntimeStatusResponseInner createLinkedIntegrationRuntime(String resourceGroupName, String factoryName, String integrationRuntimeName, CreateLinkedIntegrationRuntimeRequest createLinkedIntegrationRuntimeRequest) { + return createLinkedIntegrationRuntimeWithServiceResponseAsync(resourceGroupName, factoryName, integrationRuntimeName, createLinkedIntegrationRuntimeRequest).toBlocking().single().body(); + } + + /** + * Create a linked integration runtime entry in a shared integration runtime. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param integrationRuntimeName The integration runtime name. + * @param createLinkedIntegrationRuntimeRequest The linked integration runtime properties. + * @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 createLinkedIntegrationRuntimeAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, CreateLinkedIntegrationRuntimeRequest createLinkedIntegrationRuntimeRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createLinkedIntegrationRuntimeWithServiceResponseAsync(resourceGroupName, factoryName, integrationRuntimeName, createLinkedIntegrationRuntimeRequest), serviceCallback); + } + + /** + * Create a linked integration runtime entry in a shared integration runtime. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param integrationRuntimeName The integration runtime name. + * @param createLinkedIntegrationRuntimeRequest The linked integration runtime properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IntegrationRuntimeStatusResponseInner object + */ + public Observable createLinkedIntegrationRuntimeAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, CreateLinkedIntegrationRuntimeRequest createLinkedIntegrationRuntimeRequest) { + return createLinkedIntegrationRuntimeWithServiceResponseAsync(resourceGroupName, factoryName, integrationRuntimeName, createLinkedIntegrationRuntimeRequest).map(new Func1, IntegrationRuntimeStatusResponseInner>() { + @Override + public IntegrationRuntimeStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a linked integration runtime entry in a shared integration runtime. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param integrationRuntimeName The integration runtime name. + * @param createLinkedIntegrationRuntimeRequest The linked integration runtime properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IntegrationRuntimeStatusResponseInner object + */ + public Observable> createLinkedIntegrationRuntimeWithServiceResponseAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, CreateLinkedIntegrationRuntimeRequest createLinkedIntegrationRuntimeRequest) { + 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 (createLinkedIntegrationRuntimeRequest == null) { + throw new IllegalArgumentException("Parameter createLinkedIntegrationRuntimeRequest is required and cannot be null."); + } + Validator.validate(createLinkedIntegrationRuntimeRequest); + return service.createLinkedIntegrationRuntime(this.client.subscriptionId(), resourceGroupName, factoryName, integrationRuntimeName, this.client.apiVersion(), createLinkedIntegrationRuntimeRequest, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createLinkedIntegrationRuntimeDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createLinkedIntegrationRuntimeDelegate(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 integration runtimes. * diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/SelfHostedIntegrationRuntimeNodeImpl.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/SelfHostedIntegrationRuntimeNodeImpl.java index 60033856ed69..d1c389915c3b 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/SelfHostedIntegrationRuntimeNodeImpl.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/SelfHostedIntegrationRuntimeNodeImpl.java @@ -10,6 +10,7 @@ import com.microsoft.azure.management.datafactoryv2.v2018_06_01.SelfHostedIntegrationRuntimeNode; import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; import java.util.Map; import org.joda.time.DateTime; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.IntegrationRuntimeUpdateResult; @@ -17,7 +18,12 @@ class SelfHostedIntegrationRuntimeNodeImpl extends WrapperImpl implements SelfHostedIntegrationRuntimeNode { private final DataFactoryManager manager; - SelfHostedIntegrationRuntimeNodeImpl(SelfHostedIntegrationRuntimeNodeInner inner, DataFactoryManager manager) { + private String resourceGroupName; + private String factoryName; + private String integrationRuntimeName; + private String nodeName; + + SelfHostedIntegrationRuntimeNodeImpl(SelfHostedIntegrationRuntimeNodeInner inner, DataFactoryManager manager) { super(inner); this.manager = manager; } @@ -27,6 +33,8 @@ public DataFactoryManager manager() { return this.manager; } + + @Override public Map capabilities() { return this.inner().capabilities(); diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/SelfHostedIntegrationRuntimeNodeInner.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/SelfHostedIntegrationRuntimeNodeInner.java index 09db7eea0d18..989e395c9b9b 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/SelfHostedIntegrationRuntimeNodeInner.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/SelfHostedIntegrationRuntimeNodeInner.java @@ -96,7 +96,7 @@ public class SelfHostedIntegrationRuntimeNodeInner { /** * The result of the last integration runtime node update. Possible values - * include: 'Succeed', 'Fail'. + * include: 'None', 'Succeed', 'Fail'. */ @JsonProperty(value = "lastUpdateResult", access = JsonProperty.Access.WRITE_ONLY) private IntegrationRuntimeUpdateResult lastUpdateResult; @@ -241,7 +241,7 @@ public DateTime lastStopTime() { } /** - * Get the result of the last integration runtime node update. Possible values include: 'Succeed', 'Fail'. + * Get the result of the last integration runtime node update. Possible values include: 'None', 'Succeed', 'Fail'. * * @return the lastUpdateResult value */