diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionSharedKeyInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionSharedKeyInner.java index c61fe6fde53..a744e91b4fd 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionSharedKeyInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionSharedKeyInner.java @@ -9,11 +9,12 @@ package com.microsoft.azure.management.network.implementation; import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.SubResource; /** * Response for GetConnectionSharedKey API service call. */ -public class ConnectionSharedKeyInner { +public class ConnectionSharedKeyInner extends SubResource { /** * The virtual network connection shared key value. */ diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionsInner.java index 518cc122778..b6c9d6cf67c 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionsInner.java @@ -97,11 +97,11 @@ interface VirtualNetworkGatewayConnectionsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGatewayConnections setSharedKey" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey") - Observable> setSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ConnectionSharedKeyInner parameters, @Header("User-Agent") String userAgent); + Observable> setSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Body ConnectionSharedKeyInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGatewayConnections beginSetSharedKey" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey") - Observable> beginSetSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ConnectionSharedKeyInner parameters, @Header("User-Agent") String userAgent); + Observable> beginSetSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Body ConnectionSharedKeyInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGatewayConnections getSharedKey" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey") @@ -536,9 +536,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * @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 VirtualNetworkGatewayConnectionListEntityInner object if successful. + * @return the VirtualNetworkGatewayConnectionInner object if successful. */ - public VirtualNetworkGatewayConnectionListEntityInner updateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + public VirtualNetworkGatewayConnectionInner updateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName) { return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().last().body(); } @@ -551,7 +551,7 @@ public VirtualNetworkGatewayConnectionListEntityInner updateTags(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback serviceCallback) { + public ServiceFuture updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback); } @@ -563,10 +563,10 @@ public ServiceFuture updateTagsA * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1, VirtualNetworkGatewayConnectionListEntityInner>() { + public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1, VirtualNetworkGatewayConnectionInner>() { @Override - public VirtualNetworkGatewayConnectionListEntityInner call(ServiceResponse response) { + public VirtualNetworkGatewayConnectionInner call(ServiceResponse response) { return response.body(); } }); @@ -580,7 +580,7 @@ public VirtualNetworkGatewayConnectionListEntityInner call(ServiceResponse> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -595,7 +595,7 @@ public Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** * Updates a virtual network gateway connection tags. @@ -606,9 +606,9 @@ public Observable tags) { + public VirtualNetworkGatewayConnectionInner updateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).toBlocking().last().body(); } @@ -622,7 +622,7 @@ public VirtualNetworkGatewayConnectionListEntityInner updateTags(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags, final ServiceCallback serviceCallback) { + public ServiceFuture updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags), serviceCallback); } @@ -635,10 +635,10 @@ public ServiceFuture updateTagsA * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).map(new Func1, VirtualNetworkGatewayConnectionListEntityInner>() { + public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).map(new Func1, VirtualNetworkGatewayConnectionInner>() { @Override - public VirtualNetworkGatewayConnectionListEntityInner call(ServiceResponse response) { + public VirtualNetworkGatewayConnectionInner call(ServiceResponse response) { return response.body(); } }); @@ -653,7 +653,7 @@ public VirtualNetworkGatewayConnectionListEntityInner call(ServiceResponse> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -668,7 +668,7 @@ public Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -679,9 +679,9 @@ public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback serviceCallback) { + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback); } @@ -704,12 +704,12 @@ public ServiceFuture beginUpdate * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkGatewayConnectionListEntityInner object + * @return the observable to the VirtualNetworkGatewayConnectionInner object */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1, VirtualNetworkGatewayConnectionListEntityInner>() { + public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1, VirtualNetworkGatewayConnectionInner>() { @Override - public VirtualNetworkGatewayConnectionListEntityInner call(ServiceResponse response) { + public VirtualNetworkGatewayConnectionInner call(ServiceResponse response) { return response.body(); } }); @@ -721,9 +721,9 @@ public VirtualNetworkGatewayConnectionListEntityInner call(ServiceResponse> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -738,11 +738,11 @@ public Observable, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -760,9 +760,9 @@ public Observable tags) { + public VirtualNetworkGatewayConnectionInner beginUpdateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).toBlocking().single().body(); } @@ -776,7 +776,7 @@ public VirtualNetworkGatewayConnectionListEntityInner beginUpdateTags(String res * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags, final ServiceCallback serviceCallback) { + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags), serviceCallback); } @@ -787,12 +787,12 @@ public ServiceFuture beginUpdate * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. * @param tags Resource tags. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkGatewayConnectionListEntityInner object + * @return the observable to the VirtualNetworkGatewayConnectionInner object */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).map(new Func1, VirtualNetworkGatewayConnectionListEntityInner>() { + public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).map(new Func1, VirtualNetworkGatewayConnectionInner>() { @Override - public VirtualNetworkGatewayConnectionListEntityInner call(ServiceResponse response) { + public VirtualNetworkGatewayConnectionInner call(ServiceResponse response) { return response.body(); } }); @@ -805,9 +805,9 @@ public VirtualNetworkGatewayConnectionListEntityInner call(ServiceResponse> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -822,11 +822,11 @@ public Observable, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -835,9 +835,9 @@ public Observable beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginUpdateTagsDelegate(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); } @@ -847,14 +847,14 @@ private ServiceResponse beginUpd * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. - * @param value The virtual network connection shared key value. + * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider. * @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 ConnectionSharedKeyInner object if successful. */ - public ConnectionSharedKeyInner setSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, String value) { - return setSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, value).toBlocking().last().body(); + public ConnectionSharedKeyInner setSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) { + return setSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocking().last().body(); } /** @@ -862,13 +862,13 @@ public ConnectionSharedKeyInner setSharedKey(String resourceGroupName, String vi * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. - * @param value The virtual network connection shared key value. + * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider. * @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 setSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String value, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(setSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, value), serviceCallback); + public ServiceFuture setSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(setSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters), serviceCallback); } /** @@ -876,12 +876,12 @@ public ServiceFuture setSharedKeyAsync(String resource * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. - * @param value The virtual network connection shared key value. + * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable setSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String value) { - return setSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, value).map(new Func1, ConnectionSharedKeyInner>() { + public Observable setSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) { + return setSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).map(new Func1, ConnectionSharedKeyInner>() { @Override public ConnectionSharedKeyInner call(ServiceResponse response) { return response.body(); @@ -894,11 +894,11 @@ public ConnectionSharedKeyInner call(ServiceResponse r * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. - * @param value The virtual network connection shared key value. + * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> setSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String value) { + public Observable> setSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -908,13 +908,12 @@ public Observable> setSharedKeyWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (value == null) { - throw new IllegalArgumentException("Parameter value is required and cannot be null."); + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } + Validator.validate(parameters); final String apiVersion = "2018-06-01"; - ConnectionSharedKeyInner parameters = new ConnectionSharedKeyInner(); - parameters.withValue(value); - Observable> observable = service.setSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + Observable> observable = service.setSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -923,14 +922,14 @@ public Observable> setSharedKeyWithSer * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. - * @param value The virtual network connection shared key value. + * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider. * @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 ConnectionSharedKeyInner object if successful. */ - public ConnectionSharedKeyInner beginSetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, String value) { - return beginSetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, value).toBlocking().single().body(); + public ConnectionSharedKeyInner beginSetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) { + return beginSetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocking().single().body(); } /** @@ -938,13 +937,13 @@ public ConnectionSharedKeyInner beginSetSharedKey(String resourceGroupName, Stri * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. - * @param value The virtual network connection shared key value. + * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider. * @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 beginSetSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String value, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginSetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, value), serviceCallback); + public ServiceFuture beginSetSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginSetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters), serviceCallback); } /** @@ -952,12 +951,12 @@ public ServiceFuture beginSetSharedKeyAsync(String res * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. - * @param value The virtual network connection shared key value. + * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ConnectionSharedKeyInner object */ - public Observable beginSetSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String value) { - return beginSetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, value).map(new Func1, ConnectionSharedKeyInner>() { + public Observable beginSetSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) { + return beginSetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).map(new Func1, ConnectionSharedKeyInner>() { @Override public ConnectionSharedKeyInner call(ServiceResponse response) { return response.body(); @@ -970,11 +969,11 @@ public ConnectionSharedKeyInner call(ServiceResponse r * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. - * @param value The virtual network connection shared key value. + * @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ConnectionSharedKeyInner object */ - public Observable> beginSetSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String value) { + public Observable> beginSetSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -984,13 +983,12 @@ public Observable> beginSetSharedKeyWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (value == null) { - throw new IllegalArgumentException("Parameter value is required and cannot be null."); + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } + Validator.validate(parameters); final String apiVersion = "2018-06-01"; - ConnectionSharedKeyInner parameters = new ConnectionSharedKeyInner(); - parameters.withValue(value); - return service.beginSetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + return service.beginSetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) {