From 6c186a9f5ee8b2f351ef43954ac5a204f496f6f4 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Thu, 15 Aug 2019 01:11:54 +0000 Subject: [PATCH] Generated from b5edf02127dc8816b52bea2d18772081f3b76be1 Deleted unused file ProductCancelByBillingAccount --- .../v2019_10_01_preview/BillingAccounts.java | 9 + .../v2019_10_01_preview/Departments.java | 2 +- .../EnrollmentAccounts.java | 2 +- ...InvoiceSectionWithCreateSubPermission.java | 46 ++++ .../billing/v2019_10_01_preview/Products.java | 10 - .../implementation/BillingAccountsImpl.java | 20 ++ .../implementation/BillingAccountsInner.java | 237 ++++++++++++++++++ .../implementation/BillingPropertysInner.java | 2 +- .../implementation/DepartmentsImpl.java | 4 +- .../implementation/DepartmentsInner.java | 42 ++-- .../EnrollmentAccountsImpl.java | 4 +- .../EnrollmentAccountsInner.java | 42 ++-- ...iceSectionWithCreateSubPermissionImpl.java | 53 ++++ ...ceSectionWithCreateSubPermissionInner.java | 105 ++++++++ .../implementation/ProductsImpl.java | 12 - .../implementation/ProductsInner.java | 172 ------------- 16 files changed, 519 insertions(+), 243 deletions(-) create mode 100644 billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/InvoiceSectionWithCreateSubPermission.java create mode 100644 billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/InvoiceSectionWithCreateSubPermissionImpl.java create mode 100644 billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/InvoiceSectionWithCreateSubPermissionInner.java diff --git a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/BillingAccounts.java b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/BillingAccounts.java index 46ce9c01e2f1..279025773916 100644 --- a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/BillingAccounts.java +++ b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/BillingAccounts.java @@ -25,6 +25,15 @@ public interface BillingAccounts extends HasInner { */ Observable getAsync(String billingAccountName); + /** + * Lists all invoice sections with create subscription permission for a user. + * + * @param billingAccountName billing Account Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listInvoiceSectionsByCreateSubscriptionPermissionAsync(final String billingAccountName); + /** * Lists all billing accounts for a user which he has access to. * diff --git a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/Departments.java b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/Departments.java index fca31e4619c9..ee3ec99c8b89 100644 --- a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/Departments.java +++ b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/Departments.java @@ -23,7 +23,7 @@ public interface Departments extends HasInner { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable listByBillingAccountAsync(String billingAccountName); + Observable listByBillingAccountNameAsync(String billingAccountName); /** * Get the department by id. diff --git a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/EnrollmentAccounts.java b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/EnrollmentAccounts.java index fd18081164f1..223746844310 100644 --- a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/EnrollmentAccounts.java +++ b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/EnrollmentAccounts.java @@ -23,7 +23,7 @@ public interface EnrollmentAccounts extends HasInner { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable listByBillingAccountAsync(String billingAccountName); + Observable listByBillingAccountNameAsync(String billingAccountName); /** * Get the enrollment account by id. diff --git a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/InvoiceSectionWithCreateSubPermission.java b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/InvoiceSectionWithCreateSubPermission.java new file mode 100644 index 000000000000..f9151743a129 --- /dev/null +++ b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/InvoiceSectionWithCreateSubPermission.java @@ -0,0 +1,46 @@ +/** + * 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.v2019_10_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.billing.v2019_10_01_preview.implementation.BillingManager; +import com.microsoft.azure.management.billing.v2019_10_01_preview.implementation.InvoiceSectionWithCreateSubPermissionInner; +import java.util.List; + +/** + * Type representing InvoiceSectionWithCreateSubPermission. + */ +public interface InvoiceSectionWithCreateSubPermission extends HasInner, HasManager { + /** + * @return the billingProfileDisplayName value. + */ + String billingProfileDisplayName(); + + /** + * @return the billingProfileId value. + */ + String billingProfileId(); + + /** + * @return the enabledAzurePlans value. + */ + List enabledAzurePlans(); + + /** + * @return the invoiceSectionDisplayName value. + */ + String invoiceSectionDisplayName(); + + /** + * @return the invoiceSectionId value. + */ + String invoiceSectionId(); + +} diff --git a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/Products.java b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/Products.java index 250b93189cbe..9217aef097ea 100644 --- a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/Products.java +++ b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/Products.java @@ -84,16 +84,6 @@ public interface Products extends HasInner { */ Observable validateTransferAsync(String billingAccountName, String billingProfileName, String invoiceSectionName, String productName, TransferProductRequestProperties parameters); - /** - * Cancel auto renew for product by product id and billing account name. - * - * @param billingAccountName billing Account Id. - * @param productName Invoice Id. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Observable updateAutoRenewByBillingAccountAsync(String billingAccountName, String productName); - /** * Cancel auto renew for product by product id and invoice section name. * diff --git a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/BillingAccountsImpl.java b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/BillingAccountsImpl.java index 5d741b679ab7..71dcf678fbaa 100644 --- a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/BillingAccountsImpl.java +++ b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/BillingAccountsImpl.java @@ -13,7 +13,9 @@ import com.microsoft.azure.management.billing.v2019_10_01_preview.BillingAccounts; import rx.functions.Func1; import rx.Observable; +import com.microsoft.azure.Page; import com.microsoft.azure.management.billing.v2019_10_01_preview.BillingAccount; +import com.microsoft.azure.management.billing.v2019_10_01_preview.InvoiceSectionWithCreateSubPermission; import com.microsoft.azure.management.billing.v2019_10_01_preview.BillingAccountListResult; class BillingAccountsImpl extends WrapperImpl implements BillingAccounts { @@ -44,6 +46,24 @@ public BillingAccount call(BillingAccountInner inner) { }); } + @Override + public Observable listInvoiceSectionsByCreateSubscriptionPermissionAsync(final String billingAccountName) { + BillingAccountsInner client = this.inner(); + return client.listInvoiceSectionsByCreateSubscriptionPermissionAsync(billingAccountName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public InvoiceSectionWithCreateSubPermission call(InvoiceSectionWithCreateSubPermissionInner inner) { + return new InvoiceSectionWithCreateSubPermissionImpl(inner, manager()); + } + }); + } + @Override public Observable listAsync() { BillingAccountsInner client = this.inner(); diff --git a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/BillingAccountsInner.java b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/BillingAccountsInner.java index 7b9e794961ec..00c73f7b920e 100644 --- a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/BillingAccountsInner.java +++ b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/BillingAccountsInner.java @@ -10,13 +10,18 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.billing.v2019_10_01_preview.BillingAccountUpdateRequest; import com.microsoft.azure.management.billing.v2019_10_01_preview.ErrorResponseException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; import java.io.IOException; +import java.util.List; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; @@ -25,6 +30,7 @@ import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.Query; +import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable; @@ -71,6 +77,14 @@ interface BillingAccountsService { @PATCH("providers/Microsoft.Billing/billingAccounts/{billingAccountName}") Observable> beginUpdate(@Path("billingAccountName") String billingAccountName, @Query("api-version") String apiVersion, @Body BillingAccountUpdateRequest parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.v2019_10_01_preview.BillingAccounts listInvoiceSectionsByCreateSubscriptionPermission" }) + @GET("providers/Microsoft.Billing/billingAccounts/{billingAccountName}/listInvoiceSectionsWithCreateSubscriptionPermission") + Observable> listInvoiceSectionsByCreateSubscriptionPermission(@Path("billingAccountName") String billingAccountName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.v2019_10_01_preview.BillingAccounts listInvoiceSectionsByCreateSubscriptionPermissionNext" }) + @GET + Observable> listInvoiceSectionsByCreateSubscriptionPermissionNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -511,4 +525,227 @@ private ServiceResponse beginUpdateDelegate(Response listInvoiceSectionsByCreateSubscriptionPermission(final String billingAccountName) { + ServiceResponse> response = listInvoiceSectionsByCreateSubscriptionPermissionSinglePageAsync(billingAccountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInvoiceSectionsByCreateSubscriptionPermissionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all invoice sections with create subscription permission for a user. + * + * @param billingAccountName billing Account Id. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInvoiceSectionsByCreateSubscriptionPermissionAsync(final String billingAccountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInvoiceSectionsByCreateSubscriptionPermissionSinglePageAsync(billingAccountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInvoiceSectionsByCreateSubscriptionPermissionNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all invoice sections with create subscription permission for a user. + * + * @param billingAccountName billing Account Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<InvoiceSectionWithCreateSubPermissionInner> object + */ + public Observable> listInvoiceSectionsByCreateSubscriptionPermissionAsync(final String billingAccountName) { + return listInvoiceSectionsByCreateSubscriptionPermissionWithServiceResponseAsync(billingAccountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all invoice sections with create subscription permission for a user. + * + * @param billingAccountName billing Account Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<InvoiceSectionWithCreateSubPermissionInner> object + */ + public Observable>> listInvoiceSectionsByCreateSubscriptionPermissionWithServiceResponseAsync(final String billingAccountName) { + return listInvoiceSectionsByCreateSubscriptionPermissionSinglePageAsync(billingAccountName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInvoiceSectionsByCreateSubscriptionPermissionNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all invoice sections with create subscription permission for a user. + * + ServiceResponse> * @param billingAccountName billing Account Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<InvoiceSectionWithCreateSubPermissionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInvoiceSectionsByCreateSubscriptionPermissionSinglePageAsync(final String billingAccountName) { + if (billingAccountName == null) { + throw new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listInvoiceSectionsByCreateSubscriptionPermission(billingAccountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInvoiceSectionsByCreateSubscriptionPermissionDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInvoiceSectionsByCreateSubscriptionPermissionDelegate(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); + } + + /** + * Lists all invoice sections with create subscription permission for a user. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @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<InvoiceSectionWithCreateSubPermissionInner> object if successful. + */ + public PagedList listInvoiceSectionsByCreateSubscriptionPermissionNext(final String nextPageLink) { + ServiceResponse> response = listInvoiceSectionsByCreateSubscriptionPermissionNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInvoiceSectionsByCreateSubscriptionPermissionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all invoice sections with create subscription permission for a user. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listInvoiceSectionsByCreateSubscriptionPermissionNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInvoiceSectionsByCreateSubscriptionPermissionNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInvoiceSectionsByCreateSubscriptionPermissionNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all invoice sections with create subscription permission for a user. + * + * @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<InvoiceSectionWithCreateSubPermissionInner> object + */ + public Observable> listInvoiceSectionsByCreateSubscriptionPermissionNextAsync(final String nextPageLink) { + return listInvoiceSectionsByCreateSubscriptionPermissionNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all invoice sections with create subscription permission for a user. + * + * @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<InvoiceSectionWithCreateSubPermissionInner> object + */ + public Observable>> listInvoiceSectionsByCreateSubscriptionPermissionNextWithServiceResponseAsync(final String nextPageLink) { + return listInvoiceSectionsByCreateSubscriptionPermissionNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInvoiceSectionsByCreateSubscriptionPermissionNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all invoice sections with create subscription permission for a user. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<InvoiceSectionWithCreateSubPermissionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInvoiceSectionsByCreateSubscriptionPermissionNextSinglePageAsync(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.listInvoiceSectionsByCreateSubscriptionPermissionNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInvoiceSectionsByCreateSubscriptionPermissionNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInvoiceSectionsByCreateSubscriptionPermissionNextDelegate(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); + } + } diff --git a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/BillingPropertysInner.java b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/BillingPropertysInner.java index caea283c5b6c..ed22d589280d 100644 --- a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/BillingPropertysInner.java +++ b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/BillingPropertysInner.java @@ -52,7 +52,7 @@ public BillingPropertysInner(Retrofit retrofit, BillingManagementClientImpl clie */ interface BillingPropertysService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.v2019_10_01_preview.BillingPropertys get" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingProperty") + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingProperty/default") Observable> get(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } diff --git a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/DepartmentsImpl.java b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/DepartmentsImpl.java index be5024abca75..e4f534ea3c37 100644 --- a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/DepartmentsImpl.java +++ b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/DepartmentsImpl.java @@ -33,9 +33,9 @@ private DepartmentImpl wrapModel(DepartmentInner inner) { } @Override - public Observable listByBillingAccountAsync(String billingAccountName) { + public Observable listByBillingAccountNameAsync(String billingAccountName) { DepartmentsInner client = this.inner(); - return client.listByBillingAccountAsync(billingAccountName) + return client.listByBillingAccountNameAsync(billingAccountName) .map(new Func1() { @Override public DepartmentListResult call(DepartmentListResultInner inner) { diff --git a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/DepartmentsInner.java b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/DepartmentsInner.java index 662ab394fff2..ecc73c61fd1a 100644 --- a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/DepartmentsInner.java +++ b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/DepartmentsInner.java @@ -51,9 +51,9 @@ public DepartmentsInner(Retrofit retrofit, BillingManagementClientImpl client) { * used by Retrofit to perform actually REST calls. */ interface DepartmentsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.v2019_10_01_preview.Departments listByBillingAccount" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.v2019_10_01_preview.Departments listByBillingAccountName" }) @GET("providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments") - Observable> listByBillingAccount(@Path("billingAccountName") String billingAccountName, @Query("api-version") String apiVersion, @Query("$expand") String expand, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listByBillingAccountName(@Path("billingAccountName") String billingAccountName, @Query("api-version") String apiVersion, @Query("$expand") String expand, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.v2019_10_01_preview.Departments get" }) @GET("providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}") @@ -70,8 +70,8 @@ interface DepartmentsService { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the DepartmentListResultInner object if successful. */ - public DepartmentListResultInner listByBillingAccount(String billingAccountName) { - return listByBillingAccountWithServiceResponseAsync(billingAccountName).toBlocking().single().body(); + public DepartmentListResultInner listByBillingAccountName(String billingAccountName) { + return listByBillingAccountNameWithServiceResponseAsync(billingAccountName).toBlocking().single().body(); } /** @@ -82,8 +82,8 @@ public DepartmentListResultInner listByBillingAccount(String billingAccountName) * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listByBillingAccountAsync(String billingAccountName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listByBillingAccountWithServiceResponseAsync(billingAccountName), serviceCallback); + public ServiceFuture listByBillingAccountNameAsync(String billingAccountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listByBillingAccountNameWithServiceResponseAsync(billingAccountName), serviceCallback); } /** @@ -93,8 +93,8 @@ public ServiceFuture listByBillingAccountAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DepartmentListResultInner object */ - public Observable listByBillingAccountAsync(String billingAccountName) { - return listByBillingAccountWithServiceResponseAsync(billingAccountName).map(new Func1, DepartmentListResultInner>() { + public Observable listByBillingAccountNameAsync(String billingAccountName) { + return listByBillingAccountNameWithServiceResponseAsync(billingAccountName).map(new Func1, DepartmentListResultInner>() { @Override public DepartmentListResultInner call(ServiceResponse response) { return response.body(); @@ -109,7 +109,7 @@ public DepartmentListResultInner call(ServiceResponse * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DepartmentListResultInner object */ - public Observable> listByBillingAccountWithServiceResponseAsync(String billingAccountName) { + public Observable> listByBillingAccountNameWithServiceResponseAsync(String billingAccountName) { if (billingAccountName == null) { throw new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."); } @@ -118,12 +118,12 @@ public Observable> listByBillingAccou } final String expand = null; final String filter = null; - return service.listByBillingAccount(billingAccountName, this.client.apiVersion(), expand, filter, this.client.acceptLanguage(), this.client.userAgent()) + return service.listByBillingAccountName(billingAccountName, this.client.apiVersion(), expand, filter, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = listByBillingAccountDelegate(response); + ServiceResponse clientResponse = listByBillingAccountNameDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -143,8 +143,8 @@ public Observable> call(Response listByBillingAccountAsync(String billingAccountName, String expand, String filter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listByBillingAccountWithServiceResponseAsync(billingAccountName, expand, filter), serviceCallback); + public ServiceFuture listByBillingAccountNameAsync(String billingAccountName, String expand, String filter, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listByBillingAccountNameWithServiceResponseAsync(billingAccountName, expand, filter), serviceCallback); } /** @@ -170,8 +170,8 @@ public ServiceFuture listByBillingAccountAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DepartmentListResultInner object */ - public Observable listByBillingAccountAsync(String billingAccountName, String expand, String filter) { - return listByBillingAccountWithServiceResponseAsync(billingAccountName, expand, filter).map(new Func1, DepartmentListResultInner>() { + public Observable listByBillingAccountNameAsync(String billingAccountName, String expand, String filter) { + return listByBillingAccountNameWithServiceResponseAsync(billingAccountName, expand, filter).map(new Func1, DepartmentListResultInner>() { @Override public DepartmentListResultInner call(ServiceResponse response) { return response.body(); @@ -188,19 +188,19 @@ public DepartmentListResultInner call(ServiceResponse * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DepartmentListResultInner object */ - public Observable> listByBillingAccountWithServiceResponseAsync(String billingAccountName, String expand, String filter) { + public Observable> listByBillingAccountNameWithServiceResponseAsync(String billingAccountName, String expand, String filter) { if (billingAccountName == null) { throw new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } - return service.listByBillingAccount(billingAccountName, this.client.apiVersion(), expand, filter, this.client.acceptLanguage(), this.client.userAgent()) + return service.listByBillingAccountName(billingAccountName, this.client.apiVersion(), expand, filter, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = listByBillingAccountDelegate(response); + ServiceResponse clientResponse = listByBillingAccountNameDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -209,7 +209,7 @@ public Observable> call(Response listByBillingAccountDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + private ServiceResponse listByBillingAccountNameDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(ErrorResponseException.class) diff --git a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/EnrollmentAccountsImpl.java b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/EnrollmentAccountsImpl.java index 20d8743915a5..937bbde483b6 100644 --- a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/EnrollmentAccountsImpl.java +++ b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/EnrollmentAccountsImpl.java @@ -33,9 +33,9 @@ private EnrollmentAccountImpl wrapModel(EnrollmentAccountInner inner) { } @Override - public Observable listByBillingAccountAsync(String billingAccountName) { + public Observable listByBillingAccountNameAsync(String billingAccountName) { EnrollmentAccountsInner client = this.inner(); - return client.listByBillingAccountAsync(billingAccountName) + return client.listByBillingAccountNameAsync(billingAccountName) .map(new Func1() { @Override public EnrollmentAccountListResult call(EnrollmentAccountListResultInner inner) { diff --git a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/EnrollmentAccountsInner.java b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/EnrollmentAccountsInner.java index 536f275a2d58..37e09e04fe11 100644 --- a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/EnrollmentAccountsInner.java +++ b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/EnrollmentAccountsInner.java @@ -51,9 +51,9 @@ public EnrollmentAccountsInner(Retrofit retrofit, BillingManagementClientImpl cl * used by Retrofit to perform actually REST calls. */ interface EnrollmentAccountsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.v2019_10_01_preview.EnrollmentAccounts listByBillingAccount" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.v2019_10_01_preview.EnrollmentAccounts listByBillingAccountName" }) @GET("providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts") - Observable> listByBillingAccount(@Path("billingAccountName") String billingAccountName, @Query("api-version") String apiVersion, @Query("$expand") String expand, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listByBillingAccountName(@Path("billingAccountName") String billingAccountName, @Query("api-version") String apiVersion, @Query("$expand") String expand, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.v2019_10_01_preview.EnrollmentAccounts getByEnrollmentAccountId" }) @GET("providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}") @@ -70,8 +70,8 @@ interface EnrollmentAccountsService { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the EnrollmentAccountListResultInner object if successful. */ - public EnrollmentAccountListResultInner listByBillingAccount(String billingAccountName) { - return listByBillingAccountWithServiceResponseAsync(billingAccountName).toBlocking().single().body(); + public EnrollmentAccountListResultInner listByBillingAccountName(String billingAccountName) { + return listByBillingAccountNameWithServiceResponseAsync(billingAccountName).toBlocking().single().body(); } /** @@ -82,8 +82,8 @@ public EnrollmentAccountListResultInner listByBillingAccount(String billingAccou * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listByBillingAccountAsync(String billingAccountName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listByBillingAccountWithServiceResponseAsync(billingAccountName), serviceCallback); + public ServiceFuture listByBillingAccountNameAsync(String billingAccountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listByBillingAccountNameWithServiceResponseAsync(billingAccountName), serviceCallback); } /** @@ -93,8 +93,8 @@ public ServiceFuture listByBillingAccountAsync * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the EnrollmentAccountListResultInner object */ - public Observable listByBillingAccountAsync(String billingAccountName) { - return listByBillingAccountWithServiceResponseAsync(billingAccountName).map(new Func1, EnrollmentAccountListResultInner>() { + public Observable listByBillingAccountNameAsync(String billingAccountName) { + return listByBillingAccountNameWithServiceResponseAsync(billingAccountName).map(new Func1, EnrollmentAccountListResultInner>() { @Override public EnrollmentAccountListResultInner call(ServiceResponse response) { return response.body(); @@ -109,7 +109,7 @@ public EnrollmentAccountListResultInner call(ServiceResponse> listByBillingAccountWithServiceResponseAsync(String billingAccountName) { + public Observable> listByBillingAccountNameWithServiceResponseAsync(String billingAccountName) { if (billingAccountName == null) { throw new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."); } @@ -118,12 +118,12 @@ public Observable> listByBilli } final String expand = null; final String filter = null; - return service.listByBillingAccount(billingAccountName, this.client.apiVersion(), expand, filter, this.client.acceptLanguage(), this.client.userAgent()) + return service.listByBillingAccountName(billingAccountName, this.client.apiVersion(), expand, filter, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = listByBillingAccountDelegate(response); + ServiceResponse clientResponse = listByBillingAccountNameDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -143,8 +143,8 @@ public Observable> call(Respon * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the EnrollmentAccountListResultInner object if successful. */ - public EnrollmentAccountListResultInner listByBillingAccount(String billingAccountName, String expand, String filter) { - return listByBillingAccountWithServiceResponseAsync(billingAccountName, expand, filter).toBlocking().single().body(); + public EnrollmentAccountListResultInner listByBillingAccountName(String billingAccountName, String expand, String filter) { + return listByBillingAccountNameWithServiceResponseAsync(billingAccountName, expand, filter).toBlocking().single().body(); } /** @@ -157,8 +157,8 @@ public EnrollmentAccountListResultInner listByBillingAccount(String billingAccou * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listByBillingAccountAsync(String billingAccountName, String expand, String filter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listByBillingAccountWithServiceResponseAsync(billingAccountName, expand, filter), serviceCallback); + public ServiceFuture listByBillingAccountNameAsync(String billingAccountName, String expand, String filter, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listByBillingAccountNameWithServiceResponseAsync(billingAccountName, expand, filter), serviceCallback); } /** @@ -170,8 +170,8 @@ public ServiceFuture listByBillingAccountAsync * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the EnrollmentAccountListResultInner object */ - public Observable listByBillingAccountAsync(String billingAccountName, String expand, String filter) { - return listByBillingAccountWithServiceResponseAsync(billingAccountName, expand, filter).map(new Func1, EnrollmentAccountListResultInner>() { + public Observable listByBillingAccountNameAsync(String billingAccountName, String expand, String filter) { + return listByBillingAccountNameWithServiceResponseAsync(billingAccountName, expand, filter).map(new Func1, EnrollmentAccountListResultInner>() { @Override public EnrollmentAccountListResultInner call(ServiceResponse response) { return response.body(); @@ -188,19 +188,19 @@ public EnrollmentAccountListResultInner call(ServiceResponse> listByBillingAccountWithServiceResponseAsync(String billingAccountName, String expand, String filter) { + public Observable> listByBillingAccountNameWithServiceResponseAsync(String billingAccountName, String expand, String filter) { if (billingAccountName == null) { throw new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } - return service.listByBillingAccount(billingAccountName, this.client.apiVersion(), expand, filter, this.client.acceptLanguage(), this.client.userAgent()) + return service.listByBillingAccountName(billingAccountName, this.client.apiVersion(), expand, filter, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = listByBillingAccountDelegate(response); + ServiceResponse clientResponse = listByBillingAccountNameDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -209,7 +209,7 @@ public Observable> call(Respon }); } - private ServiceResponse listByBillingAccountDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + private ServiceResponse listByBillingAccountNameDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(ErrorResponseException.class) diff --git a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/InvoiceSectionWithCreateSubPermissionImpl.java b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/InvoiceSectionWithCreateSubPermissionImpl.java new file mode 100644 index 000000000000..84a6ef80ac9d --- /dev/null +++ b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/InvoiceSectionWithCreateSubPermissionImpl.java @@ -0,0 +1,53 @@ +/** + * 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.v2019_10_01_preview.implementation; + +import com.microsoft.azure.management.billing.v2019_10_01_preview.InvoiceSectionWithCreateSubPermission; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.billing.v2019_10_01_preview.AzurePlan; + +class InvoiceSectionWithCreateSubPermissionImpl extends WrapperImpl implements InvoiceSectionWithCreateSubPermission { + private final BillingManager manager; + InvoiceSectionWithCreateSubPermissionImpl(InvoiceSectionWithCreateSubPermissionInner inner, BillingManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public BillingManager manager() { + return this.manager; + } + + @Override + public String billingProfileDisplayName() { + return this.inner().billingProfileDisplayName(); + } + + @Override + public String billingProfileId() { + return this.inner().billingProfileId(); + } + + @Override + public List enabledAzurePlans() { + return this.inner().enabledAzurePlans(); + } + + @Override + public String invoiceSectionDisplayName() { + return this.inner().invoiceSectionDisplayName(); + } + + @Override + public String invoiceSectionId() { + return this.inner().invoiceSectionId(); + } + +} diff --git a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/InvoiceSectionWithCreateSubPermissionInner.java b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/InvoiceSectionWithCreateSubPermissionInner.java new file mode 100644 index 000000000000..005b7acd2fda --- /dev/null +++ b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/InvoiceSectionWithCreateSubPermissionInner.java @@ -0,0 +1,105 @@ +/** + * 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.v2019_10_01_preview.implementation; + +import java.util.List; +import com.microsoft.azure.management.billing.v2019_10_01_preview.AzurePlan; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Invoice section properties with create subscription permission. + */ +public class InvoiceSectionWithCreateSubPermissionInner { + /** + * Invoice Section Id. + */ + @JsonProperty(value = "invoiceSectionId", access = JsonProperty.Access.WRITE_ONLY) + private String invoiceSectionId; + + /** + * Invoice Section display name. + */ + @JsonProperty(value = "invoiceSectionDisplayName", access = JsonProperty.Access.WRITE_ONLY) + private String invoiceSectionDisplayName; + + /** + * Billing profile Id. + */ + @JsonProperty(value = "billingProfileId", access = JsonProperty.Access.WRITE_ONLY) + private String billingProfileId; + + /** + * Billing profile display name. + */ + @JsonProperty(value = "billingProfileDisplayName", access = JsonProperty.Access.WRITE_ONLY) + private String billingProfileDisplayName; + + /** + * Enabled azure plans for the associated billing profile. + */ + @JsonProperty(value = "enabledAzurePlans") + private List enabledAzurePlans; + + /** + * Get invoice Section Id. + * + * @return the invoiceSectionId value + */ + public String invoiceSectionId() { + return this.invoiceSectionId; + } + + /** + * Get invoice Section display name. + * + * @return the invoiceSectionDisplayName value + */ + public String invoiceSectionDisplayName() { + return this.invoiceSectionDisplayName; + } + + /** + * Get billing profile Id. + * + * @return the billingProfileId value + */ + public String billingProfileId() { + return this.billingProfileId; + } + + /** + * Get billing profile display name. + * + * @return the billingProfileDisplayName value + */ + public String billingProfileDisplayName() { + return this.billingProfileDisplayName; + } + + /** + * Get enabled azure plans for the associated billing profile. + * + * @return the enabledAzurePlans value + */ + public List enabledAzurePlans() { + return this.enabledAzurePlans; + } + + /** + * Set enabled azure plans for the associated billing profile. + * + * @param enabledAzurePlans the enabledAzurePlans value to set + * @return the InvoiceSectionWithCreateSubPermissionInner object itself. + */ + public InvoiceSectionWithCreateSubPermissionInner withEnabledAzurePlans(List enabledAzurePlans) { + this.enabledAzurePlans = enabledAzurePlans; + return this; + } + +} diff --git a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/ProductsImpl.java b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/ProductsImpl.java index fcf2c2fab4b5..0875fcb08dc5 100644 --- a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/ProductsImpl.java +++ b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/ProductsImpl.java @@ -114,18 +114,6 @@ public ValidateProductTransferEligibilityResult call(ValidateProductTransferElig }); } - @Override - public Observable updateAutoRenewByBillingAccountAsync(String billingAccountName, String productName) { - ProductsInner client = this.inner(); - return client.updateAutoRenewByBillingAccountAsync(billingAccountName, productName) - .map(new Func1() { - @Override - public UpdateAutoRenewOperation call(UpdateAutoRenewOperationInner inner) { - return new UpdateAutoRenewOperationImpl(inner, manager()); - } - }); - } - @Override public Observable updateAutoRenewByInvoiceSectionAsync(String billingAccountName, String billingProfileName, String invoiceSectionName, String productName) { ProductsInner client = this.inner(); diff --git a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/ProductsInner.java b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/ProductsInner.java index 6fe64a4fd237..7042a367be0e 100644 --- a/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/ProductsInner.java +++ b/billing/resource-manager/v2019_10_01_preview/src/main/java/com/microsoft/azure/management/billing/v2019_10_01_preview/implementation/ProductsInner.java @@ -93,10 +93,6 @@ interface ProductsService { @POST("providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/{productName}/validateTransferEligibility") Observable> validateTransfer(@Path("billingAccountName") String billingAccountName, @Path("billingProfileName") String billingProfileName, @Path("invoiceSectionName") String invoiceSectionName, @Path("productName") String productName, @Body TransferProductRequestProperties parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.v2019_10_01_preview.Products updateAutoRenewByBillingAccount" }) - @POST("providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}/updateAutoRenew") - Observable> updateAutoRenewByBillingAccount(@Path("billingAccountName") String billingAccountName, @Path("productName") String productName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UpdateAutoRenewRequest body, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.billing.v2019_10_01_preview.Products updateAutoRenewByInvoiceSection" }) @POST("providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/{productName}/updateAutoRenew") Observable> updateAutoRenewByInvoiceSection(@Path("billingAccountName") String billingAccountName, @Path("billingProfileName") String billingProfileName, @Path("invoiceSectionName") String invoiceSectionName, @Path("productName") String productName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UpdateAutoRenewRequest body, @Header("User-Agent") String userAgent); @@ -1067,174 +1063,6 @@ private ServiceResponse validateT .build(response); } - /** - * Cancel auto renew for product by product id and billing account name. - * - * @param billingAccountName billing Account Id. - * @param productName Invoice Id. - * @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 UpdateAutoRenewOperationInner object if successful. - */ - public UpdateAutoRenewOperationInner updateAutoRenewByBillingAccount(String billingAccountName, String productName) { - return updateAutoRenewByBillingAccountWithServiceResponseAsync(billingAccountName, productName).toBlocking().single().body(); - } - - /** - * Cancel auto renew for product by product id and billing account name. - * - * @param billingAccountName billing Account Id. - * @param productName Invoice Id. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAutoRenewByBillingAccountAsync(String billingAccountName, String productName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateAutoRenewByBillingAccountWithServiceResponseAsync(billingAccountName, productName), serviceCallback); - } - - /** - * Cancel auto renew for product by product id and billing account name. - * - * @param billingAccountName billing Account Id. - * @param productName Invoice Id. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UpdateAutoRenewOperationInner object - */ - public Observable updateAutoRenewByBillingAccountAsync(String billingAccountName, String productName) { - return updateAutoRenewByBillingAccountWithServiceResponseAsync(billingAccountName, productName).map(new Func1, UpdateAutoRenewOperationInner>() { - @Override - public UpdateAutoRenewOperationInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Cancel auto renew for product by product id and billing account name. - * - * @param billingAccountName billing Account Id. - * @param productName Invoice Id. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UpdateAutoRenewOperationInner object - */ - public Observable> updateAutoRenewByBillingAccountWithServiceResponseAsync(String billingAccountName, String productName) { - if (billingAccountName == null) { - throw new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."); - } - if (productName == null) { - throw new IllegalArgumentException("Parameter productName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final UpdateAutoRenew autoRenew = null; - UpdateAutoRenewRequest body = new UpdateAutoRenewRequest(); - body.withAutoRenew(null); - return service.updateAutoRenewByBillingAccount(billingAccountName, productName, this.client.apiVersion(), this.client.acceptLanguage(), body, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateAutoRenewByBillingAccountDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Cancel auto renew for product by product id and billing account name. - * - * @param billingAccountName billing Account Id. - * @param productName Invoice Id. - * @param autoRenew Request parameters to update auto renew policy a product. Possible values include: 'true', 'false' - * @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 UpdateAutoRenewOperationInner object if successful. - */ - public UpdateAutoRenewOperationInner updateAutoRenewByBillingAccount(String billingAccountName, String productName, UpdateAutoRenew autoRenew) { - return updateAutoRenewByBillingAccountWithServiceResponseAsync(billingAccountName, productName, autoRenew).toBlocking().single().body(); - } - - /** - * Cancel auto renew for product by product id and billing account name. - * - * @param billingAccountName billing Account Id. - * @param productName Invoice Id. - * @param autoRenew Request parameters to update auto renew policy a product. Possible values include: 'true', 'false' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAutoRenewByBillingAccountAsync(String billingAccountName, String productName, UpdateAutoRenew autoRenew, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateAutoRenewByBillingAccountWithServiceResponseAsync(billingAccountName, productName, autoRenew), serviceCallback); - } - - /** - * Cancel auto renew for product by product id and billing account name. - * - * @param billingAccountName billing Account Id. - * @param productName Invoice Id. - * @param autoRenew Request parameters to update auto renew policy a product. Possible values include: 'true', 'false' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UpdateAutoRenewOperationInner object - */ - public Observable updateAutoRenewByBillingAccountAsync(String billingAccountName, String productName, UpdateAutoRenew autoRenew) { - return updateAutoRenewByBillingAccountWithServiceResponseAsync(billingAccountName, productName, autoRenew).map(new Func1, UpdateAutoRenewOperationInner>() { - @Override - public UpdateAutoRenewOperationInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Cancel auto renew for product by product id and billing account name. - * - * @param billingAccountName billing Account Id. - * @param productName Invoice Id. - * @param autoRenew Request parameters to update auto renew policy a product. Possible values include: 'true', 'false' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the UpdateAutoRenewOperationInner object - */ - public Observable> updateAutoRenewByBillingAccountWithServiceResponseAsync(String billingAccountName, String productName, UpdateAutoRenew autoRenew) { - if (billingAccountName == null) { - throw new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."); - } - if (productName == null) { - throw new IllegalArgumentException("Parameter productName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - UpdateAutoRenewRequest body = new UpdateAutoRenewRequest(); - body.withAutoRenew(autoRenew); - return service.updateAutoRenewByBillingAccount(billingAccountName, productName, this.client.apiVersion(), this.client.acceptLanguage(), body, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateAutoRenewByBillingAccountDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateAutoRenewByBillingAccountDelegate(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); - } - /** * Cancel auto renew for product by product id and invoice section name. *