diff --git a/sdk/network/mgmt-v2019_07_01/pom.xml b/sdk/network/mgmt-v2019_07_01/pom.xml index 9d834caa6366e..f1871ea45f00a 100644 --- a/sdk/network/mgmt-v2019_07_01/pom.xml +++ b/sdk/network/mgmt-v2019_07_01/pom.xml @@ -11,8 +11,8 @@ com.microsoft.azure azure-arm-parent - 1.2.0 - ../../parents/azure-arm-parent + 1.1.0 + ../../../pom.management.xml azure-mgmt-network 1.0.0-beta diff --git a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/PrivateLinkServiceConnectionState.java b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/PrivateLinkServiceConnectionState.java index 8ac42cedc5ece..632614e85f5c4 100644 --- a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/PrivateLinkServiceConnectionState.java +++ b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/PrivateLinkServiceConnectionState.java @@ -32,8 +32,8 @@ public class PrivateLinkServiceConnectionState { * A message indicating if changes on the service provider require any * updates on the consumer. */ - @JsonProperty(value = "actionRequired") - private String actionRequired; + @JsonProperty(value = "actionsRequired") + private String actionsRequired; /** * Get indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. @@ -78,20 +78,20 @@ public PrivateLinkServiceConnectionState withDescription(String description) { /** * Get a message indicating if changes on the service provider require any updates on the consumer. * - * @return the actionRequired value + * @return the actionsRequired value */ - public String actionRequired() { - return this.actionRequired; + public String actionsRequired() { + return this.actionsRequired; } /** * Set a message indicating if changes on the service provider require any updates on the consumer. * - * @param actionRequired the actionRequired value to set + * @param actionsRequired the actionsRequired value to set * @return the PrivateLinkServiceConnectionState object itself. */ - public PrivateLinkServiceConnectionState withActionRequired(String actionRequired) { - this.actionRequired = actionRequired; + public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { + this.actionsRequired = actionsRequired; return this; } diff --git a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ApplicationGatewaysImpl.java b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ApplicationGatewaysImpl.java index fc3444a8c7767..bbba7d75bc290 100644 --- a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ApplicationGatewaysImpl.java +++ b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ApplicationGatewaysImpl.java @@ -106,13 +106,13 @@ public ApplicationGateway call(ApplicationGatewayInner inner) { @Override public PagedList list() { ApplicationGatewaysInner client = this.inner(); - return this.wrapList(client.listAll()); + return this.wrapList(client.list()); } @Override public Observable listAsync() { ApplicationGatewaysInner client = this.inner(); - return client.listAllAsync() + return client.listAsync() .flatMapIterable(new Func1, Iterable>() { @Override public Iterable call(Page page) { diff --git a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ApplicationGatewaysInner.java b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ApplicationGatewaysInner.java index 745356b591ec5..8d59f13e97a7b 100644 --- a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ApplicationGatewaysInner.java +++ b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ApplicationGatewaysInner.java @@ -10,6 +10,7 @@ import com.microsoft.azure.arm.collection.InnerSupportsGet; import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; @@ -44,14 +45,12 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined * in ApplicationGateways. */ -public class ApplicationGatewaysInner implements InnerSupportsGet, InnerSupportsDelete { +public class ApplicationGatewaysInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private ApplicationGatewaysService service; /** The service client containing this operation class. */ @@ -105,9 +104,9 @@ interface ApplicationGatewaysService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways") Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @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.v2019_07_01.ApplicationGateways listAll" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_07_01.ApplicationGateways list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways") - Observable> listAll(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> list(@Path("subscriptionId") String subscriptionId, @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.v2019_07_01.ApplicationGateways start" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start") @@ -173,9 +172,9 @@ interface ApplicationGatewaysService { @GET Observable> listByResourceGroupNext(@Url String nextUrl, @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.v2019_07_01.ApplicationGateways listAllNext" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_07_01.ApplicationGateways listNext" }) @GET - Observable> listAllNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listNext(@Url String nextUrl, @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.v2019_07_01.ApplicationGateways listAvailableSslPredefinedPoliciesNext" }) @GET @@ -1021,12 +1020,12 @@ private ServiceResponse> listByResourceGroupDe * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<ApplicationGatewayInner> object if successful. */ - public PagedList listAll() { - ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -1038,13 +1037,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAllAsync(final ListOperationCallback serviceCallback) { + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listAllSinglePageAsync(), + listSinglePageAsync(), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink); + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -1056,8 +1055,8 @@ public Observable>> call(String ne * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<ApplicationGatewayInner> object */ - public Observable> listAllAsync() { - return listAllWithServiceResponseAsync() + public Observable> listAsync() { + return listWithServiceResponseAsync() .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -1072,8 +1071,8 @@ public Page call(ServiceResponse>> listAllWithServiceResponseAsync() { - return listAllSinglePageAsync() + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -1081,7 +1080,7 @@ public Observable>> call(ServiceRe if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listAllNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } @@ -1092,17 +1091,17 @@ public Observable>> call(ServiceRe * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<ApplicationGatewayInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listAllSinglePageAsync() { + public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2019-07-01"; - return service.listAll(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listAllDelegate(response); + ServiceResponse> result = listDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -1111,7 +1110,7 @@ public Observable>> call(Response< }); } - private ServiceResponse> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -2712,12 +2711,12 @@ private ServiceResponse> listByResourceGroupNe * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<ApplicationGatewayInner> object if successful. */ - public PagedList listAllNext(final String nextPageLink) { - ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -2731,13 +2730,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAllNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listAllNextSinglePageAsync(nextPageLink), + listNextSinglePageAsync(nextPageLink), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink); + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -2750,8 +2749,8 @@ public Observable>> call(String ne * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<ApplicationGatewayInner> object */ - public Observable> listAllNextAsync(final String nextPageLink) { - return listAllNextWithServiceResponseAsync(nextPageLink) + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -2767,8 +2766,8 @@ public Page call(ServiceResponse>> listAllNextWithServiceResponseAsync(final String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink) + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -2776,7 +2775,7 @@ public Observable>> call(ServiceRe if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listAllNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } @@ -2788,17 +2787,17 @@ public Observable>> call(ServiceRe * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<ApplicationGatewayInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listAllNextSinglePageAsync(final String nextPageLink) { + public Observable>> listNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); - return service.listAllNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listAllNextDelegate(response); + ServiceResponse> result = listNextDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -2807,7 +2806,7 @@ public Observable>> call(Response< }); } - private ServiceResponse> listAllNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) diff --git a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ConnectionMonitorsInner.java b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ConnectionMonitorsInner.java index e731cdc418701..ea96430cc8588 100644 --- a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ConnectionMonitorsInner.java +++ b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ConnectionMonitorsInner.java @@ -35,8 +35,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined @@ -195,7 +193,7 @@ public Observable> createOrUpdateW throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-07-01"; Observable> observable = service.createOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -277,7 +275,7 @@ public Observable> beginCreateOrUp throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-07-01"; return service.beginCreateOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -369,7 +367,7 @@ public Observable> getWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-07-01"; return service.get(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -459,7 +457,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-07-01"; Observable> observable = service.delete(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -532,7 +530,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-07-01"; return service.beginDelete(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -624,7 +622,7 @@ public Observable> updateTagsWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-07-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -716,7 +714,7 @@ public Observable> updateTagsWithS throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-07-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); return service.updateTags(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -808,7 +806,7 @@ public Observable> stopWithServiceResponseAsync(String res if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-07-01"; Observable> observable = service.stop(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); } @@ -881,7 +879,7 @@ public Observable> beginStopWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-07-01"; return service.beginStop(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -972,7 +970,7 @@ public Observable> startWithServiceResponseAsync(String re if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-07-01"; Observable> observable = service.start(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); } @@ -1045,7 +1043,7 @@ public Observable> beginStartWithServiceResponseAsync(Stri if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-07-01"; return service.beginStart(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1137,7 +1135,7 @@ public Observable> queryWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-07-01"; Observable> observable = service.query(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); } @@ -1211,7 +1209,7 @@ public Observable> beginQuery if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-07-01"; return service.beginQuery(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1296,7 +1294,7 @@ public Observable>> listWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-07-01"; return service.list(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ExpressRouteCircuitsInner.java b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ExpressRouteCircuitsInner.java index 4b74e754cfb07..b748503973679 100644 --- a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ExpressRouteCircuitsInner.java +++ b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ExpressRouteCircuitsInner.java @@ -43,8 +43,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ExpressRouteCrossConnectionsInner.java b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ExpressRouteCrossConnectionsInner.java index 91e31cf04b4bd..19ef63fc8563a 100644 --- a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ExpressRouteCrossConnectionsInner.java +++ b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ExpressRouteCrossConnectionsInner.java @@ -41,8 +41,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/NetworkInterfacesInner.java b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/NetworkInterfacesInner.java index 87b97f679da04..e0f95a6d9e92f 100644 --- a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/NetworkInterfacesInner.java +++ b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/NetworkInterfacesInner.java @@ -43,8 +43,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/NetworkManagementClientImpl.java b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/NetworkManagementClientImpl.java index 5f15cde5a3986..24ceffc7fecb2 100644 --- a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/NetworkManagementClientImpl.java +++ b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/NetworkManagementClientImpl.java @@ -12,6 +12,8 @@ import com.microsoft.azure.AzureClient; import com.microsoft.azure.AzureServiceClient; import com.microsoft.azure.CloudException; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; import com.microsoft.azure.management.network.v2019_07_01.ErrorException; import com.microsoft.rest.credentials.ServiceClientCredentials; import com.microsoft.rest.RestClient; diff --git a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/NetworkWatchersInner.java b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/NetworkWatchersInner.java index 6ae42f4c36787..46e1bc07aec58 100644 --- a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/NetworkWatchersInner.java +++ b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/NetworkWatchersInner.java @@ -51,8 +51,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/P2sVpnGatewaysInner.java b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/P2sVpnGatewaysInner.java index f030d06ff33bf..4dca678705ea0 100644 --- a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/P2sVpnGatewaysInner.java +++ b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/P2sVpnGatewaysInner.java @@ -46,8 +46,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/PacketCapturesInner.java b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/PacketCapturesInner.java index 3f338674708d3..ae1d730249578 100644 --- a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/PacketCapturesInner.java +++ b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/PacketCapturesInner.java @@ -32,8 +32,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/PrivateLinkServicesInner.java b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/PrivateLinkServicesInner.java index 1ac7f98675fb6..da60e63679f38 100644 --- a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/PrivateLinkServicesInner.java +++ b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/PrivateLinkServicesInner.java @@ -40,6 +40,8 @@ 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 @@ -111,10 +113,18 @@ 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_07_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_07_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_07_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_07_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); @@ -1118,7 +1128,7 @@ private ServiceResponse beginDeletePrivateEndpointConnectionDelegate(Respo * @return the PrivateLinkServiceVisibilityInner object if successful. */ public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibility(String location) { - return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location).toBlocking().single().body(); + return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location).toBlocking().last().body(); } /** @@ -1138,7 +1148,7 @@ public ServiceFuture checkPrivateLinkServiceV * * @param location The location of the domain name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PrivateLinkServiceVisibilityInner object + * @return the observable for the request */ public Observable checkPrivateLinkServiceVisibilityAsync(String location) { return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location).map(new Func1, PrivateLinkServiceVisibilityInner>() { @@ -1154,7 +1164,7 @@ public PrivateLinkServiceVisibilityInner call(ServiceResponse> checkPrivateLinkServiceVisibilityWithServiceResponseAsync(String location) { if (location == null) { @@ -1167,12 +1177,140 @@ public Observable> checkPriva final String privateLinkServiceAlias = null; CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); parameters.withPrivateLinkServiceAlias(null); - return service.checkPrivateLinkServiceVisibility(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + 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-07-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. + * + * @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> beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(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-07-01"; + 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()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = checkPrivateLinkServiceVisibilityDelegate(response); + ServiceResponse clientResponse = beginCheckPrivateLinkServiceVisibilityDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1191,8 +1329,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 checkPrivateLinkServiceVisibility(String location, String privateLinkServiceAlias) { - return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).toBlocking().single().body(); + public PrivateLinkServiceVisibilityInner beginCheckPrivateLinkServiceVisibility(String location, String privateLinkServiceAlias) { + return beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).toBlocking().single().body(); } /** @@ -1204,8 +1342,8 @@ public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibility(Strin * @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); + public ServiceFuture beginCheckPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias), serviceCallback); } /** @@ -1216,8 +1354,8 @@ public ServiceFuture checkPrivateLinkServiceV * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PrivateLinkServiceVisibilityInner object */ - public Observable checkPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias) { - return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { + public Observable beginCheckPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias) { + return beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { @Override public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { return response.body(); @@ -1233,7 +1371,7 @@ public PrivateLinkServiceVisibilityInner call(ServiceResponse> checkPrivateLinkServiceVisibilityWithServiceResponseAsync(String location, String privateLinkServiceAlias) { + public Observable> beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(String location, String privateLinkServiceAlias) { if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } @@ -1243,12 +1381,12 @@ public Observable> checkPriva final String apiVersion = "2019-07-01"; CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); parameters.withPrivateLinkServiceAlias(privateLinkServiceAlias); - return service.checkPrivateLinkServiceVisibility(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + return service.beginCheckPrivateLinkServiceVisibility(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 = checkPrivateLinkServiceVisibilityDelegate(response); + ServiceResponse clientResponse = beginCheckPrivateLinkServiceVisibilityDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1257,9 +1395,10 @@ public Observable> call(Respo }); } - private ServiceResponse checkPrivateLinkServiceVisibilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse beginCheckPrivateLinkServiceVisibilityDelegate(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); } @@ -1275,7 +1414,7 @@ private ServiceResponse checkPrivateLinkServi * @return the PrivateLinkServiceVisibilityInner object if successful. */ public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibilityByResourceGroup(String location, String resourceGroupName) { - return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName).toBlocking().single().body(); + return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName).toBlocking().last().body(); } /** @@ -1297,7 +1436,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 to the PrivateLinkServiceVisibilityInner object + * @return the observable for the request */ public Observable checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName) { return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName).map(new Func1, PrivateLinkServiceVisibilityInner>() { @@ -1314,7 +1453,7 @@ public PrivateLinkServiceVisibilityInner call(ServiceResponse> checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(String location, String resourceGroupName) { if (location == null) { @@ -1330,12 +1469,154 @@ public Observable> checkPriva final String privateLinkServiceAlias = null; CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); parameters.withPrivateLinkServiceAlias(null); - return service.checkPrivateLinkServiceVisibilityByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + 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-07-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. + * + * @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> beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(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-07-01"; + 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()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = checkPrivateLinkServiceVisibilityByResourceGroupDelegate(response); + ServiceResponse clientResponse = beginCheckPrivateLinkServiceVisibilityByResourceGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1355,8 +1636,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 checkPrivateLinkServiceVisibilityByResourceGroup(String location, String resourceGroupName, String privateLinkServiceAlias) { - return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).toBlocking().single().body(); + public PrivateLinkServiceVisibilityInner beginCheckPrivateLinkServiceVisibilityByResourceGroup(String location, String resourceGroupName, String privateLinkServiceAlias) { + return beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).toBlocking().single().body(); } /** @@ -1369,8 +1650,8 @@ public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibilityByReso * @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); + public ServiceFuture beginCheckPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias), serviceCallback); } /** @@ -1382,8 +1663,8 @@ public ServiceFuture checkPrivateLinkServiceV * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PrivateLinkServiceVisibilityInner object */ - public Observable checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { - return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { + public Observable beginCheckPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { + return beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { @Override public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { return response.body(); @@ -1400,7 +1681,7 @@ public PrivateLinkServiceVisibilityInner call(ServiceResponse> checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { + public Observable> beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } @@ -1413,12 +1694,12 @@ public Observable> checkPriva final String apiVersion = "2019-07-01"; CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); parameters.withPrivateLinkServiceAlias(privateLinkServiceAlias); - return service.checkPrivateLinkServiceVisibilityByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + return service.beginCheckPrivateLinkServiceVisibilityByResourceGroup(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 = checkPrivateLinkServiceVisibilityByResourceGroupDelegate(response); + ServiceResponse clientResponse = beginCheckPrivateLinkServiceVisibilityByResourceGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1427,9 +1708,10 @@ public Observable> call(Respo }); } - private ServiceResponse checkPrivateLinkServiceVisibilityByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse beginCheckPrivateLinkServiceVisibilityByResourceGroupDelegate(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); } diff --git a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/SubnetsInner.java b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/SubnetsInner.java index 28f5c9bb7a024..3c42e89ceff27 100644 --- a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/SubnetsInner.java +++ b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/SubnetsInner.java @@ -39,8 +39,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/VirtualNetworkGatewayConnectionsInner.java b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/VirtualNetworkGatewayConnectionsInner.java index 24d456d15bc22..58e167e30b3ca 100644 --- a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/VirtualNetworkGatewayConnectionsInner.java +++ b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/VirtualNetworkGatewayConnectionsInner.java @@ -45,8 +45,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/VirtualNetworkGatewaysInner.java b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/VirtualNetworkGatewaysInner.java index c615c1cf711dd..145f05dd518dd 100644 --- a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/VirtualNetworkGatewaysInner.java +++ b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/VirtualNetworkGatewaysInner.java @@ -47,8 +47,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/VpnGatewaysInner.java b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/VpnGatewaysInner.java index efce2369abca8..3b81bcba6e953 100644 --- a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/VpnGatewaysInner.java +++ b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/VpnGatewaysInner.java @@ -44,8 +44,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/VpnSitesConfigurationsInner.java b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/VpnSitesConfigurationsInner.java index 19807dcf16c40..71eddc928845f 100644 --- a/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/VpnSitesConfigurationsInner.java +++ b/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/VpnSitesConfigurationsInner.java @@ -29,8 +29,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined