diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/EnrollmentAccountInner.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/EnrollmentAccountInner.java new file mode 100644 index 00000000000..a2b2f60a1d0 --- /dev/null +++ b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/EnrollmentAccountInner.java @@ -0,0 +1,35 @@ +/** + * 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.billing.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * An enrollment account resource. + */ +@JsonFlatten +public class EnrollmentAccountInner extends Resource { + /** + * The account owner's principal name. + */ + @JsonProperty(value = "properties.principalName", access = JsonProperty.Access.WRITE_ONLY) + private String principalName; + + /** + * Get the principalName value. + * + * @return the principalName value + */ + public String principalName() { + return this.principalName; + } + +} diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/EnrollmentAccountListResultInner.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/EnrollmentAccountListResultInner.java index c339afa80e5..0e71137590e 100644 --- a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/EnrollmentAccountListResultInner.java +++ b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/EnrollmentAccountListResultInner.java @@ -19,15 +19,30 @@ public class EnrollmentAccountListResultInner { * The list of enrollment accounts. */ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; + private List value; + + /** + * The link (url) to the next page of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; /** * Get the value value. * * @return the value value */ - public List value() { + public List value() { return this.value; } + /** + * Get the nextLink value. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + } diff --git a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/EnrollmentAccountsInner.java b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/EnrollmentAccountsInner.java index 303aa03d022..d6c4a7ea93b 100644 --- a/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/EnrollmentAccountsInner.java +++ b/azure-mgmt-billing/src/main/java/com/microsoft/azure/management/billing/implementation/EnrollmentAccountsInner.java @@ -137,9 +137,9 @@ private ServiceResponse listDelegate(Response< * @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 EnrollmentAccountResultInner object if successful. + * @return the EnrollmentAccountInner object if successful. */ - public EnrollmentAccountResultInner get(String name) { + public EnrollmentAccountInner get(String name) { return getWithServiceResponseAsync(name).toBlocking().single().body(); } @@ -151,7 +151,7 @@ public EnrollmentAccountResultInner get(String name) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture getAsync(String name, final ServiceCallback serviceCallback) { + public ServiceFuture getAsync(String name, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(name), serviceCallback); } @@ -160,12 +160,12 @@ public ServiceFuture getAsync(String name, final S * * @param name Enrollment Account name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EnrollmentAccountResultInner object + * @return the observable to the EnrollmentAccountInner object */ - public Observable getAsync(String name) { - return getWithServiceResponseAsync(name).map(new Func1, EnrollmentAccountResultInner>() { + public Observable getAsync(String name) { + return getWithServiceResponseAsync(name).map(new Func1, EnrollmentAccountInner>() { @Override - public EnrollmentAccountResultInner call(ServiceResponse response) { + public EnrollmentAccountInner call(ServiceResponse response) { return response.body(); } }); @@ -176,9 +176,9 @@ public EnrollmentAccountResultInner call(ServiceResponse> getWithServiceResponseAsync(String name) { + public Observable> getWithServiceResponseAsync(String name) { if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } @@ -186,11 +186,11 @@ public Observable> getWithServiceR throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.get(name, 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 clientResponse = getDelegate(response); + ServiceResponse clientResponse = getDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -199,9 +199,9 @@ public Observable> call(Response getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(ErrorResponseException.class) .build(response); }