diff --git a/azure-mgmt-containerservice/src/main/java/com/microsoft/azure/management/containerservice/implementation/OperationsInner.java b/azure-mgmt-containerservice/src/main/java/com/microsoft/azure/management/containerservice/implementation/OperationsInner.java index 43d1e6e2c68..d0093621232 100644 --- a/azure-mgmt-containerservice/src/main/java/com/microsoft/azure/management/containerservice/implementation/OperationsInner.java +++ b/azure-mgmt-containerservice/src/main/java/com/microsoft/azure/management/containerservice/implementation/OperationsInner.java @@ -63,9 +63,9 @@ interface OperationsService { * @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 List<OperationValueInner> object if successful. + * @return the List<ComputeOperationValueInner> object if successful. */ - public List list() { + public List list() { return listWithServiceResponseAsync().toBlocking().single().body(); } @@ -76,7 +76,7 @@ public List list() { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { + public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); } @@ -84,12 +84,12 @@ public ServiceFuture> listAsync(final ServiceCallback< * Gets a list of compute operations. * * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<OperationValueInner> object + * @return the observable to the List<ComputeOperationValueInner> object */ - public Observable> listAsync() { - return listWithServiceResponseAsync().map(new Func1>, List>() { + public Observable> listAsync() { + return listWithServiceResponseAsync().map(new Func1>, List>() { @Override - public List call(ServiceResponse> response) { + public List call(ServiceResponse> response) { return response.body(); } }); @@ -99,21 +99,21 @@ public List call(ServiceResponse> * Gets a list of compute operations. * * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<OperationValueInner> object + * @return the observable to the List<ComputeOperationValueInner> object */ - public Observable>> listWithServiceResponseAsync() { + public Observable>> listWithServiceResponseAsync() { final String apiVersion = "2018-03-31"; return service.list(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 = listDelegate(response); - List items = null; + ServiceResponse> result = listDelegate(response); + List items = null; if (result.body() != null) { items = result.body().items(); } - ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -122,9 +122,9 @@ public Observable>> call(Response> listDelegate(Response response) throws CloudException, IOException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); }