Skip to content

Commit

Permalink
Generated from 46063f49672944e407244d23940278d0b4b7dc60 (#235)
Browse files Browse the repository at this point in the history
Update example JSON with nodeResourceGroup
  • Loading branch information
AutorestCI authored Jun 8, 2018
1 parent a0519ee commit afa13f5
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ public class ManagedClusterInner extends Resource {
@JsonProperty(value = "properties.addonProfiles")
private Map<String, ManagedClusterAddonProfile> addonProfiles;

/**
* Name of the resource group containing agent pool nodes.
*/
@JsonProperty(value = "properties.nodeResourceGroup", access = JsonProperty.Access.WRITE_ONLY)
private String nodeResourceGroup;

/**
* Whether to enable Kubernetes Role-Based Access Control.
*/
Expand Down Expand Up @@ -232,6 +238,15 @@ public ManagedClusterInner withAddonProfiles(Map<String, ManagedClusterAddonProf
return this;
}

/**
* Get name of the resource group containing agent pool nodes.
*
* @return the nodeResourceGroup value
*/
public String nodeResourceGroup() {
return this.nodeResourceGroup;
}

/**
* Get whether to enable Kubernetes Role-Based Access Control.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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&lt;ComputeOperationValueInner&gt; object if successful.
* @return the List&lt;OperationValueInner&gt; object if successful.
*/
public List<ComputeOperationValueInner> list() {
public List<OperationValueInner> list() {
return listWithServiceResponseAsync().toBlocking().single().body();
}

Expand All @@ -76,20 +76,20 @@ public List<ComputeOperationValueInner> list() {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<List<ComputeOperationValueInner>> listAsync(final ServiceCallback<List<ComputeOperationValueInner>> serviceCallback) {
public ServiceFuture<List<OperationValueInner>> listAsync(final ServiceCallback<List<OperationValueInner>> serviceCallback) {
return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback);
}

/**
* Gets a list of compute operations.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the List&lt;ComputeOperationValueInner&gt; object
* @return the observable to the List&lt;OperationValueInner&gt; object
*/
public Observable<List<ComputeOperationValueInner>> listAsync() {
return listWithServiceResponseAsync().map(new Func1<ServiceResponse<List<ComputeOperationValueInner>>, List<ComputeOperationValueInner>>() {
public Observable<List<OperationValueInner>> listAsync() {
return listWithServiceResponseAsync().map(new Func1<ServiceResponse<List<OperationValueInner>>, List<OperationValueInner>>() {
@Override
public List<ComputeOperationValueInner> call(ServiceResponse<List<ComputeOperationValueInner>> response) {
public List<OperationValueInner> call(ServiceResponse<List<OperationValueInner>> response) {
return response.body();
}
});
Expand All @@ -99,21 +99,21 @@ public List<ComputeOperationValueInner> call(ServiceResponse<List<ComputeOperati
* Gets a list of compute operations.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the List&lt;ComputeOperationValueInner&gt; object
* @return the observable to the List&lt;OperationValueInner&gt; object
*/
public Observable<ServiceResponse<List<ComputeOperationValueInner>>> listWithServiceResponseAsync() {
public Observable<ServiceResponse<List<OperationValueInner>>> listWithServiceResponseAsync() {
final String apiVersion = "2018-03-31";
return service.list(apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<List<ComputeOperationValueInner>>>>() {
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<List<OperationValueInner>>>>() {
@Override
public Observable<ServiceResponse<List<ComputeOperationValueInner>>> call(Response<ResponseBody> response) {
public Observable<ServiceResponse<List<OperationValueInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl1<ComputeOperationValueInner>> result = listDelegate(response);
List<ComputeOperationValueInner> items = null;
ServiceResponse<PageImpl1<OperationValueInner>> result = listDelegate(response);
List<OperationValueInner> items = null;
if (result.body() != null) {
items = result.body().items();
}
ServiceResponse<List<ComputeOperationValueInner>> clientResponse = new ServiceResponse<List<ComputeOperationValueInner>>(items, result.response());
ServiceResponse<List<OperationValueInner>> clientResponse = new ServiceResponse<List<OperationValueInner>>(items, result.response());
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
Expand All @@ -122,9 +122,9 @@ public Observable<ServiceResponse<List<ComputeOperationValueInner>>> call(Respon
});
}

private ServiceResponse<PageImpl1<ComputeOperationValueInner>> listDelegate(Response<ResponseBody> response) throws CloudException, IOException {
return this.client.restClient().responseBuilderFactory().<PageImpl1<ComputeOperationValueInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl1<ComputeOperationValueInner>>() { }.getType())
private ServiceResponse<PageImpl1<OperationValueInner>> listDelegate(Response<ResponseBody> response) throws CloudException, IOException {
return this.client.restClient().responseBuilderFactory().<PageImpl1<OperationValueInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl1<OperationValueInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Expand Down

0 comments on commit afa13f5

Please sign in to comment.