diff --git a/eventhub/resource-manager/v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhub/v2018_01_01_preview/implementation/NamespacesImpl.java b/eventhub/resource-manager/v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhub/v2018_01_01_preview/implementation/NamespacesImpl.java index 43173ff8b124..a9547aef7b54 100644 --- a/eventhub/resource-manager/v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhub/v2018_01_01_preview/implementation/NamespacesImpl.java +++ b/eventhub/resource-manager/v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhub/v2018_01_01_preview/implementation/NamespacesImpl.java @@ -231,18 +231,12 @@ public VirtualNetworkRule call(VirtualNetworkRuleInner inner) { public Observable listVirtualNetworkRulesAsync(final String resourceGroupName, final String namespaceName) { NamespacesInner client = this.inner(); return client.listVirtualNetworkRulesAsync(resourceGroupName, namespaceName) - .flatMapIterable(new Func1, Iterable>() { + .flatMapIterable(new Func1, Iterable>() { @Override - public Iterable call(Page page) { + public Iterable call(Page page) { return page.items(); } }) - .flatMap(new Func1>() { - @Override - public Observable call(IpFilterRuleInner inner) { - return getVirtualNetworkRuleInnerUsingNamespacesInnerAsync(inner.id()); - } - }) .map(new Func1() { @Override public VirtualNetworkRule call(VirtualNetworkRuleInner inner) { diff --git a/eventhub/resource-manager/v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhub/v2018_01_01_preview/implementation/NamespacesInner.java b/eventhub/resource-manager/v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhub/v2018_01_01_preview/implementation/NamespacesInner.java index cec52abc0e2f..d1707a6c6357 100644 --- a/eventhub/resource-manager/v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhub/v2018_01_01_preview/implementation/NamespacesInner.java +++ b/eventhub/resource-manager/v2018_01_01_preview/src/main/java/com/microsoft/azure/management/eventhub/v2018_01_01_preview/implementation/NamespacesInner.java @@ -1298,13 +1298,13 @@ private ServiceResponse getIpFilterRuleDelegate(Response listVirtualNetworkRules(final String resourceGroupName, final String namespaceName) { - ServiceResponse> response = listVirtualNetworkRulesSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listVirtualNetworkRules(final String resourceGroupName, final String namespaceName) { + ServiceResponse> response = listVirtualNetworkRulesSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { + public Page nextPage(String nextPageLink) { return listVirtualNetworkRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; @@ -1319,12 +1319,12 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listVirtualNetworkRulesAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback serviceCallback) { + public ServiceFuture> listVirtualNetworkRulesAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( listVirtualNetworkRulesSinglePageAsync(resourceGroupName, namespaceName), - new Func1>>>() { + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { + public Observable>> call(String nextPageLink) { return listVirtualNetworkRulesNextSinglePageAsync(nextPageLink); } }, @@ -1337,13 +1337,13 @@ public Observable>> call(String nextPage * @param resourceGroupName Name of the resource group within the Azure subscription. * @param namespaceName The Namespace name * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IpFilterRuleInner> object + * @return the observable to the PagedList<VirtualNetworkRuleInner> object */ - public Observable> listVirtualNetworkRulesAsync(final String resourceGroupName, final String namespaceName) { + public Observable> listVirtualNetworkRulesAsync(final String resourceGroupName, final String namespaceName) { return listVirtualNetworkRulesWithServiceResponseAsync(resourceGroupName, namespaceName) - .map(new Func1>, Page>() { + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); @@ -1355,13 +1355,13 @@ public Page call(ServiceResponse> res * @param resourceGroupName Name of the resource group within the Azure subscription. * @param namespaceName The Namespace name * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IpFilterRuleInner> object + * @return the observable to the PagedList<VirtualNetworkRuleInner> object */ - public Observable>> listVirtualNetworkRulesWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) { + public Observable>> listVirtualNetworkRulesWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) { return listVirtualNetworkRulesSinglePageAsync(resourceGroupName, namespaceName) - .concatMap(new Func1>, Observable>>>() { + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); @@ -1374,12 +1374,12 @@ public Observable>> call(ServiceResponse /** * Gets a list of VirtualNetwork rules for a Namespace. * - ServiceResponse> * @param resourceGroupName Name of the resource group within the Azure subscription. - ServiceResponse> * @param namespaceName The Namespace name + ServiceResponse> * @param resourceGroupName Name of the resource group within the Azure subscription. + ServiceResponse> * @param namespaceName The Namespace name * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IpFilterRuleInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<VirtualNetworkRuleInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listVirtualNetworkRulesSinglePageAsync(final String resourceGroupName, final String namespaceName) { + public Observable>> listVirtualNetworkRulesSinglePageAsync(final String resourceGroupName, final String namespaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1393,12 +1393,12 @@ public Observable>> listVirtualNetworkRu throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listVirtualNetworkRules(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listVirtualNetworkRulesDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listVirtualNetworkRulesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -1406,9 +1406,9 @@ public Observable>> call(Response> listVirtualNetworkRulesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listVirtualNetworkRulesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } @@ -2127,13 +2127,13 @@ private ServiceResponse> listIPFilterRulesNextDelega * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<IpFilterRuleInner> object if successful. + * @return the PagedList<VirtualNetworkRuleInner> object if successful. */ - public PagedList listVirtualNetworkRulesNext(final String nextPageLink) { - ServiceResponse> response = listVirtualNetworkRulesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listVirtualNetworkRulesNext(final String nextPageLink) { + ServiceResponse> response = listVirtualNetworkRulesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { + public Page nextPage(String nextPageLink) { return listVirtualNetworkRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; @@ -2148,12 +2148,12 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listVirtualNetworkRulesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listVirtualNetworkRulesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( listVirtualNetworkRulesNextSinglePageAsync(nextPageLink), - new Func1>>>() { + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { + public Observable>> call(String nextPageLink) { return listVirtualNetworkRulesNextSinglePageAsync(nextPageLink); } }, @@ -2165,13 +2165,13 @@ public Observable>> call(String nextPage * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IpFilterRuleInner> object + * @return the observable to the PagedList<VirtualNetworkRuleInner> object */ - public Observable> listVirtualNetworkRulesNextAsync(final String nextPageLink) { + public Observable> listVirtualNetworkRulesNextAsync(final String nextPageLink) { return listVirtualNetworkRulesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); @@ -2182,13 +2182,13 @@ public Page call(ServiceResponse> res * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<IpFilterRuleInner> object + * @return the observable to the PagedList<VirtualNetworkRuleInner> object */ - public Observable>> listVirtualNetworkRulesNextWithServiceResponseAsync(final String nextPageLink) { + public Observable>> listVirtualNetworkRulesNextWithServiceResponseAsync(final String nextPageLink) { return listVirtualNetworkRulesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); @@ -2201,22 +2201,22 @@ public Observable>> call(ServiceResponse /** * Gets a list of VirtualNetwork rules for a Namespace. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<IpFilterRuleInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<VirtualNetworkRuleInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listVirtualNetworkRulesNextSinglePageAsync(final String nextPageLink) { + public Observable>> listVirtualNetworkRulesNextSinglePageAsync(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.listVirtualNetworkRulesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listVirtualNetworkRulesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listVirtualNetworkRulesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -2224,9 +2224,9 @@ public Observable>> call(Response> listVirtualNetworkRulesNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listVirtualNetworkRulesNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); }