From b89886187fb64c50186a3bd237b6a44928f69ed7 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Sat, 22 Dec 2018 10:00:21 +0000 Subject: [PATCH 1/4] Generated from f81ef7f40910a3ecb87c8b6cce9aa7bb919344fd Add exposure control APIs. --- .../v2018_06_01/ExposureControlRequest.java | 69 +++++ .../v2018_06_01/ExposureControlResponse.java | 30 +++ .../v2018_06_01/ExposureControls.java | 38 +++ .../DataFactoryManagementClientImpl.java | 14 + .../implementation/DataFactoryManager.java | 12 + .../ExposureControlResponseImpl.java | 36 +++ .../ExposureControlResponseInner.java | 69 +++++ .../implementation/ExposureControlsImpl.java | 55 ++++ .../implementation/ExposureControlsInner.java | 248 ++++++++++++++++++ 9 files changed, 571 insertions(+) create mode 100644 datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControlRequest.java create mode 100644 datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControlResponse.java create mode 100644 datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControls.java create mode 100644 datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlResponseImpl.java create mode 100644 datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlResponseInner.java create mode 100644 datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsImpl.java create mode 100644 datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsInner.java diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControlRequest.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControlRequest.java new file mode 100644 index 000000000000..298170060ef2 --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControlRequest.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datafactoryv2.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The exposure control request. + */ +public class ExposureControlRequest { + /** + * The feature name. + */ + @JsonProperty(value = "featureName") + private String featureName; + + /** + * The feature type. + */ + @JsonProperty(value = "featureType") + private String featureType; + + /** + * Get the feature name. + * + * @return the featureName value + */ + public String featureName() { + return this.featureName; + } + + /** + * Set the feature name. + * + * @param featureName the featureName value to set + * @return the ExposureControlRequest object itself. + */ + public ExposureControlRequest withFeatureName(String featureName) { + this.featureName = featureName; + return this; + } + + /** + * Get the feature type. + * + * @return the featureType value + */ + public String featureType() { + return this.featureType; + } + + /** + * Set the feature type. + * + * @param featureType the featureType value to set + * @return the ExposureControlRequest object itself. + */ + public ExposureControlRequest withFeatureType(String featureType) { + this.featureType = featureType; + return this; + } + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControlResponse.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControlResponse.java new file mode 100644 index 000000000000..2e6165fc4552 --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControlResponse.java @@ -0,0 +1,30 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datafactoryv2.v2018_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.implementation.DataFactoryManager; +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.implementation.ExposureControlResponseInner; + +/** + * Type representing ExposureControlResponse. + */ +public interface ExposureControlResponse extends HasInner, HasManager { + /** + * @return the featureName value. + */ + String featureName(); + + /** + * @return the value value. + */ + String value(); + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControls.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControls.java new file mode 100644 index 000000000000..d8f2d5f9c49a --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControls.java @@ -0,0 +1,38 @@ +/** + * 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 rx.Observable; + +/** + * Type representing ExposureControls. + */ +public interface ExposureControls { + /** + * Get exposure control feature for specific location. + * + * @param locationId The location identifier. + * @param exposureControlRequest The exposure control request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getFeatureAsync(String locationId, ExposureControlRequest exposureControlRequest); + + /** + * Get exposure control feature for specific data factory. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param exposureControlRequest The exposure control request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getFeatureForSubscriptionAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest); + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/DataFactoryManagementClientImpl.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/DataFactoryManagementClientImpl.java index 3635e62d44f4..37c40823f034 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/DataFactoryManagementClientImpl.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/DataFactoryManagementClientImpl.java @@ -158,6 +158,19 @@ public FactoriesInner factories() { return this.factories; } + /** + * The ExposureControlsInner object to access its operations. + */ + private ExposureControlsInner exposureControls; + + /** + * Gets the ExposureControlsInner object to access its operations. + * @return the ExposureControlsInner object. + */ + public ExposureControlsInner exposureControls() { + return this.exposureControls; + } + /** * The IntegrationRuntimesInner object to access its operations. */ @@ -338,6 +351,7 @@ protected void initialize() { this.generateClientRequestId = true; this.operations = new OperationsInner(restClient().retrofit(), this); this.factories = new FactoriesInner(restClient().retrofit(), this); + this.exposureControls = new ExposureControlsInner(restClient().retrofit(), this); this.integrationRuntimes = new IntegrationRuntimesInner(restClient().retrofit(), this); this.integrationRuntimeObjectMetadatas = new IntegrationRuntimeObjectMetadatasInner(restClient().retrofit(), this); this.integrationRuntimeNodes = new IntegrationRuntimeNodesInner(restClient().retrofit(), this); diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/DataFactoryManager.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/DataFactoryManager.java index ce6363efe19f..f851c1435e1e 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/DataFactoryManager.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/DataFactoryManager.java @@ -18,6 +18,7 @@ import com.microsoft.rest.RestClient; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.Operations; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.Factories; +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.ExposureControls; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.IntegrationRuntimes; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.IntegrationRuntimeObjectMetadatas; import com.microsoft.azure.management.datafactoryv2.v2018_06_01.IntegrationRuntimeNodes; @@ -38,6 +39,7 @@ public final class DataFactoryManager extends ManagerCore { private Operations operations; private Factories factories; + private ExposureControls exposureControls; private IntegrationRuntimes integrationRuntimes; private IntegrationRuntimeObjectMetadatas integrationRuntimeObjectMetadatas; private IntegrationRuntimeNodes integrationRuntimeNodes; @@ -116,6 +118,16 @@ public Factories factories() { return this.factories; } + /** + * @return Entry point to manage ExposureControls. + */ + public ExposureControls exposureControls() { + if (this.exposureControls == null) { + this.exposureControls = new ExposureControlsImpl(this); + } + return this.exposureControls; + } + /** * @return Entry point to manage IntegrationRuntimes. */ diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlResponseImpl.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlResponseImpl.java new file mode 100644 index 000000000000..00de4637c09a --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlResponseImpl.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datafactoryv2.v2018_06_01.implementation; + +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.ExposureControlResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class ExposureControlResponseImpl extends WrapperImpl implements ExposureControlResponse { + private final DataFactoryManager manager; + ExposureControlResponseImpl(ExposureControlResponseInner inner, DataFactoryManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataFactoryManager manager() { + return this.manager; + } + + @Override + public String featureName() { + return this.inner().featureName(); + } + + @Override + public String value() { + return this.inner().value(); + } + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlResponseInner.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlResponseInner.java new file mode 100644 index 000000000000..bb9a480a5496 --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlResponseInner.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datafactoryv2.v2018_06_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The exposure control response. + */ +public class ExposureControlResponseInner { + /** + * The feature name. + */ + @JsonProperty(value = "featureName") + private String featureName; + + /** + * The feature value. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the feature name. + * + * @return the featureName value + */ + public String featureName() { + return this.featureName; + } + + /** + * Set the feature name. + * + * @param featureName the featureName value to set + * @return the ExposureControlResponseInner object itself. + */ + public ExposureControlResponseInner withFeatureName(String featureName) { + this.featureName = featureName; + return this; + } + + /** + * Get the feature value. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the feature value. + * + * @param value the value value to set + * @return the ExposureControlResponseInner object itself. + */ + public ExposureControlResponseInner withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsImpl.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsImpl.java new file mode 100644 index 000000000000..777ac3e971d8 --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsImpl.java @@ -0,0 +1,55 @@ +/** + * 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. + * 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.ExposureControls; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.ExposureControlResponse; +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.ExposureControlRequest; + +class ExposureControlsImpl extends WrapperImpl implements ExposureControls { + private final DataFactoryManager manager; + + ExposureControlsImpl(DataFactoryManager manager) { + super(manager.inner().exposureControls()); + this.manager = manager; + } + + public DataFactoryManager manager() { + return this.manager; + } + + @Override + public Observable getFeatureAsync(String locationId, ExposureControlRequest exposureControlRequest) { + ExposureControlsInner client = this.inner(); + return client.getFeatureAsync(locationId, exposureControlRequest) + .map(new Func1() { + @Override + public ExposureControlResponse call(ExposureControlResponseInner inner) { + return new ExposureControlResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable getFeatureForSubscriptionAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest) { + ExposureControlsInner client = this.inner(); + return client.getFeatureForSubscriptionAsync(resourceGroupName, factoryName, exposureControlRequest) + .map(new Func1() { + @Override + public ExposureControlResponse call(ExposureControlResponseInner inner) { + return new ExposureControlResponseImpl(inner, manager()); + } + }); + } + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsInner.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsInner.java new file mode 100644 index 000000000000..cce37eadcba5 --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsInner.java @@ -0,0 +1,248 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datafactoryv2.v2018_06_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.ExposureControlRequest; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ExposureControls. + */ +public class ExposureControlsInner { + /** The Retrofit service to perform REST calls. */ + private ExposureControlsService service; + /** The service client containing this operation class. */ + private DataFactoryManagementClientImpl client; + + /** + * Initializes an instance of ExposureControlsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ExposureControlsInner(Retrofit retrofit, DataFactoryManagementClientImpl client) { + this.service = retrofit.create(ExposureControlsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ExposureControls to be + * used by Retrofit to perform actually REST calls. + */ + interface ExposureControlsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datafactoryv2.v2018_06_01.ExposureControls getFeature" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/getFeatureValue") + Observable> getFeature(@Path("subscriptionId") String subscriptionId, @Path("locationId") String locationId, @Query("api-version") String apiVersion, @Body ExposureControlRequest exposureControlRequest, @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.ExposureControls getFeatureForSubscription" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getFeatureValue") + Observable> getFeatureForSubscription(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Query("api-version") String apiVersion, @Body ExposureControlRequest exposureControlRequest, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get exposure control feature for specific location. + * + * @param locationId The location identifier. + * @param exposureControlRequest The exposure control request. + * @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 ExposureControlResponseInner object if successful. + */ + public ExposureControlResponseInner getFeature(String locationId, ExposureControlRequest exposureControlRequest) { + return getFeatureWithServiceResponseAsync(locationId, exposureControlRequest).toBlocking().single().body(); + } + + /** + * Get exposure control feature for specific location. + * + * @param locationId The location identifier. + * @param exposureControlRequest The exposure control request. + * @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 getFeatureAsync(String locationId, ExposureControlRequest exposureControlRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getFeatureWithServiceResponseAsync(locationId, exposureControlRequest), serviceCallback); + } + + /** + * Get exposure control feature for specific location. + * + * @param locationId The location identifier. + * @param exposureControlRequest The exposure control request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExposureControlResponseInner object + */ + public Observable getFeatureAsync(String locationId, ExposureControlRequest exposureControlRequest) { + return getFeatureWithServiceResponseAsync(locationId, exposureControlRequest).map(new Func1, ExposureControlResponseInner>() { + @Override + public ExposureControlResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get exposure control feature for specific location. + * + * @param locationId The location identifier. + * @param exposureControlRequest The exposure control request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExposureControlResponseInner object + */ + public Observable> getFeatureWithServiceResponseAsync(String locationId, ExposureControlRequest exposureControlRequest) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (locationId == null) { + throw new IllegalArgumentException("Parameter locationId 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 (exposureControlRequest == null) { + throw new IllegalArgumentException("Parameter exposureControlRequest is required and cannot be null."); + } + Validator.validate(exposureControlRequest); + return service.getFeature(this.client.subscriptionId(), locationId, this.client.apiVersion(), exposureControlRequest, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getFeatureDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getFeatureDelegate(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); + } + + /** + * Get exposure control feature for specific data factory. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param exposureControlRequest The exposure control request. + * @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 ExposureControlResponseInner object if successful. + */ + public ExposureControlResponseInner getFeatureForSubscription(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest) { + return getFeatureForSubscriptionWithServiceResponseAsync(resourceGroupName, factoryName, exposureControlRequest).toBlocking().single().body(); + } + + /** + * Get exposure control feature for specific data factory. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param exposureControlRequest The exposure control request. + * @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 getFeatureForSubscriptionAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getFeatureForSubscriptionWithServiceResponseAsync(resourceGroupName, factoryName, exposureControlRequest), serviceCallback); + } + + /** + * Get exposure control feature for specific data factory. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param exposureControlRequest The exposure control request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExposureControlResponseInner object + */ + public Observable getFeatureForSubscriptionAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest) { + return getFeatureForSubscriptionWithServiceResponseAsync(resourceGroupName, factoryName, exposureControlRequest).map(new Func1, ExposureControlResponseInner>() { + @Override + public ExposureControlResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get exposure control feature for specific data factory. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param exposureControlRequest The exposure control request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExposureControlResponseInner object + */ + public Observable> getFeatureForSubscriptionWithServiceResponseAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (factoryName == null) { + throw new IllegalArgumentException("Parameter factoryName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (exposureControlRequest == null) { + throw new IllegalArgumentException("Parameter exposureControlRequest is required and cannot be null."); + } + Validator.validate(exposureControlRequest); + return service.getFeatureForSubscription(this.client.subscriptionId(), resourceGroupName, factoryName, this.client.apiVersion(), exposureControlRequest, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getFeatureForSubscriptionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getFeatureForSubscriptionDelegate(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); + } + +} From c152bc39c20e6e97d3d7fb5c3498b7e20b8e93b4 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 27 Dec 2018 02:48:09 +0000 Subject: [PATCH 2/4] Generated from 741fceb5f54f36ac55da1e93567549588c5cdb69 Resolve reivew comments --- .../v2018_06_01/ExposureControls.java | 2 +- .../ExposureControlResponseInner.java | 26 ++----------------- .../implementation/ExposureControlsImpl.java | 4 +-- .../implementation/ExposureControlsInner.java | 24 ++++++++--------- 4 files changed, 17 insertions(+), 39 deletions(-) diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControls.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControls.java index d8f2d5f9c49a..81d080dc488b 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControls.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControls.java @@ -33,6 +33,6 @@ public interface ExposureControls { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable getFeatureForSubscriptionAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest); + Observable getFeatureBySubscriptionAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest); } diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlResponseInner.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlResponseInner.java index bb9a480a5496..e18aaaffea9f 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlResponseInner.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlResponseInner.java @@ -17,13 +17,13 @@ public class ExposureControlResponseInner { /** * The feature name. */ - @JsonProperty(value = "featureName") + @JsonProperty(value = "featureName", access = JsonProperty.Access.WRITE_ONLY) private String featureName; /** * The feature value. */ - @JsonProperty(value = "value") + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private String value; /** @@ -35,17 +35,6 @@ public String featureName() { return this.featureName; } - /** - * Set the feature name. - * - * @param featureName the featureName value to set - * @return the ExposureControlResponseInner object itself. - */ - public ExposureControlResponseInner withFeatureName(String featureName) { - this.featureName = featureName; - return this; - } - /** * Get the feature value. * @@ -55,15 +44,4 @@ public String value() { return this.value; } - /** - * Set the feature value. - * - * @param value the value value to set - * @return the ExposureControlResponseInner object itself. - */ - public ExposureControlResponseInner withValue(String value) { - this.value = value; - return this; - } - } diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsImpl.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsImpl.java index 777ac3e971d8..72d43e3a1d3b 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsImpl.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsImpl.java @@ -41,9 +41,9 @@ public ExposureControlResponse call(ExposureControlResponseInner inner) { } @Override - public Observable getFeatureForSubscriptionAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest) { + public Observable getFeatureBySubscriptionAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest) { ExposureControlsInner client = this.inner(); - return client.getFeatureForSubscriptionAsync(resourceGroupName, factoryName, exposureControlRequest) + return client.getFeatureBySubscriptionAsync(resourceGroupName, factoryName, exposureControlRequest) .map(new Func1() { @Override public ExposureControlResponse call(ExposureControlResponseInner inner) { diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsInner.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsInner.java index cce37eadcba5..df3cd74c527f 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsInner.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsInner.java @@ -58,9 +58,9 @@ interface ExposureControlsService { @POST("subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/getFeatureValue") Observable> getFeature(@Path("subscriptionId") String subscriptionId, @Path("locationId") String locationId, @Query("api-version") String apiVersion, @Body ExposureControlRequest exposureControlRequest, @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.ExposureControls getFeatureForSubscription" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datafactoryv2.v2018_06_01.ExposureControls getFeatureBySubscription" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getFeatureValue") - Observable> getFeatureForSubscription(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Query("api-version") String apiVersion, @Body ExposureControlRequest exposureControlRequest, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getFeatureBySubscription(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Query("api-version") String apiVersion, @Body ExposureControlRequest exposureControlRequest, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } @@ -162,8 +162,8 @@ private ServiceResponse getFeatureDelegate(Respons * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ExposureControlResponseInner object if successful. */ - public ExposureControlResponseInner getFeatureForSubscription(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest) { - return getFeatureForSubscriptionWithServiceResponseAsync(resourceGroupName, factoryName, exposureControlRequest).toBlocking().single().body(); + public ExposureControlResponseInner getFeatureBySubscription(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest) { + return getFeatureBySubscriptionWithServiceResponseAsync(resourceGroupName, factoryName, exposureControlRequest).toBlocking().single().body(); } /** @@ -176,8 +176,8 @@ public ExposureControlResponseInner getFeatureForSubscription(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture getFeatureForSubscriptionAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getFeatureForSubscriptionWithServiceResponseAsync(resourceGroupName, factoryName, exposureControlRequest), serviceCallback); + public ServiceFuture getFeatureBySubscriptionAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getFeatureBySubscriptionWithServiceResponseAsync(resourceGroupName, factoryName, exposureControlRequest), serviceCallback); } /** @@ -189,8 +189,8 @@ public ServiceFuture getFeatureForSubscriptionAsyn * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ExposureControlResponseInner object */ - public Observable getFeatureForSubscriptionAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest) { - return getFeatureForSubscriptionWithServiceResponseAsync(resourceGroupName, factoryName, exposureControlRequest).map(new Func1, ExposureControlResponseInner>() { + public Observable getFeatureBySubscriptionAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest) { + return getFeatureBySubscriptionWithServiceResponseAsync(resourceGroupName, factoryName, exposureControlRequest).map(new Func1, ExposureControlResponseInner>() { @Override public ExposureControlResponseInner call(ServiceResponse response) { return response.body(); @@ -207,7 +207,7 @@ public ExposureControlResponseInner call(ServiceResponse> getFeatureForSubscriptionWithServiceResponseAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest) { + public Observable> getFeatureBySubscriptionWithServiceResponseAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -224,12 +224,12 @@ public Observable> getFeatureForSu throw new IllegalArgumentException("Parameter exposureControlRequest is required and cannot be null."); } Validator.validate(exposureControlRequest); - return service.getFeatureForSubscription(this.client.subscriptionId(), resourceGroupName, factoryName, this.client.apiVersion(), exposureControlRequest, this.client.acceptLanguage(), this.client.userAgent()) + return service.getFeatureBySubscription(this.client.subscriptionId(), resourceGroupName, factoryName, this.client.apiVersion(), exposureControlRequest, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = getFeatureForSubscriptionDelegate(response); + ServiceResponse clientResponse = getFeatureBySubscriptionDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -238,7 +238,7 @@ public Observable> call(Response getFeatureForSubscriptionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getFeatureBySubscriptionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) From d244b83753775c7d5a1d8995e7049fd21eb36ca3 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 8 Jan 2019 01:26:11 +0000 Subject: [PATCH 3/4] Generated from 0c64157708f71a189f8e9726dff0959e63440ed0 Delete API ExposureControl_GetFeatureBySubscription --- .../ExecuteSSISPackageActivity.java | 40 +++--- .../v2018_06_01/ExposureControls.java | 17 +-- .../v2018_06_01/SSISPackageLocation.java | 13 +- .../implementation/ExposureControlsImpl.java | 16 +-- .../implementation/ExposureControlsInner.java | 122 ++---------------- 5 files changed, 46 insertions(+), 162 deletions(-) diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExecuteSSISPackageActivity.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExecuteSSISPackageActivity.java index 1c57e350e85f..a4849889cdea 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExecuteSSISPackageActivity.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExecuteSSISPackageActivity.java @@ -28,23 +28,25 @@ public class ExecuteSSISPackageActivity extends ExecutionActivity { private SSISPackageLocation packageLocation; /** - * Specifies the runtime to execute SSIS package. Possible values include: - * 'x64', 'x86'. + * Specifies the runtime to execute SSIS package. The value should be "x86" + * or "x64". Type: string (or Expression with resultType string). */ @JsonProperty(value = "typeProperties.runtime") - private SSISExecutionRuntime runtime; + private Object runtime; /** - * The logging level of SSIS package execution. + * The logging level of SSIS package execution. Type: string (or Expression + * with resultType string). */ @JsonProperty(value = "typeProperties.loggingLevel") - private String loggingLevel; + private Object loggingLevel; /** - * The environment path to execute the SSIS package. + * The environment path to execute the SSIS package. Type: string (or + * Expression with resultType string). */ @JsonProperty(value = "typeProperties.environmentPath") - private String environmentPath; + private Object environmentPath; /** * The integration runtime reference. @@ -103,61 +105,61 @@ public ExecuteSSISPackageActivity withPackageLocation(SSISPackageLocation packag } /** - * Get specifies the runtime to execute SSIS package. Possible values include: 'x64', 'x86'. + * Get specifies the runtime to execute SSIS package. The value should be "x86" or "x64". Type: string (or Expression with resultType string). * * @return the runtime value */ - public SSISExecutionRuntime runtime() { + public Object runtime() { return this.runtime; } /** - * Set specifies the runtime to execute SSIS package. Possible values include: 'x64', 'x86'. + * Set specifies the runtime to execute SSIS package. The value should be "x86" or "x64". Type: string (or Expression with resultType string). * * @param runtime the runtime value to set * @return the ExecuteSSISPackageActivity object itself. */ - public ExecuteSSISPackageActivity withRuntime(SSISExecutionRuntime runtime) { + public ExecuteSSISPackageActivity withRuntime(Object runtime) { this.runtime = runtime; return this; } /** - * Get the logging level of SSIS package execution. + * Get the logging level of SSIS package execution. Type: string (or Expression with resultType string). * * @return the loggingLevel value */ - public String loggingLevel() { + public Object loggingLevel() { return this.loggingLevel; } /** - * Set the logging level of SSIS package execution. + * Set the logging level of SSIS package execution. Type: string (or Expression with resultType string). * * @param loggingLevel the loggingLevel value to set * @return the ExecuteSSISPackageActivity object itself. */ - public ExecuteSSISPackageActivity withLoggingLevel(String loggingLevel) { + public ExecuteSSISPackageActivity withLoggingLevel(Object loggingLevel) { this.loggingLevel = loggingLevel; return this; } /** - * Get the environment path to execute the SSIS package. + * Get the environment path to execute the SSIS package. Type: string (or Expression with resultType string). * * @return the environmentPath value */ - public String environmentPath() { + public Object environmentPath() { return this.environmentPath; } /** - * Set the environment path to execute the SSIS package. + * Set the environment path to execute the SSIS package. Type: string (or Expression with resultType string). * * @param environmentPath the environmentPath value to set * @return the ExecuteSSISPackageActivity object itself. */ - public ExecuteSSISPackageActivity withEnvironmentPath(String environmentPath) { + public ExecuteSSISPackageActivity withEnvironmentPath(Object environmentPath) { this.environmentPath = environmentPath; return this; } diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControls.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControls.java index 81d080dc488b..b07594a9504e 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControls.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExposureControls.java @@ -9,11 +9,13 @@ package com.microsoft.azure.management.datafactoryv2.v2018_06_01; import rx.Observable; +import com.microsoft.azure.management.datafactoryv2.v2018_06_01.implementation.ExposureControlsInner; +import com.microsoft.azure.arm.model.HasInner; /** * Type representing ExposureControls. */ -public interface ExposureControls { +public interface ExposureControls extends HasInner { /** * Get exposure control feature for specific location. * @@ -22,17 +24,6 @@ public interface ExposureControls { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable getFeatureAsync(String locationId, ExposureControlRequest exposureControlRequest); - - /** - * Get exposure control feature for specific data factory. - * - * @param resourceGroupName The resource group name. - * @param factoryName The factory name. - * @param exposureControlRequest The exposure control request. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Observable getFeatureBySubscriptionAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest); + Observable getFeatureValueAsync(String locationId, ExposureControlRequest exposureControlRequest); } diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SSISPackageLocation.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SSISPackageLocation.java index d7105a7b8f4a..63a6149eeaef 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SSISPackageLocation.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SSISPackageLocation.java @@ -15,27 +15,28 @@ */ public class SSISPackageLocation { /** - * The SSIS package path. + * The SSIS package path. Type: string (or Expression with resultType + * string). */ @JsonProperty(value = "packagePath", required = true) - private String packagePath; + private Object packagePath; /** - * Get the SSIS package path. + * Get the SSIS package path. Type: string (or Expression with resultType string). * * @return the packagePath value */ - public String packagePath() { + public Object packagePath() { return this.packagePath; } /** - * Set the SSIS package path. + * Set the SSIS package path. Type: string (or Expression with resultType string). * * @param packagePath the packagePath value to set * @return the SSISPackageLocation object itself. */ - public SSISPackageLocation withPackagePath(String packagePath) { + public SSISPackageLocation withPackagePath(Object packagePath) { this.packagePath = packagePath; return this; } diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsImpl.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsImpl.java index 72d43e3a1d3b..55b8b76a67f2 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsImpl.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsImpl.java @@ -29,21 +29,9 @@ public DataFactoryManager manager() { } @Override - public Observable getFeatureAsync(String locationId, ExposureControlRequest exposureControlRequest) { + public Observable getFeatureValueAsync(String locationId, ExposureControlRequest exposureControlRequest) { ExposureControlsInner client = this.inner(); - return client.getFeatureAsync(locationId, exposureControlRequest) - .map(new Func1() { - @Override - public ExposureControlResponse call(ExposureControlResponseInner inner) { - return new ExposureControlResponseImpl(inner, manager()); - } - }); - } - - @Override - public Observable getFeatureBySubscriptionAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest) { - ExposureControlsInner client = this.inner(); - return client.getFeatureBySubscriptionAsync(resourceGroupName, factoryName, exposureControlRequest) + return client.getFeatureValueAsync(locationId, exposureControlRequest) .map(new Func1() { @Override public ExposureControlResponse call(ExposureControlResponseInner inner) { diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsInner.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsInner.java index df3cd74c527f..cc636548135d 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsInner.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/ExposureControlsInner.java @@ -54,13 +54,9 @@ public ExposureControlsInner(Retrofit retrofit, DataFactoryManagementClientImpl * used by Retrofit to perform actually REST calls. */ interface ExposureControlsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datafactoryv2.v2018_06_01.ExposureControls getFeature" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datafactoryv2.v2018_06_01.ExposureControls getFeatureValue" }) @POST("subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/getFeatureValue") - Observable> getFeature(@Path("subscriptionId") String subscriptionId, @Path("locationId") String locationId, @Query("api-version") String apiVersion, @Body ExposureControlRequest exposureControlRequest, @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.ExposureControls getFeatureBySubscription" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getFeatureValue") - Observable> getFeatureBySubscription(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Query("api-version") String apiVersion, @Body ExposureControlRequest exposureControlRequest, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getFeatureValue(@Path("subscriptionId") String subscriptionId, @Path("locationId") String locationId, @Query("api-version") String apiVersion, @Body ExposureControlRequest exposureControlRequest, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } @@ -74,8 +70,8 @@ interface ExposureControlsService { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ExposureControlResponseInner object if successful. */ - public ExposureControlResponseInner getFeature(String locationId, ExposureControlRequest exposureControlRequest) { - return getFeatureWithServiceResponseAsync(locationId, exposureControlRequest).toBlocking().single().body(); + public ExposureControlResponseInner getFeatureValue(String locationId, ExposureControlRequest exposureControlRequest) { + return getFeatureValueWithServiceResponseAsync(locationId, exposureControlRequest).toBlocking().single().body(); } /** @@ -87,8 +83,8 @@ public ExposureControlResponseInner getFeature(String locationId, ExposureContro * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture getFeatureAsync(String locationId, ExposureControlRequest exposureControlRequest, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getFeatureWithServiceResponseAsync(locationId, exposureControlRequest), serviceCallback); + public ServiceFuture getFeatureValueAsync(String locationId, ExposureControlRequest exposureControlRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getFeatureValueWithServiceResponseAsync(locationId, exposureControlRequest), serviceCallback); } /** @@ -99,8 +95,8 @@ public ServiceFuture getFeatureAsync(String locati * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ExposureControlResponseInner object */ - public Observable getFeatureAsync(String locationId, ExposureControlRequest exposureControlRequest) { - return getFeatureWithServiceResponseAsync(locationId, exposureControlRequest).map(new Func1, ExposureControlResponseInner>() { + public Observable getFeatureValueAsync(String locationId, ExposureControlRequest exposureControlRequest) { + return getFeatureValueWithServiceResponseAsync(locationId, exposureControlRequest).map(new Func1, ExposureControlResponseInner>() { @Override public ExposureControlResponseInner call(ServiceResponse response) { return response.body(); @@ -116,7 +112,7 @@ public ExposureControlResponseInner call(ServiceResponse> getFeatureWithServiceResponseAsync(String locationId, ExposureControlRequest exposureControlRequest) { + public Observable> getFeatureValueWithServiceResponseAsync(String locationId, ExposureControlRequest exposureControlRequest) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -130,106 +126,12 @@ public Observable> getFeatureWithS throw new IllegalArgumentException("Parameter exposureControlRequest is required and cannot be null."); } Validator.validate(exposureControlRequest); - return service.getFeature(this.client.subscriptionId(), locationId, this.client.apiVersion(), exposureControlRequest, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getFeatureDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getFeatureDelegate(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); - } - - /** - * Get exposure control feature for specific data factory. - * - * @param resourceGroupName The resource group name. - * @param factoryName The factory name. - * @param exposureControlRequest The exposure control request. - * @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 ExposureControlResponseInner object if successful. - */ - public ExposureControlResponseInner getFeatureBySubscription(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest) { - return getFeatureBySubscriptionWithServiceResponseAsync(resourceGroupName, factoryName, exposureControlRequest).toBlocking().single().body(); - } - - /** - * Get exposure control feature for specific data factory. - * - * @param resourceGroupName The resource group name. - * @param factoryName The factory name. - * @param exposureControlRequest The exposure control request. - * @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 getFeatureBySubscriptionAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getFeatureBySubscriptionWithServiceResponseAsync(resourceGroupName, factoryName, exposureControlRequest), serviceCallback); - } - - /** - * Get exposure control feature for specific data factory. - * - * @param resourceGroupName The resource group name. - * @param factoryName The factory name. - * @param exposureControlRequest The exposure control request. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExposureControlResponseInner object - */ - public Observable getFeatureBySubscriptionAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest) { - return getFeatureBySubscriptionWithServiceResponseAsync(resourceGroupName, factoryName, exposureControlRequest).map(new Func1, ExposureControlResponseInner>() { - @Override - public ExposureControlResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Get exposure control feature for specific data factory. - * - * @param resourceGroupName The resource group name. - * @param factoryName The factory name. - * @param exposureControlRequest The exposure control request. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExposureControlResponseInner object - */ - public Observable> getFeatureBySubscriptionWithServiceResponseAsync(String resourceGroupName, String factoryName, ExposureControlRequest exposureControlRequest) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (factoryName == null) { - throw new IllegalArgumentException("Parameter factoryName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (exposureControlRequest == null) { - throw new IllegalArgumentException("Parameter exposureControlRequest is required and cannot be null."); - } - Validator.validate(exposureControlRequest); - return service.getFeatureBySubscription(this.client.subscriptionId(), resourceGroupName, factoryName, this.client.apiVersion(), exposureControlRequest, this.client.acceptLanguage(), this.client.userAgent()) + return service.getFeatureValue(this.client.subscriptionId(), locationId, this.client.apiVersion(), exposureControlRequest, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = getFeatureBySubscriptionDelegate(response); + ServiceResponse clientResponse = getFeatureValueDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -238,7 +140,7 @@ public Observable> call(Response getFeatureBySubscriptionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getFeatureValueDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) From c26e7211741258c481eac1408ced66507f7add6e Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 16 Jan 2019 15:39:39 +0000 Subject: [PATCH 4/4] Generated from 32f235ca299351d02b27f0546cb1f06d02125b63 Resolve review comments --- .../ExecuteSSISPackageActivity.java | 66 ++++-- .../SSISExecutionCredential.java | 95 +++++++++ .../SSISPackageLocation.java | 13 +- .../v2018_06_01/ControlActivity.java | 2 + .../ExecuteSSISPackageActivity.java | 26 +++ .../v2018_06_01/SSISExecutionCredential.java | 95 +++++++++ .../v2018_06_01/ValidationActivity.java | 136 ++++++++++++ .../v2018_06_01/WebHookActivity.java | 197 ++++++++++++++++++ .../v2018_06_01/WebHookActivityMethod.java | 38 ++++ .../implementation/DatasetInner.java | 28 +++ 10 files changed, 671 insertions(+), 25 deletions(-) create mode 100644 datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/SSISExecutionCredential.java create mode 100644 datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SSISExecutionCredential.java create mode 100644 datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ValidationActivity.java create mode 100644 datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/WebHookActivity.java create mode 100644 datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/WebHookActivityMethod.java diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/ExecuteSSISPackageActivity.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/ExecuteSSISPackageActivity.java index 114ca9fe72d7..4e9e663022e6 100644 --- a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/ExecuteSSISPackageActivity.java +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/ExecuteSSISPackageActivity.java @@ -28,23 +28,31 @@ public class ExecuteSSISPackageActivity extends ExecutionActivity { private SSISPackageLocation packageLocation; /** - * Specifies the runtime to execute SSIS package. Possible values include: - * 'x64', 'x86'. + * Specifies the runtime to execute SSIS package. The value should be "x86" + * or "x64". Type: string (or Expression with resultType string). */ @JsonProperty(value = "typeProperties.runtime") - private SSISExecutionRuntime runtime; + private Object runtime; /** - * The logging level of SSIS package execution. + * The logging level of SSIS package execution. Type: string (or Expression + * with resultType string). */ @JsonProperty(value = "typeProperties.loggingLevel") - private String loggingLevel; + private Object loggingLevel; /** - * The environment path to execute the SSIS package. + * The environment path to execute the SSIS package. Type: string (or + * Expression with resultType string). */ @JsonProperty(value = "typeProperties.environmentPath") - private String environmentPath; + private Object environmentPath; + + /** + * The package execution credential. + */ + @JsonProperty(value = "typeProperties.executionCredential") + private Map executionCredential; /** * The integration runtime reference. @@ -103,65 +111,85 @@ public ExecuteSSISPackageActivity withPackageLocation(SSISPackageLocation packag } /** - * Get specifies the runtime to execute SSIS package. Possible values include: 'x64', 'x86'. + * Get specifies the runtime to execute SSIS package. The value should be "x86" or "x64". Type: string (or Expression with resultType string). * * @return the runtime value */ - public SSISExecutionRuntime runtime() { + public Object runtime() { return this.runtime; } /** - * Set specifies the runtime to execute SSIS package. Possible values include: 'x64', 'x86'. + * Set specifies the runtime to execute SSIS package. The value should be "x86" or "x64". Type: string (or Expression with resultType string). * * @param runtime the runtime value to set * @return the ExecuteSSISPackageActivity object itself. */ - public ExecuteSSISPackageActivity withRuntime(SSISExecutionRuntime runtime) { + public ExecuteSSISPackageActivity withRuntime(Object runtime) { this.runtime = runtime; return this; } /** - * Get the logging level of SSIS package execution. + * Get the logging level of SSIS package execution. Type: string (or Expression with resultType string). * * @return the loggingLevel value */ - public String loggingLevel() { + public Object loggingLevel() { return this.loggingLevel; } /** - * Set the logging level of SSIS package execution. + * Set the logging level of SSIS package execution. Type: string (or Expression with resultType string). * * @param loggingLevel the loggingLevel value to set * @return the ExecuteSSISPackageActivity object itself. */ - public ExecuteSSISPackageActivity withLoggingLevel(String loggingLevel) { + public ExecuteSSISPackageActivity withLoggingLevel(Object loggingLevel) { this.loggingLevel = loggingLevel; return this; } /** - * Get the environment path to execute the SSIS package. + * Get the environment path to execute the SSIS package. Type: string (or Expression with resultType string). * * @return the environmentPath value */ - public String environmentPath() { + public Object environmentPath() { return this.environmentPath; } /** - * Set the environment path to execute the SSIS package. + * Set the environment path to execute the SSIS package. Type: string (or Expression with resultType string). * * @param environmentPath the environmentPath value to set * @return the ExecuteSSISPackageActivity object itself. */ - public ExecuteSSISPackageActivity withEnvironmentPath(String environmentPath) { + public ExecuteSSISPackageActivity withEnvironmentPath(Object environmentPath) { this.environmentPath = environmentPath; return this; } + /** + * Get the package execution credential. + * + * @return the executionCredential value + */ + public Map executionCredential() { + return this.executionCredential; + } + + /** + * Set the package execution credential. + * + * @param executionCredential the executionCredential value to set + * @return the ExecuteSSISPackageActivity object itself. + */ + public ExecuteSSISPackageActivity withExecutionCredential(Map executionCredential) { + this.executionCredential = executionCredential; + return this; + } + /** * Get the integration runtime reference. * diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/SSISExecutionCredential.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/SSISExecutionCredential.java new file mode 100644 index 000000000000..96a27b2e8c9d --- /dev/null +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/SSISExecutionCredential.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SSIS package execution credential. + */ +public class SSISExecutionCredential { + /** + * Domain for windows authentication. + */ + @JsonProperty(value = "domain", required = true) + private Object domain; + + /** + * UseName for windows authentication. + */ + @JsonProperty(value = "userName", required = true) + private Object userName; + + /** + * Password for windows authentication. + */ + @JsonProperty(value = "password", required = true) + private SecureString password; + + /** + * Get domain for windows authentication. + * + * @return the domain value + */ + public Object domain() { + return this.domain; + } + + /** + * Set domain for windows authentication. + * + * @param domain the domain value to set + * @return the SSISExecutionCredential object itself. + */ + public SSISExecutionCredential withDomain(Object domain) { + this.domain = domain; + return this; + } + + /** + * Get useName for windows authentication. + * + * @return the userName value + */ + public Object userName() { + return this.userName; + } + + /** + * Set useName for windows authentication. + * + * @param userName the userName value to set + * @return the SSISExecutionCredential object itself. + */ + public SSISExecutionCredential withUserName(Object userName) { + this.userName = userName; + return this; + } + + /** + * Get password for windows authentication. + * + * @return the password value + */ + public SecureString password() { + return this.password; + } + + /** + * Set password for windows authentication. + * + * @param password the password value to set + * @return the SSISExecutionCredential object itself. + */ + public SSISExecutionCredential withPassword(SecureString password) { + this.password = password; + return this; + } + +} diff --git a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/SSISPackageLocation.java b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/SSISPackageLocation.java index 6f7665c1530b..c746e3669706 100644 --- a/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/SSISPackageLocation.java +++ b/datafactoryv2/resource-manager/v2017_09_01_preview/src/main/java/com/microsoft/azure/management/datafactoryv2/v2017_09_01_preview/SSISPackageLocation.java @@ -15,27 +15,28 @@ */ public class SSISPackageLocation { /** - * The SSIS package path. + * The SSIS package path. Type: string (or Expression with resultType + * string). */ @JsonProperty(value = "packagePath", required = true) - private String packagePath; + private Object packagePath; /** - * Get the SSIS package path. + * Get the SSIS package path. Type: string (or Expression with resultType string). * * @return the packagePath value */ - public String packagePath() { + public Object packagePath() { return this.packagePath; } /** - * Set the SSIS package path. + * Set the SSIS package path. Type: string (or Expression with resultType string). * * @param packagePath the packagePath value to set * @return the SSISPackageLocation object itself. */ - public SSISPackageLocation withPackagePath(String packagePath) { + public SSISPackageLocation withPackagePath(Object packagePath) { this.packagePath = packagePath; return this; } diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ControlActivity.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ControlActivity.java index 7eaddec8aea2..c6f119cc9040 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ControlActivity.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ControlActivity.java @@ -21,10 +21,12 @@ @JsonSubTypes.Type(name = "AppendVariable", value = AppendVariableActivity.class), @JsonSubTypes.Type(name = "SetVariable", value = SetVariableActivity.class), @JsonSubTypes.Type(name = "Filter", value = FilterActivity.class), + @JsonSubTypes.Type(name = "Validation", value = ValidationActivity.class), @JsonSubTypes.Type(name = "Until", value = UntilActivity.class), @JsonSubTypes.Type(name = "Wait", value = WaitActivity.class), @JsonSubTypes.Type(name = "ForEach", value = ForEachActivity.class), @JsonSubTypes.Type(name = "IfCondition", value = IfConditionActivity.class), + @JsonSubTypes.Type(name = "WebHook", value = WebHookActivity.class), @JsonSubTypes.Type(name = "ExecutePipeline", value = ExecutePipelineActivity.class) }) public class ControlActivity extends Activity { diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExecuteSSISPackageActivity.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExecuteSSISPackageActivity.java index a4849889cdea..342c6ac02e5d 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExecuteSSISPackageActivity.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ExecuteSSISPackageActivity.java @@ -48,6 +48,12 @@ public class ExecuteSSISPackageActivity extends ExecutionActivity { @JsonProperty(value = "typeProperties.environmentPath") private Object environmentPath; + /** + * The package execution credential. + */ + @JsonProperty(value = "typeProperties.executionCredential") + private Map executionCredential; + /** * The integration runtime reference. */ @@ -164,6 +170,26 @@ public ExecuteSSISPackageActivity withEnvironmentPath(Object environmentPath) { return this; } + /** + * Get the package execution credential. + * + * @return the executionCredential value + */ + public Map executionCredential() { + return this.executionCredential; + } + + /** + * Set the package execution credential. + * + * @param executionCredential the executionCredential value to set + * @return the ExecuteSSISPackageActivity object itself. + */ + public ExecuteSSISPackageActivity withExecutionCredential(Map executionCredential) { + this.executionCredential = executionCredential; + return this; + } + /** * Get the integration runtime reference. * diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SSISExecutionCredential.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SSISExecutionCredential.java new file mode 100644 index 000000000000..453a9459f026 --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/SSISExecutionCredential.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datafactoryv2.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SSIS package execution credential. + */ +public class SSISExecutionCredential { + /** + * Domain for windows authentication. + */ + @JsonProperty(value = "domain", required = true) + private Object domain; + + /** + * UseName for windows authentication. + */ + @JsonProperty(value = "userName", required = true) + private Object userName; + + /** + * Password for windows authentication. + */ + @JsonProperty(value = "password", required = true) + private SecureString password; + + /** + * Get domain for windows authentication. + * + * @return the domain value + */ + public Object domain() { + return this.domain; + } + + /** + * Set domain for windows authentication. + * + * @param domain the domain value to set + * @return the SSISExecutionCredential object itself. + */ + public SSISExecutionCredential withDomain(Object domain) { + this.domain = domain; + return this; + } + + /** + * Get useName for windows authentication. + * + * @return the userName value + */ + public Object userName() { + return this.userName; + } + + /** + * Set useName for windows authentication. + * + * @param userName the userName value to set + * @return the SSISExecutionCredential object itself. + */ + public SSISExecutionCredential withUserName(Object userName) { + this.userName = userName; + return this; + } + + /** + * Get password for windows authentication. + * + * @return the password value + */ + public SecureString password() { + return this.password; + } + + /** + * Set password for windows authentication. + * + * @param password the password value to set + * @return the SSISExecutionCredential object itself. + */ + public SSISExecutionCredential withPassword(SecureString password) { + this.password = password; + return this; + } + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ValidationActivity.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ValidationActivity.java new file mode 100644 index 000000000000..b86e551bf9de --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/ValidationActivity.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datafactoryv2.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * This activity blocks execution until a file has been validated to exist, + * with an optional minimum size, or the timeout is reached, whichever is + * earlier. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("Validation") +@JsonFlatten +public class ValidationActivity extends ControlActivity { + /** + * Specifies the timeout for the activity to run. If there is no value + * specified, it takes the value of TimeSpan.FromDays(7) which is 1 week as + * default. Type: string (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). Type: string (or + * Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + */ + @JsonProperty(value = "typeProperties.timeout") + private Object timeout; + + /** + * A delay in seconds between validation attempts. If no value is + * specified, 10 seconds will be used as the default. + */ + @JsonProperty(value = "typeProperties.sleep") + private Integer sleep; + + /** + * Minimum size of a file in byte. If no value is specified, 0 byte will be + * used as the default. + */ + @JsonProperty(value = "typeProperties.minimumSize") + private Integer minimumSize; + + /** + * Validation activity dataset reference. + */ + @JsonProperty(value = "typeProperties.dataset", required = true) + private DatasetReference dataset; + + /** + * Get specifies the timeout for the activity to run. If there is no value specified, it takes the value of TimeSpan.FromDays(7) which is 1 week as default. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * + * @return the timeout value + */ + public Object timeout() { + return this.timeout; + } + + /** + * Set specifies the timeout for the activity to run. If there is no value specified, it takes the value of TimeSpan.FromDays(7) which is 1 week as default. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * + * @param timeout the timeout value to set + * @return the ValidationActivity object itself. + */ + public ValidationActivity withTimeout(Object timeout) { + this.timeout = timeout; + return this; + } + + /** + * Get a delay in seconds between validation attempts. If no value is specified, 10 seconds will be used as the default. + * + * @return the sleep value + */ + public Integer sleep() { + return this.sleep; + } + + /** + * Set a delay in seconds between validation attempts. If no value is specified, 10 seconds will be used as the default. + * + * @param sleep the sleep value to set + * @return the ValidationActivity object itself. + */ + public ValidationActivity withSleep(Integer sleep) { + this.sleep = sleep; + return this; + } + + /** + * Get minimum size of a file in byte. If no value is specified, 0 byte will be used as the default. + * + * @return the minimumSize value + */ + public Integer minimumSize() { + return this.minimumSize; + } + + /** + * Set minimum size of a file in byte. If no value is specified, 0 byte will be used as the default. + * + * @param minimumSize the minimumSize value to set + * @return the ValidationActivity object itself. + */ + public ValidationActivity withMinimumSize(Integer minimumSize) { + this.minimumSize = minimumSize; + return this; + } + + /** + * Get validation activity dataset reference. + * + * @return the dataset value + */ + public DatasetReference dataset() { + return this.dataset; + } + + /** + * Set validation activity dataset reference. + * + * @param dataset the dataset value to set + * @return the ValidationActivity object itself. + */ + public ValidationActivity withDataset(DatasetReference dataset) { + this.dataset = dataset; + return this; + } + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/WebHookActivity.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/WebHookActivity.java new file mode 100644 index 000000000000..9cdfd3267013 --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/WebHookActivity.java @@ -0,0 +1,197 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datafactoryv2.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * WebHook activity. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("WebHook") +@JsonFlatten +public class WebHookActivity extends ControlActivity { + /** + * Rest API method for target endpoint. + */ + @JsonProperty(value = "typeProperties.method", required = true) + private String method; + + /** + * WebHook activity target endpoint and path. Type: string (or Expression + * with resultType string). + */ + @JsonProperty(value = "typeProperties.url", required = true) + private Object url; + + /** + * Specifies the timeout within which the webhook should be called back. If + * there is no value specified, it takes the value of + * TimeSpan.FromMinutes(10) which is 10 minutes as default. Type: string + * (or Expression with resultType string), pattern: + * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + */ + @JsonProperty(value = "typeProperties.timeout") + private Object timeout; + + /** + * Represents the headers that will be sent to the request. For example, to + * set the language and type on a request: "headers" : { "Accept-Language": + * "en-us", "Content-Type": "application/json" }. Type: string (or + * Expression with resultType string). + */ + @JsonProperty(value = "typeProperties.headers") + private Object headers; + + /** + * Represents the payload that will be sent to the endpoint. Required for + * POST/PUT method, not allowed for GET method Type: string (or Expression + * with resultType string). + */ + @JsonProperty(value = "typeProperties.body") + private Object body; + + /** + * Authentication method used for calling the endpoint. + */ + @JsonProperty(value = "typeProperties.authentication") + private WebActivityAuthentication authentication; + + /** + * Creates an instance of WebHookActivity class. + * @param url webHook activity target endpoint and path. Type: string (or Expression with resultType string). + */ + public WebHookActivity() { + method = "POST"; + } + + /** + * Get rest API method for target endpoint. + * + * @return the method value + */ + public String method() { + return this.method; + } + + /** + * Set rest API method for target endpoint. + * + * @param method the method value to set + * @return the WebHookActivity object itself. + */ + public WebHookActivity withMethod(String method) { + this.method = method; + return this; + } + + /** + * Get webHook activity target endpoint and path. Type: string (or Expression with resultType string). + * + * @return the url value + */ + public Object url() { + return this.url; + } + + /** + * Set webHook activity target endpoint and path. Type: string (or Expression with resultType string). + * + * @param url the url value to set + * @return the WebHookActivity object itself. + */ + public WebHookActivity withUrl(Object url) { + this.url = url; + return this; + } + + /** + * Get specifies the timeout within which the webhook should be called back. If there is no value specified, it takes the value of TimeSpan.FromMinutes(10) which is 10 minutes as default. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * + * @return the timeout value + */ + public Object timeout() { + return this.timeout; + } + + /** + * Set specifies the timeout within which the webhook should be called back. If there is no value specified, it takes the value of TimeSpan.FromMinutes(10) which is 10 minutes as default. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + * + * @param timeout the timeout value to set + * @return the WebHookActivity object itself. + */ + public WebHookActivity withTimeout(Object timeout) { + this.timeout = timeout; + return this; + } + + /** + * Get represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string). + * + * @return the headers value + */ + public Object headers() { + return this.headers; + } + + /** + * Set represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string). + * + * @param headers the headers value to set + * @return the WebHookActivity object itself. + */ + public WebHookActivity withHeaders(Object headers) { + this.headers = headers; + return this; + } + + /** + * Get represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string). + * + * @return the body value + */ + public Object body() { + return this.body; + } + + /** + * Set represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string). + * + * @param body the body value to set + * @return the WebHookActivity object itself. + */ + public WebHookActivity withBody(Object body) { + this.body = body; + return this; + } + + /** + * Get authentication method used for calling the endpoint. + * + * @return the authentication value + */ + public WebActivityAuthentication authentication() { + return this.authentication; + } + + /** + * Set authentication method used for calling the endpoint. + * + * @param authentication the authentication value to set + * @return the WebHookActivity object itself. + */ + public WebHookActivity withAuthentication(WebActivityAuthentication authentication) { + this.authentication = authentication; + return this; + } + +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/WebHookActivityMethod.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/WebHookActivityMethod.java new file mode 100644 index 000000000000..a3a7c15a294c --- /dev/null +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/WebHookActivityMethod.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datafactoryv2.v2018_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for WebHookActivityMethod. + */ +public final class WebHookActivityMethod extends ExpandableStringEnum { + /** Static value POST for WebHookActivityMethod. */ + public static final WebHookActivityMethod POST = fromString("POST"); + + /** + * Creates or finds a WebHookActivityMethod from its string representation. + * @param name a name to look for + * @return the corresponding WebHookActivityMethod + */ + @JsonCreator + public static WebHookActivityMethod fromString(String name) { + return fromString(name, WebHookActivityMethod.class); + } + + /** + * @return known WebHookActivityMethod values + */ + public static Collection values() { + return values(WebHookActivityMethod.class); + } +} diff --git a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/DatasetInner.java b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/DatasetInner.java index eb9c97ee64bd..85025cc57414 100644 --- a/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/DatasetInner.java +++ b/datafactoryv2/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactoryv2/v2018_06_01/implementation/DatasetInner.java @@ -99,6 +99,14 @@ public class DatasetInner { @JsonProperty(value = "structure") private Object structure; + /** + * Columns that define the physical type schema of the dataset. Type: array + * (or Expression with resultType array), itemType: + * DatasetSchemaDataElement. + */ + @JsonProperty(value = "schema") + private Object schema; + /** * Linked service reference. */ @@ -184,6 +192,26 @@ public DatasetInner withStructure(Object structure) { return this; } + /** + * Get columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + * + * @return the schema value + */ + public Object schema() { + return this.schema; + } + + /** + * Set columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + * + * @param schema the schema value to set + * @return the DatasetInner object itself. + */ + public DatasetInner withSchema(Object schema) { + this.schema = schema; + return this; + } + /** * Get linked service reference. *