From 64a250c083df437d6ec8b83eab1e2ac432c603f1 Mon Sep 17 00:00:00 2001
From: Chuang <54572251+xccc-msft@users.noreply.github.com>
Date: Thu, 16 Jul 2020 15:13:53 +0800
Subject: [PATCH] HDInsight: regenerate package-2018-06-01-preview (#13231)
* HDInsight: regenerate package-2018-06-01-preview
* update pom
---
.../mgmt-v2018_06_01_preview/pom.xml | 4 +-
...AutoscaleConfigurationUpdateParameter.java | 43 +++
.../ClusterCreateProperties.java | 52 +++
.../ClusterGetProperties.java | 52 +++
.../v2018_06_01_preview/Clusters.java | 10 +
.../EncryptionInTransitProperties.java | 44 +++
.../v2018_06_01_preview/NetworkSettings.java | 72 ++++
.../OutboundOnlyPublicNetworkAccessType.java | 41 +++
.../PublicNetworkAccess.java | 41 +++
.../implementation/ClustersImpl.java | 6 +
.../implementation/ClustersInner.java | 333 ++++++++++++++++++
11 files changed, 696 insertions(+), 2 deletions(-)
create mode 100644 sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleConfigurationUpdateParameter.java
create mode 100644 sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/EncryptionInTransitProperties.java
create mode 100644 sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/NetworkSettings.java
create mode 100644 sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/OutboundOnlyPublicNetworkAccessType.java
create mode 100644 sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/PublicNetworkAccess.java
diff --git a/sdk/hdinsight/mgmt-v2018_06_01_preview/pom.xml b/sdk/hdinsight/mgmt-v2018_06_01_preview/pom.xml
index 51cd7aa60a93..7de691d6db1b 100644
--- a/sdk/hdinsight/mgmt-v2018_06_01_preview/pom.xml
+++ b/sdk/hdinsight/mgmt-v2018_06_01_preview/pom.xml
@@ -11,11 +11,11 @@
com.microsoft.azure
azure-arm-parent
- 1.3.1
+ 1.3.2
../../parents/azure-arm-parent/pom.xml
azure-mgmt-hdinsight
- 1.3.3
+ 1.3.4
jar
Microsoft Azure SDK for HDInsight Management
This package contains Microsoft HDInsight Management SDK.
diff --git a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleConfigurationUpdateParameter.java b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleConfigurationUpdateParameter.java
new file mode 100644
index 000000000000..4d602abcc8f2
--- /dev/null
+++ b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleConfigurationUpdateParameter.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.hdinsight.v2018_06_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The autoscale configuration update parameter.
+ */
+public class AutoscaleConfigurationUpdateParameter {
+ /**
+ * The autoscale configuration.
+ */
+ @JsonProperty(value = "autoscale")
+ private Autoscale autoscale;
+
+ /**
+ * Get the autoscale configuration.
+ *
+ * @return the autoscale value
+ */
+ public Autoscale autoscale() {
+ return this.autoscale;
+ }
+
+ /**
+ * Set the autoscale configuration.
+ *
+ * @param autoscale the autoscale value to set
+ * @return the AutoscaleConfigurationUpdateParameter object itself.
+ */
+ public AutoscaleConfigurationUpdateParameter withAutoscale(Autoscale autoscale) {
+ this.autoscale = autoscale;
+ return this;
+ }
+
+}
diff --git a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ClusterCreateProperties.java b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ClusterCreateProperties.java
index ee0e119e1f93..55b741299881 100644
--- a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ClusterCreateProperties.java
+++ b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ClusterCreateProperties.java
@@ -69,12 +69,24 @@ public class ClusterCreateProperties {
@JsonProperty(value = "diskEncryptionProperties")
private DiskEncryptionProperties diskEncryptionProperties;
+ /**
+ * The encryption-in-transit properties.
+ */
+ @JsonProperty(value = "encryptionInTransitProperties")
+ private EncryptionInTransitProperties encryptionInTransitProperties;
+
/**
* The minimal supported tls version.
*/
@JsonProperty(value = "minSupportedTlsVersion")
private String minSupportedTlsVersion;
+ /**
+ * The network settings.
+ */
+ @JsonProperty(value = "networkSettings")
+ private NetworkSettings networkSettings;
+
/**
* Get the version of the cluster.
*
@@ -255,6 +267,26 @@ public ClusterCreateProperties withDiskEncryptionProperties(DiskEncryptionProper
return this;
}
+ /**
+ * Get the encryption-in-transit properties.
+ *
+ * @return the encryptionInTransitProperties value
+ */
+ public EncryptionInTransitProperties encryptionInTransitProperties() {
+ return this.encryptionInTransitProperties;
+ }
+
+ /**
+ * Set the encryption-in-transit properties.
+ *
+ * @param encryptionInTransitProperties the encryptionInTransitProperties value to set
+ * @return the ClusterCreateProperties object itself.
+ */
+ public ClusterCreateProperties withEncryptionInTransitProperties(EncryptionInTransitProperties encryptionInTransitProperties) {
+ this.encryptionInTransitProperties = encryptionInTransitProperties;
+ return this;
+ }
+
/**
* Get the minimal supported tls version.
*
@@ -275,4 +307,24 @@ public ClusterCreateProperties withMinSupportedTlsVersion(String minSupportedTls
return this;
}
+ /**
+ * Get the network settings.
+ *
+ * @return the networkSettings value
+ */
+ public NetworkSettings networkSettings() {
+ return this.networkSettings;
+ }
+
+ /**
+ * Set the network settings.
+ *
+ * @param networkSettings the networkSettings value to set
+ * @return the ClusterCreateProperties object itself.
+ */
+ public ClusterCreateProperties withNetworkSettings(NetworkSettings networkSettings) {
+ this.networkSettings = networkSettings;
+ return this;
+ }
+
}
diff --git a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ClusterGetProperties.java b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ClusterGetProperties.java
index 36634a6b967b..8d553e6b8137 100644
--- a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ClusterGetProperties.java
+++ b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ClusterGetProperties.java
@@ -102,12 +102,24 @@ public class ClusterGetProperties {
@JsonProperty(value = "diskEncryptionProperties")
private DiskEncryptionProperties diskEncryptionProperties;
+ /**
+ * The encryption-in-transit properties.
+ */
+ @JsonProperty(value = "encryptionInTransitProperties")
+ private EncryptionInTransitProperties encryptionInTransitProperties;
+
/**
* The minimal supported tls version.
*/
@JsonProperty(value = "minSupportedTlsVersion")
private String minSupportedTlsVersion;
+ /**
+ * The network settings.
+ */
+ @JsonProperty(value = "networkSettings")
+ private NetworkSettings networkSettings;
+
/**
* Get the version of the cluster.
*
@@ -388,6 +400,26 @@ public ClusterGetProperties withDiskEncryptionProperties(DiskEncryptionPropertie
return this;
}
+ /**
+ * Get the encryption-in-transit properties.
+ *
+ * @return the encryptionInTransitProperties value
+ */
+ public EncryptionInTransitProperties encryptionInTransitProperties() {
+ return this.encryptionInTransitProperties;
+ }
+
+ /**
+ * Set the encryption-in-transit properties.
+ *
+ * @param encryptionInTransitProperties the encryptionInTransitProperties value to set
+ * @return the ClusterGetProperties object itself.
+ */
+ public ClusterGetProperties withEncryptionInTransitProperties(EncryptionInTransitProperties encryptionInTransitProperties) {
+ this.encryptionInTransitProperties = encryptionInTransitProperties;
+ return this;
+ }
+
/**
* Get the minimal supported tls version.
*
@@ -408,4 +440,24 @@ public ClusterGetProperties withMinSupportedTlsVersion(String minSupportedTlsVer
return this;
}
+ /**
+ * Get the network settings.
+ *
+ * @return the networkSettings value
+ */
+ public NetworkSettings networkSettings() {
+ return this.networkSettings;
+ }
+
+ /**
+ * Set the network settings.
+ *
+ * @param networkSettings the networkSettings value to set
+ * @return the ClusterGetProperties object itself.
+ */
+ public ClusterGetProperties withNetworkSettings(NetworkSettings networkSettings) {
+ this.networkSettings = networkSettings;
+ return this;
+ }
+
}
diff --git a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/Clusters.java b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/Clusters.java
index f606528226f9..cf19e298813b 100644
--- a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/Clusters.java
+++ b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/Clusters.java
@@ -76,4 +76,14 @@ public interface Clusters extends SupportsCreating {
+ /** Static value PublicLoadBalancer for OutboundOnlyPublicNetworkAccessType. */
+ public static final OutboundOnlyPublicNetworkAccessType PUBLIC_LOAD_BALANCER = fromString("PublicLoadBalancer");
+
+ /** Static value UDR for OutboundOnlyPublicNetworkAccessType. */
+ public static final OutboundOnlyPublicNetworkAccessType UDR = fromString("UDR");
+
+ /**
+ * Creates or finds a OutboundOnlyPublicNetworkAccessType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding OutboundOnlyPublicNetworkAccessType
+ */
+ @JsonCreator
+ public static OutboundOnlyPublicNetworkAccessType fromString(String name) {
+ return fromString(name, OutboundOnlyPublicNetworkAccessType.class);
+ }
+
+ /**
+ * @return known OutboundOnlyPublicNetworkAccessType values
+ */
+ public static Collection values() {
+ return values(OutboundOnlyPublicNetworkAccessType.class);
+ }
+}
diff --git a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/PublicNetworkAccess.java b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/PublicNetworkAccess.java
new file mode 100644
index 000000000000..9f83fac49300
--- /dev/null
+++ b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/PublicNetworkAccess.java
@@ -0,0 +1,41 @@
+/**
+ * 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.hdinsight.v2018_06_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for PublicNetworkAccess.
+ */
+public final class PublicNetworkAccess extends ExpandableStringEnum {
+ /** Static value InboundAndOutbound for PublicNetworkAccess. */
+ public static final PublicNetworkAccess INBOUND_AND_OUTBOUND = fromString("InboundAndOutbound");
+
+ /** Static value OutboundOnly for PublicNetworkAccess. */
+ public static final PublicNetworkAccess OUTBOUND_ONLY = fromString("OutboundOnly");
+
+ /**
+ * Creates or finds a PublicNetworkAccess from its string representation.
+ * @param name a name to look for
+ * @return the corresponding PublicNetworkAccess
+ */
+ @JsonCreator
+ public static PublicNetworkAccess fromString(String name) {
+ return fromString(name, PublicNetworkAccess.class);
+ }
+
+ /**
+ * @return known PublicNetworkAccess values
+ */
+ public static Collection values() {
+ return values(PublicNetworkAccess.class);
+ }
+}
diff --git a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersImpl.java b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersImpl.java
index 63400afa4a31..973698a11a66 100644
--- a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersImpl.java
+++ b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersImpl.java
@@ -175,4 +175,10 @@ public Completable resizeAsync(String resourceGroupName, String clusterName) {
return client.resizeAsync(resourceGroupName, clusterName).toCompletable();
}
+ @Override
+ public Completable updateAutoScaleConfigurationAsync(String resourceGroupName, String clusterName) {
+ ClustersInner client = this.inner();
+ return client.updateAutoScaleConfigurationAsync(resourceGroupName, clusterName).toCompletable();
+ }
+
}
diff --git a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java
index a742a7175f99..38fd4130f69d 100644
--- a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java
+++ b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java
@@ -15,6 +15,8 @@
import com.google.common.reflect.TypeToken;
import com.microsoft.azure.AzureServiceFuture;
import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.Autoscale;
+import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.AutoscaleConfigurationUpdateParameter;
import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.ClusterCreateParametersExtended;
import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.ClusterDiskEncryptionParameters;
import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.ClusterPatchParameters;
@@ -109,6 +111,14 @@ interface ClustersService {
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/roles/{roleName}/resize")
Observable> beginResize(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("roleName") String roleName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ClusterResizeParameters parameters, @Header("User-Agent") String userAgent);
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hdinsight.v2018_06_01_preview.Clusters updateAutoScaleConfiguration" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/roles/{roleName}/autoscale")
+ Observable> updateAutoScaleConfiguration(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("roleName") String roleName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AutoscaleConfigurationUpdateParameter parameters, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hdinsight.v2018_06_01_preview.Clusters beginUpdateAutoScaleConfiguration" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/roles/{roleName}/autoscale")
+ Observable> beginUpdateAutoScaleConfiguration(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("roleName") String roleName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AutoscaleConfigurationUpdateParameter parameters, @Header("User-Agent") String userAgent);
+
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hdinsight.v2018_06_01_preview.Clusters list" })
@GET("subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/clusters")
Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@@ -1173,6 +1183,329 @@ private ServiceResponse beginResizeDelegate(Response respons
.build(response);
}
+ /**
+ * Updates the Autoscale Configuration for HDInsight cluster.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void updateAutoScaleConfiguration(String resourceGroupName, String clusterName) {
+ updateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().last().body();
+ }
+
+ /**
+ * Updates the Autoscale Configuration for HDInsight cluster.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster.
+ * @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 updateAutoScaleConfigurationAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(updateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback);
+ }
+
+ /**
+ * Updates the Autoscale Configuration for HDInsight cluster.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable updateAutoScaleConfigurationAsync(String resourceGroupName, String clusterName) {
+ return updateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Updates the Autoscale Configuration for HDInsight cluster.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> updateAutoScaleConfigurationWithServiceResponseAsync(String resourceGroupName, String clusterName) {
+ 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 (clusterName == null) {
+ throw new IllegalArgumentException("Parameter clusterName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final String roleName = "workernode";
+ final Autoscale autoscale = null;
+ AutoscaleConfigurationUpdateParameter parameters = new AutoscaleConfigurationUpdateParameter();
+ parameters.withAutoscale(null);
+ Observable> observable = service.updateAutoScaleConfiguration(this.client.subscriptionId(), resourceGroupName, clusterName, roleName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent());
+ return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType());
+ }
+ /**
+ * Updates the Autoscale Configuration for HDInsight cluster.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster.
+ * @param autoscale The autoscale configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void updateAutoScaleConfiguration(String resourceGroupName, String clusterName, Autoscale autoscale) {
+ updateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName, autoscale).toBlocking().last().body();
+ }
+
+ /**
+ * Updates the Autoscale Configuration for HDInsight cluster.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster.
+ * @param autoscale The autoscale configuration.
+ * @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 updateAutoScaleConfigurationAsync(String resourceGroupName, String clusterName, Autoscale autoscale, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(updateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName, autoscale), serviceCallback);
+ }
+
+ /**
+ * Updates the Autoscale Configuration for HDInsight cluster.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster.
+ * @param autoscale The autoscale configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable updateAutoScaleConfigurationAsync(String resourceGroupName, String clusterName, Autoscale autoscale) {
+ return updateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName, autoscale).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Updates the Autoscale Configuration for HDInsight cluster.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster.
+ * @param autoscale The autoscale configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> updateAutoScaleConfigurationWithServiceResponseAsync(String resourceGroupName, String clusterName, Autoscale autoscale) {
+ 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 (clusterName == null) {
+ throw new IllegalArgumentException("Parameter clusterName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(autoscale);
+ final String roleName = "workernode";
+ AutoscaleConfigurationUpdateParameter parameters = new AutoscaleConfigurationUpdateParameter();
+ parameters.withAutoscale(autoscale);
+ Observable> observable = service.updateAutoScaleConfiguration(this.client.subscriptionId(), resourceGroupName, clusterName, roleName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent());
+ return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Updates the Autoscale Configuration for HDInsight cluster.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void beginUpdateAutoScaleConfiguration(String resourceGroupName, String clusterName) {
+ beginUpdateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body();
+ }
+
+ /**
+ * Updates the Autoscale Configuration for HDInsight cluster.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster.
+ * @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 beginUpdateAutoScaleConfigurationAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginUpdateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback);
+ }
+
+ /**
+ * Updates the Autoscale Configuration for HDInsight cluster.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable beginUpdateAutoScaleConfigurationAsync(String resourceGroupName, String clusterName) {
+ return beginUpdateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Updates the Autoscale Configuration for HDInsight cluster.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> beginUpdateAutoScaleConfigurationWithServiceResponseAsync(String resourceGroupName, String clusterName) {
+ 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 (clusterName == null) {
+ throw new IllegalArgumentException("Parameter clusterName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final String roleName = "workernode";
+ final Autoscale autoscale = null;
+ AutoscaleConfigurationUpdateParameter parameters = new AutoscaleConfigurationUpdateParameter();
+ parameters.withAutoscale(null);
+ return service.beginUpdateAutoScaleConfiguration(this.client.subscriptionId(), resourceGroupName, clusterName, roleName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = beginUpdateAutoScaleConfigurationDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * Updates the Autoscale Configuration for HDInsight cluster.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster.
+ * @param autoscale The autoscale configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void beginUpdateAutoScaleConfiguration(String resourceGroupName, String clusterName, Autoscale autoscale) {
+ beginUpdateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName, autoscale).toBlocking().single().body();
+ }
+
+ /**
+ * Updates the Autoscale Configuration for HDInsight cluster.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster.
+ * @param autoscale The autoscale configuration.
+ * @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 beginUpdateAutoScaleConfigurationAsync(String resourceGroupName, String clusterName, Autoscale autoscale, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginUpdateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName, autoscale), serviceCallback);
+ }
+
+ /**
+ * Updates the Autoscale Configuration for HDInsight cluster.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster.
+ * @param autoscale The autoscale configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable beginUpdateAutoScaleConfigurationAsync(String resourceGroupName, String clusterName, Autoscale autoscale) {
+ return beginUpdateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName, autoscale).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Updates the Autoscale Configuration for HDInsight cluster.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param clusterName The name of the cluster.
+ * @param autoscale The autoscale configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> beginUpdateAutoScaleConfigurationWithServiceResponseAsync(String resourceGroupName, String clusterName, Autoscale autoscale) {
+ 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 (clusterName == null) {
+ throw new IllegalArgumentException("Parameter clusterName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(autoscale);
+ final String roleName = "workernode";
+ AutoscaleConfigurationUpdateParameter parameters = new AutoscaleConfigurationUpdateParameter();
+ parameters.withAutoscale(autoscale);
+ return service.beginUpdateAutoScaleConfiguration(this.client.subscriptionId(), resourceGroupName, clusterName, roleName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = beginUpdateAutoScaleConfigurationDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse beginUpdateAutoScaleConfigurationDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(202, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
/**
* Lists all the HDInsight clusters under the subscription.
*