Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ public interface IntegrationRuntimeNodes extends HasInner<IntegrationRuntimeNode
*/
Observable<IntegrationRuntimeNodeIpAddress> 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<SelfHostedIntegrationRuntimeNode> getAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, String nodeName);

/**
* Deletes a self-hosted integration runtime node.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
* Defines values for IntegrationRuntimeUpdateResult.
*/
public final class IntegrationRuntimeUpdateResult extends ExpandableStringEnum<IntegrationRuntimeUpdateResult> {
/** Static value None for IntegrationRuntimeUpdateResult. */
public static final IntegrationRuntimeUpdateResult NONE = fromString("None");

/** Static value Succeed for IntegrationRuntimeUpdateResult. */
public static final IntegrationRuntimeUpdateResult SUCCEED = fromString("Succeed");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,18 @@ public interface IntegrationRuntimes extends SupportsCreating<IntegrationRuntime
*/
Completable removeLinksAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, String linkedFactoryName);

/**
* 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 for the request
*/
Observable<IntegrationRuntimeStatusResponse> createLinkedIntegrationRuntimeAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, CreateLinkedIntegrationRuntimeRequest createLinkedIntegrationRuntimeRequest);

/**
* Gets an integration runtime.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -28,6 +29,10 @@ public DataFactoryManager manager() {
return this.manager;
}

private SelfHostedIntegrationRuntimeNodeImpl wrapModel(SelfHostedIntegrationRuntimeNodeInner inner) {
return new SelfHostedIntegrationRuntimeNodeImpl(inner, manager());
}

@Override
public Observable<SelfHostedIntegrationRuntimeNode> updateAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, String nodeName) {
IntegrationRuntimeNodesInner client = this.inner();
Expand All @@ -52,4 +57,22 @@ public IntegrationRuntimeNodeIpAddress call(IntegrationRuntimeNodeIpAddressInner
});
}

@Override
public Observable<SelfHostedIntegrationRuntimeNode> getAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, String nodeName) {
IntegrationRuntimeNodesInner client = this.inner();
return client.getAsync(resourceGroupName, factoryName, integrationRuntimeName, nodeName)
.map(new Func1<SelfHostedIntegrationRuntimeNodeInner, SelfHostedIntegrationRuntimeNode>() {
@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();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<Response<ResponseBody>> 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<Response<ResponseBody>> 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);
Expand All @@ -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<SelfHostedIntegrationRuntimeNodeInner> getAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, String nodeName, final ServiceCallback<SelfHostedIntegrationRuntimeNodeInner> 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<SelfHostedIntegrationRuntimeNodeInner> getAsync(String resourceGroupName, String factoryName, String integrationRuntimeName, String nodeName) {
return getWithServiceResponseAsync(resourceGroupName, factoryName, integrationRuntimeName, nodeName).map(new Func1<ServiceResponse<SelfHostedIntegrationRuntimeNodeInner>, SelfHostedIntegrationRuntimeNodeInner>() {
@Override
public SelfHostedIntegrationRuntimeNodeInner call(ServiceResponse<SelfHostedIntegrationRuntimeNodeInner> 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<ServiceResponse<SelfHostedIntegrationRuntimeNodeInner>> 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<Response<ResponseBody>, Observable<ServiceResponse<SelfHostedIntegrationRuntimeNodeInner>>>() {
@Override
public Observable<ServiceResponse<SelfHostedIntegrationRuntimeNodeInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<SelfHostedIntegrationRuntimeNodeInner> clientResponse = getDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}

private ServiceResponse<SelfHostedIntegrationRuntimeNodeInner> getDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<SelfHostedIntegrationRuntimeNodeInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<SelfHostedIntegrationRuntimeNodeInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}

/**
* Deletes a self-hosted integration runtime node.
*
Expand Down
Loading