From 8735b739dea61b526b2614bdae2c65d013a3c5ff Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Wed, 15 Jul 2020 22:24:48 +0000 Subject: [PATCH] Generated from 610cc56953098e99883334480c116ff6b605d8dc Add support for addressprefix in NVA and enableVirtualRouterRoutePropogation in virtualHub --- .../PrivateLinkServicesInner.java | 342 ++---------------- 1 file changed, 30 insertions(+), 312 deletions(-) diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServicesInner.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServicesInner.java index c44acd85a1d97..ca84c6a74a977 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServicesInner.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServicesInner.java @@ -40,8 +40,6 @@ import retrofit2.Response; import rx.functions.Func1; import rx.Observable; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined @@ -121,18 +119,10 @@ interface PrivateLinkServicesService { @POST("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility") Observable> checkPrivateLinkServiceVisibility(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckPrivateLinkServiceVisibilityRequest parameters, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServices beginCheckPrivateLinkServiceVisibility" }) - @POST("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility") - Observable> beginCheckPrivateLinkServiceVisibility(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckPrivateLinkServiceVisibilityRequest parameters, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServices checkPrivateLinkServiceVisibilityByResourceGroup" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility") Observable> checkPrivateLinkServiceVisibilityByResourceGroup(@Path("location") String location, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckPrivateLinkServiceVisibilityRequest parameters, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServices beginCheckPrivateLinkServiceVisibilityByResourceGroup" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility") - Observable> beginCheckPrivateLinkServiceVisibilityByResourceGroup(@Path("location") String location, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckPrivateLinkServiceVisibilityRequest parameters, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServices listAutoApprovedPrivateLinkServices" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices") Observable> listAutoApprovedPrivateLinkServices(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -1441,7 +1431,7 @@ private ServiceResponse> listPrivateEnd * @return the PrivateLinkServiceVisibilityInner object if successful. */ public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibility(String location) { - return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location).toBlocking().last().body(); + return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location).toBlocking().single().body(); } /** @@ -1461,7 +1451,7 @@ public ServiceFuture checkPrivateLinkServiceV * * @param location The location of the domain name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the observable to the PrivateLinkServiceVisibilityInner object */ public Observable checkPrivateLinkServiceVisibilityAsync(String location) { return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location).map(new Func1, PrivateLinkServiceVisibilityInner>() { @@ -1472,134 +1462,6 @@ public PrivateLinkServiceVisibilityInner call(ServiceResponse> checkPrivateLinkServiceVisibilityWithServiceResponseAsync(String location) { - if (location == null) { - throw new IllegalArgumentException("Parameter location is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2019-09-01"; - final String privateLinkServiceAlias = null; - CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); - parameters.withPrivateLinkServiceAlias(null); - Observable> observable = service.checkPrivateLinkServiceVisibility(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); - } - /** - * Checks whether the subscription is visible to private link service. - * - * @param location The location of the domain name. - * @param privateLinkServiceAlias The alias of the private link service. - * @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 PrivateLinkServiceVisibilityInner object if successful. - */ - public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibility(String location, String privateLinkServiceAlias) { - return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).toBlocking().last().body(); - } - - /** - * Checks whether the subscription is visible to private link service. - * - * @param location The location of the domain name. - * @param privateLinkServiceAlias The alias of the private link service. - * @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 checkPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias), serviceCallback); - } - - /** - * Checks whether the subscription is visible to private link service. - * - * @param location The location of the domain name. - * @param privateLinkServiceAlias The alias of the private link service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable checkPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias) { - return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { - @Override - public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Checks whether the subscription is visible to private link service. - * - * @param location The location of the domain name. - * @param privateLinkServiceAlias The alias of the private link service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> checkPrivateLinkServiceVisibilityWithServiceResponseAsync(String location, String privateLinkServiceAlias) { - if (location == null) { - throw new IllegalArgumentException("Parameter location is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2019-09-01"; - CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); - parameters.withPrivateLinkServiceAlias(privateLinkServiceAlias); - Observable> observable = service.checkPrivateLinkServiceVisibility(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); - } - - /** - * Checks whether the subscription is visible to private link service. - * - * @param location The location of the domain name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PrivateLinkServiceVisibilityInner object if successful. - */ - public PrivateLinkServiceVisibilityInner beginCheckPrivateLinkServiceVisibility(String location) { - return beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(location).toBlocking().single().body(); - } - - /** - * Checks whether the subscription is visible to private link service. - * - * @param location The location of the domain name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCheckPrivateLinkServiceVisibilityAsync(String location, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(location), serviceCallback); - } - - /** - * Checks whether the subscription is visible to private link service. - * - * @param location The location of the domain name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PrivateLinkServiceVisibilityInner object - */ - public Observable beginCheckPrivateLinkServiceVisibilityAsync(String location) { - return beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(location).map(new Func1, PrivateLinkServiceVisibilityInner>() { - @Override - public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { - return response.body(); - } - }); - } - /** * Checks whether the subscription is visible to private link service. * @@ -1607,7 +1469,7 @@ public PrivateLinkServiceVisibilityInner call(ServiceResponse> beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(String location) { + public Observable> checkPrivateLinkServiceVisibilityWithServiceResponseAsync(String location) { if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } @@ -1618,12 +1480,12 @@ public Observable> beginCheck final String privateLinkServiceAlias = null; CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); parameters.withPrivateLinkServiceAlias(null); - return service.beginCheckPrivateLinkServiceVisibility(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + return service.checkPrivateLinkServiceVisibility(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginCheckPrivateLinkServiceVisibilityDelegate(response); + ServiceResponse clientResponse = checkPrivateLinkServiceVisibilityDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1642,8 +1504,8 @@ public Observable> call(Respo * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PrivateLinkServiceVisibilityInner object if successful. */ - public PrivateLinkServiceVisibilityInner beginCheckPrivateLinkServiceVisibility(String location, String privateLinkServiceAlias) { - return beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).toBlocking().single().body(); + public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibility(String location, String privateLinkServiceAlias) { + return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).toBlocking().single().body(); } /** @@ -1655,8 +1517,8 @@ public PrivateLinkServiceVisibilityInner beginCheckPrivateLinkServiceVisibility( * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginCheckPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias), serviceCallback); + public ServiceFuture checkPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias), serviceCallback); } /** @@ -1667,8 +1529,8 @@ public ServiceFuture beginCheckPrivateLinkSer * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PrivateLinkServiceVisibilityInner object */ - public Observable beginCheckPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias) { - return beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { + public Observable checkPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias) { + return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { @Override public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { return response.body(); @@ -1684,7 +1546,7 @@ public PrivateLinkServiceVisibilityInner call(ServiceResponse> beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(String location, String privateLinkServiceAlias) { + public Observable> checkPrivateLinkServiceVisibilityWithServiceResponseAsync(String location, String privateLinkServiceAlias) { if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } @@ -1694,12 +1556,12 @@ public Observable> beginCheck final String apiVersion = "2019-09-01"; CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); parameters.withPrivateLinkServiceAlias(privateLinkServiceAlias); - return service.beginCheckPrivateLinkServiceVisibility(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + return service.checkPrivateLinkServiceVisibility(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginCheckPrivateLinkServiceVisibilityDelegate(response); + ServiceResponse clientResponse = checkPrivateLinkServiceVisibilityDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1708,10 +1570,9 @@ public Observable> call(Respo }); } - private ServiceResponse beginCheckPrivateLinkServiceVisibilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse checkPrivateLinkServiceVisibilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -1727,7 +1588,7 @@ private ServiceResponse beginCheckPrivateLink * @return the PrivateLinkServiceVisibilityInner object if successful. */ public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibilityByResourceGroup(String location, String resourceGroupName) { - return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName).toBlocking().last().body(); + return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName).toBlocking().single().body(); } /** @@ -1749,7 +1610,7 @@ public ServiceFuture checkPrivateLinkServiceV * @param location The location of the domain name. * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the observable to the PrivateLinkServiceVisibilityInner object */ public Observable checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName) { return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName).map(new Func1, PrivateLinkServiceVisibilityInner>() { @@ -1760,148 +1621,6 @@ public PrivateLinkServiceVisibilityInner call(ServiceResponse> checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(String location, String resourceGroupName) { - if (location == null) { - throw new IllegalArgumentException("Parameter location is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2019-09-01"; - final String privateLinkServiceAlias = null; - CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); - parameters.withPrivateLinkServiceAlias(null); - Observable> observable = service.checkPrivateLinkServiceVisibilityByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); - } - /** - * Checks whether the subscription is visible to private link service in the specified resource group. - * - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param privateLinkServiceAlias The alias of the private link service. - * @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 PrivateLinkServiceVisibilityInner object if successful. - */ - public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibilityByResourceGroup(String location, String resourceGroupName, String privateLinkServiceAlias) { - return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).toBlocking().last().body(); - } - - /** - * Checks whether the subscription is visible to private link service in the specified resource group. - * - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param privateLinkServiceAlias The alias of the private link service. - * @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 checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias), serviceCallback); - } - - /** - * Checks whether the subscription is visible to private link service in the specified resource group. - * - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param privateLinkServiceAlias The alias of the private link service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { - return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { - @Override - public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Checks whether the subscription is visible to private link service in the specified resource group. - * - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @param privateLinkServiceAlias The alias of the private link service. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { - if (location == null) { - throw new IllegalArgumentException("Parameter location is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2019-09-01"; - CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); - parameters.withPrivateLinkServiceAlias(privateLinkServiceAlias); - Observable> observable = service.checkPrivateLinkServiceVisibilityByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); - } - - /** - * Checks whether the subscription is visible to private link service in the specified resource group. - * - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @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 PrivateLinkServiceVisibilityInner object if successful. - */ - public PrivateLinkServiceVisibilityInner beginCheckPrivateLinkServiceVisibilityByResourceGroup(String location, String resourceGroupName) { - return beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName).toBlocking().single().body(); - } - - /** - * Checks whether the subscription is visible to private link service in the specified resource group. - * - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @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 beginCheckPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName), serviceCallback); - } - - /** - * Checks whether the subscription is visible to private link service in the specified resource group. - * - * @param location The location of the domain name. - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PrivateLinkServiceVisibilityInner object - */ - public Observable beginCheckPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName) { - return beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName).map(new Func1, PrivateLinkServiceVisibilityInner>() { - @Override - public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { - return response.body(); - } - }); - } - /** * Checks whether the subscription is visible to private link service in the specified resource group. * @@ -1910,7 +1629,7 @@ public PrivateLinkServiceVisibilityInner call(ServiceResponse> beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(String location, String resourceGroupName) { + public Observable> checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(String location, String resourceGroupName) { if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } @@ -1924,12 +1643,12 @@ public Observable> beginCheck final String privateLinkServiceAlias = null; CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); parameters.withPrivateLinkServiceAlias(null); - return service.beginCheckPrivateLinkServiceVisibilityByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + return service.checkPrivateLinkServiceVisibilityByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginCheckPrivateLinkServiceVisibilityByResourceGroupDelegate(response); + ServiceResponse clientResponse = checkPrivateLinkServiceVisibilityByResourceGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1949,8 +1668,8 @@ public Observable> call(Respo * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PrivateLinkServiceVisibilityInner object if successful. */ - public PrivateLinkServiceVisibilityInner beginCheckPrivateLinkServiceVisibilityByResourceGroup(String location, String resourceGroupName, String privateLinkServiceAlias) { - return beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).toBlocking().single().body(); + public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibilityByResourceGroup(String location, String resourceGroupName, String privateLinkServiceAlias) { + return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).toBlocking().single().body(); } /** @@ -1963,8 +1682,8 @@ public PrivateLinkServiceVisibilityInner beginCheckPrivateLinkServiceVisibilityB * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginCheckPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias), serviceCallback); + public ServiceFuture checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias), serviceCallback); } /** @@ -1976,8 +1695,8 @@ public ServiceFuture beginCheckPrivateLinkSer * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PrivateLinkServiceVisibilityInner object */ - public Observable beginCheckPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { - return beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { + public Observable checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { + return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { @Override public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { return response.body(); @@ -1994,7 +1713,7 @@ public PrivateLinkServiceVisibilityInner call(ServiceResponse> beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { + public Observable> checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } @@ -2007,12 +1726,12 @@ public Observable> beginCheck final String apiVersion = "2019-09-01"; CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); parameters.withPrivateLinkServiceAlias(privateLinkServiceAlias); - return service.beginCheckPrivateLinkServiceVisibilityByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + return service.checkPrivateLinkServiceVisibilityByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginCheckPrivateLinkServiceVisibilityByResourceGroupDelegate(response); + ServiceResponse clientResponse = checkPrivateLinkServiceVisibilityByResourceGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2021,10 +1740,9 @@ public Observable> call(Respo }); } - private ServiceResponse beginCheckPrivateLinkServiceVisibilityByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse checkPrivateLinkServiceVisibilityByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); }