diff --git a/azure-mgmt-containerservice/src/main/java/com/microsoft/azure/management/containerservice/implementation/OperationValueInner.java b/azure-mgmt-containerservice/src/main/java/com/microsoft/azure/management/containerservice/implementation/OperationValueInner.java new file mode 100644 index 00000000000..c5a8bcc2b07 --- /dev/null +++ b/azure-mgmt-containerservice/src/main/java/com/microsoft/azure/management/containerservice/implementation/OperationValueInner.java @@ -0,0 +1,109 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Describes the properties of a Compute Operation value. + */ +@JsonFlatten +public class OperationValueInner { + /** + * The origin of the compute operation. + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private String origin; + + /** + * The name of the compute operation. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The display name of the compute operation. + */ + @JsonProperty(value = "display.operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /** + * The display name of the resource the operation applies to. + */ + @JsonProperty(value = "display.resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /** + * The description of the operation. + */ + @JsonProperty(value = "display.description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * The resource provider for the operation. + */ + @JsonProperty(value = "display.provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /** + * Get the origin of the compute operation. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Get the name of the compute operation. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the display name of the compute operation. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Get the display name of the resource the operation applies to. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Get the description of the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Get the resource provider for the operation. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + +} 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 d0093621232..43d1e6e2c68 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<ComputeOperationValueInner> object if successful. + * @return the List<OperationValueInner> 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 ServiceCa * Gets a list of compute operations. * * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<ComputeOperationValueInner> object + * @return the observable to the List<OperationValueInner> 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>> 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(Respon }); } - private ServiceResponse> 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); }