diff --git a/sdk/billing/azure-resourcemanager-billing/CHANGELOG.md b/sdk/billing/azure-resourcemanager-billing/CHANGELOG.md index 817c796a5aca..c01d365c5450 100644 --- a/sdk/billing/azure-resourcemanager-billing/CHANGELOG.md +++ b/sdk/billing/azure-resourcemanager-billing/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2022-10-12) + +- Azure Resource Manager Billing client library for Java. This package contains Microsoft Azure SDK for Billing Management SDK. Billing client provides access to billing resources for Azure subscriptions. Package tag package-2020-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/billing/azure-resourcemanager-billing/README.md b/sdk/billing/azure-resourcemanager-billing/README.md index 7e19f65c2df0..1b6e199cc250 100644 --- a/sdk/billing/azure-resourcemanager-billing/README.md +++ b/sdk/billing/azure-resourcemanager-billing/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-billing - 1.0.0-beta.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/BillingManager.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/BillingManager.java index 2743dee0aa9f..9e87dec0a5a2 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/BillingManager.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/BillingManager.java @@ -8,12 +8,15 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; @@ -69,6 +72,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** Entry point to BillingManager. Billing client provides access to billing resources for Azure subscriptions. */ public final class BillingManager { @@ -100,8 +104,6 @@ public final class BillingManager { private BillingProperties billingProperties; - private Operations operations; - private BillingRoleDefinitions billingRoleDefinitions; private BillingRoleAssignments billingRoleAssignments; @@ -114,6 +116,8 @@ public final class BillingManager { private BillingPeriods billingPeriods; + private Operations operations; + private final BillingManagementClient clientObject; private BillingManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -141,6 +145,19 @@ public static BillingManager authenticate(TokenCredential credential, AzureProfi return configure().authenticate(credential, profile); } + /** + * Creates an instance of Billing service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the Billing service API instance. + */ + public static BillingManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new BillingManager(httpPipeline, profile, null); + } + /** * Gets a Configurable instance that can be used to create BillingManager with optional configuration. * @@ -152,13 +169,14 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; + private RetryOptions retryOptions; private Duration defaultPollInterval; private Configurable() { @@ -219,6 +237,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { return this; } + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + /** * Sets the default poll interval, used when service does not provide "Retry-After" header. * @@ -226,9 +257,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -250,7 +283,7 @@ public BillingManager authenticate(TokenCredential credential, AzureProfile prof .append("-") .append("com.azure.resourcemanager.billing") .append("/") - .append("1.0.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -268,16 +301,34 @@ public BillingManager authenticate(TokenCredential credential, AzureProfile prof scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); } if (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = @@ -289,7 +340,11 @@ public BillingManager authenticate(TokenCredential credential, AzureProfile prof } } - /** @return Resource collection API of BillingAccounts. */ + /** + * Gets the resource collection API of BillingAccounts. + * + * @return Resource collection API of BillingAccounts. + */ public BillingAccounts billingAccounts() { if (this.billingAccounts == null) { this.billingAccounts = new BillingAccountsImpl(clientObject.getBillingAccounts(), this); @@ -297,7 +352,11 @@ public BillingAccounts billingAccounts() { return billingAccounts; } - /** @return Resource collection API of Address. */ + /** + * Gets the resource collection API of Address. + * + * @return Resource collection API of Address. + */ public Address address() { if (this.address == null) { this.address = new AddressImpl(clientObject.getAddress(), this); @@ -305,7 +364,11 @@ public Address address() { return address; } - /** @return Resource collection API of AvailableBalances. */ + /** + * Gets the resource collection API of AvailableBalances. + * + * @return Resource collection API of AvailableBalances. + */ public AvailableBalances availableBalances() { if (this.availableBalances == null) { this.availableBalances = new AvailableBalancesImpl(clientObject.getAvailableBalances(), this); @@ -313,7 +376,11 @@ public AvailableBalances availableBalances() { return availableBalances; } - /** @return Resource collection API of Instructions. */ + /** + * Gets the resource collection API of Instructions. + * + * @return Resource collection API of Instructions. + */ public Instructions instructions() { if (this.instructions == null) { this.instructions = new InstructionsImpl(clientObject.getInstructions(), this); @@ -321,7 +388,11 @@ public Instructions instructions() { return instructions; } - /** @return Resource collection API of BillingProfiles. */ + /** + * Gets the resource collection API of BillingProfiles. + * + * @return Resource collection API of BillingProfiles. + */ public BillingProfiles billingProfiles() { if (this.billingProfiles == null) { this.billingProfiles = new BillingProfilesImpl(clientObject.getBillingProfiles(), this); @@ -329,7 +400,11 @@ public BillingProfiles billingProfiles() { return billingProfiles; } - /** @return Resource collection API of Customers. */ + /** + * Gets the resource collection API of Customers. + * + * @return Resource collection API of Customers. + */ public Customers customers() { if (this.customers == null) { this.customers = new CustomersImpl(clientObject.getCustomers(), this); @@ -337,7 +412,11 @@ public Customers customers() { return customers; } - /** @return Resource collection API of InvoiceSections. */ + /** + * Gets the resource collection API of InvoiceSections. + * + * @return Resource collection API of InvoiceSections. + */ public InvoiceSections invoiceSections() { if (this.invoiceSections == null) { this.invoiceSections = new InvoiceSectionsImpl(clientObject.getInvoiceSections(), this); @@ -345,7 +424,11 @@ public InvoiceSections invoiceSections() { return invoiceSections; } - /** @return Resource collection API of BillingPermissions. */ + /** + * Gets the resource collection API of BillingPermissions. + * + * @return Resource collection API of BillingPermissions. + */ public BillingPermissions billingPermissions() { if (this.billingPermissions == null) { this.billingPermissions = new BillingPermissionsImpl(clientObject.getBillingPermissions(), this); @@ -353,7 +436,11 @@ public BillingPermissions billingPermissions() { return billingPermissions; } - /** @return Resource collection API of BillingSubscriptions. */ + /** + * Gets the resource collection API of BillingSubscriptions. + * + * @return Resource collection API of BillingSubscriptions. + */ public BillingSubscriptions billingSubscriptions() { if (this.billingSubscriptions == null) { this.billingSubscriptions = new BillingSubscriptionsImpl(clientObject.getBillingSubscriptions(), this); @@ -361,7 +448,11 @@ public BillingSubscriptions billingSubscriptions() { return billingSubscriptions; } - /** @return Resource collection API of Products. */ + /** + * Gets the resource collection API of Products. + * + * @return Resource collection API of Products. + */ public Products products() { if (this.products == null) { this.products = new ProductsImpl(clientObject.getProducts(), this); @@ -369,7 +460,11 @@ public Products products() { return products; } - /** @return Resource collection API of Invoices. */ + /** + * Gets the resource collection API of Invoices. + * + * @return Resource collection API of Invoices. + */ public Invoices invoices() { if (this.invoices == null) { this.invoices = new InvoicesImpl(clientObject.getInvoices(), this); @@ -377,7 +472,11 @@ public Invoices invoices() { return invoices; } - /** @return Resource collection API of Transactions. */ + /** + * Gets the resource collection API of Transactions. + * + * @return Resource collection API of Transactions. + */ public Transactions transactions() { if (this.transactions == null) { this.transactions = new TransactionsImpl(clientObject.getTransactions(), this); @@ -385,7 +484,11 @@ public Transactions transactions() { return transactions; } - /** @return Resource collection API of Policies. */ + /** + * Gets the resource collection API of Policies. + * + * @return Resource collection API of Policies. + */ public Policies policies() { if (this.policies == null) { this.policies = new PoliciesImpl(clientObject.getPolicies(), this); @@ -393,7 +496,11 @@ public Policies policies() { return policies; } - /** @return Resource collection API of BillingProperties. */ + /** + * Gets the resource collection API of BillingProperties. + * + * @return Resource collection API of BillingProperties. + */ public BillingProperties billingProperties() { if (this.billingProperties == null) { this.billingProperties = new BillingPropertiesImpl(clientObject.getBillingProperties(), this); @@ -401,15 +508,11 @@ public BillingProperties billingProperties() { return billingProperties; } - /** @return Resource collection API of Operations. */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** @return Resource collection API of BillingRoleDefinitions. */ + /** + * Gets the resource collection API of BillingRoleDefinitions. + * + * @return Resource collection API of BillingRoleDefinitions. + */ public BillingRoleDefinitions billingRoleDefinitions() { if (this.billingRoleDefinitions == null) { this.billingRoleDefinitions = @@ -418,7 +521,11 @@ public BillingRoleDefinitions billingRoleDefinitions() { return billingRoleDefinitions; } - /** @return Resource collection API of BillingRoleAssignments. */ + /** + * Gets the resource collection API of BillingRoleAssignments. + * + * @return Resource collection API of BillingRoleAssignments. + */ public BillingRoleAssignments billingRoleAssignments() { if (this.billingRoleAssignments == null) { this.billingRoleAssignments = @@ -427,7 +534,11 @@ public BillingRoleAssignments billingRoleAssignments() { return billingRoleAssignments; } - /** @return Resource collection API of Agreements. */ + /** + * Gets the resource collection API of Agreements. + * + * @return Resource collection API of Agreements. + */ public Agreements agreements() { if (this.agreements == null) { this.agreements = new AgreementsImpl(clientObject.getAgreements(), this); @@ -435,7 +546,11 @@ public Agreements agreements() { return agreements; } - /** @return Resource collection API of Reservations. */ + /** + * Gets the resource collection API of Reservations. + * + * @return Resource collection API of Reservations. + */ public Reservations reservations() { if (this.reservations == null) { this.reservations = new ReservationsImpl(clientObject.getReservations(), this); @@ -443,7 +558,11 @@ public Reservations reservations() { return reservations; } - /** @return Resource collection API of EnrollmentAccounts. */ + /** + * Gets the resource collection API of EnrollmentAccounts. + * + * @return Resource collection API of EnrollmentAccounts. + */ public EnrollmentAccounts enrollmentAccounts() { if (this.enrollmentAccounts == null) { this.enrollmentAccounts = new EnrollmentAccountsImpl(clientObject.getEnrollmentAccounts(), this); @@ -451,7 +570,11 @@ public EnrollmentAccounts enrollmentAccounts() { return enrollmentAccounts; } - /** @return Resource collection API of BillingPeriods. */ + /** + * Gets the resource collection API of BillingPeriods. + * + * @return Resource collection API of BillingPeriods. + */ public BillingPeriods billingPeriods() { if (this.billingPeriods == null) { this.billingPeriods = new BillingPeriodsImpl(clientObject.getBillingPeriods(), this); @@ -459,6 +582,18 @@ public BillingPeriods billingPeriods() { return billingPeriods; } + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + /** * @return Wrapped service client BillingManagementClient providing direct access to the underlying auto-generated * API implementation, based on Azure REST API. diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AddressClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AddressClient.java index 66eecfbbab46..3810e247e2ee 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AddressClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AddressClient.java @@ -17,24 +17,24 @@ public interface AddressClient { * Validates an address. Use the operation to validate an address before using it as soldTo or a billTo address. * * @param address Address details. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the address validation. + * @return result of the address validation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ValidateAddressResponseInner validate(AddressDetails address); + Response validateWithResponse(AddressDetails address, Context context); /** * Validates an address. Use the operation to validate an address before using it as soldTo or a billTo address. * * @param address Address details. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the address validation. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response validateWithResponse(AddressDetails address, Context context); + ValidateAddressResponseInner validate(AddressDetails address); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AgreementsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AgreementsClient.java index ad29ace3539d..2966384ab22a 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AgreementsClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AgreementsClient.java @@ -20,7 +20,7 @@ public interface AgreementsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing agreements. + * @return result of listing agreements as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount(String billingAccountName); @@ -34,7 +34,7 @@ public interface AgreementsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing agreements. + * @return result of listing agreements as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount(String billingAccountName, String expand, Context context); @@ -44,27 +44,27 @@ public interface AgreementsClient { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param agreementName The ID that uniquely identifies an agreement. + * @param expand May be used to expand the participants. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an agreement by ID. + * @return an agreement by ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AgreementInner get(String billingAccountName, String agreementName); + Response getWithResponse( + String billingAccountName, String agreementName, String expand, Context context); /** * Gets an agreement by ID. * * @param billingAccountName The ID that uniquely identifies a billing account. * @param agreementName The ID that uniquely identifies an agreement. - * @param expand May be used to expand the participants. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an agreement by ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String billingAccountName, String agreementName, String expand, Context context); + AgreementInner get(String billingAccountName, String agreementName); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AvailableBalancesClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AvailableBalancesClient.java index 3b9e3e6df477..338e89332f7d 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AvailableBalancesClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/AvailableBalancesClient.java @@ -19,13 +19,15 @@ public interface AvailableBalancesClient { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the latest Azure credit balance. + * @return the latest Azure credit balance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AvailableBalanceInner get(String billingAccountName, String billingProfileName); + Response getWithResponse( + String billingAccountName, String billingProfileName, Context context); /** * The available credit balance for a billing profile. This is the balance that can be used for pay now to settle @@ -34,13 +36,11 @@ public interface AvailableBalancesClient { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the latest Azure credit balance. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String billingAccountName, String billingProfileName, Context context); + AvailableBalanceInner get(String billingAccountName, String billingProfileName); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingAccountsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingAccountsClient.java index 3e8aef58d0e4..7dd1f15292b7 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingAccountsClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingAccountsClient.java @@ -22,7 +22,7 @@ public interface BillingAccountsClient { * * @throws com.azure.core.management.exception.ManagementException 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 of billing accounts. + * @return the list of billing accounts as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -35,7 +35,7 @@ public interface BillingAccountsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing accounts. + * @return the list of billing accounts as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String expand, Context context); @@ -44,27 +44,27 @@ public interface BillingAccountsClient { * Gets a billing account by its ID. * * @param billingAccountName The ID that uniquely identifies a billing account. + * @param expand May be used to expand the soldTo, invoice sections and billing profiles. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing account by its ID. + * @return a billing account by its ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BillingAccountInner get(String billingAccountName); + Response getWithResponse(String billingAccountName, String expand, Context context); /** * Gets a billing account by its ID. * * @param billingAccountName The ID that uniquely identifies a billing account. - * @param expand May be used to expand the soldTo, invoice sections and billing profiles. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a billing account by its ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String billingAccountName, String expand, Context context); + BillingAccountInner get(String billingAccountName); /** * Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is @@ -75,7 +75,7 @@ public interface BillingAccountsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing account. + * @return the {@link SyncPoller} for polling of a billing account. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BillingAccountInner> beginUpdate( @@ -91,7 +91,7 @@ SyncPoller, BillingAccountInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing account. + * @return the {@link SyncPoller} for polling of a billing account. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BillingAccountInner> beginUpdate( @@ -134,7 +134,8 @@ SyncPoller, BillingAccountInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoice section properties with create subscription permission. + * @return the list of invoice section properties with create subscription permission as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listInvoiceSectionsByCreateSubscriptionPermission( @@ -149,7 +150,8 @@ PagedIterable listInvoiceSectionsByC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoice section properties with create subscription permission. + * @return the list of invoice section properties with create subscription permission as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listInvoiceSectionsByCreateSubscriptionPermission( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingManagementClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingManagementClient.java index cea1c2b7e376..3f98daa9f4f3 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingManagementClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingManagementClient.java @@ -135,13 +135,6 @@ public interface BillingManagementClient { */ BillingPropertiesClient getBillingProperties(); - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - /** * Gets the BillingRoleDefinitionsClient object to access its operations. * @@ -183,4 +176,11 @@ public interface BillingManagementClient { * @return the BillingPeriodsClient object. */ BillingPeriodsClient getBillingPeriods(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPeriodsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPeriodsClient.java index 9b05db568d5a..29b0f172ec4b 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPeriodsClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPeriodsClient.java @@ -20,7 +20,7 @@ public interface BillingPeriodsClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing billing periods. + * @return result of listing billing periods as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -40,7 +40,7 @@ public interface BillingPeriodsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing billing periods. + * @return result of listing billing periods as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String filter, String skiptoken, Integer top, Context context); @@ -50,25 +50,25 @@ public interface BillingPeriodsClient { * which were not purchased directly through the Azure web portal are not supported through this preview API. * * @param billingPeriodName The name of a BillingPeriod resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a named billing period. + * @return a named billing period along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BillingPeriodInner get(String billingPeriodName); + Response getWithResponse(String billingPeriodName, Context context); /** * Gets a named billing period. This is only supported for Azure Web-Direct subscriptions. Other subscription types * which were not purchased directly through the Azure web portal are not supported through this preview API. * * @param billingPeriodName The name of a BillingPeriod resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a named billing period. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String billingPeriodName, Context context); + BillingPeriodInner get(String billingPeriodName); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPermissionsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPermissionsClient.java index 806c78a4a825..0cad08a5895b 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPermissionsClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPermissionsClient.java @@ -20,7 +20,8 @@ public interface BillingPermissionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByCustomer(String billingAccountName, String customerName); @@ -34,7 +35,8 @@ public interface BillingPermissionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByCustomer( @@ -47,7 +49,8 @@ PagedIterable listByCustomer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount(String billingAccountName); @@ -60,7 +63,8 @@ PagedIterable listByCustomer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount(String billingAccountName, Context context); @@ -74,7 +78,8 @@ PagedIterable listByCustomer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByInvoiceSections( @@ -90,7 +95,8 @@ PagedIterable listByInvoiceSections( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByInvoiceSections( @@ -104,7 +110,8 @@ PagedIterable listByInvoiceSections( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile( @@ -119,7 +126,8 @@ PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingProfilesClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingProfilesClient.java index a708b9769226..ad55bc8a2616 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingProfilesClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingProfilesClient.java @@ -23,7 +23,7 @@ public interface BillingProfilesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing profiles. + * @return the list of billing profiles as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount(String billingAccountName); @@ -38,7 +38,7 @@ public interface BillingProfilesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing profiles. + * @return the list of billing profiles as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount(String billingAccountName, String expand, Context context); @@ -49,13 +49,16 @@ public interface BillingProfilesClient { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param expand May be used to expand the invoice sections. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing profile by its ID. + * @return a billing profile by its ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BillingProfileInner get(String billingAccountName, String billingProfileName); + Response getWithResponse( + String billingAccountName, String billingProfileName, String expand, Context context); /** * Gets a billing profile by its ID. The operation is supported for billing accounts with agreement type Microsoft @@ -63,16 +66,13 @@ public interface BillingProfilesClient { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. - * @param expand May be used to expand the invoice sections. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a billing profile by its ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String billingAccountName, String billingProfileName, String expand, Context context); + BillingProfileInner get(String billingAccountName, String billingProfileName); /** * Creates or updates a billing profile. The operation is supported for billing accounts with agreement type @@ -84,7 +84,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing profile. + * @return the {@link SyncPoller} for polling of a billing profile. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BillingProfileInner> beginCreateOrUpdate( @@ -101,7 +101,7 @@ SyncPoller, BillingProfileInner> beginCreateOrUp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing profile. + * @return the {@link SyncPoller} for polling of a billing profile. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BillingProfileInner> beginCreateOrUpdate( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPropertiesClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPropertiesClient.java index 6fb632b38e70..70dcb91077fe 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPropertiesClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingPropertiesClient.java @@ -16,50 +16,50 @@ public interface BillingPropertiesClient { * Get the billing properties for a subscription. This operation is not supported for billing accounts with * agreement type Enterprise Agreement. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the billing properties for a subscription. + * @return the billing properties for a subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BillingPropertyInner get(); + Response getWithResponse(Context context); /** * Get the billing properties for a subscription. This operation is not supported for billing accounts with * agreement type Enterprise Agreement. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the billing properties for a subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(Context context); + BillingPropertyInner get(); /** * Updates the billing property of a subscription. Currently, cost center can be updated. The operation is supported * only for billing accounts with agreement type Microsoft Customer Agreement. * * @param parameters Request parameters that are provided to the update billing property operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing property. + * @return a billing property along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BillingPropertyInner update(BillingPropertyInner parameters); + Response updateWithResponse(BillingPropertyInner parameters, Context context); /** * Updates the billing property of a subscription. Currently, cost center can be updated. The operation is supported * only for billing accounts with agreement type Microsoft Customer Agreement. * * @param parameters Request parameters that are provided to the update billing property operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a billing property. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(BillingPropertyInner parameters, Context context); + BillingPropertyInner update(BillingPropertyInner parameters); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingRoleAssignmentsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingRoleAssignmentsClient.java index 35f767918b95..52f89a0a81f6 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingRoleAssignmentsClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingRoleAssignmentsClient.java @@ -19,13 +19,15 @@ public interface BillingRoleAssignmentsClient { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a role assignment for the caller on a billing account. + * @return a role assignment for the caller on a billing account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BillingRoleAssignmentInner getByBillingAccount(String billingAccountName, String billingRoleAssignmentName); + Response getByBillingAccountWithResponse( + String billingAccountName, String billingRoleAssignmentName, Context context); /** * Gets a role assignment for the caller on a billing account. The operation is supported for billing accounts with @@ -33,15 +35,13 @@ public interface BillingRoleAssignmentsClient { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a role assignment for the caller on a billing account. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByBillingAccountWithResponse( - String billingAccountName, String billingRoleAssignmentName, Context context); + BillingRoleAssignmentInner getByBillingAccount(String billingAccountName, String billingRoleAssignmentName); /** * Deletes a role assignment for the caller on a billing account. The operation is supported for billing accounts @@ -49,13 +49,15 @@ Response getByBillingAccountWithResponse( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the role assignment. + * @return the role assignment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BillingRoleAssignmentInner deleteByBillingAccount(String billingAccountName, String billingRoleAssignmentName); + Response deleteByBillingAccountWithResponse( + String billingAccountName, String billingRoleAssignmentName, Context context); /** * Deletes a role assignment for the caller on a billing account. The operation is supported for billing accounts @@ -63,15 +65,13 @@ Response getByBillingAccountWithResponse( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the role assignment. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteByBillingAccountWithResponse( - String billingAccountName, String billingRoleAssignmentName, Context context); + BillingRoleAssignmentInner deleteByBillingAccount(String billingAccountName, String billingRoleAssignmentName); /** * Gets a role assignment for the caller on an invoice section. The operation is supported for billing accounts with @@ -81,17 +81,19 @@ Response deleteByBillingAccountWithResponse( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a role assignment for the caller on an invoice section. + * @return a role assignment for the caller on an invoice section along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BillingRoleAssignmentInner getByInvoiceSection( + Response getByInvoiceSectionWithResponse( String billingAccountName, String billingProfileName, String invoiceSectionName, - String billingRoleAssignmentName); + String billingRoleAssignmentName, + Context context); /** * Gets a role assignment for the caller on an invoice section. The operation is supported for billing accounts with @@ -101,19 +103,17 @@ BillingRoleAssignmentInner getByInvoiceSection( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a role assignment for the caller on an invoice section. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByInvoiceSectionWithResponse( + BillingRoleAssignmentInner getByInvoiceSection( String billingAccountName, String billingProfileName, String invoiceSectionName, - String billingRoleAssignmentName, - Context context); + String billingRoleAssignmentName); /** * Deletes a role assignment for the caller on an invoice section. The operation is supported for billing accounts @@ -123,17 +123,19 @@ Response getByInvoiceSectionWithResponse( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the role assignment. + * @return the role assignment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BillingRoleAssignmentInner deleteByInvoiceSection( + Response deleteByInvoiceSectionWithResponse( String billingAccountName, String billingProfileName, String invoiceSectionName, - String billingRoleAssignmentName); + String billingRoleAssignmentName, + Context context); /** * Deletes a role assignment for the caller on an invoice section. The operation is supported for billing accounts @@ -143,19 +145,17 @@ BillingRoleAssignmentInner deleteByInvoiceSection( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the role assignment. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteByInvoiceSectionWithResponse( + BillingRoleAssignmentInner deleteByInvoiceSection( String billingAccountName, String billingProfileName, String invoiceSectionName, - String billingRoleAssignmentName, - Context context); + String billingRoleAssignmentName); /** * Gets a role assignment for the caller on a billing profile. The operation is supported for billing accounts with @@ -164,14 +164,15 @@ Response deleteByInvoiceSectionWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a role assignment for the caller on a billing profile. + * @return a role assignment for the caller on a billing profile along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BillingRoleAssignmentInner getByBillingProfile( - String billingAccountName, String billingProfileName, String billingRoleAssignmentName); + Response getByBillingProfileWithResponse( + String billingAccountName, String billingProfileName, String billingRoleAssignmentName, Context context); /** * Gets a role assignment for the caller on a billing profile. The operation is supported for billing accounts with @@ -180,15 +181,14 @@ BillingRoleAssignmentInner getByBillingProfile( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a role assignment for the caller on a billing profile. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByBillingProfileWithResponse( - String billingAccountName, String billingProfileName, String billingRoleAssignmentName, Context context); + BillingRoleAssignmentInner getByBillingProfile( + String billingAccountName, String billingProfileName, String billingRoleAssignmentName); /** * Deletes a role assignment for the caller on a billing profile. The operation is supported for billing accounts @@ -197,14 +197,15 @@ Response getByBillingProfileWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the role assignment. + * @return the role assignment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BillingRoleAssignmentInner deleteByBillingProfile( - String billingAccountName, String billingProfileName, String billingRoleAssignmentName); + Response deleteByBillingProfileWithResponse( + String billingAccountName, String billingProfileName, String billingRoleAssignmentName, Context context); /** * Deletes a role assignment for the caller on a billing profile. The operation is supported for billing accounts @@ -213,15 +214,14 @@ BillingRoleAssignmentInner deleteByBillingProfile( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the role assignment. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteByBillingProfileWithResponse( - String billingAccountName, String billingProfileName, String billingRoleAssignmentName, Context context); + BillingRoleAssignmentInner deleteByBillingProfile( + String billingAccountName, String billingProfileName, String billingRoleAssignmentName); /** * Lists the role assignments for the caller on a billing account. The operation is supported for billing accounts @@ -231,7 +231,7 @@ Response deleteByBillingProfileWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount(String billingAccountName); @@ -245,7 +245,7 @@ Response deleteByBillingProfileWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount(String billingAccountName, Context context); @@ -260,7 +260,7 @@ Response deleteByBillingProfileWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByInvoiceSection( @@ -277,7 +277,7 @@ PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByInvoiceSection( @@ -292,7 +292,7 @@ PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile( @@ -308,7 +308,7 @@ PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingRoleDefinitionsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingRoleDefinitionsClient.java index ae03cfa9580f..6d961616bd0d 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingRoleDefinitionsClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingRoleDefinitionsClient.java @@ -19,13 +19,15 @@ public interface BillingRoleDefinitionsClient { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the definition for a role on a billing account. + * @return the definition for a role on a billing account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BillingRoleDefinitionInner getByBillingAccount(String billingAccountName, String billingRoleDefinitionName); + Response getByBillingAccountWithResponse( + String billingAccountName, String billingRoleDefinitionName, Context context); /** * Gets the definition for a role on a billing account. The operation is supported for billing accounts with @@ -33,15 +35,13 @@ public interface BillingRoleDefinitionsClient { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the definition for a role on a billing account. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByBillingAccountWithResponse( - String billingAccountName, String billingRoleDefinitionName, Context context); + BillingRoleDefinitionInner getByBillingAccount(String billingAccountName, String billingRoleDefinitionName); /** * Gets the definition for a role on an invoice section. The operation is supported only for billing accounts with @@ -51,17 +51,19 @@ Response getByBillingAccountWithResponse( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the definition for a role on an invoice section. + * @return the definition for a role on an invoice section along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BillingRoleDefinitionInner getByInvoiceSection( + Response getByInvoiceSectionWithResponse( String billingAccountName, String billingProfileName, String invoiceSectionName, - String billingRoleDefinitionName); + String billingRoleDefinitionName, + Context context); /** * Gets the definition for a role on an invoice section. The operation is supported only for billing accounts with @@ -71,19 +73,17 @@ BillingRoleDefinitionInner getByInvoiceSection( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the definition for a role on an invoice section. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByInvoiceSectionWithResponse( + BillingRoleDefinitionInner getByInvoiceSection( String billingAccountName, String billingProfileName, String invoiceSectionName, - String billingRoleDefinitionName, - Context context); + String billingRoleDefinitionName); /** * Gets the definition for a role on a billing profile. The operation is supported for billing accounts with @@ -92,14 +92,15 @@ Response getByInvoiceSectionWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the definition for a role on a billing profile. + * @return the definition for a role on a billing profile along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BillingRoleDefinitionInner getByBillingProfile( - String billingAccountName, String billingProfileName, String billingRoleDefinitionName); + Response getByBillingProfileWithResponse( + String billingAccountName, String billingProfileName, String billingRoleDefinitionName, Context context); /** * Gets the definition for a role on a billing profile. The operation is supported for billing accounts with @@ -108,15 +109,14 @@ BillingRoleDefinitionInner getByBillingProfile( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the definition for a role on a billing profile. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByBillingProfileWithResponse( - String billingAccountName, String billingProfileName, String billingRoleDefinitionName, Context context); + BillingRoleDefinitionInner getByBillingProfile( + String billingAccountName, String billingProfileName, String billingRoleDefinitionName); /** * Lists the role definitions for a billing account. The operation is supported for billing accounts with agreement @@ -126,7 +126,7 @@ Response getByBillingProfileWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount(String billingAccountName); @@ -140,7 +140,7 @@ Response getByBillingProfileWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount(String billingAccountName, Context context); @@ -155,7 +155,7 @@ Response getByBillingProfileWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByInvoiceSection( @@ -172,7 +172,7 @@ PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByInvoiceSection( @@ -187,7 +187,7 @@ PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile( @@ -203,7 +203,7 @@ PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingSubscriptionsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingSubscriptionsClient.java index 389c9b9259fe..6eb1ae8e6cc4 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingSubscriptionsClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/BillingSubscriptionsClient.java @@ -26,7 +26,7 @@ public interface BillingSubscriptionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByCustomer(String billingAccountName, String customerName); @@ -41,7 +41,7 @@ public interface BillingSubscriptionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByCustomer( @@ -55,7 +55,7 @@ PagedIterable listByCustomer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount(String billingAccountName); @@ -69,7 +69,7 @@ PagedIterable listByCustomer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount(String billingAccountName, Context context); @@ -83,7 +83,7 @@ PagedIterable listByCustomer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName); @@ -98,7 +98,7 @@ PagedIterable listByCustomer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile( @@ -114,7 +114,7 @@ PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByInvoiceSection( @@ -131,7 +131,7 @@ PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByInvoiceSection( @@ -142,27 +142,27 @@ PagedIterable listByInvoiceSection( * Customer Agreement and Microsoft Partner Agreement. * * @param billingAccountName The ID that uniquely identifies a billing account. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a subscription by its ID. + * @return a subscription by its ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BillingSubscriptionInner get(String billingAccountName); + Response getWithResponse(String billingAccountName, Context context); /** * Gets a subscription by its ID. The operation is supported for billing accounts with agreement type Microsoft * Customer Agreement and Microsoft Partner Agreement. * * @param billingAccountName The ID that uniquely identifies a billing account. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a subscription by its ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String billingAccountName, Context context); + BillingSubscriptionInner get(String billingAccountName); /** * Updates the properties of a billing subscription. Currently, cost center can be updated. The operation is @@ -170,13 +170,15 @@ PagedIterable listByInvoiceSection( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param parameters Request parameters that are provided to the update billing subscription operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing subscription. + * @return a billing subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BillingSubscriptionInner update(String billingAccountName, BillingSubscriptionInner parameters); + Response updateWithResponse( + String billingAccountName, BillingSubscriptionInner parameters, Context context); /** * Updates the properties of a billing subscription. Currently, cost center can be updated. The operation is @@ -184,15 +186,13 @@ PagedIterable listByInvoiceSection( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param parameters Request parameters that are provided to the update billing subscription operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a billing subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String billingAccountName, BillingSubscriptionInner parameters, Context context); + BillingSubscriptionInner update(String billingAccountName, BillingSubscriptionInner parameters); /** * Moves a subscription's charges to a new invoice section. The new invoice section must belong to the same billing @@ -204,7 +204,7 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing subscription. + * @return the {@link SyncPoller} for polling of a billing subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BillingSubscriptionInner> beginMove( @@ -221,7 +221,7 @@ SyncPoller, BillingSubscriptionInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing subscription. + * @return the {@link SyncPoller} for polling of a billing subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BillingSubscriptionInner> beginMove( @@ -265,14 +265,15 @@ BillingSubscriptionInner move( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param parameters Request parameters that are provided to the validate move eligibility operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the transfer eligibility validation. + * @return result of the transfer eligibility validation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ValidateSubscriptionTransferEligibilityResultInner validateMove( - String billingAccountName, TransferBillingSubscriptionRequestProperties parameters); + Response validateMoveWithResponse( + String billingAccountName, TransferBillingSubscriptionRequestProperties parameters, Context context); /** * Validates if a subscription's charges can be moved to a new invoice section. This operation is supported for @@ -280,13 +281,12 @@ ValidateSubscriptionTransferEligibilityResultInner validateMove( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param parameters Request parameters that are provided to the validate move eligibility operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the transfer eligibility validation. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response validateMoveWithResponse( - String billingAccountName, TransferBillingSubscriptionRequestProperties parameters, Context context); + ValidateSubscriptionTransferEligibilityResultInner validateMove( + String billingAccountName, TransferBillingSubscriptionRequestProperties parameters); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/CustomersClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/CustomersClient.java index 0331888c57e6..df99217822ca 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/CustomersClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/CustomersClient.java @@ -22,7 +22,7 @@ public interface CustomersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of customers. + * @return the list of customers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName); @@ -40,7 +40,7 @@ public interface CustomersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of customers. + * @return the list of customers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile( @@ -54,7 +54,7 @@ PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of customers. + * @return the list of customers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount(String billingAccountName); @@ -71,7 +71,7 @@ PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of customers. + * @return the list of customers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount( @@ -83,13 +83,16 @@ PagedIterable listByBillingAccount( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. + * @param expand May be used to expand enabledAzurePlans and resellers. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a customer by its ID. + * @return a customer by its ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - CustomerInner get(String billingAccountName, String customerName); + Response getWithResponse( + String billingAccountName, String customerName, String expand, Context context); /** * Gets a customer by its ID. The operation is supported only for billing accounts with agreement type Microsoft @@ -97,14 +100,11 @@ PagedIterable listByBillingAccount( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. - * @param expand May be used to expand enabledAzurePlans and resellers. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a customer by its ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String billingAccountName, String customerName, String expand, Context context); + CustomerInner get(String billingAccountName, String customerName); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/EnrollmentAccountsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/EnrollmentAccountsClient.java index 5e167c1f147b..85926cd3b8cb 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/EnrollmentAccountsClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/EnrollmentAccountsClient.java @@ -18,7 +18,7 @@ public interface EnrollmentAccountsClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing enrollment accounts. + * @return result of listing enrollment accounts as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -30,7 +30,7 @@ public interface EnrollmentAccountsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing enrollment accounts. + * @return result of listing enrollment accounts as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -39,24 +39,24 @@ public interface EnrollmentAccountsClient { * Gets a enrollment account by name. * * @param name Enrollment Account name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a enrollment account by name. + * @return a enrollment account by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EnrollmentAccountSummaryInner get(String name); + Response getWithResponse(String name, Context context); /** * Gets a enrollment account by name. * * @param name Enrollment Account name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a enrollment account by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String name, Context context); + EnrollmentAccountSummaryInner get(String name); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InstructionsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InstructionsClient.java index 5b8116658c0b..a1217295a863 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InstructionsClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InstructionsClient.java @@ -21,7 +21,8 @@ public interface InstructionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing instructions used during invoice generation. + * @return the list of billing instructions used during invoice generation as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName); @@ -35,7 +36,8 @@ public interface InstructionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing instructions used during invoice generation. + * @return the list of billing instructions used during invoice generation as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile( @@ -47,13 +49,15 @@ PagedIterable listByBillingProfile( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param instructionName Instruction Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the instruction by name. + * @return the instruction by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - InstructionInner get(String billingAccountName, String billingProfileName, String instructionName); + Response getWithResponse( + String billingAccountName, String billingProfileName, String instructionName, Context context); /** * Get the instruction by name. These are custom billing instructions and are only applicable for certain customers. @@ -61,15 +65,13 @@ PagedIterable listByBillingProfile( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param instructionName Instruction Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the instruction by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String billingAccountName, String billingProfileName, String instructionName, Context context); + InstructionInner get(String billingAccountName, String billingProfileName, String instructionName); /** * Creates or updates an instruction. These are custom billing instructions and are only applicable for certain @@ -79,14 +81,19 @@ Response getWithResponse( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param instructionName Instruction Name. * @param parameters The new instruction. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instruction. + * @return an instruction along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - InstructionInner put( - String billingAccountName, String billingProfileName, String instructionName, InstructionInner parameters); + Response putWithResponse( + String billingAccountName, + String billingProfileName, + String instructionName, + InstructionInner parameters, + Context context); /** * Creates or updates an instruction. These are custom billing instructions and are only applicable for certain @@ -96,17 +103,12 @@ InstructionInner put( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param instructionName Instruction Name. * @param parameters The new instruction. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an instruction. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response putWithResponse( - String billingAccountName, - String billingProfileName, - String instructionName, - InstructionInner parameters, - Context context); + InstructionInner put( + String billingAccountName, String billingProfileName, String instructionName, InstructionInner parameters); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InvoiceSectionsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InvoiceSectionsClient.java index 9681158c5e34..a493fb296877 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InvoiceSectionsClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InvoiceSectionsClient.java @@ -24,7 +24,7 @@ public interface InvoiceSectionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoice sections. + * @return the list of invoice sections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName); @@ -39,7 +39,7 @@ public interface InvoiceSectionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoice sections. + * @return the list of invoice sections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile( @@ -52,13 +52,15 @@ PagedIterable listByBillingProfile( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice section by its ID. + * @return an invoice section by its ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - InvoiceSectionInner get(String billingAccountName, String billingProfileName, String invoiceSectionName); + Response getWithResponse( + String billingAccountName, String billingProfileName, String invoiceSectionName, Context context); /** * Gets an invoice section by its ID. The operation is supported only for billing accounts with agreement type @@ -67,15 +69,13 @@ PagedIterable listByBillingProfile( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an invoice section by its ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String billingAccountName, String billingProfileName, String invoiceSectionName, Context context); + InvoiceSectionInner get(String billingAccountName, String billingProfileName, String invoiceSectionName); /** * Creates or updates an invoice section. The operation is supported only for billing accounts with agreement type @@ -88,7 +88,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice section. + * @return the {@link SyncPoller} for polling of an invoice section. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, InvoiceSectionInner> beginCreateOrUpdate( @@ -109,7 +109,7 @@ SyncPoller, InvoiceSectionInner> beginCreateOrUp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice section. + * @return the {@link SyncPoller} for polling of an invoice section. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, InvoiceSectionInner> beginCreateOrUpdate( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InvoicesClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InvoicesClient.java index 2836a300df6b..5cff0be560ef 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InvoicesClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/InvoicesClient.java @@ -27,7 +27,7 @@ public interface InvoicesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount( @@ -44,7 +44,7 @@ PagedIterable listByBillingAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount( @@ -61,7 +61,7 @@ PagedIterable listByBillingAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile( @@ -79,7 +79,7 @@ PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile( @@ -95,13 +95,14 @@ PagedIterable listByBillingProfile( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param invoiceName The ID that uniquely identifies an invoice. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice by billing account name and ID. + * @return an invoice by billing account name and ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - InvoiceInner get(String billingAccountName, String invoiceName); + Response getWithResponse(String billingAccountName, String invoiceName, Context context); /** * Gets an invoice by billing account name and ID. The operation is supported for billing accounts with agreement @@ -109,41 +110,40 @@ PagedIterable listByBillingProfile( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param invoiceName The ID that uniquely identifies an invoice. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an invoice by billing account name and ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String billingAccountName, String invoiceName, Context context); + InvoiceInner get(String billingAccountName, String invoiceName); /** * Gets an invoice by ID. The operation is supported for billing accounts with agreement type Microsoft Partner * Agreement or Microsoft Customer Agreement. * * @param invoiceName The ID that uniquely identifies an invoice. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice by ID. + * @return an invoice by ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - InvoiceInner getById(String invoiceName); + Response getByIdWithResponse(String invoiceName, Context context); /** * Gets an invoice by ID. The operation is supported for billing accounts with agreement type Microsoft Partner * Agreement or Microsoft Customer Agreement. * * @param invoiceName The ID that uniquely identifies an invoice. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an invoice by ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByIdWithResponse(String invoiceName, Context context); + InvoiceInner getById(String invoiceName); /** * Gets a URL to download an invoice. The operation is supported for billing accounts with agreement type Microsoft @@ -155,7 +155,7 @@ PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return the {@link SyncPoller} for polling of a URL to download an invoice. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DownloadUrlInner> beginDownloadInvoice( @@ -172,7 +172,7 @@ SyncPoller, DownloadUrlInner> beginDownloadInvoice( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return the {@link SyncPoller} for polling of a URL to download an invoice. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DownloadUrlInner> beginDownloadInvoice( @@ -220,7 +220,8 @@ DownloadUrlInner downloadInvoice( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return the {@link SyncPoller} for polling of a URL to download multiple invoice documents (invoice pdf, tax + * receipts, credit notes) as a zip file. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DownloadUrlInner> beginDownloadMultipleBillingProfileInvoices( @@ -237,7 +238,8 @@ SyncPoller, DownloadUrlInner> beginDownloadMultiple * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return the {@link SyncPoller} for polling of a URL to download multiple invoice documents (invoice pdf, tax + * receipts, credit notes) as a zip file. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DownloadUrlInner> beginDownloadMultipleBillingProfileInvoices( @@ -283,7 +285,7 @@ DownloadUrlInner downloadMultipleBillingProfileInvoices( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingSubscription(String periodStartDate, String periodEndDate); @@ -297,7 +299,7 @@ DownloadUrlInner downloadMultipleBillingProfileInvoices( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingSubscription( @@ -307,26 +309,26 @@ PagedIterable listByBillingSubscription( * Gets an invoice by subscription ID and invoice ID. * * @param invoiceName The ID that uniquely identifies an invoice. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice by subscription ID and invoice ID. + * @return an invoice by subscription ID and invoice ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - InvoiceInner getBySubscriptionAndInvoiceId(String invoiceName); + Response getBySubscriptionAndInvoiceIdWithResponse(String invoiceName, Context context); /** * Gets an invoice by subscription ID and invoice ID. * * @param invoiceName The ID that uniquely identifies an invoice. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an invoice by subscription ID and invoice ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getBySubscriptionAndInvoiceIdWithResponse(String invoiceName, Context context); + InvoiceInner getBySubscriptionAndInvoiceId(String invoiceName); /** * Gets a URL to download an invoice. @@ -336,7 +338,7 @@ PagedIterable listByBillingSubscription( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return the {@link SyncPoller} for polling of a URL to download an invoice. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DownloadUrlInner> beginDownloadBillingSubscriptionInvoice( @@ -351,7 +353,7 @@ SyncPoller, DownloadUrlInner> beginDownloadBillingS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return the {@link SyncPoller} for polling of a URL to download an invoice. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DownloadUrlInner> beginDownloadBillingSubscriptionInvoice( @@ -391,7 +393,8 @@ SyncPoller, DownloadUrlInner> beginDownloadBillingS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return the {@link SyncPoller} for polling of a URL to download multiple invoice documents (invoice pdf, tax + * receipts, credit notes) as a zip file. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DownloadUrlInner> beginDownloadMultipleBillingSubscriptionInvoices( @@ -405,7 +408,8 @@ SyncPoller, DownloadUrlInner> beginDownloadMultiple * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return the {@link SyncPoller} for polling of a URL to download multiple invoice documents (invoice pdf, tax + * receipts, credit notes) as a zip file. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DownloadUrlInner> beginDownloadMultipleBillingSubscriptionInvoices( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/OperationsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/OperationsClient.java index 103f7ad487db..67a5aaa856f6 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/OperationsClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/OperationsClient.java @@ -17,7 +17,8 @@ public interface OperationsClient { * * @throws com.azure.core.management.exception.ManagementException 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 of billing operations and a URL link to get the next set of results. + * @return the list of billing operations and a URL link to get the next set of results as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +30,8 @@ public interface OperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing operations and a URL link to get the next set of results. + * @return the list of billing operations and a URL link to get the next set of results as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/PoliciesClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/PoliciesClient.java index d6853d3867da..970ca0dadc0f 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/PoliciesClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/PoliciesClient.java @@ -19,13 +19,15 @@ public interface PoliciesClient { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a policy. + * @return a policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PolicyInner getByBillingProfile(String billingAccountName, String billingProfileName); + Response getByBillingProfileWithResponse( + String billingAccountName, String billingProfileName, Context context); /** * Lists the policies for a billing profile. This operation is supported only for billing accounts with agreement @@ -33,15 +35,13 @@ public interface PoliciesClient { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByBillingProfileWithResponse( - String billingAccountName, String billingProfileName, Context context); + PolicyInner getByBillingProfile(String billingAccountName, String billingProfileName); /** * Updates the policies for a billing profile. This operation is supported only for billing accounts with agreement @@ -50,13 +50,15 @@ Response getByBillingProfileWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param parameters Request parameters that are provided to the update policies operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a policy. + * @return a policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PolicyInner update(String billingAccountName, String billingProfileName, PolicyInner parameters); + Response updateWithResponse( + String billingAccountName, String billingProfileName, PolicyInner parameters, Context context); /** * Updates the policies for a billing profile. This operation is supported only for billing accounts with agreement @@ -65,15 +67,13 @@ Response getByBillingProfileWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param parameters Request parameters that are provided to the update policies operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String billingAccountName, String billingProfileName, PolicyInner parameters, Context context); + PolicyInner update(String billingAccountName, String billingProfileName, PolicyInner parameters); /** * Lists the policies for a customer. This operation is supported only for billing accounts with agreement type @@ -81,13 +81,15 @@ Response updateWithResponse( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the customer's Policy. + * @return the customer's Policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - CustomerPolicyInner getByCustomer(String billingAccountName, String customerName); + Response getByCustomerWithResponse( + String billingAccountName, String customerName, Context context); /** * Lists the policies for a customer. This operation is supported only for billing accounts with agreement type @@ -95,15 +97,13 @@ Response updateWithResponse( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the customer's Policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByCustomerWithResponse( - String billingAccountName, String customerName, Context context); + CustomerPolicyInner getByCustomer(String billingAccountName, String customerName); /** * Updates the policies for a customer. This operation is supported only for billing accounts with agreement type @@ -112,13 +112,15 @@ Response getByCustomerWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. * @param parameters Request parameters that are provided to the update policies operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the customer's Policy. + * @return the customer's Policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - CustomerPolicyInner updateCustomer(String billingAccountName, String customerName, CustomerPolicyInner parameters); + Response updateCustomerWithResponse( + String billingAccountName, String customerName, CustomerPolicyInner parameters, Context context); /** * Updates the policies for a customer. This operation is supported only for billing accounts with agreement type @@ -127,13 +129,11 @@ Response getByCustomerWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. * @param parameters Request parameters that are provided to the update policies operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the customer's Policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateCustomerWithResponse( - String billingAccountName, String customerName, CustomerPolicyInner parameters, Context context); + CustomerPolicyInner updateCustomer(String billingAccountName, String customerName, CustomerPolicyInner parameters); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/ProductsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/ProductsClient.java index f611f10a553b..65148493ed64 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/ProductsClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/ProductsClient.java @@ -25,7 +25,7 @@ public interface ProductsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByCustomer(String billingAccountName, String customerName); @@ -40,7 +40,7 @@ public interface ProductsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByCustomer(String billingAccountName, String customerName, Context context); @@ -53,7 +53,7 @@ public interface ProductsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount(String billingAccountName); @@ -70,7 +70,7 @@ public interface ProductsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount(String billingAccountName, String filter, Context context); @@ -84,7 +84,7 @@ public interface ProductsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName); @@ -102,7 +102,7 @@ public interface ProductsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile( @@ -118,7 +118,7 @@ PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByInvoiceSection( @@ -138,7 +138,7 @@ PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByInvoiceSection( @@ -154,13 +154,14 @@ PagedIterable listByInvoiceSection( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a product by ID. + * @return a product by ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ProductInner get(String billingAccountName, String productName); + Response getWithResponse(String billingAccountName, String productName, Context context); /** * Gets a product by ID. The operation is supported only for billing accounts with agreement type Microsoft Customer @@ -168,14 +169,13 @@ PagedIterable listByInvoiceSection( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a product by ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String billingAccountName, String productName, Context context); + ProductInner get(String billingAccountName, String productName); /** * Updates the properties of a Product. Currently, auto renew can be updated. The operation is supported only for @@ -184,13 +184,15 @@ PagedIterable listByInvoiceSection( * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. * @param parameters Request parameters that are provided to the update product operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a product. + * @return a product along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ProductInner update(String billingAccountName, String productName, ProductInner parameters); + Response updateWithResponse( + String billingAccountName, String productName, ProductInner parameters, Context context); /** * Updates the properties of a Product. Currently, auto renew can be updated. The operation is supported only for @@ -199,15 +201,13 @@ PagedIterable listByInvoiceSection( * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. * @param parameters Request parameters that are provided to the update product operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a product. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String billingAccountName, String productName, ProductInner parameters, Context context); + ProductInner update(String billingAccountName, String productName, ProductInner parameters); /** * Moves a product's charges to a new invoice section. The new invoice section must belong to the same billing @@ -217,13 +217,15 @@ Response updateWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. * @param parameters Request parameters that are provided to the move product operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a product. */ @ServiceMethod(returns = ReturnType.SINGLE) - ProductInner move(String billingAccountName, String productName, TransferProductRequestProperties parameters); + ProductsMoveResponse moveWithResponse( + String billingAccountName, String productName, TransferProductRequestProperties parameters, Context context); /** * Moves a product's charges to a new invoice section. The new invoice section must belong to the same billing @@ -233,15 +235,13 @@ Response updateWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. * @param parameters Request parameters that are provided to the move product operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a product. */ @ServiceMethod(returns = ReturnType.SINGLE) - ProductsMoveResponse moveWithResponse( - String billingAccountName, String productName, TransferProductRequestProperties parameters, Context context); + ProductInner move(String billingAccountName, String productName, TransferProductRequestProperties parameters); /** * Validates if a product's charges can be moved to a new invoice section. This operation is supported only for @@ -251,14 +251,15 @@ ProductsMoveResponse moveWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. * @param parameters Request parameters that are provided to the validate move eligibility operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the product transfer eligibility validation. + * @return result of the product transfer eligibility validation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ValidateProductTransferEligibilityResultInner validateMove( - String billingAccountName, String productName, TransferProductRequestProperties parameters); + Response validateMoveWithResponse( + String billingAccountName, String productName, TransferProductRequestProperties parameters, Context context); /** * Validates if a product's charges can be moved to a new invoice section. This operation is supported only for @@ -268,13 +269,12 @@ ValidateProductTransferEligibilityResultInner validateMove( * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. * @param parameters Request parameters that are provided to the validate move eligibility operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the product transfer eligibility validation. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response validateMoveWithResponse( - String billingAccountName, String productName, TransferProductRequestProperties parameters, Context context); + ValidateProductTransferEligibilityResultInner validateMove( + String billingAccountName, String productName, TransferProductRequestProperties parameters); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/ReservationsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/ReservationsClient.java index db37194db8db..c6c8707457dd 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/ReservationsClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/ReservationsClient.java @@ -19,7 +19,8 @@ public interface ReservationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount(String billingAccountName); @@ -38,7 +39,8 @@ public interface ReservationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingAccount( @@ -57,7 +59,8 @@ PagedIterable listByBillingAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName); @@ -77,7 +80,8 @@ PagedIterable listByBillingAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBillingProfile( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/TransactionsClient.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/TransactionsClient.java index 403f959e8a87..4e9e736b92e8 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/TransactionsClient.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/TransactionsClient.java @@ -20,7 +20,7 @@ public interface TransactionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of transactions. + * @return the list of transactions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByInvoice(String billingAccountName, String invoiceName); @@ -34,7 +34,7 @@ public interface TransactionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of transactions. + * @return the list of transactions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByInvoice(String billingAccountName, String invoiceName, Context context); diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AgreementInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AgreementInner.java index 4aaf64e2b001..9c5337fc4a92 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AgreementInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AgreementInner.java @@ -6,11 +6,10 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.AcceptanceMode; +import com.azure.resourcemanager.billing.models.BillingProfileInfo; import com.azure.resourcemanager.billing.models.Category; import com.azure.resourcemanager.billing.models.Participants; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -18,14 +17,16 @@ /** An agreement. */ @Fluent public final class AgreementInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AgreementInner.class); - /* * The properties of an agreement. */ @JsonProperty(value = "properties") private AgreementProperties innerProperties; + /** Creates an instance of AgreementInner class. */ + public AgreementInner() { + } + /** * Get the innerProperties property: The properties of an agreement. * @@ -62,6 +63,16 @@ public AcceptanceMode acceptanceMode() { return this.innerProperties() == null ? null : this.innerProperties().acceptanceMode(); } + /** + * Get the billingProfileInfo property: The list of billing profiles associated with agreement and present only for + * specific agreements. + * + * @return the billingProfileInfo value. + */ + public BillingProfileInfo billingProfileInfo() { + return this.innerProperties() == null ? null : this.innerProperties().billingProfileInfo(); + } + /** * Get the effectiveDate property: The date from which the agreement is effective. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AgreementProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AgreementProperties.java index 2c58990d8f54..4b7f36d5a52d 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AgreementProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AgreementProperties.java @@ -5,11 +5,10 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.AcceptanceMode; +import com.azure.resourcemanager.billing.models.BillingProfileInfo; import com.azure.resourcemanager.billing.models.Category; import com.azure.resourcemanager.billing.models.Participants; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -17,8 +16,6 @@ /** The properties of an agreement. */ @Fluent public final class AgreementProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AgreementProperties.class); - /* * The URL to download the agreement. */ @@ -37,6 +34,12 @@ public final class AgreementProperties { @JsonProperty(value = "acceptanceMode", access = JsonProperty.Access.WRITE_ONLY) private AcceptanceMode acceptanceMode; + /* + * The list of billing profiles associated with agreement and present only for specific agreements. + */ + @JsonProperty(value = "billingProfileInfo", access = JsonProperty.Access.WRITE_ONLY) + private BillingProfileInfo billingProfileInfo; + /* * The date from which the agreement is effective. */ @@ -50,8 +53,7 @@ public final class AgreementProperties { private OffsetDateTime expirationDate; /* - * The list of participants that participates in acceptance of an - * agreement. + * The list of participants that participates in acceptance of an agreement. */ @JsonProperty(value = "participants") private List participants; @@ -62,6 +64,10 @@ public final class AgreementProperties { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private String status; + /** Creates an instance of AgreementProperties class. */ + public AgreementProperties() { + } + /** * Get the agreementLink property: The URL to download the agreement. * @@ -89,6 +95,16 @@ public AcceptanceMode acceptanceMode() { return this.acceptanceMode; } + /** + * Get the billingProfileInfo property: The list of billing profiles associated with agreement and present only for + * specific agreements. + * + * @return the billingProfileInfo value. + */ + public BillingProfileInfo billingProfileInfo() { + return this.billingProfileInfo; + } + /** * Get the effectiveDate property: The date from which the agreement is effective. * @@ -142,6 +158,9 @@ public String status() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (billingProfileInfo() != null) { + billingProfileInfo().validate(); + } if (participants() != null) { participants().forEach(e -> e.validate()); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AvailableBalanceInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AvailableBalanceInner.java index 227613aced33..9347e9d2c5a5 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AvailableBalanceInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AvailableBalanceInner.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.billing.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.Amount; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The latest Azure credit balance. This is the balance available for pay now. */ -@Fluent +@Immutable public final class AvailableBalanceInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableBalanceInner.class); - /* * The properties of available balance. */ @JsonProperty(value = "properties") private AvailableBalanceProperties innerProperties; + /** Creates an instance of AvailableBalanceInner class. */ + public AvailableBalanceInner() { + } + /** * Get the innerProperties property: The properties of available balance. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AvailableBalanceProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AvailableBalanceProperties.java index 9e48931341e3..f0aeddeccacd 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AvailableBalanceProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/AvailableBalanceProperties.java @@ -5,22 +5,22 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.Amount; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties of available balance. */ @Immutable public final class AvailableBalanceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableBalanceProperties.class); - /* * Balance amount. */ @JsonProperty(value = "amount", access = JsonProperty.Access.WRITE_ONLY) private Amount amount; + /** Creates an instance of AvailableBalanceProperties class. */ + public AvailableBalanceProperties() { + } + /** * Get the amount property: Balance amount. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingAccountInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingAccountInner.java index f119d957031d..9286c56cddee 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingAccountInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingAccountInner.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.AccountStatus; import com.azure.resourcemanager.billing.models.AccountType; import com.azure.resourcemanager.billing.models.AddressDetails; @@ -15,21 +14,22 @@ import com.azure.resourcemanager.billing.models.Department; import com.azure.resourcemanager.billing.models.Enrollment; import com.azure.resourcemanager.billing.models.EnrollmentAccount; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A billing account. */ @Fluent public final class BillingAccountInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingAccountInner.class); - /* * The properties of the billing account. */ @JsonProperty(value = "properties") private BillingAccountProperties innerProperties; + /** Creates an instance of BillingAccountInner class. */ + public BillingAccountInner() { + } + /** * Get the innerProperties property: The properties of the billing account. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingAccountProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingAccountProperties.java index d8a9019f1b23..22015daa5cb4 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingAccountProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingAccountProperties.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.AccountStatus; import com.azure.resourcemanager.billing.models.AccountType; import com.azure.resourcemanager.billing.models.AddressDetails; @@ -14,15 +13,12 @@ import com.azure.resourcemanager.billing.models.Department; import com.azure.resourcemanager.billing.models.Enrollment; import com.azure.resourcemanager.billing.models.EnrollmentAccount; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The properties of the billing account. */ @Fluent public final class BillingAccountProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingAccountProperties.class); - /* * The billing account name. */ @@ -30,8 +26,7 @@ public final class BillingAccountProperties { private String displayName; /* - * The address of the individual or organization that is responsible for - * the billing account. + * The address of the individual or organization that is responsible for the billing account. */ @JsonProperty(value = "soldTo") private AddressDetails soldTo; @@ -55,15 +50,15 @@ public final class BillingAccountProperties { private AccountStatus accountStatus; /* - * The billing profiles associated with the billing account. By default - * this is not populated, unless it's specified in $expand. + * The billing profiles associated with the billing account. By default this is not populated, unless it's + * specified in $expand. */ @JsonProperty(value = "billingProfiles") private BillingProfilesOnExpand billingProfiles; /* - * The details about the associated legacy enrollment. By default this is - * not populated, unless it's specified in $expand. + * The details about the associated legacy enrollment. By default this is not populated, unless it's specified in + * $expand. */ @JsonProperty(value = "enrollmentDetails", access = JsonProperty.Access.WRITE_ONLY) private Enrollment enrollmentDetails; @@ -92,6 +87,10 @@ public final class BillingAccountProperties { @JsonProperty(value = "notificationEmailAddress") private String notificationEmailAddress; + /** Creates an instance of BillingAccountProperties class. */ + public BillingAccountProperties() { + } + /** * Get the displayName property: The billing account name. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPeriodInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPeriodInner.java index fc81c5f3a2a8..b1b0fc91723a 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPeriodInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPeriodInner.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.billing.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.LocalDate; import java.util.List; /** A billing period resource. */ -@Fluent +@Immutable public final class BillingPeriodInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingPeriodInner.class); - /* * A billing period. */ @JsonProperty(value = "properties") private BillingPeriodProperties innerProperties; + /** Creates an instance of BillingPeriodInner class. */ + public BillingPeriodInner() { + } + /** * Get the innerProperties property: A billing period. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPeriodProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPeriodProperties.java index 527f21fc77ef..01f2338ac0aa 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPeriodProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPeriodProperties.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.LocalDate; import java.util.List; @@ -14,8 +12,6 @@ /** The properties of the billing period. */ @Immutable public final class BillingPeriodProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingPeriodProperties.class); - /* * The start of the date range covered by the billing period. */ @@ -34,6 +30,10 @@ public final class BillingPeriodProperties { @JsonProperty(value = "invoiceIds", access = JsonProperty.Access.WRITE_ONLY) private List invoiceIds; + /** Creates an instance of BillingPeriodProperties class. */ + public BillingPeriodProperties() { + } + /** * Get the billingPeriodStartDate property: The start of the date range covered by the billing period. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPermissionsPropertiesInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPermissionsPropertiesInner.java index b44d405928f9..ab1defbdb6f1 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPermissionsPropertiesInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPermissionsPropertiesInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The set of allowed action and not allowed actions a caller has on a billing account. */ @Immutable public final class BillingPermissionsPropertiesInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingPermissionsPropertiesInner.class); - /* * The set of actions that the caller is allowed to perform. */ @@ -27,6 +23,10 @@ public final class BillingPermissionsPropertiesInner { @JsonProperty(value = "notActions", access = JsonProperty.Access.WRITE_ONLY) private List notActions; + /** Creates an instance of BillingPermissionsPropertiesInner class. */ + public BillingPermissionsPropertiesInner() { + } + /** * Get the actions property: The set of actions that the caller is allowed to perform. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingProfileInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingProfileInner.java index a54bd6c8e17f..fb7c22f890d4 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingProfileInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingProfileInner.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.AddressDetails; import com.azure.resourcemanager.billing.models.AzurePlan; import com.azure.resourcemanager.billing.models.BillingProfileStatus; @@ -16,7 +15,6 @@ import com.azure.resourcemanager.billing.models.SpendingLimit; import com.azure.resourcemanager.billing.models.StatusReasonCode; import com.azure.resourcemanager.billing.models.TargetCloud; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -24,14 +22,16 @@ /** A billing profile. */ @Fluent public final class BillingProfileInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingProfileInner.class); - /* * The properties of the billing profile. */ @JsonProperty(value = "properties") private BillingProfileProperties innerProperties; + /** Creates an instance of BillingProfileInner class. */ + public BillingProfileInner() { + } + /** * Get the innerProperties property: The properties of the billing profile. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingProfileProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingProfileProperties.java index f250f2508e07..469a85db194b 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingProfileProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingProfileProperties.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.AddressDetails; import com.azure.resourcemanager.billing.models.AzurePlan; import com.azure.resourcemanager.billing.models.BillingProfileStatus; @@ -15,7 +14,6 @@ import com.azure.resourcemanager.billing.models.SpendingLimit; import com.azure.resourcemanager.billing.models.StatusReasonCode; import com.azure.resourcemanager.billing.models.TargetCloud; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -24,8 +22,6 @@ /** The properties of the billing profile. */ @Fluent public final class BillingProfileProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingProfileProperties.class); - /* * The name of the billing profile. */ @@ -33,8 +29,7 @@ public final class BillingProfileProperties { private String displayName; /* - * The purchase order name that will appear on the invoices generated for - * the billing profile. + * The purchase order name that will appear on the invoices generated for the billing profile. */ @JsonProperty(value = "poNumber") private String poNumber; @@ -52,22 +47,19 @@ public final class BillingProfileProperties { private AddressDetails billTo; /* - * Identifies the billing profile that is linked to another billing profile - * in indirect purchase motion. + * Identifies the billing profile that is linked to another billing profile in indirect purchase motion. */ @JsonProperty(value = "indirectRelationshipInfo", access = JsonProperty.Access.WRITE_ONLY) private IndirectRelationshipInfo indirectRelationshipInfo; /* - * Flag controlling whether the invoices for the billing profile are sent - * through email. + * Flag controlling whether the invoices for the billing profile are sent through email. */ @JsonProperty(value = "invoiceEmailOptIn") private Boolean invoiceEmailOptIn; /* - * The day of the month when the invoice for the billing profile is - * generated. + * The day of the month when the invoice for the billing profile is generated. */ @JsonProperty(value = "invoiceDay", access = JsonProperty.Access.WRITE_ONLY) private Integer invoiceDay; @@ -85,8 +77,8 @@ public final class BillingProfileProperties { private List enabledAzurePlans; /* - * The invoice sections associated to the billing profile. By default this - * is not populated, unless it's specified in $expand. + * The invoice sections associated to the billing profile. By default this is not populated, unless it's specified + * in $expand. */ @JsonProperty(value = "invoiceSections") private InvoiceSectionsOnExpand invoiceSections; @@ -122,9 +114,8 @@ public final class BillingProfileProperties { private SpendingLimit spendingLimit; /* - * Identifies the cloud environments that are associated with a billing - * profile. This is a system managed optional field and gets updated as the - * billing profile gets associated with accounts in various clouds. + * Identifies the cloud environments that are associated with a billing profile. This is a system managed optional + * field and gets updated as the billing profile gets associated with accounts in various clouds. */ @JsonProperty(value = "targetClouds", access = JsonProperty.Access.WRITE_ONLY) private List targetClouds; @@ -136,6 +127,10 @@ public final class BillingProfileProperties { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of BillingProfileProperties class. */ + public BillingProfileProperties() { + } + /** * Get the displayName property: The name of the billing profile. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPropertyInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPropertyInner.java index 4f59a4ef0e36..13b625a522e7 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPropertyInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPropertyInner.java @@ -6,24 +6,24 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.BillingProfileSpendingLimit; import com.azure.resourcemanager.billing.models.BillingProfileStatus; import com.azure.resourcemanager.billing.models.BillingProfileStatusReasonCode; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A billing property. */ @Fluent public final class BillingPropertyInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingPropertyInner.class); - /* * A billing property. */ @JsonProperty(value = "properties") private BillingPropertyProperties innerProperties; + /** Creates an instance of BillingPropertyInner class. */ + public BillingPropertyInner() { + } + /** * Get the innerProperties property: A billing property. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPropertyProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPropertyProperties.java index 28aaf5e0b5ca..25c4e7f9ec6c 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPropertyProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPropertyProperties.java @@ -5,21 +5,16 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.BillingProfileSpendingLimit; import com.azure.resourcemanager.billing.models.BillingProfileStatus; import com.azure.resourcemanager.billing.models.BillingProfileStatusReasonCode; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The billing property. */ @Fluent public final class BillingPropertyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingPropertyProperties.class); - /* - * The email address on which the account admin gets all Azure - * notifications. + * The email address on which the account admin gets all Azure notifications. */ @JsonProperty(value = "accountAdminNotificationEmailAddress", access = JsonProperty.Access.WRITE_ONLY) private String accountAdminNotificationEmailAddress; @@ -120,6 +115,10 @@ public final class BillingPropertyProperties { @JsonProperty(value = "skuDescription", access = JsonProperty.Access.WRITE_ONLY) private String skuDescription; + /** Creates an instance of BillingPropertyProperties class. */ + public BillingPropertyProperties() { + } + /** * Get the accountAdminNotificationEmailAddress property: The email address on which the account admin gets all * Azure notifications. diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleAssignmentInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleAssignmentInner.java index e9a38b3242bb..204fdab2a713 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleAssignmentInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleAssignmentInner.java @@ -6,21 +6,21 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The role assignment. */ @Fluent public final class BillingRoleAssignmentInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingRoleAssignmentInner.class); - /* * The properties of the role assignment. */ @JsonProperty(value = "properties") private BillingRoleAssignmentProperties innerProperties; + /** Creates an instance of BillingRoleAssignmentInner class. */ + public BillingRoleAssignmentInner() { + } + /** * Get the innerProperties property: The properties of the role assignment. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleAssignmentProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleAssignmentProperties.java index a7271bc64cb7..61a73807dfe0 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleAssignmentProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleAssignmentProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties of the role assignment. */ @Fluent public final class BillingRoleAssignmentProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingRoleAssignmentProperties.class); - /* * The date the role assignment was created. */ @@ -74,6 +70,10 @@ public final class BillingRoleAssignmentProperties { @JsonProperty(value = "userEmailAddress") private String userEmailAddress; + /** Creates an instance of BillingRoleAssignmentProperties class. */ + public BillingRoleAssignmentProperties() { + } + /** * Get the createdOn property: The date the role assignment was created. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleDefinitionInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleDefinitionInner.java index cee0987629b9..eff6d305c481 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleDefinitionInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleDefinitionInner.java @@ -6,22 +6,22 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The properties of a role definition. */ @Fluent public final class BillingRoleDefinitionInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingRoleDefinitionInner.class); - /* * The properties of the a role definition. */ @JsonProperty(value = "properties") private BillingRoleDefinitionProperties innerProperties; + /** Creates an instance of BillingRoleDefinitionInner class. */ + public BillingRoleDefinitionInner() { + } + /** * Get the innerProperties property: The properties of the a role definition. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleDefinitionProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleDefinitionProperties.java index 4779fb34d81a..682de12736c2 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleDefinitionProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingRoleDefinitionProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The properties of the a role definition. */ @Fluent public final class BillingRoleDefinitionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingRoleDefinitionProperties.class); - /* * The role description */ @@ -33,6 +29,10 @@ public final class BillingRoleDefinitionProperties { @JsonProperty(value = "roleName", access = JsonProperty.Access.WRITE_ONLY) private String roleName; + /** Creates an instance of BillingRoleDefinitionProperties class. */ + public BillingRoleDefinitionProperties() { + } + /** * Get the description property: The role description. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingSubscriptionInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingSubscriptionInner.java index df2b910364f4..4fe6d32aa0f6 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingSubscriptionInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingSubscriptionInner.java @@ -6,11 +6,9 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.Amount; import com.azure.resourcemanager.billing.models.BillingSubscriptionStatusType; import com.azure.resourcemanager.billing.models.Reseller; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.UUID; @@ -18,14 +16,16 @@ /** A billing subscription. */ @Fluent public final class BillingSubscriptionInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingSubscriptionInner.class); - /* * The billing properties of a subscription. */ @JsonProperty(value = "properties") private BillingSubscriptionProperties innerProperties; + /** Creates an instance of BillingSubscriptionInner class. */ + public BillingSubscriptionInner() { + } + /** * Get the innerProperties property: The billing properties of a subscription. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingSubscriptionProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingSubscriptionProperties.java index b32b5b069e38..790abdfb933a 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingSubscriptionProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingSubscriptionProperties.java @@ -5,11 +5,9 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.Amount; import com.azure.resourcemanager.billing.models.BillingSubscriptionStatusType; import com.azure.resourcemanager.billing.models.Reseller; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.UUID; @@ -17,8 +15,6 @@ /** The billing properties of a subscription. */ @Fluent public final class BillingSubscriptionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingSubscriptionProperties.class); - /* * The name of the subscription. */ @@ -68,16 +64,15 @@ public final class BillingSubscriptionProperties { private String costCenter; /* - * The ID of the customer for whom the subscription was created. The field - * is applicable only for Microsoft Partner Agreement billing account. + * The ID of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner + * Agreement billing account. */ @JsonProperty(value = "customerId", access = JsonProperty.Access.WRITE_ONLY) private String customerId; /* - * The name of the customer for whom the subscription was created. The - * field is applicable only for Microsoft Partner Agreement billing - * account. + * The name of the customer for whom the subscription was created. The field is applicable only for Microsoft + * Partner Agreement billing account. */ @JsonProperty(value = "customerDisplayName", access = JsonProperty.Access.WRITE_ONLY) private String customerDisplayName; @@ -113,12 +108,16 @@ public final class BillingSubscriptionProperties { private String skuDescription; /* - * The suspension reason for a subscription. Applies only to subscriptions - * in Microsoft Online Services Program billing accounts. + * The suspension reason for a subscription. Applies only to subscriptions in Microsoft Online Services Program + * billing accounts. */ @JsonProperty(value = "suspensionReasons", access = JsonProperty.Access.WRITE_ONLY) private List suspensionReasons; + /** Creates an instance of BillingSubscriptionProperties class. */ + public BillingSubscriptionProperties() { + } + /** * Get the displayName property: The name of the subscription. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerInner.java index 9723f24be86a..5e6b0215c6ff 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerInner.java @@ -6,24 +6,24 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.AzurePlan; import com.azure.resourcemanager.billing.models.Reseller; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A partner's customer. */ @Fluent public final class CustomerInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomerInner.class); - /* * The customer. */ @JsonProperty(value = "properties") private CustomerProperties innerProperties; + /** Creates an instance of CustomerInner class. */ + public CustomerInner() { + } + /** * Get the innerProperties property: The customer. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerPolicyInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerPolicyInner.java index 42d39870014f..4c61d6545364 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerPolicyInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerPolicyInner.java @@ -6,22 +6,22 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.ViewCharges; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The customer's Policy. */ @Fluent public final class CustomerPolicyInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomerPolicyInner.class); - /* * The properties of a customer's policy. */ @JsonProperty(value = "properties") private CustomerPolicyProperties innerProperties; + /** Creates an instance of CustomerPolicyInner class. */ + public CustomerPolicyInner() { + } + /** * Get the innerProperties property: The properties of a customer's policy. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerPolicyProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerPolicyProperties.java index 1cf4dc9c1feb..5ee7699185b8 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerPolicyProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerPolicyProperties.java @@ -5,23 +5,22 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.ViewCharges; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties of a customer's policy. */ @Fluent public final class CustomerPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomerPolicyProperties.class); - /* - * The policy that controls whether the users in customer's organization - * can view charges at pay-as-you-go prices. + * The policy that controls whether the users in customer's organization can view charges at pay-as-you-go prices. */ @JsonProperty(value = "viewCharges") private ViewCharges viewCharges; + /** Creates an instance of CustomerPolicyProperties class. */ + public CustomerPolicyProperties() { + } + /** * Get the viewCharges property: The policy that controls whether the users in customer's organization can view * charges at pay-as-you-go prices. diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerProperties.java index b3104bb02aaa..e6061bfd4a74 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/CustomerProperties.java @@ -5,18 +5,14 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.AzurePlan; import com.azure.resourcemanager.billing.models.Reseller; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The properties of a customer. */ @Fluent public final class CustomerProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomerProperties.class); - /* * The ID of the billing profile for the invoice section. */ @@ -42,12 +38,15 @@ public final class CustomerProperties { private List enabledAzurePlans; /* - * The list of resellers for which an Azure plan is enabled for the - * customer. + * The list of resellers for which an Azure plan is enabled for the customer. */ @JsonProperty(value = "resellers") private List resellers; + /** Creates an instance of CustomerProperties class. */ + public CustomerProperties() { + } + /** * Get the billingProfileId property: The ID of the billing profile for the invoice section. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/DepartmentProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/DepartmentProperties.java index b8faa43a8dd7..6f63be9b9ef0 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/DepartmentProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/DepartmentProperties.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.EnrollmentAccount; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The properties of a department. */ @Fluent public final class DepartmentProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DepartmentProperties.class); - /* * The name of the department. */ @@ -35,12 +31,15 @@ public final class DepartmentProperties { private String status; /* - * Associated enrollment accounts. By default this is not populated, unless - * it's specified in $expand. + * Associated enrollment accounts. By default this is not populated, unless it's specified in $expand. */ @JsonProperty(value = "enrollmentAccounts") private List enrollmentAccounts; + /** Creates an instance of DepartmentProperties class. */ + public DepartmentProperties() { + } + /** * Get the departmentName property: The name of the department. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/DownloadUrlInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/DownloadUrlInner.java index f8b4bc915aad..a849996ba0bd 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/DownloadUrlInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/DownloadUrlInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** A secure URL that can be used to download a an entity until the URL expires. */ @Immutable public final class DownloadUrlInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DownloadUrlInner.class); - /* * The time in UTC when the download URL will expire. */ @@ -27,6 +23,10 @@ public final class DownloadUrlInner { @JsonProperty(value = "url", access = JsonProperty.Access.WRITE_ONLY) private String url; + /** Creates an instance of DownloadUrlInner class. */ + public DownloadUrlInner() { + } + /** * Get the expiryTime property: The time in UTC when the download URL will expire. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/EnrollmentAccountProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/EnrollmentAccountProperties.java index 657f137f55c9..7a73dd359bfd 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/EnrollmentAccountProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/EnrollmentAccountProperties.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.Department; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** The properties of an enrollment account. */ @Fluent public final class EnrollmentAccountProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnrollmentAccountProperties.class); - /* * The name of the enrollment account. */ @@ -59,12 +55,15 @@ public final class EnrollmentAccountProperties { private OffsetDateTime endDate; /* - * Associated department. By default this is not populated, unless it's - * specified in $expand. + * Associated department. By default this is not populated, unless it's specified in $expand. */ @JsonProperty(value = "department") private Department department; + /** Creates an instance of EnrollmentAccountProperties class. */ + public EnrollmentAccountProperties() { + } + /** * Get the accountName property: The name of the enrollment account. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/EnrollmentAccountSummaryInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/EnrollmentAccountSummaryInner.java index 8d9822e0512c..39de9f591389 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/EnrollmentAccountSummaryInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/EnrollmentAccountSummaryInner.java @@ -4,23 +4,23 @@ package com.azure.resourcemanager.billing.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** An enrollment account resource. */ -@Fluent +@Immutable public final class EnrollmentAccountSummaryInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnrollmentAccountSummaryInner.class); - /* * An enrollment account. */ @JsonProperty(value = "properties") private EnrollmentAccountSummaryProperties innerProperties; + /** Creates an instance of EnrollmentAccountSummaryInner class. */ + public EnrollmentAccountSummaryInner() { + } + /** * Get the innerProperties property: An enrollment account. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/EnrollmentAccountSummaryProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/EnrollmentAccountSummaryProperties.java index 7b0d9943f82f..b844a8e68cb5 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/EnrollmentAccountSummaryProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/EnrollmentAccountSummaryProperties.java @@ -5,21 +5,21 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties of the enrollment account. */ @Immutable public final class EnrollmentAccountSummaryProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnrollmentAccountSummaryProperties.class); - /* * The account owner's principal name. */ @JsonProperty(value = "principalName", access = JsonProperty.Access.WRITE_ONLY) private String principalName; + /** Creates an instance of EnrollmentAccountSummaryProperties class. */ + public EnrollmentAccountSummaryProperties() { + } + /** * Get the principalName property: The account owner's principal name. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InstructionInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InstructionInner.java index 84cd5142be08..86708fd37791 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InstructionInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InstructionInner.java @@ -6,22 +6,22 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** An instruction. */ @Fluent public final class InstructionInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InstructionInner.class); - /* * A billing instruction used during invoice generation. */ @JsonProperty(value = "properties") private InstructionProperties innerProperties; + /** Creates an instance of InstructionInner class. */ + public InstructionInner() { + } + /** * Get the innerProperties property: A billing instruction used during invoice generation. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InstructionProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InstructionProperties.java index 9bd37586b391..ddb06ed321ba 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InstructionProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InstructionProperties.java @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** A billing instruction used during invoice generation. */ @Fluent public final class InstructionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InstructionProperties.class); - /* * The amount budgeted for this billing instruction. */ @@ -39,6 +36,10 @@ public final class InstructionProperties { @JsonProperty(value = "creationDate") private OffsetDateTime creationDate; + /** Creates an instance of InstructionProperties class. */ + public InstructionProperties() { + } + /** * Get the amount property: The amount budgeted for this billing instruction. * @@ -126,14 +127,16 @@ public InstructionProperties withCreationDate(OffsetDateTime creationDate) { */ public void validate() { if (startDate() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property startDate in model InstructionProperties")); } if (endDate() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property endDate in model InstructionProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(InstructionProperties.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceInner.java index b951670e7825..79f7df1f60e7 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceInner.java @@ -4,9 +4,8 @@ package com.azure.resourcemanager.billing.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.Amount; import com.azure.resourcemanager.billing.models.Document; import com.azure.resourcemanager.billing.models.InvoiceDocumentType; @@ -14,23 +13,24 @@ import com.azure.resourcemanager.billing.models.InvoiceType; import com.azure.resourcemanager.billing.models.PaymentProperties; import com.azure.resourcemanager.billing.models.RebillDetails; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** An invoice. */ -@Fluent +@Immutable public final class InvoiceInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InvoiceInner.class); - /* * An invoice. */ @JsonProperty(value = "properties") private InvoiceProperties innerProperties; + /** Creates an instance of InvoiceInner class. */ + public InvoiceInner() { + } + /** * Get the innerProperties property: An invoice. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceProperties.java index 3aea454342db..b7eb5925fd43 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceProperties.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.Amount; import com.azure.resourcemanager.billing.models.Document; import com.azure.resourcemanager.billing.models.InvoiceDocumentType; @@ -13,7 +12,6 @@ import com.azure.resourcemanager.billing.models.InvoiceType; import com.azure.resourcemanager.billing.models.PaymentProperties; import com.azure.resourcemanager.billing.models.RebillDetails; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; @@ -23,8 +21,6 @@ /** The properties of the invoice. */ @Immutable public final class InvoiceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InvoiceProperties.class); - /* * The due date for the invoice. */ @@ -50,9 +46,8 @@ public final class InvoiceProperties { private Amount amountDue; /* - * The amount of Azure prepayment applied to the charges. This field is - * applicable to billing accounts with agreement type Microsoft Customer - * Agreement. + * The amount of Azure prepayment applied to the charges. This field is applicable to billing accounts with + * agreement type Microsoft Customer Agreement. */ @JsonProperty(value = "azurePrepaymentApplied", access = JsonProperty.Access.WRITE_ONLY) private Amount azurePrepaymentApplied; @@ -64,39 +59,36 @@ public final class InvoiceProperties { private Amount billedAmount; /* - * The total refund for returns and cancellations during the invoice - * billing period. This field is applicable to billing accounts with - * agreement type Microsoft Customer Agreement. + * The total refund for returns and cancellations during the invoice billing period. This field is applicable to + * billing accounts with agreement type Microsoft Customer Agreement. */ @JsonProperty(value = "creditAmount", access = JsonProperty.Access.WRITE_ONLY) private Amount creditAmount; /* - * The amount of free Azure credits applied to the charges. This field is - * applicable to billing accounts with agreement type Microsoft Customer - * Agreement. + * The amount of free Azure credits applied to the charges. This field is applicable to billing accounts with + * agreement type Microsoft Customer Agreement. */ @JsonProperty(value = "freeAzureCreditApplied", access = JsonProperty.Access.WRITE_ONLY) private Amount freeAzureCreditApplied; /* - * The pre-tax amount due. This field is applicable to billing accounts - * with agreement type Microsoft Customer Agreement. + * The pre-tax amount due. This field is applicable to billing accounts with agreement type Microsoft Customer + * Agreement. */ @JsonProperty(value = "subTotal", access = JsonProperty.Access.WRITE_ONLY) private Amount subTotal; /* - * The amount of tax charged for the billing period. This field is - * applicable to billing accounts with agreement type Microsoft Customer - * Agreement. + * The amount of tax charged for the billing period. This field is applicable to billing accounts with agreement + * type Microsoft Customer Agreement. */ @JsonProperty(value = "taxAmount", access = JsonProperty.Access.WRITE_ONLY) private Amount taxAmount; /* - * The amount due when the invoice was generated. This field is applicable - * to billing accounts with agreement type Microsoft Customer Agreement. + * The amount due when the invoice was generated. This field is applicable to billing accounts with agreement type + * Microsoft Customer Agreement. */ @JsonProperty(value = "totalAmount", access = JsonProperty.Access.WRITE_ONLY) private Amount totalAmount; @@ -120,9 +112,8 @@ public final class InvoiceProperties { private InvoiceType invoiceType; /* - * Specifies if the invoice is generated as part of monthly invoicing cycle - * or not. This field is applicable to billing accounts with agreement type - * Microsoft Customer Agreement. + * Specifies if the invoice is generated as part of monthly invoicing cycle or not. This field is applicable to + * billing accounts with agreement type Microsoft Customer Agreement. */ @JsonProperty(value = "isMonthlyInvoice", access = JsonProperty.Access.WRITE_ONLY) private Boolean isMonthlyInvoice; @@ -171,15 +162,15 @@ public final class InvoiceProperties { private InvoiceDocumentType documentType; /* - * The Id of the active invoice which is originally billed after this - * invoice was voided. This field is applicable to the void invoices only. + * The Id of the active invoice which is originally billed after this invoice was voided. This field is applicable + * to the void invoices only. */ @JsonProperty(value = "billedDocumentId", access = JsonProperty.Access.WRITE_ONLY) private String billedDocumentId; /* - * The Id of the invoice which got voided and this credit note was issued - * as a result. This field is applicable to the credit notes only. + * The Id of the invoice which got voided and this credit note was issued as a result. This field is applicable to + * the credit notes only. */ @JsonProperty(value = "creditForDocumentId", access = JsonProperty.Access.WRITE_ONLY) private String creditForDocumentId; @@ -190,6 +181,10 @@ public final class InvoiceProperties { @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY) private String subscriptionId; + /** Creates an instance of InvoiceProperties class. */ + public InvoiceProperties() { + } + /** * Get the dueDate property: The due date for the invoice. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceSectionInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceSectionInner.java index b769f4fc3d2e..d17c5bcdafb0 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceSectionInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceSectionInner.java @@ -6,24 +6,24 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.InvoiceSectionState; import com.azure.resourcemanager.billing.models.TargetCloud; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** An invoice section. */ @Fluent public final class InvoiceSectionInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InvoiceSectionInner.class); - /* * The properties of an invoice section. */ @JsonProperty(value = "properties") private InvoiceSectionProperties innerProperties; + /** Creates an instance of InvoiceSectionInner class. */ + public InvoiceSectionInner() { + } + /** * Get the innerProperties property: The properties of an invoice section. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceSectionProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceSectionProperties.java index b8e12e1be0d8..0165d3755e56 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceSectionProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceSectionProperties.java @@ -5,10 +5,8 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.InvoiceSectionState; import com.azure.resourcemanager.billing.models.TargetCloud; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -16,8 +14,6 @@ /** The properties of an invoice section. */ @Fluent public final class InvoiceSectionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InvoiceSectionProperties.class); - /* * The name of the invoice section. */ @@ -44,22 +40,24 @@ public final class InvoiceSectionProperties { private String systemId; /* - * Dictionary of metadata associated with the invoice section. Maximum - * key/value length supported of 256 characters. Keys/value should not - * empty value nor null. Keys can not contain < > % & \ ? / + * Dictionary of metadata associated with the invoice section. Maximum key/value length supported of 256 + * characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? / */ @JsonProperty(value = "tags") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* - * Identifies the cloud environments that are associated with an invoice - * section. This is a system managed optional field and gets updated as the - * invoice section gets associated with accounts in various clouds. + * Identifies the cloud environments that are associated with an invoice section. This is a system managed optional + * field and gets updated as the invoice section gets associated with accounts in various clouds. */ @JsonProperty(value = "targetCloud", access = JsonProperty.Access.WRITE_ONLY) private TargetCloud targetCloud; + /** Creates an instance of InvoiceSectionProperties class. */ + public InvoiceSectionProperties() { + } + /** * Get the displayName property: The name of the invoice section. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceSectionWithCreateSubPermissionInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceSectionWithCreateSubPermissionInner.java index b704b84fb1e8..21475859d3b4 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceSectionWithCreateSubPermissionInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceSectionWithCreateSubPermissionInner.java @@ -5,20 +5,16 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.AzurePlan; import com.azure.resourcemanager.billing.models.BillingProfileStatus; import com.azure.resourcemanager.billing.models.SpendingLimitForBillingProfile; import com.azure.resourcemanager.billing.models.StatusReasonCodeForBillingProfile; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Invoice section properties with create subscription permission. */ @Fluent public final class InvoiceSectionWithCreateSubPermissionInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InvoiceSectionWithCreateSubPermissionInner.class); - /* * The ID of the invoice section. */ @@ -79,6 +75,10 @@ public final class InvoiceSectionWithCreateSubPermissionInner { @JsonProperty(value = "enabledAzurePlans") private List enabledAzurePlans; + /** Creates an instance of InvoiceSectionWithCreateSubPermissionInner class. */ + public InvoiceSectionWithCreateSubPermissionInner() { + } + /** * Get the invoiceSectionId property: The ID of the invoice section. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/OperationInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/OperationInner.java index 707ca148c7ee..a52420b8f68c 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/OperationInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/OperationInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A Billing REST API operation. */ @Fluent public final class OperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); - /* * Operation name: {provider}/{resource}/{operation}. */ @@ -33,6 +29,10 @@ public final class OperationInner { @JsonProperty(value = "display") private OperationDisplay display; + /** Creates an instance of OperationInner class. */ + public OperationInner() { + } + /** * Get the name property: Operation name: {provider}/{resource}/{operation}. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/PolicyInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/PolicyInner.java index cd9cd98539e1..92dfa6a9338b 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/PolicyInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/PolicyInner.java @@ -6,24 +6,24 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.MarketplacePurchasesPolicy; import com.azure.resourcemanager.billing.models.ReservationPurchasesPolicy; import com.azure.resourcemanager.billing.models.ViewChargesPolicy; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A policy. */ @Fluent public final class PolicyInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PolicyInner.class); - /* * The properties of a policy. */ @JsonProperty(value = "properties") private PolicyProperties innerProperties; + /** Creates an instance of PolicyInner class. */ + public PolicyInner() { + } + /** * Get the innerProperties property: The properties of a policy. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/PolicyProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/PolicyProperties.java index 296c53526cf7..19bd95d98255 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/PolicyProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/PolicyProperties.java @@ -5,39 +5,36 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.MarketplacePurchasesPolicy; import com.azure.resourcemanager.billing.models.ReservationPurchasesPolicy; import com.azure.resourcemanager.billing.models.ViewChargesPolicy; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties of a policy. */ @Fluent public final class PolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PolicyProperties.class); - /* - * The policy that controls whether Azure marketplace purchases are allowed - * for a billing profile. + * The policy that controls whether Azure marketplace purchases are allowed for a billing profile. */ @JsonProperty(value = "marketplacePurchases") private MarketplacePurchasesPolicy marketplacePurchases; /* - * The policy that controls whether Azure reservation purchases are allowed - * for a billing profile. + * The policy that controls whether Azure reservation purchases are allowed for a billing profile. */ @JsonProperty(value = "reservationPurchases") private ReservationPurchasesPolicy reservationPurchases; /* - * The policy that controls whether users with Azure RBAC access to a - * subscription can view its charges. + * The policy that controls whether users with Azure RBAC access to a subscription can view its charges. */ @JsonProperty(value = "viewCharges") private ViewChargesPolicy viewCharges; + /** Creates an instance of PolicyProperties class. */ + public PolicyProperties() { + } + /** * Get the marketplacePurchases property: The policy that controls whether Azure marketplace purchases are allowed * for a billing profile. diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ProductInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ProductInner.java index 90b4a875f27d..7e876cc538ab 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ProductInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ProductInner.java @@ -6,27 +6,27 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.Amount; import com.azure.resourcemanager.billing.models.AutoRenew; import com.azure.resourcemanager.billing.models.BillingFrequency; import com.azure.resourcemanager.billing.models.ProductStatusType; import com.azure.resourcemanager.billing.models.Reseller; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** A product. */ @Fluent public final class ProductInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ProductInner.class); - /* * The properties of a product. */ @JsonProperty(value = "properties") private ProductProperties innerProperties; + /** Creates an instance of ProductInner class. */ + public ProductInner() { + } + /** * Get the innerProperties property: The properties of a product. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ProductProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ProductProperties.java index a36d2f3d632f..971f2f5a1d75 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ProductProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ProductProperties.java @@ -5,21 +5,17 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.Amount; import com.azure.resourcemanager.billing.models.AutoRenew; import com.azure.resourcemanager.billing.models.BillingFrequency; import com.azure.resourcemanager.billing.models.ProductStatusType; import com.azure.resourcemanager.billing.models.Reseller; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** The properties of a product. */ @Fluent public final class ProductProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ProductProperties.class); - /* * Indicates whether auto renewal is turned on or off for a product. */ @@ -135,15 +131,15 @@ public final class ProductProperties { private String billingProfileDisplayName; /* - * The ID of the customer for whom the product was purchased. The field is - * applicable only for Microsoft Partner Agreement billing account. + * The ID of the customer for whom the product was purchased. The field is applicable only for Microsoft Partner + * Agreement billing account. */ @JsonProperty(value = "customerId", access = JsonProperty.Access.WRITE_ONLY) private String customerId; /* - * The name of the customer for whom the product was purchased. The field - * is applicable only for Microsoft Partner Agreement billing account. + * The name of the customer for whom the product was purchased. The field is applicable only for Microsoft Partner + * Agreement billing account. */ @JsonProperty(value = "customerDisplayName", access = JsonProperty.Access.WRITE_ONLY) private String customerDisplayName; @@ -154,6 +150,10 @@ public final class ProductProperties { @JsonProperty(value = "reseller", access = JsonProperty.Access.WRITE_ONLY) private Reseller reseller; + /** Creates an instance of ProductProperties class. */ + public ProductProperties() { + } + /** * Get the autoRenew property: Indicates whether auto renewal is turned on or off for a product. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ReservationInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ReservationInner.java index 745deab65982..dfa2007edd4a 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ReservationInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ReservationInner.java @@ -5,18 +5,14 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.ReservationPropertyUtilization; import com.azure.resourcemanager.billing.models.ReservationSkuProperty; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The definition of the reservation. */ @Fluent public final class ReservationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationInner.class); - /* * The id of the reservation. */ @@ -53,6 +49,10 @@ public final class ReservationInner { @JsonProperty(value = "properties") private ReservationProperty innerProperties; + /** Creates an instance of ReservationInner class. */ + public ReservationInner() { + } + /** * Get the id property: The id of the reservation. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ReservationProperty.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ReservationProperty.java index aba361ba61f7..7c10570639ea 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ReservationProperty.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ReservationProperty.java @@ -5,20 +5,15 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.ReservationPropertyUtilization; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The property of reservation object. */ @Fluent public final class ReservationProperty { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationProperty.class); - /* - * The array of applied scopes of a reservation. Will be null if the - * reservation is in Shared scope + * The array of applied scopes of a reservation. Will be null if the reservation is in Shared scope */ @JsonProperty(value = "appliedScopes") private List appliedScopes; @@ -119,6 +114,10 @@ public final class ReservationProperty { @JsonProperty(value = "utilization", access = JsonProperty.Access.WRITE_ONLY) private ReservationPropertyUtilization utilization; + /** Creates an instance of ReservationProperty class. */ + public ReservationProperty() { + } + /** * Get the appliedScopes property: The array of applied scopes of a reservation. Will be null if the reservation is * in Shared scope. diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/TransactionInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/TransactionInner.java index 956a87e6b044..1f63b8993658 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/TransactionInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/TransactionInner.java @@ -6,25 +6,25 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.Amount; import com.azure.resourcemanager.billing.models.ReservationType; import com.azure.resourcemanager.billing.models.TransactionTypeKind; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** A transaction. */ @Fluent public final class TransactionInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransactionInner.class); - /* * The properties of a transaction. */ @JsonProperty(value = "properties") private TransactionProperties innerProperties; + /** Creates an instance of TransactionInner class. */ + public TransactionInner() { + } + /** * Get the innerProperties property: The properties of a transaction. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/TransactionProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/TransactionProperties.java index 0a4d16e4815d..bd7d1ca9777a 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/TransactionProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/TransactionProperties.java @@ -5,19 +5,15 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.Amount; import com.azure.resourcemanager.billing.models.ReservationType; import com.azure.resourcemanager.billing.models.TransactionTypeKind; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** The properties of a transaction. */ @Fluent public final class TransactionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransactionProperties.class); - /* * The kind of transaction. Options are all or reservation. */ @@ -31,29 +27,26 @@ public final class TransactionProperties { private OffsetDateTime date; /* - * Invoice on which the transaction was billed or 'pending' if the - * transaction is not billed. + * Invoice on which the transaction was billed or 'pending' if the transaction is not billed. */ @JsonProperty(value = "invoice", access = JsonProperty.Access.WRITE_ONLY) private String invoice; /* - * The ID of the invoice on which the transaction was billed. This field is - * only applicable for transactions which are billed. + * The ID of the invoice on which the transaction was billed. This field is only applicable for transactions which + * are billed. */ @JsonProperty(value = "invoiceId", access = JsonProperty.Access.WRITE_ONLY) private String invoiceId; /* - * The order ID of the reservation. The field is only applicable for - * transaction of kind reservation. + * The order ID of the reservation. The field is only applicable for transaction of kind reservation. */ @JsonProperty(value = "orderId", access = JsonProperty.Access.WRITE_ONLY) private String orderId; /* - * The name of the reservation order. The field is only applicable for - * transactions of kind reservation. + * The name of the reservation order. The field is only applicable for transactions of kind reservation. */ @JsonProperty(value = "orderName", access = JsonProperty.Access.WRITE_ONLY) private String orderName; @@ -107,8 +100,7 @@ public final class TransactionProperties { private String invoiceSectionId; /* - * The name of the invoice section which will be billed for the - * transaction. + * The name of the invoice section which will be billed for the transaction. */ @JsonProperty(value = "invoiceSectionDisplayName", access = JsonProperty.Access.WRITE_ONLY) private String invoiceSectionDisplayName; @@ -120,50 +112,47 @@ public final class TransactionProperties { private String billingProfileId; /* - * The name of the billing profile which will be billed for the - * transaction. + * The name of the billing profile which will be billed for the transaction. */ @JsonProperty(value = "billingProfileDisplayName", access = JsonProperty.Access.WRITE_ONLY) private String billingProfileDisplayName; /* - * The ID of the customer for which the transaction took place. The field - * is applicable only for Microsoft Partner Agreement billing account. + * The ID of the customer for which the transaction took place. The field is applicable only for Microsoft Partner + * Agreement billing account. */ @JsonProperty(value = "customerId", access = JsonProperty.Access.WRITE_ONLY) private String customerId; /* - * The name of the customer for which the transaction took place. The field - * is applicable only for Microsoft Partner Agreement billing account. + * The name of the customer for which the transaction took place. The field is applicable only for Microsoft + * Partner Agreement billing account. */ @JsonProperty(value = "customerDisplayName", access = JsonProperty.Access.WRITE_ONLY) private String customerDisplayName; /* - * The ID of the subscription that was used for the transaction. The field - * is only applicable for transaction of kind reservation. + * The ID of the subscription that was used for the transaction. The field is only applicable for transaction of + * kind reservation. */ @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY) private String subscriptionId; /* - * The name of the subscription that was used for the transaction. The - * field is only applicable for transaction of kind reservation. + * The name of the subscription that was used for the transaction. The field is only applicable for transaction of + * kind reservation. */ @JsonProperty(value = "subscriptionName", access = JsonProperty.Access.WRITE_ONLY) private String subscriptionName; /* - * The type of azure plan of the subscription that was used for the - * transaction. + * The type of azure plan of the subscription that was used for the transaction. */ @JsonProperty(value = "azurePlan", access = JsonProperty.Access.WRITE_ONLY) private String azurePlan; /* - * The amount of any Azure credits automatically applied to this - * transaction. + * The amount of any Azure credits automatically applied to this transaction. */ @JsonProperty(value = "azureCreditApplied", access = JsonProperty.Access.WRITE_ONLY) private Amount azureCreditApplied; @@ -187,8 +176,7 @@ public final class TransactionProperties { private Amount effectivePrice; /* - * The exchange rate used to convert charged amount to billing currency, if - * applicable. + * The exchange rate used to convert charged amount to billing currency, if applicable. */ @JsonProperty(value = "exchangeRate", access = JsonProperty.Access.WRITE_ONLY) private Float exchangeRate; @@ -206,15 +194,13 @@ public final class TransactionProperties { private String pricingCurrency; /* - * The date of the purchase of the product, or the start date of the month - * in which usage started. + * The date of the purchase of the product, or the start date of the month in which usage started. */ @JsonProperty(value = "servicePeriodStartDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime servicePeriodStartDate; /* - * The end date of the product term, or the end date of the month in which - * usage ended. + * The end date of the product term, or the end date of the month in which usage ended. */ @JsonProperty(value = "servicePeriodEndDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime servicePeriodEndDate; @@ -232,8 +218,7 @@ public final class TransactionProperties { private Amount tax; /* - * The unit of measure used to bill for the product. For example, compute - * services are billed per hour. + * The unit of measure used to bill for the product. For example, compute services are billed per hour. */ @JsonProperty(value = "unitOfMeasure", access = JsonProperty.Access.WRITE_ONLY) private String unitOfMeasure; @@ -250,6 +235,10 @@ public final class TransactionProperties { @JsonProperty(value = "unitType", access = JsonProperty.Access.WRITE_ONLY) private String unitType; + /** Creates an instance of TransactionProperties class. */ + public TransactionProperties() { + } + /** * Get the kind property: The kind of transaction. Options are all or reservation. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateAddressResponseInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateAddressResponseInner.java index fe5e582d9b45..546f80da5cf1 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateAddressResponseInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateAddressResponseInner.java @@ -5,18 +5,14 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.AddressDetails; import com.azure.resourcemanager.billing.models.AddressValidationStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Result of the address validation. */ @Fluent public final class ValidateAddressResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidateAddressResponseInner.class); - /* * status of the address validation. */ @@ -35,6 +31,10 @@ public final class ValidateAddressResponseInner { @JsonProperty(value = "validationMessage") private String validationMessage; + /** Creates an instance of ValidateAddressResponseInner class. */ + public ValidateAddressResponseInner() { + } + /** * Get the status property: status of the address validation. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateProductTransferEligibilityResultInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateProductTransferEligibilityResultInner.java index ec3a1192692a..0bd677a082de 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateProductTransferEligibilityResultInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateProductTransferEligibilityResultInner.java @@ -5,17 +5,12 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.ValidateProductTransferEligibilityError; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Result of the product transfer eligibility validation. */ @Fluent public final class ValidateProductTransferEligibilityResultInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ValidateProductTransferEligibilityResultInner.class); - /* * Specifies whether the transfer is eligible or not. */ @@ -28,6 +23,10 @@ public final class ValidateProductTransferEligibilityResultInner { @JsonProperty(value = "errorDetails") private ValidateProductTransferEligibilityError errorDetails; + /** Creates an instance of ValidateProductTransferEligibilityResultInner class. */ + public ValidateProductTransferEligibilityResultInner() { + } + /** * Get the isMoveEligible property: Specifies whether the transfer is eligible or not. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateSubscriptionTransferEligibilityResultInner.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateSubscriptionTransferEligibilityResultInner.java index 8182afc61f4d..575c971584ff 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateSubscriptionTransferEligibilityResultInner.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/ValidateSubscriptionTransferEligibilityResultInner.java @@ -5,17 +5,12 @@ package com.azure.resourcemanager.billing.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.models.ValidateSubscriptionTransferEligibilityError; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Result of the transfer eligibility validation. */ @Fluent public final class ValidateSubscriptionTransferEligibilityResultInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ValidateSubscriptionTransferEligibilityResultInner.class); - /* * Specifies whether the subscription is eligible to be transferred. */ @@ -28,6 +23,10 @@ public final class ValidateSubscriptionTransferEligibilityResultInner { @JsonProperty(value = "errorDetails") private ValidateSubscriptionTransferEligibilityError errorDetails; + /** Creates an instance of ValidateSubscriptionTransferEligibilityResultInner class. */ + public ValidateSubscriptionTransferEligibilityResultInner() { + } + /** * Get the isMoveEligible property: Specifies whether the subscription is eligible to be transferred. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AddressClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AddressClientImpl.java index 1d23f4086199..fa2cd5d004c7 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AddressClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AddressClientImpl.java @@ -21,7 +21,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.AddressClient; import com.azure.resourcemanager.billing.fluent.models.ValidateAddressResponseInner; import com.azure.resourcemanager.billing.models.AddressDetails; @@ -29,8 +28,6 @@ /** An instance of this class provides access to all the operations defined in AddressClient. */ public final class AddressClientImpl implements AddressClient { - private final ClientLogger logger = new ClientLogger(AddressClientImpl.class); - /** The proxy service used to perform REST calls. */ private final AddressService service; @@ -73,7 +70,7 @@ Mono> validate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the address validation. + * @return result of the address validation along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> validateWithResponseAsync(AddressDetails address) { @@ -103,7 +100,7 @@ private Mono> validateWithResponseAsync(A * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the address validation. + * @return result of the address validation along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> validateWithResponseAsync( @@ -132,47 +129,39 @@ private Mono> validateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the address validation. + * @return result of the address validation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateAsync(AddressDetails address) { - return validateWithResponseAsync(address) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return validateWithResponseAsync(address).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Validates an address. Use the operation to validate an address before using it as soldTo or a billTo address. * * @param address Address details. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the address validation. + * @return result of the address validation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ValidateAddressResponseInner validate(AddressDetails address) { - return validateAsync(address).block(); + public Response validateWithResponse(AddressDetails address, Context context) { + return validateWithResponseAsync(address, context).block(); } /** * Validates an address. Use the operation to validate an address before using it as soldTo or a billTo address. * * @param address Address details. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the address validation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response validateWithResponse(AddressDetails address, Context context) { - return validateWithResponseAsync(address, context).block(); + public ValidateAddressResponseInner validate(AddressDetails address) { + return validateWithResponse(address, Context.NONE).getValue(); } } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AddressImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AddressImpl.java index 58f50db82564..be94c8c1878c 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AddressImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AddressImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.billing.models.Address; import com.azure.resourcemanager.billing.models.AddressDetails; import com.azure.resourcemanager.billing.models.ValidateAddressResponse; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class AddressImpl implements Address { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AddressImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AddressImpl.class); private final AddressClient innerClient; @@ -27,15 +26,6 @@ public AddressImpl(AddressClient innerClient, com.azure.resourcemanager.billing. this.serviceManager = serviceManager; } - public ValidateAddressResponse validate(AddressDetails address) { - ValidateAddressResponseInner inner = this.serviceClient().validate(address); - if (inner != null) { - return new ValidateAddressResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response validateWithResponse(AddressDetails address, Context context) { Response inner = this.serviceClient().validateWithResponse(address, context); if (inner != null) { @@ -49,6 +39,15 @@ public Response validateWithResponse(AddressDetails add } } + public ValidateAddressResponse validate(AddressDetails address) { + ValidateAddressResponseInner inner = this.serviceClient().validate(address); + if (inner != null) { + return new ValidateAddressResponseImpl(inner, this.manager()); + } else { + return null; + } + } + private AddressClient serviceClient() { return this.innerClient; } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementImpl.java index e0fd035f1086..ab49f9e9987a 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementImpl.java @@ -7,6 +7,7 @@ import com.azure.resourcemanager.billing.fluent.models.AgreementInner; import com.azure.resourcemanager.billing.models.AcceptanceMode; import com.azure.resourcemanager.billing.models.Agreement; +import com.azure.resourcemanager.billing.models.BillingProfileInfo; import com.azure.resourcemanager.billing.models.Category; import com.azure.resourcemanager.billing.models.Participants; import java.time.OffsetDateTime; @@ -47,6 +48,10 @@ public AcceptanceMode acceptanceMode() { return this.innerModel().acceptanceMode(); } + public BillingProfileInfo billingProfileInfo() { + return this.innerModel().billingProfileInfo(); + } + public OffsetDateTime effectiveDate() { return this.innerModel().effectiveDate(); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementsClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementsClientImpl.java index 3b85f5aa2e14..4ef200ce9056 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementsClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.AgreementsClient; import com.azure.resourcemanager.billing.fluent.models.AgreementInner; import com.azure.resourcemanager.billing.models.AgreementListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in AgreementsClient. */ public final class AgreementsClientImpl implements AgreementsClient { - private final ClientLogger logger = new ClientLogger(AgreementsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final AgreementsService service; @@ -103,7 +100,7 @@ Mono> listByBillingAccountNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing agreements. + * @return result of listing agreements along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -147,7 +144,7 @@ private Mono> listByBillingAccountSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing agreements. + * @return result of listing agreements along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -186,7 +183,7 @@ private Mono> listByBillingAccountSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing agreements. + * @return result of listing agreements as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync(String billingAccountName, String expand) { @@ -202,7 +199,7 @@ private PagedFlux listByBillingAccountAsync(String billingAccoun * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing agreements. + * @return result of listing agreements as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync(String billingAccountName) { @@ -221,7 +218,7 @@ private PagedFlux listByBillingAccountAsync(String billingAccoun * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing agreements. + * @return result of listing agreements as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync( @@ -238,7 +235,7 @@ private PagedFlux listByBillingAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing agreements. + * @return result of listing agreements as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount(String billingAccountName) { @@ -255,7 +252,7 @@ public PagedIterable listByBillingAccount(String billingAccountN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing agreements. + * @return result of listing agreements as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount( @@ -272,7 +269,7 @@ public PagedIterable listByBillingAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an agreement by ID. + * @return an agreement by ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -317,7 +314,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an agreement by ID. + * @return an agreement by ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -342,30 +339,6 @@ private Mono> getWithResponseAsync( .get(this.client.getEndpoint(), apiVersion, billingAccountName, agreementName, expand, accept, context); } - /** - * Gets an agreement by ID. - * - * @param billingAccountName The ID that uniquely identifies a billing account. - * @param agreementName The ID that uniquely identifies an agreement. - * @param expand May be used to expand the participants. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an agreement by ID. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String billingAccountName, String agreementName, String expand) { - return getWithResponseAsync(billingAccountName, agreementName, expand) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - /** * Gets an agreement by ID. * @@ -374,20 +347,13 @@ private Mono getAsync(String billingAccountName, String agreemen * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an agreement by ID. + * @return an agreement by ID on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String billingAccountName, String agreementName) { final String expand = null; return getWithResponseAsync(billingAccountName, agreementName, expand) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -395,15 +361,17 @@ private Mono getAsync(String billingAccountName, String agreemen * * @param billingAccountName The ID that uniquely identifies a billing account. * @param agreementName The ID that uniquely identifies an agreement. + * @param expand May be used to expand the participants. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an agreement by ID. + * @return an agreement by ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AgreementInner get(String billingAccountName, String agreementName) { - final String expand = null; - return getAsync(billingAccountName, agreementName, expand).block(); + public Response getWithResponse( + String billingAccountName, String agreementName, String expand, Context context) { + return getWithResponseAsync(billingAccountName, agreementName, expand, context).block(); } /** @@ -411,27 +379,26 @@ public AgreementInner get(String billingAccountName, String agreementName) { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param agreementName The ID that uniquely identifies an agreement. - * @param expand May be used to expand the participants. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an agreement by ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String billingAccountName, String agreementName, String expand, Context context) { - return getWithResponseAsync(billingAccountName, agreementName, expand, context).block(); + public AgreementInner get(String billingAccountName, String agreementName) { + final String expand = null; + return getWithResponse(billingAccountName, agreementName, expand, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing agreements. + * @return result of listing agreements along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync(String nextLink) { @@ -463,12 +430,13 @@ private Mono> listByBillingAccountNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing agreements. + * @return result of listing agreements along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementsImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementsImpl.java index 78fc6f2c2d33..979d3d8de7df 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementsImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AgreementsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.billing.fluent.models.AgreementInner; import com.azure.resourcemanager.billing.models.Agreement; import com.azure.resourcemanager.billing.models.Agreements; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class AgreementsImpl implements Agreements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AgreementsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AgreementsImpl.class); private final AgreementsClient innerClient; @@ -39,15 +38,6 @@ public PagedIterable listByBillingAccount(String billingAccountName, return Utils.mapPage(inner, inner1 -> new AgreementImpl(inner1, this.manager())); } - public Agreement get(String billingAccountName, String agreementName) { - AgreementInner inner = this.serviceClient().get(billingAccountName, agreementName); - if (inner != null) { - return new AgreementImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String billingAccountName, String agreementName, String expand, Context context) { Response inner = @@ -63,6 +53,15 @@ public Response getWithResponse( } } + public Agreement get(String billingAccountName, String agreementName) { + AgreementInner inner = this.serviceClient().get(billingAccountName, agreementName); + if (inner != null) { + return new AgreementImpl(inner, this.manager()); + } else { + return null; + } + } + private AgreementsClient serviceClient() { return this.innerClient; } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AvailableBalancesClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AvailableBalancesClientImpl.java index a0f1bf1d0238..ff6b512e1b40 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AvailableBalancesClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AvailableBalancesClientImpl.java @@ -21,15 +21,12 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.AvailableBalancesClient; import com.azure.resourcemanager.billing.fluent.models.AvailableBalanceInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in AvailableBalancesClient. */ public final class AvailableBalancesClientImpl implements AvailableBalancesClient { - private final ClientLogger logger = new ClientLogger(AvailableBalancesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final AvailableBalancesService service; @@ -79,7 +76,7 @@ Mono> get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the latest Azure credit balance. + * @return the latest Azure credit balance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -125,7 +122,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the latest Azure credit balance. + * @return the latest Azure credit balance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -161,19 +158,12 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the latest Azure credit balance. + * @return the latest Azure credit balance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String billingAccountName, String billingProfileName) { return getWithResponseAsync(billingAccountName, billingProfileName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -183,14 +173,16 @@ private Mono getAsync(String billingAccountName, String b * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the latest Azure credit balance. + * @return the latest Azure credit balance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AvailableBalanceInner get(String billingAccountName, String billingProfileName) { - return getAsync(billingAccountName, billingProfileName).block(); + public Response getWithResponse( + String billingAccountName, String billingProfileName, Context context) { + return getWithResponseAsync(billingAccountName, billingProfileName, context).block(); } /** @@ -200,15 +192,13 @@ public AvailableBalanceInner get(String billingAccountName, String billingProfil * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the latest Azure credit balance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String billingAccountName, String billingProfileName, Context context) { - return getWithResponseAsync(billingAccountName, billingProfileName, context).block(); + public AvailableBalanceInner get(String billingAccountName, String billingProfileName) { + return getWithResponse(billingAccountName, billingProfileName, Context.NONE).getValue(); } } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AvailableBalancesImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AvailableBalancesImpl.java index 5bf92689d07a..e07933e80e54 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AvailableBalancesImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/AvailableBalancesImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.billing.fluent.models.AvailableBalanceInner; import com.azure.resourcemanager.billing.models.AvailableBalance; import com.azure.resourcemanager.billing.models.AvailableBalances; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class AvailableBalancesImpl implements AvailableBalances { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableBalancesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AvailableBalancesImpl.class); private final AvailableBalancesClient innerClient; @@ -27,15 +26,6 @@ public AvailableBalancesImpl( this.serviceManager = serviceManager; } - public AvailableBalance get(String billingAccountName, String billingProfileName) { - AvailableBalanceInner inner = this.serviceClient().get(billingAccountName, billingProfileName); - if (inner != null) { - return new AvailableBalanceImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String billingAccountName, String billingProfileName, Context context) { Response inner = @@ -51,6 +41,15 @@ public Response getWithResponse( } } + public AvailableBalance get(String billingAccountName, String billingProfileName) { + AvailableBalanceInner inner = this.serviceClient().get(billingAccountName, billingProfileName); + if (inner != null) { + return new AvailableBalanceImpl(inner, this.manager()); + } else { + return null; + } + } + private AvailableBalancesClient serviceClient() { return this.innerClient; } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingAccountsClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingAccountsClientImpl.java index f139e118ab3b..b1634c4b2b61 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingAccountsClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingAccountsClientImpl.java @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.billing.fluent.BillingAccountsClient; @@ -44,8 +43,6 @@ /** An instance of this class provides access to all the operations defined in BillingAccountsClient. */ public final class BillingAccountsClientImpl implements BillingAccountsClient { - private final ClientLogger logger = new ClientLogger(BillingAccountsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final BillingAccountsService service; @@ -148,7 +145,7 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing accounts. + * @return the list of billing accounts along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String expand) { @@ -182,7 +179,7 @@ private Mono> listSinglePageAsync(String expa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing accounts. + * @return the list of billing accounts along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String expand, Context context) { @@ -215,7 +212,7 @@ private Mono> listSinglePageAsync(String expa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing accounts. + * @return the list of billing accounts as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String expand) { @@ -227,7 +224,7 @@ private PagedFlux listAsync(String expand) { * * @throws ManagementException 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 of billing accounts. + * @return the list of billing accounts as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -243,7 +240,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing accounts. + * @return the list of billing accounts as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String expand, Context context) { @@ -256,7 +253,7 @@ private PagedFlux listAsync(String expand, Context context) * * @throws ManagementException 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 of billing accounts. + * @return the list of billing accounts as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -272,7 +269,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing accounts. + * @return the list of billing accounts as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String expand, Context context) { @@ -287,7 +284,7 @@ public PagedIterable list(String expand, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing account by its ID. + * @return a billing account by its ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String billingAccountName, String expand) { @@ -319,7 +316,7 @@ private Mono> getWithResponseAsync(String billingA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing account by its ID. + * @return a billing account by its ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -344,77 +341,46 @@ private Mono> getWithResponseAsync( * Gets a billing account by its ID. * * @param billingAccountName The ID that uniquely identifies a billing account. - * @param expand May be used to expand the soldTo, invoice sections and billing profiles. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing account by its ID. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String billingAccountName, String expand) { - return getWithResponseAsync(billingAccountName, expand) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets a billing account by its ID. - * - * @param billingAccountName The ID that uniquely identifies a billing account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing account by its ID. + * @return a billing account by its ID on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String billingAccountName) { final String expand = null; - return getWithResponseAsync(billingAccountName, expand) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync(billingAccountName, expand).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a billing account by its ID. * * @param billingAccountName The ID that uniquely identifies a billing account. + * @param expand May be used to expand the soldTo, invoice sections and billing profiles. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing account by its ID. + * @return a billing account by its ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BillingAccountInner get(String billingAccountName) { - final String expand = null; - return getAsync(billingAccountName, expand).block(); + public Response getWithResponse(String billingAccountName, String expand, Context context) { + return getWithResponseAsync(billingAccountName, expand, context).block(); } /** * Gets a billing account by its ID. * * @param billingAccountName The ID that uniquely identifies a billing account. - * @param expand May be used to expand the soldTo, invoice sections and billing profiles. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a billing account by its ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String billingAccountName, String expand, Context context) { - return getWithResponseAsync(billingAccountName, expand, context).block(); + public BillingAccountInner get(String billingAccountName) { + final String expand = null; + return getWithResponse(billingAccountName, expand, Context.NONE).getValue(); } /** @@ -426,7 +392,7 @@ public Response getWithResponse(String billingAccountName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing account. + * @return a billing account along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -466,7 +432,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing account. + * @return a billing account along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -501,7 +467,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing account. + * @return the {@link PollerFlux} for polling of a billing account. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BillingAccountInner> beginUpdateAsync( @@ -514,7 +480,7 @@ private PollerFlux, BillingAccountInner> beginUp this.client.getHttpPipeline(), BillingAccountInner.class, BillingAccountInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -527,7 +493,7 @@ private PollerFlux, BillingAccountInner> beginUp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing account. + * @return the {@link PollerFlux} for polling of a billing account. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BillingAccountInner> beginUpdateAsync( @@ -549,7 +515,7 @@ private PollerFlux, BillingAccountInner> beginUp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing account. + * @return the {@link SyncPoller} for polling of a billing account. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BillingAccountInner> beginUpdate( @@ -567,7 +533,7 @@ public SyncPoller, BillingAccountInner> beginUpd * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing account. + * @return the {@link SyncPoller} for polling of a billing account. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BillingAccountInner> beginUpdate( @@ -584,7 +550,7 @@ public SyncPoller, BillingAccountInner> beginUpd * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing account. + * @return a billing account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String billingAccountName, BillingAccountUpdateRequest parameters) { @@ -601,7 +567,7 @@ private Mono updateAsync(String billingAccountName, Billing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing account. + * @return a billing account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -653,7 +619,8 @@ public BillingAccountInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoice section properties with create subscription permission. + * @return the list of invoice section properties with create subscription permission along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -697,7 +664,8 @@ public BillingAccountInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoice section properties with create subscription permission. + * @return the list of invoice section properties with create subscription permission along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -737,7 +705,8 @@ public BillingAccountInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoice section properties with create subscription permission. + * @return the list of invoice section properties with create subscription permission as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux @@ -756,7 +725,8 @@ public BillingAccountInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoice section properties with create subscription permission. + * @return the list of invoice section properties with create subscription permission as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux @@ -774,7 +744,8 @@ public BillingAccountInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoice section properties with create subscription permission. + * @return the list of invoice section properties with create subscription permission as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listInvoiceSectionsByCreateSubscriptionPermission( @@ -791,7 +762,8 @@ public PagedIterable listInvoiceSect * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoice section properties with create subscription permission. + * @return the list of invoice section properties with create subscription permission as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listInvoiceSectionsByCreateSubscriptionPermission( @@ -802,11 +774,12 @@ public PagedIterable listInvoiceSect /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing accounts. + * @return the list of billing accounts along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -837,12 +810,13 @@ private Mono> listNextSinglePageAsync(String /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing accounts. + * @return the list of billing accounts along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -873,11 +847,13 @@ private Mono> listNextSinglePageAsync(String /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoice section properties with create subscription permission. + * @return the list of invoice section properties with create subscription permission along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -913,12 +889,14 @@ private Mono> listNextSinglePageAsync(String /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoice section properties with create subscription permission. + * @return the list of invoice section properties with create subscription permission along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingAccountsImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingAccountsImpl.java index 399440dc5ead..d8ed256df537 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingAccountsImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingAccountsImpl.java @@ -16,10 +16,9 @@ import com.azure.resourcemanager.billing.models.BillingAccountUpdateRequest; import com.azure.resourcemanager.billing.models.BillingAccounts; import com.azure.resourcemanager.billing.models.InvoiceSectionWithCreateSubPermission; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class BillingAccountsImpl implements BillingAccounts { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingAccountsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BillingAccountsImpl.class); private final BillingAccountsClient innerClient; @@ -41,15 +40,6 @@ public PagedIterable list(String expand, Context context) { return Utils.mapPage(inner, inner1 -> new BillingAccountImpl(inner1, this.manager())); } - public BillingAccount get(String billingAccountName) { - BillingAccountInner inner = this.serviceClient().get(billingAccountName); - if (inner != null) { - return new BillingAccountImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String billingAccountName, String expand, Context context) { Response inner = this.serviceClient().getWithResponse(billingAccountName, expand, context); if (inner != null) { @@ -63,6 +53,15 @@ public Response getWithResponse(String billingAccountName, Strin } } + public BillingAccount get(String billingAccountName) { + BillingAccountInner inner = this.serviceClient().get(billingAccountName); + if (inner != null) { + return new BillingAccountImpl(inner, this.manager()); + } else { + return null; + } + } + public BillingAccount update(String billingAccountName, BillingAccountUpdateRequest parameters) { BillingAccountInner inner = this.serviceClient().update(billingAccountName, parameters); if (inner != null) { diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingManagementClientBuilder.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingManagementClientBuilder.java index 7beeb4a93f47..884d4f2877fd 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingManagementClientBuilder.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingManagementClientBuilder.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.AzureEnvironment; @@ -67,34 +66,34 @@ public BillingManagementClientBuilder environment(AzureEnvironment environment) } /* - * The default poll interval for long-running operation + * The HTTP pipeline to send requests through */ - private Duration defaultPollInterval; + private HttpPipeline pipeline; /** - * Sets The default poll interval for long-running operation. + * Sets The HTTP pipeline to send requests through. * - * @param defaultPollInterval the defaultPollInterval value. + * @param pipeline the pipeline value. * @return the BillingManagementClientBuilder. */ - public BillingManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; + public BillingManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; return this; } /* - * The HTTP pipeline to send requests through + * The default poll interval for long-running operation */ - private HttpPipeline pipeline; + private Duration defaultPollInterval; /** - * Sets The HTTP pipeline to send requests through. + * Sets The default poll interval for long-running operation. * - * @param pipeline the pipeline value. + * @param defaultPollInterval the defaultPollInterval value. * @return the BillingManagementClientBuilder. */ - public BillingManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; + public BillingManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; return this; } @@ -120,27 +119,26 @@ public BillingManagementClientBuilder serializerAdapter(SerializerAdapter serial * @return an instance of BillingManagementClientImpl. */ public BillingManagementClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = + (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval = + (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); BillingManagementClientImpl client = new BillingManagementClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + subscriptionId, + localEndpoint); return client; } } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingManagementClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingManagementClientImpl.java index 862b1b980852..0bd154a2b841 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingManagementClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingManagementClientImpl.java @@ -15,6 +15,7 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; @@ -49,15 +50,12 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.util.Map; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** Initializes a new instance of the BillingManagementClientImpl type. */ @ServiceClient(builder = BillingManagementClientBuilder.class) public final class BillingManagementClientImpl implements BillingManagementClient { - private final ClientLogger logger = new ClientLogger(BillingManagementClientImpl.class); - /** The ID that uniquely identifies an Azure subscription. */ private final String subscriptionId; @@ -286,18 +284,6 @@ public BillingPropertiesClient getBillingProperties() { return this.billingProperties; } - /** The OperationsClient object to access its operations. */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - /** The BillingRoleDefinitionsClient object to access its operations. */ private final BillingRoleDefinitionsClient billingRoleDefinitions; @@ -370,6 +356,18 @@ public BillingPeriodsClient getBillingPeriods() { return this.billingPeriods; } + /** The OperationsClient object to access its operations. */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + /** * Initializes an instance of BillingManagementClient client. * @@ -406,13 +404,13 @@ public BillingPeriodsClient getBillingPeriods() { this.transactions = new TransactionsClientImpl(this); this.policies = new PoliciesClientImpl(this); this.billingProperties = new BillingPropertiesClientImpl(this); - this.operations = new OperationsClientImpl(this); this.billingRoleDefinitions = new BillingRoleDefinitionsClientImpl(this); this.billingRoleAssignments = new BillingRoleAssignmentsClientImpl(this); this.agreements = new AgreementsClientImpl(this); this.reservations = new ReservationsClientImpl(this); this.enrollmentAccounts = new EnrollmentAccountsClientImpl(this); this.billingPeriods = new BillingPeriodsClientImpl(this); + this.operations = new OperationsClientImpl(this); } /** @@ -431,10 +429,7 @@ public Context getContext() { * @return the merged context. */ public Context mergeContext(Context context) { - for (Map.Entry entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return context; + return CoreUtils.mergeContexts(this.getContext(), context); } /** @@ -498,7 +493,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -557,4 +552,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(BillingManagementClientImpl.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPeriodsClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPeriodsClientImpl.java index 41908fdc5d50..c9733902933b 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPeriodsClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPeriodsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.BillingPeriodsClient; import com.azure.resourcemanager.billing.fluent.models.BillingPeriodInner; import com.azure.resourcemanager.billing.models.BillingPeriodsListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in BillingPeriodsClient. */ public final class BillingPeriodsClientImpl implements BillingPeriodsClient { - private final ClientLogger logger = new ClientLogger(BillingPeriodsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final BillingPeriodsService service; @@ -110,7 +107,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing billing periods. + * @return result of listing billing periods along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String filter, String skiptoken, Integer top) { @@ -168,7 +166,8 @@ private Mono> listSinglePageAsync(String filte * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing billing periods. + * @return result of listing billing periods along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -223,7 +222,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing billing periods. + * @return result of listing billing periods as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String filter, String skiptoken, Integer top) { @@ -238,7 +237,7 @@ private PagedFlux listAsync(String filter, String skiptoken, * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing billing periods. + * @return result of listing billing periods as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -264,7 +263,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing billing periods. + * @return result of listing billing periods as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String filter, String skiptoken, Integer top, Context context) { @@ -280,7 +279,7 @@ private PagedFlux listAsync(String filter, String skiptoken, * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing billing periods. + * @return result of listing billing periods as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -305,7 +304,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing billing periods. + * @return result of listing billing periods as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String filter, String skiptoken, Integer top, Context context) { @@ -320,7 +319,7 @@ public PagedIterable list(String filter, String skiptoken, I * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a named billing period. + * @return a named billing period along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String billingPeriodName) { @@ -365,7 +364,7 @@ private Mono> getWithResponseAsync(String billingPe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a named billing period. + * @return a named billing period along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String billingPeriodName, Context context) { @@ -406,19 +405,11 @@ private Mono> getWithResponseAsync(String billingPe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a named billing period. + * @return a named billing period on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String billingPeriodName) { - return getWithResponseAsync(billingPeriodName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync(billingPeriodName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -426,14 +417,15 @@ private Mono getAsync(String billingPeriodName) { * which were not purchased directly through the Azure web portal are not supported through this preview API. * * @param billingPeriodName The name of a BillingPeriod resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a named billing period. + * @return a named billing period along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BillingPeriodInner get(String billingPeriodName) { - return getAsync(billingPeriodName).block(); + public Response getWithResponse(String billingPeriodName, Context context) { + return getWithResponseAsync(billingPeriodName, context).block(); } /** @@ -441,25 +433,26 @@ public BillingPeriodInner get(String billingPeriodName) { * which were not purchased directly through the Azure web portal are not supported through this preview API. * * @param billingPeriodName The name of a BillingPeriod resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a named billing period. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String billingPeriodName, Context context) { - return getWithResponseAsync(billingPeriodName, context).block(); + public BillingPeriodInner get(String billingPeriodName) { + return getWithResponse(billingPeriodName, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing billing periods. + * @return result of listing billing periods along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -490,12 +483,14 @@ private Mono> listNextSinglePageAsync(String n /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing billing periods. + * @return result of listing billing periods along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPeriodsImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPeriodsImpl.java index dce7606151b3..caca277c8889 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPeriodsImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPeriodsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.billing.fluent.models.BillingPeriodInner; import com.azure.resourcemanager.billing.models.BillingPeriod; import com.azure.resourcemanager.billing.models.BillingPeriods; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class BillingPeriodsImpl implements BillingPeriods { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingPeriodsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BillingPeriodsImpl.class); private final BillingPeriodsClient innerClient; @@ -38,15 +37,6 @@ public PagedIterable list(String filter, String skiptoken, Intege return Utils.mapPage(inner, inner1 -> new BillingPeriodImpl(inner1, this.manager())); } - public BillingPeriod get(String billingPeriodName) { - BillingPeriodInner inner = this.serviceClient().get(billingPeriodName); - if (inner != null) { - return new BillingPeriodImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String billingPeriodName, Context context) { Response inner = this.serviceClient().getWithResponse(billingPeriodName, context); if (inner != null) { @@ -60,6 +50,15 @@ public Response getWithResponse(String billingPeriodName, Context } } + public BillingPeriod get(String billingPeriodName) { + BillingPeriodInner inner = this.serviceClient().get(billingPeriodName); + if (inner != null) { + return new BillingPeriodImpl(inner, this.manager()); + } else { + return null; + } + } + private BillingPeriodsClient serviceClient() { return this.innerClient; } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPermissionsClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPermissionsClientImpl.java index 923d31f7d070..fcdb7fdaf3b9 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPermissionsClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPermissionsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.BillingPermissionsClient; import com.azure.resourcemanager.billing.fluent.models.BillingPermissionsPropertiesInner; import com.azure.resourcemanager.billing.models.BillingPermissionsListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in BillingPermissionsClient. */ public final class BillingPermissionsClientImpl implements BillingPermissionsClient { - private final ClientLogger logger = new ClientLogger(BillingPermissionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final BillingPermissionsService service; @@ -162,7 +159,8 @@ Mono> listByBillingProfileNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCustomerSinglePageAsync( @@ -209,7 +207,8 @@ private Mono> listByCustomerSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCustomerSinglePageAsync( @@ -251,7 +250,8 @@ private Mono> listByCustomerSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByCustomerAsync( @@ -270,7 +270,8 @@ private PagedFlux listByCustomerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByCustomerAsync( @@ -288,7 +289,8 @@ private PagedFlux listByCustomerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByCustomer( @@ -305,7 +307,8 @@ public PagedIterable listByCustomer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByCustomer( @@ -320,7 +323,8 @@ public PagedIterable listByCustomer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -363,7 +367,8 @@ private Mono> listByBillingAcco * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -401,7 +406,8 @@ private Mono> listByBillingAcco * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync(String billingAccountName) { @@ -418,7 +424,8 @@ private PagedFlux listByBillingAccountAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync( @@ -435,7 +442,8 @@ private PagedFlux listByBillingAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount(String billingAccountName) { @@ -450,7 +458,8 @@ public PagedIterable listByBillingAccount(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount( @@ -467,7 +476,8 @@ public PagedIterable listByBillingAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionsSinglePageAsync( @@ -526,7 +536,8 @@ private Mono> listByInvoiceSect * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionsSinglePageAsync( @@ -581,7 +592,8 @@ private Mono> listByInvoiceSect * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByInvoiceSectionsAsync( @@ -601,7 +613,8 @@ private PagedFlux listByInvoiceSectionsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByInvoiceSectionsAsync( @@ -622,7 +635,8 @@ private PagedFlux listByInvoiceSectionsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByInvoiceSections( @@ -641,7 +655,8 @@ public PagedIterable listByInvoiceSections( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByInvoiceSections( @@ -658,7 +673,8 @@ public PagedIterable listByInvoiceSections( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -711,7 +727,8 @@ private Mono> listByBillingProf * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -755,7 +772,8 @@ private Mono> listByBillingProf * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -774,7 +792,8 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -792,7 +811,8 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -809,7 +829,8 @@ public PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -820,11 +841,13 @@ public PagedIterable listByBillingProfile( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCustomerNextSinglePageAsync(String nextLink) { @@ -855,12 +878,14 @@ private Mono> listByCustomerNex /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCustomerNextSinglePageAsync( @@ -892,11 +917,13 @@ private Mono> listByCustomerNex /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync( @@ -929,12 +956,14 @@ private Mono> listByBillingAcco /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync( @@ -966,11 +995,13 @@ private Mono> listByBillingAcco /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionsNextSinglePageAsync( @@ -1003,12 +1034,14 @@ private Mono> listByInvoiceSect /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionsNextSinglePageAsync( @@ -1040,11 +1073,13 @@ private Mono> listByInvoiceSect /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync( @@ -1077,12 +1112,14 @@ private Mono> listByBillingProf /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPermissionsImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPermissionsImpl.java index 513d3ff4b7fc..270cfd126b1f 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPermissionsImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPermissionsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.billing.fluent.models.BillingPermissionsPropertiesInner; import com.azure.resourcemanager.billing.models.BillingPermissions; import com.azure.resourcemanager.billing.models.BillingPermissionsProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class BillingPermissionsImpl implements BillingPermissions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingPermissionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BillingPermissionsImpl.class); private final BillingPermissionsClient innerClient; diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingProfilesClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingProfilesClientImpl.java index 5b0e499c27ed..b32a5daf39e8 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingProfilesClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingProfilesClientImpl.java @@ -28,7 +28,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.billing.fluent.BillingProfilesClient; @@ -40,8 +39,6 @@ /** An instance of this class provides access to all the operations defined in BillingProfilesClient. */ public final class BillingProfilesClientImpl implements BillingProfilesClient { - private final ClientLogger logger = new ClientLogger(BillingProfilesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final BillingProfilesService service; @@ -124,7 +121,7 @@ Mono> listByBillingAccountNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing profiles. + * @return the list of billing profiles along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -169,7 +166,7 @@ private Mono> listByBillingAccountSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing profiles. + * @return the list of billing profiles along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -209,7 +206,7 @@ private Mono> listByBillingAccountSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing profiles. + * @return the list of billing profiles as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync(String billingAccountName, String expand) { @@ -226,7 +223,7 @@ private PagedFlux listByBillingAccountAsync(String billingA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing profiles. + * @return the list of billing profiles as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync(String billingAccountName) { @@ -246,7 +243,7 @@ private PagedFlux listByBillingAccountAsync(String billingA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing profiles. + * @return the list of billing profiles as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync( @@ -264,7 +261,7 @@ private PagedFlux listByBillingAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing profiles. + * @return the list of billing profiles as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount(String billingAccountName) { @@ -282,7 +279,7 @@ public PagedIterable listByBillingAccount(String billingAcc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing profiles. + * @return the list of billing profiles as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount( @@ -300,7 +297,7 @@ public PagedIterable listByBillingAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing profile by its ID. + * @return a billing profile by its ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -347,7 +344,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing profile by its ID. + * @return a billing profile by its ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -374,31 +371,6 @@ private Mono> getWithResponseAsync( this.client.getEndpoint(), apiVersion, billingAccountName, billingProfileName, expand, accept, context); } - /** - * Gets a billing profile by its ID. The operation is supported for billing accounts with agreement type Microsoft - * Customer Agreement or Microsoft Partner Agreement. - * - * @param billingAccountName The ID that uniquely identifies a billing account. - * @param billingProfileName The ID that uniquely identifies a billing profile. - * @param expand May be used to expand the invoice sections. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing profile by its ID. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String billingAccountName, String billingProfileName, String expand) { - return getWithResponseAsync(billingAccountName, billingProfileName, expand) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - /** * Gets a billing profile by its ID. The operation is supported for billing accounts with agreement type Microsoft * Customer Agreement or Microsoft Partner Agreement. @@ -408,20 +380,13 @@ private Mono getAsync(String billingAccountName, String bil * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing profile by its ID. + * @return a billing profile by its ID on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String billingAccountName, String billingProfileName) { final String expand = null; return getWithResponseAsync(billingAccountName, billingProfileName, expand) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -430,15 +395,17 @@ private Mono getAsync(String billingAccountName, String bil * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param expand May be used to expand the invoice sections. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing profile by its ID. + * @return a billing profile by its ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BillingProfileInner get(String billingAccountName, String billingProfileName) { - final String expand = null; - return getAsync(billingAccountName, billingProfileName, expand).block(); + public Response getWithResponse( + String billingAccountName, String billingProfileName, String expand, Context context) { + return getWithResponseAsync(billingAccountName, billingProfileName, expand, context).block(); } /** @@ -447,17 +414,15 @@ public BillingProfileInner get(String billingAccountName, String billingProfileN * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. - * @param expand May be used to expand the invoice sections. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a billing profile by its ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String billingAccountName, String billingProfileName, String expand, Context context) { - return getWithResponseAsync(billingAccountName, billingProfileName, expand, context).block(); + public BillingProfileInner get(String billingAccountName, String billingProfileName) { + final String expand = null; + return getWithResponse(billingAccountName, billingProfileName, expand, Context.NONE).getValue(); } /** @@ -470,7 +435,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing profile. + * @return a billing profile along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -522,7 +487,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing profile. + * @return a billing profile along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -570,7 +535,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing profile. + * @return the {@link PollerFlux} for polling of a billing profile. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BillingProfileInner> beginCreateOrUpdateAsync( @@ -584,7 +549,7 @@ private PollerFlux, BillingProfileInner> beginCr this.client.getHttpPipeline(), BillingProfileInner.class, BillingProfileInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -598,7 +563,7 @@ private PollerFlux, BillingProfileInner> beginCr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing profile. + * @return the {@link PollerFlux} for polling of a billing profile. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BillingProfileInner> beginCreateOrUpdateAsync( @@ -622,7 +587,7 @@ private PollerFlux, BillingProfileInner> beginCr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing profile. + * @return the {@link SyncPoller} for polling of a billing profile. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BillingProfileInner> beginCreateOrUpdate( @@ -641,7 +606,7 @@ public SyncPoller, BillingProfileInner> beginCre * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing profile. + * @return the {@link SyncPoller} for polling of a billing profile. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BillingProfileInner> beginCreateOrUpdate( @@ -659,7 +624,7 @@ public SyncPoller, BillingProfileInner> beginCre * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing profile. + * @return a billing profile on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -680,7 +645,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing profile. + * @return a billing profile on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -730,11 +695,12 @@ public BillingProfileInner createOrUpdate( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing profiles. + * @return the list of billing profiles along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync(String nextLink) { @@ -766,12 +732,13 @@ private Mono> listByBillingAccountNextSingleP /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing profiles. + * @return the list of billing profiles along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingProfilesImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingProfilesImpl.java index dce0bde2fb4c..601b499b1af9 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingProfilesImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingProfilesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.billing.fluent.models.BillingProfileInner; import com.azure.resourcemanager.billing.models.BillingProfile; import com.azure.resourcemanager.billing.models.BillingProfiles; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class BillingProfilesImpl implements BillingProfiles { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingProfilesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BillingProfilesImpl.class); private final BillingProfilesClient innerClient; @@ -40,15 +39,6 @@ public PagedIterable listByBillingAccount( return Utils.mapPage(inner, inner1 -> new BillingProfileImpl(inner1, this.manager())); } - public BillingProfile get(String billingAccountName, String billingProfileName) { - BillingProfileInner inner = this.serviceClient().get(billingAccountName, billingProfileName); - if (inner != null) { - return new BillingProfileImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String billingAccountName, String billingProfileName, String expand, Context context) { Response inner = @@ -64,6 +54,15 @@ public Response getWithResponse( } } + public BillingProfile get(String billingAccountName, String billingProfileName) { + BillingProfileInner inner = this.serviceClient().get(billingAccountName, billingProfileName); + if (inner != null) { + return new BillingProfileImpl(inner, this.manager()); + } else { + return null; + } + } + public BillingProfile createOrUpdate( String billingAccountName, String billingProfileName, BillingProfileInner parameters) { BillingProfileInner inner = diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPropertiesClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPropertiesClientImpl.java index ad67ab0e5b5b..4413a89e52cf 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPropertiesClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPropertiesClientImpl.java @@ -23,15 +23,12 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.BillingPropertiesClient; import com.azure.resourcemanager.billing.fluent.models.BillingPropertyInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in BillingPropertiesClient. */ public final class BillingPropertiesClientImpl implements BillingPropertiesClient { - private final ClientLogger logger = new ClientLogger(BillingPropertiesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final BillingPropertiesService service; @@ -86,7 +83,8 @@ Mono> update( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the billing properties for a subscription. + * @return the billing properties for a subscription along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync() { @@ -120,7 +118,8 @@ private Mono> getWithResponseAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the billing properties for a subscription. + * @return the billing properties for a subscription along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(Context context) { @@ -148,47 +147,39 @@ private Mono> getWithResponseAsync(Context contex * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the billing properties for a subscription. + * @return the billing properties for a subscription on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync() { - return getWithResponseAsync() - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get the billing properties for a subscription. This operation is not supported for billing accounts with * agreement type Enterprise Agreement. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the billing properties for a subscription. + * @return the billing properties for a subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BillingPropertyInner get() { - return getAsync().block(); + public Response getWithResponse(Context context) { + return getWithResponseAsync(context).block(); } /** * Get the billing properties for a subscription. This operation is not supported for billing accounts with * agreement type Enterprise Agreement. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the billing properties for a subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(Context context) { - return getWithResponseAsync(context).block(); + public BillingPropertyInner get() { + return getWithResponse(Context.NONE).getValue(); } /** @@ -199,7 +190,7 @@ public Response getWithResponse(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing property. + * @return a billing property along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync(BillingPropertyInner parameters) { @@ -245,7 +236,7 @@ private Mono> updateWithResponseAsync(BillingProp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing property. + * @return a billing property along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -283,19 +274,11 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing property. + * @return a billing property on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(BillingPropertyInner parameters) { - return updateWithResponseAsync(parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return updateWithResponseAsync(parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -303,14 +286,15 @@ private Mono updateAsync(BillingPropertyInner parameters) * only for billing accounts with agreement type Microsoft Customer Agreement. * * @param parameters Request parameters that are provided to the update billing property operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing property. + * @return a billing property along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BillingPropertyInner update(BillingPropertyInner parameters) { - return updateAsync(parameters).block(); + public Response updateWithResponse(BillingPropertyInner parameters, Context context) { + return updateWithResponseAsync(parameters, context).block(); } /** @@ -318,14 +302,13 @@ public BillingPropertyInner update(BillingPropertyInner parameters) { * only for billing accounts with agreement type Microsoft Customer Agreement. * * @param parameters Request parameters that are provided to the update billing property operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a billing property. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(BillingPropertyInner parameters, Context context) { - return updateWithResponseAsync(parameters, context).block(); + public BillingPropertyInner update(BillingPropertyInner parameters) { + return updateWithResponse(parameters, Context.NONE).getValue(); } } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPropertiesImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPropertiesImpl.java index b60d1b534773..9a48d10fc169 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPropertiesImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPropertiesImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.billing.fluent.models.BillingPropertyInner; import com.azure.resourcemanager.billing.models.BillingProperties; import com.azure.resourcemanager.billing.models.BillingProperty; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class BillingPropertiesImpl implements BillingProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingPropertiesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BillingPropertiesImpl.class); private final BillingPropertiesClient innerClient; @@ -27,15 +26,6 @@ public BillingPropertiesImpl( this.serviceManager = serviceManager; } - public BillingProperty get() { - BillingPropertyInner inner = this.serviceClient().get(); - if (inner != null) { - return new BillingPropertyImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(Context context) { Response inner = this.serviceClient().getWithResponse(context); if (inner != null) { @@ -49,8 +39,8 @@ public Response getWithResponse(Context context) { } } - public BillingProperty update(BillingPropertyInner parameters) { - BillingPropertyInner inner = this.serviceClient().update(parameters); + public BillingProperty get() { + BillingPropertyInner inner = this.serviceClient().get(); if (inner != null) { return new BillingPropertyImpl(inner, this.manager()); } else { @@ -71,6 +61,15 @@ public Response updateWithResponse(BillingPropertyInner paramet } } + public BillingProperty update(BillingPropertyInner parameters) { + BillingPropertyInner inner = this.serviceClient().update(parameters); + if (inner != null) { + return new BillingPropertyImpl(inner, this.manager()); + } else { + return null; + } + } + private BillingPropertiesClient serviceClient() { return this.innerClient; } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingRoleAssignmentsClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingRoleAssignmentsClientImpl.java index 9940fb97457e..2aa42b78c80c 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingRoleAssignmentsClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingRoleAssignmentsClientImpl.java @@ -26,7 +26,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.BillingRoleAssignmentsClient; import com.azure.resourcemanager.billing.fluent.models.BillingRoleAssignmentInner; import com.azure.resourcemanager.billing.models.BillingRoleAssignmentListResult; @@ -34,8 +33,6 @@ /** An instance of this class provides access to all the operations defined in BillingRoleAssignmentsClient. */ public final class BillingRoleAssignmentsClientImpl implements BillingRoleAssignmentsClient { - private final ClientLogger logger = new ClientLogger(BillingRoleAssignmentsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final BillingRoleAssignmentsService service; @@ -231,7 +228,8 @@ Mono> listByBillingProfileNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a role assignment for the caller on a billing account. + * @return a role assignment for the caller on a billing account along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByBillingAccountWithResponseAsync( @@ -278,7 +276,8 @@ private Mono> getByBillingAccountWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a role assignment for the caller on a billing account. + * @return a role assignment for the caller on a billing account along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByBillingAccountWithResponseAsync( @@ -316,20 +315,13 @@ private Mono> getByBillingAccountWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a role assignment for the caller on a billing account. + * @return a role assignment for the caller on a billing account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByBillingAccountAsync( String billingAccountName, String billingRoleAssignmentName) { return getByBillingAccountWithResponseAsync(billingAccountName, billingRoleAssignmentName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -338,14 +330,16 @@ private Mono getByBillingAccountAsync( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a role assignment for the caller on a billing account. + * @return a role assignment for the caller on a billing account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BillingRoleAssignmentInner getByBillingAccount(String billingAccountName, String billingRoleAssignmentName) { - return getByBillingAccountAsync(billingAccountName, billingRoleAssignmentName).block(); + public Response getByBillingAccountWithResponse( + String billingAccountName, String billingRoleAssignmentName, Context context) { + return getByBillingAccountWithResponseAsync(billingAccountName, billingRoleAssignmentName, context).block(); } /** @@ -354,16 +348,14 @@ public BillingRoleAssignmentInner getByBillingAccount(String billingAccountName, * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a role assignment for the caller on a billing account. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByBillingAccountWithResponse( - String billingAccountName, String billingRoleAssignmentName, Context context) { - return getByBillingAccountWithResponseAsync(billingAccountName, billingRoleAssignmentName, context).block(); + public BillingRoleAssignmentInner getByBillingAccount(String billingAccountName, String billingRoleAssignmentName) { + return getByBillingAccountWithResponse(billingAccountName, billingRoleAssignmentName, Context.NONE).getValue(); } /** @@ -375,7 +367,7 @@ public Response getByBillingAccountWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the role assignment. + * @return the role assignment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteByBillingAccountWithResponseAsync( @@ -422,7 +414,7 @@ private Mono> deleteByBillingAccountWithRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the role assignment. + * @return the role assignment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteByBillingAccountWithResponseAsync( @@ -460,20 +452,13 @@ private Mono> deleteByBillingAccountWithRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the role assignment. + * @return the role assignment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteByBillingAccountAsync( String billingAccountName, String billingRoleAssignmentName) { return deleteByBillingAccountWithResponseAsync(billingAccountName, billingRoleAssignmentName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -482,15 +467,16 @@ private Mono deleteByBillingAccountAsync( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the role assignment. + * @return the role assignment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BillingRoleAssignmentInner deleteByBillingAccount( - String billingAccountName, String billingRoleAssignmentName) { - return deleteByBillingAccountAsync(billingAccountName, billingRoleAssignmentName).block(); + public Response deleteByBillingAccountWithResponse( + String billingAccountName, String billingRoleAssignmentName, Context context) { + return deleteByBillingAccountWithResponseAsync(billingAccountName, billingRoleAssignmentName, context).block(); } /** @@ -499,16 +485,16 @@ public BillingRoleAssignmentInner deleteByBillingAccount( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the role assignment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteByBillingAccountWithResponse( - String billingAccountName, String billingRoleAssignmentName, Context context) { - return deleteByBillingAccountWithResponseAsync(billingAccountName, billingRoleAssignmentName, context).block(); + public BillingRoleAssignmentInner deleteByBillingAccount( + String billingAccountName, String billingRoleAssignmentName) { + return deleteByBillingAccountWithResponse(billingAccountName, billingRoleAssignmentName, Context.NONE) + .getValue(); } /** @@ -522,7 +508,8 @@ public Response deleteByBillingAccountWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a role assignment for the caller on an invoice section. + * @return a role assignment for the caller on an invoice section along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByInvoiceSectionWithResponseAsync( @@ -584,7 +571,8 @@ private Mono> getByInvoiceSectionWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a role assignment for the caller on an invoice section. + * @return a role assignment for the caller on an invoice section along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByInvoiceSectionWithResponseAsync( @@ -643,7 +631,7 @@ private Mono> getByInvoiceSectionWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a role assignment for the caller on an invoice section. + * @return a role assignment for the caller on an invoice section on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByInvoiceSectionAsync( @@ -653,14 +641,7 @@ private Mono getByInvoiceSectionAsync( String billingRoleAssignmentName) { return getByInvoiceSectionWithResponseAsync( billingAccountName, billingProfileName, invoiceSectionName, billingRoleAssignmentName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -671,19 +652,21 @@ private Mono getByInvoiceSectionAsync( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a role assignment for the caller on an invoice section. + * @return a role assignment for the caller on an invoice section along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BillingRoleAssignmentInner getByInvoiceSection( + public Response getByInvoiceSectionWithResponse( String billingAccountName, String billingProfileName, String invoiceSectionName, - String billingRoleAssignmentName) { - return getByInvoiceSectionAsync( - billingAccountName, billingProfileName, invoiceSectionName, billingRoleAssignmentName) + String billingRoleAssignmentName, + Context context) { + return getByInvoiceSectionWithResponseAsync( + billingAccountName, billingProfileName, invoiceSectionName, billingRoleAssignmentName, context) .block(); } @@ -695,22 +678,20 @@ public BillingRoleAssignmentInner getByInvoiceSection( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a role assignment for the caller on an invoice section. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByInvoiceSectionWithResponse( + public BillingRoleAssignmentInner getByInvoiceSection( String billingAccountName, String billingProfileName, String invoiceSectionName, - String billingRoleAssignmentName, - Context context) { - return getByInvoiceSectionWithResponseAsync( - billingAccountName, billingProfileName, invoiceSectionName, billingRoleAssignmentName, context) - .block(); + String billingRoleAssignmentName) { + return getByInvoiceSectionWithResponse( + billingAccountName, billingProfileName, invoiceSectionName, billingRoleAssignmentName, Context.NONE) + .getValue(); } /** @@ -724,7 +705,7 @@ public Response getByInvoiceSectionWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the role assignment. + * @return the role assignment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteByInvoiceSectionWithResponseAsync( @@ -786,7 +767,7 @@ private Mono> deleteByInvoiceSectionWithRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the role assignment. + * @return the role assignment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteByInvoiceSectionWithResponseAsync( @@ -845,7 +826,7 @@ private Mono> deleteByInvoiceSectionWithRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the role assignment. + * @return the role assignment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteByInvoiceSectionAsync( @@ -855,14 +836,7 @@ private Mono deleteByInvoiceSectionAsync( String billingRoleAssignmentName) { return deleteByInvoiceSectionWithResponseAsync( billingAccountName, billingProfileName, invoiceSectionName, billingRoleAssignmentName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -873,19 +847,21 @@ private Mono deleteByInvoiceSectionAsync( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the role assignment. + * @return the role assignment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BillingRoleAssignmentInner deleteByInvoiceSection( + public Response deleteByInvoiceSectionWithResponse( String billingAccountName, String billingProfileName, String invoiceSectionName, - String billingRoleAssignmentName) { - return deleteByInvoiceSectionAsync( - billingAccountName, billingProfileName, invoiceSectionName, billingRoleAssignmentName) + String billingRoleAssignmentName, + Context context) { + return deleteByInvoiceSectionWithResponseAsync( + billingAccountName, billingProfileName, invoiceSectionName, billingRoleAssignmentName, context) .block(); } @@ -897,22 +873,20 @@ public BillingRoleAssignmentInner deleteByInvoiceSection( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the role assignment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteByInvoiceSectionWithResponse( + public BillingRoleAssignmentInner deleteByInvoiceSection( String billingAccountName, String billingProfileName, String invoiceSectionName, - String billingRoleAssignmentName, - Context context) { - return deleteByInvoiceSectionWithResponseAsync( - billingAccountName, billingProfileName, invoiceSectionName, billingRoleAssignmentName, context) - .block(); + String billingRoleAssignmentName) { + return deleteByInvoiceSectionWithResponse( + billingAccountName, billingProfileName, invoiceSectionName, billingRoleAssignmentName, Context.NONE) + .getValue(); } /** @@ -925,7 +899,8 @@ public Response deleteByInvoiceSectionWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a role assignment for the caller on a billing profile. + * @return a role assignment for the caller on a billing profile along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByBillingProfileWithResponseAsync( @@ -978,7 +953,8 @@ private Mono> getByBillingProfileWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a role assignment for the caller on a billing profile. + * @return a role assignment for the caller on a billing profile along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByBillingProfileWithResponseAsync( @@ -1027,20 +1003,13 @@ private Mono> getByBillingProfileWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a role assignment for the caller on a billing profile. + * @return a role assignment for the caller on a billing profile on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByBillingProfileAsync( String billingAccountName, String billingProfileName, String billingRoleAssignmentName) { return getByBillingProfileWithResponseAsync(billingAccountName, billingProfileName, billingRoleAssignmentName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1050,15 +1019,18 @@ private Mono getByBillingProfileAsync( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a role assignment for the caller on a billing profile. + * @return a role assignment for the caller on a billing profile along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BillingRoleAssignmentInner getByBillingProfile( - String billingAccountName, String billingProfileName, String billingRoleAssignmentName) { - return getByBillingProfileAsync(billingAccountName, billingProfileName, billingRoleAssignmentName).block(); + public Response getByBillingProfileWithResponse( + String billingAccountName, String billingProfileName, String billingRoleAssignmentName, Context context) { + return getByBillingProfileWithResponseAsync( + billingAccountName, billingProfileName, billingRoleAssignmentName, context) + .block(); } /** @@ -1068,18 +1040,17 @@ public BillingRoleAssignmentInner getByBillingProfile( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a role assignment for the caller on a billing profile. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByBillingProfileWithResponse( - String billingAccountName, String billingProfileName, String billingRoleAssignmentName, Context context) { - return getByBillingProfileWithResponseAsync( - billingAccountName, billingProfileName, billingRoleAssignmentName, context) - .block(); + public BillingRoleAssignmentInner getByBillingProfile( + String billingAccountName, String billingProfileName, String billingRoleAssignmentName) { + return getByBillingProfileWithResponse( + billingAccountName, billingProfileName, billingRoleAssignmentName, Context.NONE) + .getValue(); } /** @@ -1092,7 +1063,7 @@ public Response getByBillingProfileWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the role assignment. + * @return the role assignment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteByBillingProfileWithResponseAsync( @@ -1145,7 +1116,7 @@ private Mono> deleteByBillingProfileWithRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the role assignment. + * @return the role assignment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteByBillingProfileWithResponseAsync( @@ -1194,21 +1165,14 @@ private Mono> deleteByBillingProfileWithRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the role assignment. + * @return the role assignment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteByBillingProfileAsync( String billingAccountName, String billingProfileName, String billingRoleAssignmentName) { return deleteByBillingProfileWithResponseAsync( billingAccountName, billingProfileName, billingRoleAssignmentName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1218,15 +1182,18 @@ private Mono deleteByBillingProfileAsync( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the role assignment. + * @return the role assignment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BillingRoleAssignmentInner deleteByBillingProfile( - String billingAccountName, String billingProfileName, String billingRoleAssignmentName) { - return deleteByBillingProfileAsync(billingAccountName, billingProfileName, billingRoleAssignmentName).block(); + public Response deleteByBillingProfileWithResponse( + String billingAccountName, String billingProfileName, String billingRoleAssignmentName, Context context) { + return deleteByBillingProfileWithResponseAsync( + billingAccountName, billingProfileName, billingRoleAssignmentName, context) + .block(); } /** @@ -1236,18 +1203,17 @@ public BillingRoleAssignmentInner deleteByBillingProfile( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the role assignment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteByBillingProfileWithResponse( - String billingAccountName, String billingProfileName, String billingRoleAssignmentName, Context context) { - return deleteByBillingProfileWithResponseAsync( - billingAccountName, billingProfileName, billingRoleAssignmentName, context) - .block(); + public BillingRoleAssignmentInner deleteByBillingProfile( + String billingAccountName, String billingProfileName, String billingRoleAssignmentName) { + return deleteByBillingProfileWithResponse( + billingAccountName, billingProfileName, billingRoleAssignmentName, Context.NONE) + .getValue(); } /** @@ -1258,7 +1224,7 @@ public Response deleteByBillingProfileWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -1302,7 +1268,7 @@ private Mono> listByBillingAccountSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -1341,7 +1307,7 @@ private Mono> listByBillingAccountSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync(String billingAccountName) { @@ -1359,7 +1325,7 @@ private PagedFlux listByBillingAccountAsync(String b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync( @@ -1377,7 +1343,7 @@ private PagedFlux listByBillingAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount(String billingAccountName) { @@ -1393,7 +1359,7 @@ public PagedIterable listByBillingAccount(String bil * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount(String billingAccountName, Context context) { @@ -1410,7 +1376,7 @@ public PagedIterable listByBillingAccount(String bil * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionSinglePageAsync( @@ -1470,7 +1436,7 @@ private Mono> listByInvoiceSectionSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionSinglePageAsync( @@ -1526,7 +1492,7 @@ private Mono> listByInvoiceSectionSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByInvoiceSectionAsync( @@ -1547,7 +1513,7 @@ private PagedFlux listByInvoiceSectionAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByInvoiceSectionAsync( @@ -1569,7 +1535,7 @@ private PagedFlux listByInvoiceSectionAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByInvoiceSection( @@ -1589,7 +1555,7 @@ public PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByInvoiceSection( @@ -1607,7 +1573,7 @@ public PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -1661,7 +1627,7 @@ private Mono> listByBillingProfileSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -1706,7 +1672,7 @@ private Mono> listByBillingProfileSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -1726,7 +1692,7 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -1745,7 +1711,7 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -1763,7 +1729,7 @@ public PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -1774,11 +1740,12 @@ public PagedIterable listByBillingProfile( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync(String nextLink) { @@ -1810,12 +1777,13 @@ private Mono> listByBillingAccountNext /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync( @@ -1847,11 +1815,12 @@ private Mono> listByBillingAccountNext /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionNextSinglePageAsync(String nextLink) { @@ -1883,12 +1852,13 @@ private Mono> listByInvoiceSectionNext /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionNextSinglePageAsync( @@ -1920,11 +1890,12 @@ private Mono> listByInvoiceSectionNext /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync(String nextLink) { @@ -1956,12 +1927,13 @@ private Mono> listByBillingProfileNext /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role assignments. + * @return the list of role assignments along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingRoleAssignmentsImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingRoleAssignmentsImpl.java index 58062de8c9a4..3e30ab4e79e7 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingRoleAssignmentsImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingRoleAssignmentsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.billing.fluent.models.BillingRoleAssignmentInner; import com.azure.resourcemanager.billing.models.BillingRoleAssignment; import com.azure.resourcemanager.billing.models.BillingRoleAssignments; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class BillingRoleAssignmentsImpl implements BillingRoleAssignments { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingRoleAssignmentsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BillingRoleAssignmentsImpl.class); private final BillingRoleAssignmentsClient innerClient; @@ -28,16 +27,6 @@ public BillingRoleAssignmentsImpl( this.serviceManager = serviceManager; } - public BillingRoleAssignment getByBillingAccount(String billingAccountName, String billingRoleAssignmentName) { - BillingRoleAssignmentInner inner = - this.serviceClient().getByBillingAccount(billingAccountName, billingRoleAssignmentName); - if (inner != null) { - return new BillingRoleAssignmentImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByBillingAccountWithResponse( String billingAccountName, String billingRoleAssignmentName, Context context) { Response inner = @@ -55,9 +44,9 @@ public Response getByBillingAccountWithResponse( } } - public BillingRoleAssignment deleteByBillingAccount(String billingAccountName, String billingRoleAssignmentName) { + public BillingRoleAssignment getByBillingAccount(String billingAccountName, String billingRoleAssignmentName) { BillingRoleAssignmentInner inner = - this.serviceClient().deleteByBillingAccount(billingAccountName, billingRoleAssignmentName); + this.serviceClient().getByBillingAccount(billingAccountName, billingRoleAssignmentName); if (inner != null) { return new BillingRoleAssignmentImpl(inner, this.manager()); } else { @@ -82,16 +71,9 @@ public Response deleteByBillingAccountWithResponse( } } - public BillingRoleAssignment getByInvoiceSection( - String billingAccountName, - String billingProfileName, - String invoiceSectionName, - String billingRoleAssignmentName) { + public BillingRoleAssignment deleteByBillingAccount(String billingAccountName, String billingRoleAssignmentName) { BillingRoleAssignmentInner inner = - this - .serviceClient() - .getByInvoiceSection( - billingAccountName, billingProfileName, invoiceSectionName, billingRoleAssignmentName); + this.serviceClient().deleteByBillingAccount(billingAccountName, billingRoleAssignmentName); if (inner != null) { return new BillingRoleAssignmentImpl(inner, this.manager()); } else { @@ -121,7 +103,7 @@ public Response getByInvoiceSectionWithResponse( } } - public BillingRoleAssignment deleteByInvoiceSection( + public BillingRoleAssignment getByInvoiceSection( String billingAccountName, String billingProfileName, String invoiceSectionName, @@ -129,7 +111,7 @@ public BillingRoleAssignment deleteByInvoiceSection( BillingRoleAssignmentInner inner = this .serviceClient() - .deleteByInvoiceSection( + .getByInvoiceSection( billingAccountName, billingProfileName, invoiceSectionName, billingRoleAssignmentName); if (inner != null) { return new BillingRoleAssignmentImpl(inner, this.manager()); @@ -160,10 +142,16 @@ public Response deleteByInvoiceSectionWithResponse( } } - public BillingRoleAssignment getByBillingProfile( - String billingAccountName, String billingProfileName, String billingRoleAssignmentName) { + public BillingRoleAssignment deleteByInvoiceSection( + String billingAccountName, + String billingProfileName, + String invoiceSectionName, + String billingRoleAssignmentName) { BillingRoleAssignmentInner inner = - this.serviceClient().getByBillingProfile(billingAccountName, billingProfileName, billingRoleAssignmentName); + this + .serviceClient() + .deleteByInvoiceSection( + billingAccountName, billingProfileName, invoiceSectionName, billingRoleAssignmentName); if (inner != null) { return new BillingRoleAssignmentImpl(inner, this.manager()); } else { @@ -189,12 +177,10 @@ public Response getByBillingProfileWithResponse( } } - public BillingRoleAssignment deleteByBillingProfile( + public BillingRoleAssignment getByBillingProfile( String billingAccountName, String billingProfileName, String billingRoleAssignmentName) { BillingRoleAssignmentInner inner = - this - .serviceClient() - .deleteByBillingProfile(billingAccountName, billingProfileName, billingRoleAssignmentName); + this.serviceClient().getByBillingProfile(billingAccountName, billingProfileName, billingRoleAssignmentName); if (inner != null) { return new BillingRoleAssignmentImpl(inner, this.manager()); } else { @@ -220,6 +206,19 @@ public Response deleteByBillingProfileWithResponse( } } + public BillingRoleAssignment deleteByBillingProfile( + String billingAccountName, String billingProfileName, String billingRoleAssignmentName) { + BillingRoleAssignmentInner inner = + this + .serviceClient() + .deleteByBillingProfile(billingAccountName, billingProfileName, billingRoleAssignmentName); + if (inner != null) { + return new BillingRoleAssignmentImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable listByBillingAccount(String billingAccountName) { PagedIterable inner = this.serviceClient().listByBillingAccount(billingAccountName); return Utils.mapPage(inner, inner1 -> new BillingRoleAssignmentImpl(inner1, this.manager())); diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingRoleDefinitionsClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingRoleDefinitionsClientImpl.java index 52d2e1f966c9..b20e37d16285 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingRoleDefinitionsClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingRoleDefinitionsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.BillingRoleDefinitionsClient; import com.azure.resourcemanager.billing.fluent.models.BillingRoleDefinitionInner; import com.azure.resourcemanager.billing.models.BillingRoleDefinitionListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in BillingRoleDefinitionsClient. */ public final class BillingRoleDefinitionsClientImpl implements BillingRoleDefinitionsClient { - private final ClientLogger logger = new ClientLogger(BillingRoleDefinitionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final BillingRoleDefinitionsService service; @@ -185,7 +182,8 @@ Mono> listByBillingProfileNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the definition for a role on a billing account. + * @return the definition for a role on a billing account along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByBillingAccountWithResponseAsync( @@ -232,7 +230,8 @@ private Mono> getByBillingAccountWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the definition for a role on a billing account. + * @return the definition for a role on a billing account along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByBillingAccountWithResponseAsync( @@ -270,20 +269,13 @@ private Mono> getByBillingAccountWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the definition for a role on a billing account. + * @return the definition for a role on a billing account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByBillingAccountAsync( String billingAccountName, String billingRoleDefinitionName) { return getByBillingAccountWithResponseAsync(billingAccountName, billingRoleDefinitionName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -292,14 +284,16 @@ private Mono getByBillingAccountAsync( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the definition for a role on a billing account. + * @return the definition for a role on a billing account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BillingRoleDefinitionInner getByBillingAccount(String billingAccountName, String billingRoleDefinitionName) { - return getByBillingAccountAsync(billingAccountName, billingRoleDefinitionName).block(); + public Response getByBillingAccountWithResponse( + String billingAccountName, String billingRoleDefinitionName, Context context) { + return getByBillingAccountWithResponseAsync(billingAccountName, billingRoleDefinitionName, context).block(); } /** @@ -308,16 +302,14 @@ public BillingRoleDefinitionInner getByBillingAccount(String billingAccountName, * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the definition for a role on a billing account. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByBillingAccountWithResponse( - String billingAccountName, String billingRoleDefinitionName, Context context) { - return getByBillingAccountWithResponseAsync(billingAccountName, billingRoleDefinitionName, context).block(); + public BillingRoleDefinitionInner getByBillingAccount(String billingAccountName, String billingRoleDefinitionName) { + return getByBillingAccountWithResponse(billingAccountName, billingRoleDefinitionName, Context.NONE).getValue(); } /** @@ -331,7 +323,8 @@ public Response getByBillingAccountWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the definition for a role on an invoice section. + * @return the definition for a role on an invoice section along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByInvoiceSectionWithResponseAsync( @@ -393,7 +386,8 @@ private Mono> getByInvoiceSectionWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the definition for a role on an invoice section. + * @return the definition for a role on an invoice section along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByInvoiceSectionWithResponseAsync( @@ -452,7 +446,7 @@ private Mono> getByInvoiceSectionWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the definition for a role on an invoice section. + * @return the definition for a role on an invoice section on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByInvoiceSectionAsync( @@ -462,14 +456,7 @@ private Mono getByInvoiceSectionAsync( String billingRoleDefinitionName) { return getByInvoiceSectionWithResponseAsync( billingAccountName, billingProfileName, invoiceSectionName, billingRoleDefinitionName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -480,19 +467,21 @@ private Mono getByInvoiceSectionAsync( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the definition for a role on an invoice section. + * @return the definition for a role on an invoice section along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BillingRoleDefinitionInner getByInvoiceSection( + public Response getByInvoiceSectionWithResponse( String billingAccountName, String billingProfileName, String invoiceSectionName, - String billingRoleDefinitionName) { - return getByInvoiceSectionAsync( - billingAccountName, billingProfileName, invoiceSectionName, billingRoleDefinitionName) + String billingRoleDefinitionName, + Context context) { + return getByInvoiceSectionWithResponseAsync( + billingAccountName, billingProfileName, invoiceSectionName, billingRoleDefinitionName, context) .block(); } @@ -504,22 +493,20 @@ public BillingRoleDefinitionInner getByInvoiceSection( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the definition for a role on an invoice section. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByInvoiceSectionWithResponse( + public BillingRoleDefinitionInner getByInvoiceSection( String billingAccountName, String billingProfileName, String invoiceSectionName, - String billingRoleDefinitionName, - Context context) { - return getByInvoiceSectionWithResponseAsync( - billingAccountName, billingProfileName, invoiceSectionName, billingRoleDefinitionName, context) - .block(); + String billingRoleDefinitionName) { + return getByInvoiceSectionWithResponse( + billingAccountName, billingProfileName, invoiceSectionName, billingRoleDefinitionName, Context.NONE) + .getValue(); } /** @@ -532,7 +519,8 @@ public Response getByInvoiceSectionWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the definition for a role on a billing profile. + * @return the definition for a role on a billing profile along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByBillingProfileWithResponseAsync( @@ -585,7 +573,8 @@ private Mono> getByBillingProfileWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the definition for a role on a billing profile. + * @return the definition for a role on a billing profile along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByBillingProfileWithResponseAsync( @@ -634,20 +623,13 @@ private Mono> getByBillingProfileWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the definition for a role on a billing profile. + * @return the definition for a role on a billing profile on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByBillingProfileAsync( String billingAccountName, String billingProfileName, String billingRoleDefinitionName) { return getByBillingProfileWithResponseAsync(billingAccountName, billingProfileName, billingRoleDefinitionName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -657,15 +639,18 @@ private Mono getByBillingProfileAsync( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the definition for a role on a billing profile. + * @return the definition for a role on a billing profile along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BillingRoleDefinitionInner getByBillingProfile( - String billingAccountName, String billingProfileName, String billingRoleDefinitionName) { - return getByBillingProfileAsync(billingAccountName, billingProfileName, billingRoleDefinitionName).block(); + public Response getByBillingProfileWithResponse( + String billingAccountName, String billingProfileName, String billingRoleDefinitionName, Context context) { + return getByBillingProfileWithResponseAsync( + billingAccountName, billingProfileName, billingRoleDefinitionName, context) + .block(); } /** @@ -675,18 +660,17 @@ public BillingRoleDefinitionInner getByBillingProfile( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the definition for a role on a billing profile. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByBillingProfileWithResponse( - String billingAccountName, String billingProfileName, String billingRoleDefinitionName, Context context) { - return getByBillingProfileWithResponseAsync( - billingAccountName, billingProfileName, billingRoleDefinitionName, context) - .block(); + public BillingRoleDefinitionInner getByBillingProfile( + String billingAccountName, String billingProfileName, String billingRoleDefinitionName) { + return getByBillingProfileWithResponse( + billingAccountName, billingProfileName, billingRoleDefinitionName, Context.NONE) + .getValue(); } /** @@ -697,7 +681,7 @@ public Response getByBillingProfileWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -741,7 +725,7 @@ private Mono> listByBillingAccountSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -780,7 +764,7 @@ private Mono> listByBillingAccountSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync(String billingAccountName) { @@ -798,7 +782,7 @@ private PagedFlux listByBillingAccountAsync(String b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync( @@ -816,7 +800,7 @@ private PagedFlux listByBillingAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount(String billingAccountName) { @@ -832,7 +816,7 @@ public PagedIterable listByBillingAccount(String bil * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount(String billingAccountName, Context context) { @@ -849,7 +833,7 @@ public PagedIterable listByBillingAccount(String bil * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionSinglePageAsync( @@ -909,7 +893,7 @@ private Mono> listByInvoiceSectionSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionSinglePageAsync( @@ -965,7 +949,7 @@ private Mono> listByInvoiceSectionSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByInvoiceSectionAsync( @@ -986,7 +970,7 @@ private PagedFlux listByInvoiceSectionAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByInvoiceSectionAsync( @@ -1008,7 +992,7 @@ private PagedFlux listByInvoiceSectionAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByInvoiceSection( @@ -1028,7 +1012,7 @@ public PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByInvoiceSection( @@ -1046,7 +1030,7 @@ public PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -1100,7 +1084,7 @@ private Mono> listByBillingProfileSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -1145,7 +1129,7 @@ private Mono> listByBillingProfileSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -1165,7 +1149,7 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -1184,7 +1168,7 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -1202,7 +1186,7 @@ public PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -1213,11 +1197,12 @@ public PagedIterable listByBillingProfile( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync(String nextLink) { @@ -1249,12 +1234,13 @@ private Mono> listByBillingAccountNext /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync( @@ -1286,11 +1272,12 @@ private Mono> listByBillingAccountNext /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionNextSinglePageAsync(String nextLink) { @@ -1322,12 +1309,13 @@ private Mono> listByInvoiceSectionNext /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionNextSinglePageAsync( @@ -1359,11 +1347,12 @@ private Mono> listByInvoiceSectionNext /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync(String nextLink) { @@ -1395,12 +1384,13 @@ private Mono> listByBillingProfileNext /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of role definitions. + * @return the list of role definitions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingRoleDefinitionsImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingRoleDefinitionsImpl.java index 04e129c7d9b6..25e916f4eedb 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingRoleDefinitionsImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingRoleDefinitionsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.billing.fluent.models.BillingRoleDefinitionInner; import com.azure.resourcemanager.billing.models.BillingRoleDefinition; import com.azure.resourcemanager.billing.models.BillingRoleDefinitions; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class BillingRoleDefinitionsImpl implements BillingRoleDefinitions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingRoleDefinitionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BillingRoleDefinitionsImpl.class); private final BillingRoleDefinitionsClient innerClient; @@ -28,16 +27,6 @@ public BillingRoleDefinitionsImpl( this.serviceManager = serviceManager; } - public BillingRoleDefinition getByBillingAccount(String billingAccountName, String billingRoleDefinitionName) { - BillingRoleDefinitionInner inner = - this.serviceClient().getByBillingAccount(billingAccountName, billingRoleDefinitionName); - if (inner != null) { - return new BillingRoleDefinitionImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByBillingAccountWithResponse( String billingAccountName, String billingRoleDefinitionName, Context context) { Response inner = @@ -55,16 +44,9 @@ public Response getByBillingAccountWithResponse( } } - public BillingRoleDefinition getByInvoiceSection( - String billingAccountName, - String billingProfileName, - String invoiceSectionName, - String billingRoleDefinitionName) { + public BillingRoleDefinition getByBillingAccount(String billingAccountName, String billingRoleDefinitionName) { BillingRoleDefinitionInner inner = - this - .serviceClient() - .getByInvoiceSection( - billingAccountName, billingProfileName, invoiceSectionName, billingRoleDefinitionName); + this.serviceClient().getByBillingAccount(billingAccountName, billingRoleDefinitionName); if (inner != null) { return new BillingRoleDefinitionImpl(inner, this.manager()); } else { @@ -94,10 +76,16 @@ public Response getByInvoiceSectionWithResponse( } } - public BillingRoleDefinition getByBillingProfile( - String billingAccountName, String billingProfileName, String billingRoleDefinitionName) { + public BillingRoleDefinition getByInvoiceSection( + String billingAccountName, + String billingProfileName, + String invoiceSectionName, + String billingRoleDefinitionName) { BillingRoleDefinitionInner inner = - this.serviceClient().getByBillingProfile(billingAccountName, billingProfileName, billingRoleDefinitionName); + this + .serviceClient() + .getByInvoiceSection( + billingAccountName, billingProfileName, invoiceSectionName, billingRoleDefinitionName); if (inner != null) { return new BillingRoleDefinitionImpl(inner, this.manager()); } else { @@ -123,6 +111,17 @@ public Response getByBillingProfileWithResponse( } } + public BillingRoleDefinition getByBillingProfile( + String billingAccountName, String billingProfileName, String billingRoleDefinitionName) { + BillingRoleDefinitionInner inner = + this.serviceClient().getByBillingProfile(billingAccountName, billingProfileName, billingRoleDefinitionName); + if (inner != null) { + return new BillingRoleDefinitionImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable listByBillingAccount(String billingAccountName) { PagedIterable inner = this.serviceClient().listByBillingAccount(billingAccountName); return Utils.mapPage(inner, inner1 -> new BillingRoleDefinitionImpl(inner1, this.manager())); diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingSubscriptionsClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingSubscriptionsClientImpl.java index 93a193a3e84f..b17b713ad4ae 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingSubscriptionsClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingSubscriptionsClientImpl.java @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.billing.fluent.BillingSubscriptionsClient; @@ -43,8 +42,6 @@ /** An instance of this class provides access to all the operations defined in BillingSubscriptionsClient. */ public final class BillingSubscriptionsClientImpl implements BillingSubscriptionsClient { - private final ClientLogger logger = new ClientLogger(BillingSubscriptionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final BillingSubscriptionsService service; @@ -230,7 +227,8 @@ Mono> listByInvoiceSectionNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCustomerSinglePageAsync( @@ -278,7 +276,8 @@ private Mono> listByCustomerSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCustomerSinglePageAsync( @@ -321,7 +320,7 @@ private Mono> listByCustomerSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByCustomerAsync(String billingAccountName, String customerName) { @@ -340,7 +339,7 @@ private PagedFlux listByCustomerAsync(String billingAc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByCustomerAsync( @@ -359,7 +358,7 @@ private PagedFlux listByCustomerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByCustomer(String billingAccountName, String customerName) { @@ -376,7 +375,7 @@ public PagedIterable listByCustomer(String billingAcco * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByCustomer( @@ -392,7 +391,8 @@ public PagedIterable listByCustomer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -436,7 +436,8 @@ private Mono> listByBillingAccountSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -475,7 +476,7 @@ private Mono> listByBillingAccountSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync(String billingAccountName) { @@ -493,7 +494,7 @@ private PagedFlux listByBillingAccountAsync(String bil * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync(String billingAccountName, Context context) { @@ -510,7 +511,7 @@ private PagedFlux listByBillingAccountAsync(String bil * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount(String billingAccountName) { @@ -526,7 +527,7 @@ public PagedIterable listByBillingAccount(String billi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount(String billingAccountName, Context context) { @@ -542,7 +543,8 @@ public PagedIterable listByBillingAccount(String billi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -596,7 +598,8 @@ private Mono> listByBillingProfileSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -641,7 +644,7 @@ private Mono> listByBillingProfileSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -661,7 +664,7 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -680,7 +683,7 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -698,7 +701,7 @@ public PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -716,7 +719,8 @@ public PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionSinglePageAsync( @@ -776,7 +780,8 @@ private Mono> listByInvoiceSectionSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionSinglePageAsync( @@ -832,7 +837,7 @@ private Mono> listByInvoiceSectionSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByInvoiceSectionAsync( @@ -853,7 +858,7 @@ private PagedFlux listByInvoiceSectionAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByInvoiceSectionAsync( @@ -875,7 +880,7 @@ private PagedFlux listByInvoiceSectionAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByInvoiceSection( @@ -895,7 +900,7 @@ public PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByInvoiceSection( @@ -912,7 +917,7 @@ public PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a subscription by its ID. + * @return a subscription by its ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String billingAccountName) { @@ -957,7 +962,7 @@ private Mono> getWithResponseAsync(String bil * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a subscription by its ID. + * @return a subscription by its ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String billingAccountName, Context context) { @@ -998,19 +1003,11 @@ private Mono> getWithResponseAsync(String bil * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a subscription by its ID. + * @return a subscription by its ID on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String billingAccountName) { - return getWithResponseAsync(billingAccountName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync(billingAccountName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1018,14 +1015,15 @@ private Mono getAsync(String billingAccountName) { * Customer Agreement and Microsoft Partner Agreement. * * @param billingAccountName The ID that uniquely identifies a billing account. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a subscription by its ID. + * @return a subscription by its ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BillingSubscriptionInner get(String billingAccountName) { - return getAsync(billingAccountName).block(); + public Response getWithResponse(String billingAccountName, Context context) { + return getWithResponseAsync(billingAccountName, context).block(); } /** @@ -1033,15 +1031,14 @@ public BillingSubscriptionInner get(String billingAccountName) { * Customer Agreement and Microsoft Partner Agreement. * * @param billingAccountName The ID that uniquely identifies a billing account. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a subscription by its ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String billingAccountName, Context context) { - return getWithResponseAsync(billingAccountName, context).block(); + public BillingSubscriptionInner get(String billingAccountName) { + return getWithResponse(billingAccountName, Context.NONE).getValue(); } /** @@ -1053,7 +1050,7 @@ public Response getWithResponse(String billingAccountN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing subscription. + * @return a billing subscription along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1106,7 +1103,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing subscription. + * @return a billing subscription along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1155,19 +1152,11 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing subscription. + * @return a billing subscription on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String billingAccountName, BillingSubscriptionInner parameters) { - return updateWithResponseAsync(billingAccountName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return updateWithResponseAsync(billingAccountName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1176,14 +1165,16 @@ private Mono updateAsync(String billingAccountName, Bi * * @param billingAccountName The ID that uniquely identifies a billing account. * @param parameters Request parameters that are provided to the update billing subscription operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing subscription. + * @return a billing subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BillingSubscriptionInner update(String billingAccountName, BillingSubscriptionInner parameters) { - return updateAsync(billingAccountName, parameters).block(); + public Response updateWithResponse( + String billingAccountName, BillingSubscriptionInner parameters, Context context) { + return updateWithResponseAsync(billingAccountName, parameters, context).block(); } /** @@ -1192,16 +1183,14 @@ public BillingSubscriptionInner update(String billingAccountName, BillingSubscri * * @param billingAccountName The ID that uniquely identifies a billing account. * @param parameters Request parameters that are provided to the update billing subscription operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a billing subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String billingAccountName, BillingSubscriptionInner parameters, Context context) { - return updateWithResponseAsync(billingAccountName, parameters, context).block(); + public BillingSubscriptionInner update(String billingAccountName, BillingSubscriptionInner parameters) { + return updateWithResponse(billingAccountName, parameters, Context.NONE).getValue(); } /** @@ -1214,7 +1203,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing subscription. + * @return a billing subscription along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> moveWithResponseAsync( @@ -1268,7 +1257,7 @@ private Mono>> moveWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing subscription. + * @return a billing subscription along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> moveWithResponseAsync( @@ -1318,7 +1307,7 @@ private Mono>> moveWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing subscription. + * @return the {@link PollerFlux} for polling of a billing subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BillingSubscriptionInner> beginMoveAsync( @@ -1331,7 +1320,7 @@ private PollerFlux, BillingSubscriptionInne this.client.getHttpPipeline(), BillingSubscriptionInner.class, BillingSubscriptionInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1345,7 +1334,7 @@ private PollerFlux, BillingSubscriptionInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing subscription. + * @return the {@link PollerFlux} for polling of a billing subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BillingSubscriptionInner> beginMoveAsync( @@ -1372,7 +1361,7 @@ private PollerFlux, BillingSubscriptionInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing subscription. + * @return the {@link SyncPoller} for polling of a billing subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BillingSubscriptionInner> beginMove( @@ -1391,7 +1380,7 @@ public SyncPoller, BillingSubscriptionInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing subscription. + * @return the {@link SyncPoller} for polling of a billing subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BillingSubscriptionInner> beginMove( @@ -1409,7 +1398,7 @@ public SyncPoller, BillingSubscriptionInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing subscription. + * @return a billing subscription on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono moveAsync( @@ -1428,7 +1417,7 @@ private Mono moveAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing subscription. + * @return a billing subscription on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono moveAsync( @@ -1484,7 +1473,8 @@ public BillingSubscriptionInner move( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the transfer eligibility validation. + * @return result of the transfer eligibility validation along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> validateMoveWithResponseAsync( @@ -1537,7 +1527,8 @@ private Mono> valid * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the transfer eligibility validation. + * @return result of the transfer eligibility validation along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> validateMoveWithResponseAsync( @@ -1586,20 +1577,13 @@ private Mono> valid * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the transfer eligibility validation. + * @return result of the transfer eligibility validation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateMoveAsync( String billingAccountName, TransferBillingSubscriptionRequestProperties parameters) { return validateMoveWithResponseAsync(billingAccountName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1608,15 +1592,16 @@ private Mono validateMoveAsy * * @param billingAccountName The ID that uniquely identifies a billing account. * @param parameters Request parameters that are provided to the validate move eligibility operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the transfer eligibility validation. + * @return result of the transfer eligibility validation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ValidateSubscriptionTransferEligibilityResultInner validateMove( - String billingAccountName, TransferBillingSubscriptionRequestProperties parameters) { - return validateMoveAsync(billingAccountName, parameters).block(); + public Response validateMoveWithResponse( + String billingAccountName, TransferBillingSubscriptionRequestProperties parameters, Context context) { + return validateMoveWithResponseAsync(billingAccountName, parameters, context).block(); } /** @@ -1625,26 +1610,27 @@ public ValidateSubscriptionTransferEligibilityResultInner validateMove( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param parameters Request parameters that are provided to the validate move eligibility operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the transfer eligibility validation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response validateMoveWithResponse( - String billingAccountName, TransferBillingSubscriptionRequestProperties parameters, Context context) { - return validateMoveWithResponseAsync(billingAccountName, parameters, context).block(); + public ValidateSubscriptionTransferEligibilityResultInner validateMove( + String billingAccountName, TransferBillingSubscriptionRequestProperties parameters) { + return validateMoveWithResponse(billingAccountName, parameters, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCustomerNextSinglePageAsync(String nextLink) { @@ -1675,12 +1661,14 @@ private Mono> listByCustomerNextSinglePa /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCustomerNextSinglePageAsync( @@ -1712,11 +1700,13 @@ private Mono> listByCustomerNextSinglePa /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync(String nextLink) { @@ -1748,12 +1738,14 @@ private Mono> listByBillingAccountNextSi /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync( @@ -1785,11 +1777,13 @@ private Mono> listByBillingAccountNextSi /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync(String nextLink) { @@ -1821,12 +1815,14 @@ private Mono> listByBillingProfileNextSi /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync( @@ -1858,11 +1854,13 @@ private Mono> listByBillingProfileNextSi /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionNextSinglePageAsync(String nextLink) { @@ -1894,12 +1892,14 @@ private Mono> listByInvoiceSectionNextSi /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionNextSinglePageAsync( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingSubscriptionsImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingSubscriptionsImpl.java index 27b5d567d52b..2594b8c47e86 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingSubscriptionsImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingSubscriptionsImpl.java @@ -16,10 +16,9 @@ import com.azure.resourcemanager.billing.models.BillingSubscriptions; import com.azure.resourcemanager.billing.models.TransferBillingSubscriptionRequestProperties; import com.azure.resourcemanager.billing.models.ValidateSubscriptionTransferEligibilityResult; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class BillingSubscriptionsImpl implements BillingSubscriptions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingSubscriptionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BillingSubscriptionsImpl.class); private final BillingSubscriptionsClient innerClient; @@ -85,15 +84,6 @@ public PagedIterable listByInvoiceSection( return Utils.mapPage(inner, inner1 -> new BillingSubscriptionImpl(inner1, this.manager())); } - public BillingSubscription get(String billingAccountName) { - BillingSubscriptionInner inner = this.serviceClient().get(billingAccountName); - if (inner != null) { - return new BillingSubscriptionImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String billingAccountName, Context context) { Response inner = this.serviceClient().getWithResponse(billingAccountName, context); if (inner != null) { @@ -107,8 +97,8 @@ public Response getWithResponse(String billingAccountName, } } - public BillingSubscription update(String billingAccountName, BillingSubscriptionInner parameters) { - BillingSubscriptionInner inner = this.serviceClient().update(billingAccountName, parameters); + public BillingSubscription get(String billingAccountName) { + BillingSubscriptionInner inner = this.serviceClient().get(billingAccountName); if (inner != null) { return new BillingSubscriptionImpl(inner, this.manager()); } else { @@ -131,9 +121,8 @@ public Response updateWithResponse( } } - public BillingSubscription move( - String billingAccountName, TransferBillingSubscriptionRequestProperties parameters) { - BillingSubscriptionInner inner = this.serviceClient().move(billingAccountName, parameters); + public BillingSubscription update(String billingAccountName, BillingSubscriptionInner parameters) { + BillingSubscriptionInner inner = this.serviceClient().update(billingAccountName, parameters); if (inner != null) { return new BillingSubscriptionImpl(inner, this.manager()); } else { @@ -142,8 +131,8 @@ public BillingSubscription move( } public BillingSubscription move( - String billingAccountName, TransferBillingSubscriptionRequestProperties parameters, Context context) { - BillingSubscriptionInner inner = this.serviceClient().move(billingAccountName, parameters, context); + String billingAccountName, TransferBillingSubscriptionRequestProperties parameters) { + BillingSubscriptionInner inner = this.serviceClient().move(billingAccountName, parameters); if (inner != null) { return new BillingSubscriptionImpl(inner, this.manager()); } else { @@ -151,12 +140,11 @@ public BillingSubscription move( } } - public ValidateSubscriptionTransferEligibilityResult validateMove( - String billingAccountName, TransferBillingSubscriptionRequestProperties parameters) { - ValidateSubscriptionTransferEligibilityResultInner inner = - this.serviceClient().validateMove(billingAccountName, parameters); + public BillingSubscription move( + String billingAccountName, TransferBillingSubscriptionRequestProperties parameters, Context context) { + BillingSubscriptionInner inner = this.serviceClient().move(billingAccountName, parameters, context); if (inner != null) { - return new ValidateSubscriptionTransferEligibilityResultImpl(inner, this.manager()); + return new BillingSubscriptionImpl(inner, this.manager()); } else { return null; } @@ -177,6 +165,17 @@ public Response validateMoveWithR } } + public ValidateSubscriptionTransferEligibilityResult validateMove( + String billingAccountName, TransferBillingSubscriptionRequestProperties parameters) { + ValidateSubscriptionTransferEligibilityResultInner inner = + this.serviceClient().validateMove(billingAccountName, parameters); + if (inner != null) { + return new ValidateSubscriptionTransferEligibilityResultImpl(inner, this.manager()); + } else { + return null; + } + } + private BillingSubscriptionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/CustomersClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/CustomersClientImpl.java index 970999ba3929..f039b43e8f40 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/CustomersClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/CustomersClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.CustomersClient; import com.azure.resourcemanager.billing.fluent.models.CustomerInner; import com.azure.resourcemanager.billing.models.CustomerListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in CustomersClient. */ public final class CustomersClientImpl implements CustomersClient { - private final ClientLogger logger = new ClientLogger(CustomersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final CustomersService service; @@ -134,7 +131,7 @@ Mono> listByBillingAccountNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of customers. + * @return the list of customers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -193,7 +190,7 @@ private Mono> listByBillingProfileSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of customers. + * @return the list of customers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -248,7 +245,7 @@ private Mono> listByBillingProfileSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of customers. + * @return the list of customers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -267,7 +264,7 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of customers. + * @return the list of customers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync(String billingAccountName, String billingProfileName) { @@ -291,7 +288,7 @@ private PagedFlux listByBillingProfileAsync(String billingAccount * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of customers. + * @return the list of customers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -310,7 +307,7 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of customers. + * @return the list of customers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName) { @@ -332,7 +329,7 @@ public PagedIterable listByBillingProfile(String billingAccountNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of customers. + * @return the list of customers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -352,7 +349,7 @@ public PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of customers. + * @return the list of customers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -399,7 +396,7 @@ private Mono> listByBillingAccountSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of customers. + * @return the list of customers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -442,7 +439,7 @@ private Mono> listByBillingAccountSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of customers. + * @return the list of customers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync( @@ -460,7 +457,7 @@ private PagedFlux listByBillingAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of customers. + * @return the list of customers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync(String billingAccountName) { @@ -483,7 +480,7 @@ private PagedFlux listByBillingAccountAsync(String billingAccount * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of customers. + * @return the list of customers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync( @@ -501,7 +498,7 @@ private PagedFlux listByBillingAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of customers. + * @return the list of customers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount(String billingAccountName) { @@ -522,7 +519,7 @@ public PagedIterable listByBillingAccount(String billingAccountNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of customers. + * @return the list of customers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount( @@ -540,7 +537,7 @@ public PagedIterable listByBillingAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a customer by its ID. + * @return a customer by its ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -586,7 +583,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a customer by its ID. + * @return a customer by its ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -617,48 +614,16 @@ private Mono> getWithResponseAsync( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. - * @param expand May be used to expand enabledAzurePlans and resellers. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a customer by its ID. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String billingAccountName, String customerName, String expand) { - return getWithResponseAsync(billingAccountName, customerName, expand) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets a customer by its ID. The operation is supported only for billing accounts with agreement type Microsoft - * Partner Agreement. - * - * @param billingAccountName The ID that uniquely identifies a billing account. - * @param customerName The ID that uniquely identifies a customer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a customer by its ID. + * @return a customer by its ID on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String billingAccountName, String customerName) { final String expand = null; return getWithResponseAsync(billingAccountName, customerName, expand) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -667,15 +632,17 @@ private Mono getAsync(String billingAccountName, String customerN * * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. + * @param expand May be used to expand enabledAzurePlans and resellers. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a customer by its ID. + * @return a customer by its ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CustomerInner get(String billingAccountName, String customerName) { - final String expand = null; - return getAsync(billingAccountName, customerName, expand).block(); + public Response getWithResponse( + String billingAccountName, String customerName, String expand, Context context) { + return getWithResponseAsync(billingAccountName, customerName, expand, context).block(); } /** @@ -684,27 +651,26 @@ public CustomerInner get(String billingAccountName, String customerName) { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. - * @param expand May be used to expand enabledAzurePlans and resellers. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a customer by its ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String billingAccountName, String customerName, String expand, Context context) { - return getWithResponseAsync(billingAccountName, customerName, expand, context).block(); + public CustomerInner get(String billingAccountName, String customerName) { + final String expand = null; + return getWithResponse(billingAccountName, customerName, expand, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of customers. + * @return the list of customers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync(String nextLink) { @@ -736,12 +702,13 @@ private Mono> listByBillingProfileNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of customers. + * @return the list of customers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync( @@ -773,11 +740,12 @@ private Mono> listByBillingProfileNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of customers. + * @return the list of customers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync(String nextLink) { @@ -809,12 +777,13 @@ private Mono> listByBillingAccountNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of customers. + * @return the list of customers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/CustomersImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/CustomersImpl.java index 4bdc72997dde..eff4e8a23c29 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/CustomersImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/CustomersImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.billing.fluent.models.CustomerInner; import com.azure.resourcemanager.billing.models.Customer; import com.azure.resourcemanager.billing.models.Customers; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class CustomersImpl implements Customers { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(CustomersImpl.class); private final CustomersClient innerClient; @@ -52,15 +51,6 @@ public PagedIterable listByBillingAccount( return Utils.mapPage(inner, inner1 -> new CustomerImpl(inner1, this.manager())); } - public Customer get(String billingAccountName, String customerName) { - CustomerInner inner = this.serviceClient().get(billingAccountName, customerName); - if (inner != null) { - return new CustomerImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String billingAccountName, String customerName, String expand, Context context) { Response inner = @@ -76,6 +66,15 @@ public Response getWithResponse( } } + public Customer get(String billingAccountName, String customerName) { + CustomerInner inner = this.serviceClient().get(billingAccountName, customerName); + if (inner != null) { + return new CustomerImpl(inner, this.manager()); + } else { + return null; + } + } + private CustomersClient serviceClient() { return this.innerClient; } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/EnrollmentAccountsClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/EnrollmentAccountsClientImpl.java index 4239f5be7586..f7cadd2eb695 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/EnrollmentAccountsClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/EnrollmentAccountsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.EnrollmentAccountsClient; import com.azure.resourcemanager.billing.fluent.models.EnrollmentAccountSummaryInner; import com.azure.resourcemanager.billing.models.EnrollmentAccountListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in EnrollmentAccountsClient. */ public final class EnrollmentAccountsClientImpl implements EnrollmentAccountsClient { - private final ClientLogger logger = new ClientLogger(EnrollmentAccountsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final EnrollmentAccountsService service; @@ -96,7 +93,8 @@ Mono> listNext( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing enrollment accounts. + * @return result of listing enrollment accounts along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -129,7 +127,8 @@ private Mono> listSinglePageAsync() * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing enrollment accounts. + * @return result of listing enrollment accounts along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -160,7 +159,7 @@ private Mono> listSinglePageAsync(C * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing enrollment accounts. + * @return result of listing enrollment accounts as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -174,7 +173,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing enrollment accounts. + * @return result of listing enrollment accounts as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -187,7 +186,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing enrollment accounts. + * @return result of listing enrollment accounts as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -201,7 +200,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing enrollment accounts. + * @return result of listing enrollment accounts as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -215,7 +214,7 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a enrollment account by name. + * @return a enrollment account by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String name) { @@ -243,7 +242,7 @@ private Mono> getWithResponseAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a enrollment account by name. + * @return a enrollment account by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String name, Context context) { @@ -269,58 +268,52 @@ private Mono> getWithResponseAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a enrollment account by name. + * @return a enrollment account by name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String name) { - return getWithResponseAsync(name) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync(name).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a enrollment account by name. * * @param name Enrollment Account name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a enrollment account by name. + * @return a enrollment account by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EnrollmentAccountSummaryInner get(String name) { - return getAsync(name).block(); + public Response getWithResponse(String name, Context context) { + return getWithResponseAsync(name, context).block(); } /** * Gets a enrollment account by name. * * @param name Enrollment Account name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a enrollment account by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String name, Context context) { - return getWithResponseAsync(name, context).block(); + public EnrollmentAccountSummaryInner get(String name) { + return getWithResponse(name, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing enrollment accounts. + * @return result of listing enrollment accounts along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -351,12 +344,14 @@ private Mono> listNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing enrollment accounts. + * @return result of listing enrollment accounts along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/EnrollmentAccountsImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/EnrollmentAccountsImpl.java index f30584f5519e..f0d85d2464f8 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/EnrollmentAccountsImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/EnrollmentAccountsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.billing.fluent.models.EnrollmentAccountSummaryInner; import com.azure.resourcemanager.billing.models.EnrollmentAccountSummary; import com.azure.resourcemanager.billing.models.EnrollmentAccounts; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class EnrollmentAccountsImpl implements EnrollmentAccounts { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnrollmentAccountsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(EnrollmentAccountsImpl.class); private final EnrollmentAccountsClient innerClient; @@ -38,15 +37,6 @@ public PagedIterable list(Context context) { return Utils.mapPage(inner, inner1 -> new EnrollmentAccountSummaryImpl(inner1, this.manager())); } - public EnrollmentAccountSummary get(String name) { - EnrollmentAccountSummaryInner inner = this.serviceClient().get(name); - if (inner != null) { - return new EnrollmentAccountSummaryImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String name, Context context) { Response inner = this.serviceClient().getWithResponse(name, context); if (inner != null) { @@ -60,6 +50,15 @@ public Response getWithResponse(String name, Context c } } + public EnrollmentAccountSummary get(String name) { + EnrollmentAccountSummaryInner inner = this.serviceClient().get(name); + if (inner != null) { + return new EnrollmentAccountSummaryImpl(inner, this.manager()); + } else { + return null; + } + } + private EnrollmentAccountsClient serviceClient() { return this.innerClient; } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InstructionsClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InstructionsClientImpl.java index f80d1a0aac5e..dd6117f73543 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InstructionsClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InstructionsClientImpl.java @@ -27,7 +27,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.InstructionsClient; import com.azure.resourcemanager.billing.fluent.models.InstructionInner; import com.azure.resourcemanager.billing.models.InstructionListResult; @@ -35,8 +34,6 @@ /** An instance of this class provides access to all the operations defined in InstructionsClient. */ public final class InstructionsClientImpl implements InstructionsClient { - private final ClientLogger logger = new ClientLogger(InstructionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final InstructionsService service; @@ -125,7 +122,8 @@ Mono> listByBillingProfileNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing instructions used during invoice generation. + * @return the list of billing instructions used during invoice generation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -178,7 +176,8 @@ private Mono> listByBillingProfileSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing instructions used during invoice generation. + * @return the list of billing instructions used during invoice generation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -222,7 +221,8 @@ private Mono> listByBillingProfileSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing instructions used during invoice generation. + * @return the list of billing instructions used during invoice generation as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -241,7 +241,8 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing instructions used during invoice generation. + * @return the list of billing instructions used during invoice generation as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -259,7 +260,8 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing instructions used during invoice generation. + * @return the list of billing instructions used during invoice generation as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName) { @@ -275,7 +277,8 @@ public PagedIterable listByBillingProfile(String billingAccoun * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing instructions used during invoice generation. + * @return the list of billing instructions used during invoice generation as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -292,7 +295,7 @@ public PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the instruction by name. + * @return the instruction by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -342,7 +345,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the instruction by name. + * @return the instruction by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -388,20 +391,13 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the instruction by name. + * @return the instruction by name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String billingAccountName, String billingProfileName, String instructionName) { return getWithResponseAsync(billingAccountName, billingProfileName, instructionName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -410,14 +406,16 @@ private Mono getAsync( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param instructionName Instruction Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the instruction by name. + * @return the instruction by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InstructionInner get(String billingAccountName, String billingProfileName, String instructionName) { - return getAsync(billingAccountName, billingProfileName, instructionName).block(); + public Response getWithResponse( + String billingAccountName, String billingProfileName, String instructionName, Context context) { + return getWithResponseAsync(billingAccountName, billingProfileName, instructionName, context).block(); } /** @@ -426,16 +424,14 @@ public InstructionInner get(String billingAccountName, String billingProfileName * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param instructionName Instruction Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the instruction by name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String billingAccountName, String billingProfileName, String instructionName, Context context) { - return getWithResponseAsync(billingAccountName, billingProfileName, instructionName, context).block(); + public InstructionInner get(String billingAccountName, String billingProfileName, String instructionName) { + return getWithResponse(billingAccountName, billingProfileName, instructionName, Context.NONE).getValue(); } /** @@ -449,7 +445,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instruction. + * @return an instruction along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> putWithResponseAsync( @@ -507,7 +503,7 @@ private Mono> putWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instruction. + * @return an instruction along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> putWithResponseAsync( @@ -565,20 +561,13 @@ private Mono> putWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instruction. + * @return an instruction on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono putAsync( String billingAccountName, String billingProfileName, String instructionName, InstructionInner parameters) { return putWithResponseAsync(billingAccountName, billingProfileName, instructionName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -589,15 +578,21 @@ private Mono putAsync( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param instructionName Instruction Name. * @param parameters The new instruction. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instruction. + * @return an instruction along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InstructionInner put( - String billingAccountName, String billingProfileName, String instructionName, InstructionInner parameters) { - return putAsync(billingAccountName, billingProfileName, instructionName, parameters).block(); + public Response putWithResponse( + String billingAccountName, + String billingProfileName, + String instructionName, + InstructionInner parameters, + Context context) { + return putWithResponseAsync(billingAccountName, billingProfileName, instructionName, parameters, context) + .block(); } /** @@ -608,31 +603,28 @@ public InstructionInner put( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param instructionName Instruction Name. * @param parameters The new instruction. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an instruction. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response putWithResponse( - String billingAccountName, - String billingProfileName, - String instructionName, - InstructionInner parameters, - Context context) { - return putWithResponseAsync(billingAccountName, billingProfileName, instructionName, parameters, context) - .block(); + public InstructionInner put( + String billingAccountName, String billingProfileName, String instructionName, InstructionInner parameters) { + return putWithResponse(billingAccountName, billingProfileName, instructionName, parameters, Context.NONE) + .getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing instructions used during invoice generation. + * @return the list of billing instructions used during invoice generation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync(String nextLink) { @@ -664,12 +656,14 @@ private Mono> listByBillingProfileNextSinglePage /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing instructions used during invoice generation. + * @return the list of billing instructions used during invoice generation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InstructionsImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InstructionsImpl.java index b41a5b565c99..99411de77018 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InstructionsImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InstructionsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.billing.fluent.models.InstructionInner; import com.azure.resourcemanager.billing.models.Instruction; import com.azure.resourcemanager.billing.models.Instructions; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class InstructionsImpl implements Instructions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InstructionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(InstructionsImpl.class); private final InstructionsClient innerClient; @@ -41,15 +40,6 @@ public PagedIterable listByBillingProfile( return Utils.mapPage(inner, inner1 -> new InstructionImpl(inner1, this.manager())); } - public Instruction get(String billingAccountName, String billingProfileName, String instructionName) { - InstructionInner inner = this.serviceClient().get(billingAccountName, billingProfileName, instructionName); - if (inner != null) { - return new InstructionImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String billingAccountName, String billingProfileName, String instructionName, Context context) { Response inner = @@ -65,10 +55,8 @@ public Response getWithResponse( } } - public Instruction put( - String billingAccountName, String billingProfileName, String instructionName, InstructionInner parameters) { - InstructionInner inner = - this.serviceClient().put(billingAccountName, billingProfileName, instructionName, parameters); + public Instruction get(String billingAccountName, String billingProfileName, String instructionName) { + InstructionInner inner = this.serviceClient().get(billingAccountName, billingProfileName, instructionName); if (inner != null) { return new InstructionImpl(inner, this.manager()); } else { @@ -97,6 +85,17 @@ public Response putWithResponse( } } + public Instruction put( + String billingAccountName, String billingProfileName, String instructionName, InstructionInner parameters) { + InstructionInner inner = + this.serviceClient().put(billingAccountName, billingProfileName, instructionName, parameters); + if (inner != null) { + return new InstructionImpl(inner, this.manager()); + } else { + return null; + } + } + private InstructionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InvoiceSectionsClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InvoiceSectionsClientImpl.java index ddbcf36b8cab..41c8a3884182 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InvoiceSectionsClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InvoiceSectionsClientImpl.java @@ -28,7 +28,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.billing.fluent.InvoiceSectionsClient; @@ -40,8 +39,6 @@ /** An instance of this class provides access to all the operations defined in InvoiceSectionsClient. */ public final class InvoiceSectionsClientImpl implements InvoiceSectionsClient { - private final ClientLogger logger = new ClientLogger(InvoiceSectionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final InvoiceSectionsService service; @@ -131,7 +128,7 @@ Mono> listByBillingProfileNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoice sections. + * @return the list of invoice sections along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -185,7 +182,7 @@ private Mono> listByBillingProfileSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoice sections. + * @return the list of invoice sections along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -230,7 +227,7 @@ private Mono> listByBillingProfileSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoice sections. + * @return the list of invoice sections as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -250,7 +247,7 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoice sections. + * @return the list of invoice sections as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -269,7 +266,7 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoice sections. + * @return the list of invoice sections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -287,7 +284,7 @@ public PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoice sections. + * @return the list of invoice sections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -305,7 +302,7 @@ public PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice section by its ID. + * @return an invoice section by its ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -356,7 +353,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice section by its ID. + * @return an invoice section by its ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -403,20 +400,13 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice section by its ID. + * @return an invoice section by its ID on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String billingAccountName, String billingProfileName, String invoiceSectionName) { return getWithResponseAsync(billingAccountName, billingProfileName, invoiceSectionName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -426,14 +416,16 @@ private Mono getAsync( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice section by its ID. + * @return an invoice section by its ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InvoiceSectionInner get(String billingAccountName, String billingProfileName, String invoiceSectionName) { - return getAsync(billingAccountName, billingProfileName, invoiceSectionName).block(); + public Response getWithResponse( + String billingAccountName, String billingProfileName, String invoiceSectionName, Context context) { + return getWithResponseAsync(billingAccountName, billingProfileName, invoiceSectionName, context).block(); } /** @@ -443,16 +435,14 @@ public InvoiceSectionInner get(String billingAccountName, String billingProfileN * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an invoice section by its ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String billingAccountName, String billingProfileName, String invoiceSectionName, Context context) { - return getWithResponseAsync(billingAccountName, billingProfileName, invoiceSectionName, context).block(); + public InvoiceSectionInner get(String billingAccountName, String billingProfileName, String invoiceSectionName) { + return getWithResponse(billingAccountName, billingProfileName, invoiceSectionName, Context.NONE).getValue(); } /** @@ -466,7 +456,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice section. + * @return an invoice section along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -527,7 +517,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice section. + * @return an invoice section along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -585,7 +575,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice section. + * @return the {@link PollerFlux} for polling of an invoice section. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, InvoiceSectionInner> beginCreateOrUpdateAsync( @@ -602,7 +592,7 @@ private PollerFlux, InvoiceSectionInner> beginCr this.client.getHttpPipeline(), InvoiceSectionInner.class, InvoiceSectionInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -617,7 +607,7 @@ private PollerFlux, InvoiceSectionInner> beginCr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice section. + * @return the {@link PollerFlux} for polling of an invoice section. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, InvoiceSectionInner> beginCreateOrUpdateAsync( @@ -647,7 +637,7 @@ private PollerFlux, InvoiceSectionInner> beginCr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice section. + * @return the {@link SyncPoller} for polling of an invoice section. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InvoiceSectionInner> beginCreateOrUpdate( @@ -671,7 +661,7 @@ public SyncPoller, InvoiceSectionInner> beginCre * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice section. + * @return the {@link SyncPoller} for polling of an invoice section. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InvoiceSectionInner> beginCreateOrUpdate( @@ -695,7 +685,7 @@ public SyncPoller, InvoiceSectionInner> beginCre * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice section. + * @return an invoice section on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -720,7 +710,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice section. + * @return an invoice section on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -784,11 +774,12 @@ public InvoiceSectionInner createOrUpdate( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoice sections. + * @return the list of invoice sections along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync(String nextLink) { @@ -820,12 +811,13 @@ private Mono> listByBillingProfileNextSingleP /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoice sections. + * @return the list of invoice sections along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InvoiceSectionsImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InvoiceSectionsImpl.java index 1552947cbe8d..0174539a0144 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InvoiceSectionsImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InvoiceSectionsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.billing.fluent.models.InvoiceSectionInner; import com.azure.resourcemanager.billing.models.InvoiceSection; import com.azure.resourcemanager.billing.models.InvoiceSections; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class InvoiceSectionsImpl implements InvoiceSections { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InvoiceSectionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(InvoiceSectionsImpl.class); private final InvoiceSectionsClient innerClient; @@ -41,16 +40,6 @@ public PagedIterable listByBillingProfile( return Utils.mapPage(inner, inner1 -> new InvoiceSectionImpl(inner1, this.manager())); } - public InvoiceSection get(String billingAccountName, String billingProfileName, String invoiceSectionName) { - InvoiceSectionInner inner = - this.serviceClient().get(billingAccountName, billingProfileName, invoiceSectionName); - if (inner != null) { - return new InvoiceSectionImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String billingAccountName, String billingProfileName, String invoiceSectionName, Context context) { Response inner = @@ -66,6 +55,16 @@ public Response getWithResponse( } } + public InvoiceSection get(String billingAccountName, String billingProfileName, String invoiceSectionName) { + InvoiceSectionInner inner = + this.serviceClient().get(billingAccountName, billingProfileName, invoiceSectionName); + if (inner != null) { + return new InvoiceSectionImpl(inner, this.manager()); + } else { + return null; + } + } + public InvoiceSection createOrUpdate( String billingAccountName, String billingProfileName, diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InvoicesClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InvoicesClientImpl.java index 3580b77b2e36..87607daf4579 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InvoicesClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InvoicesClientImpl.java @@ -28,7 +28,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.billing.fluent.InvoicesClient; @@ -42,8 +41,6 @@ /** An instance of this class provides access to all the operations defined in InvoicesClient. */ public final class InvoicesClientImpl implements InvoicesClient { - private final ClientLogger logger = new ClientLogger(InvoicesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final InvoicesService service; @@ -241,7 +238,7 @@ Mono> listByBillingSubscriptionNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -300,7 +297,7 @@ private Mono> listByBillingAccountSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -355,7 +352,7 @@ private Mono> listByBillingAccountSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync( @@ -376,7 +373,7 @@ private PagedFlux listByBillingAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync( @@ -396,7 +393,7 @@ private PagedFlux listByBillingAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount( @@ -415,7 +412,7 @@ public PagedIterable listByBillingAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount( @@ -435,7 +432,7 @@ public PagedIterable listByBillingAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -500,7 +497,7 @@ private Mono> listByBillingProfileSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -565,7 +562,7 @@ private Mono> listByBillingProfileSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -589,7 +586,7 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -616,7 +613,7 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -637,7 +634,7 @@ public PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -659,7 +656,8 @@ public PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice by billing account name and ID. + * @return an invoice by billing account name and ID along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String billingAccountName, String invoiceName) { @@ -696,7 +694,8 @@ private Mono> getWithResponseAsync(String billingAccountN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice by billing account name and ID. + * @return an invoice by billing account name and ID along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -729,19 +728,11 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice by billing account name and ID. + * @return an invoice by billing account name and ID on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String billingAccountName, String invoiceName) { - return getWithResponseAsync(billingAccountName, invoiceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync(billingAccountName, invoiceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -750,14 +741,15 @@ private Mono getAsync(String billingAccountName, String invoiceNam * * @param billingAccountName The ID that uniquely identifies a billing account. * @param invoiceName The ID that uniquely identifies an invoice. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice by billing account name and ID. + * @return an invoice by billing account name and ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InvoiceInner get(String billingAccountName, String invoiceName) { - return getAsync(billingAccountName, invoiceName).block(); + public Response getWithResponse(String billingAccountName, String invoiceName, Context context) { + return getWithResponseAsync(billingAccountName, invoiceName, context).block(); } /** @@ -766,15 +758,14 @@ public InvoiceInner get(String billingAccountName, String invoiceName) { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param invoiceName The ID that uniquely identifies an invoice. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an invoice by billing account name and ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String billingAccountName, String invoiceName, Context context) { - return getWithResponseAsync(billingAccountName, invoiceName, context).block(); + public InvoiceInner get(String billingAccountName, String invoiceName) { + return getWithResponse(billingAccountName, invoiceName, Context.NONE).getValue(); } /** @@ -785,7 +776,7 @@ public Response getWithResponse(String billingAccountName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice by ID. + * @return an invoice by ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByIdWithResponseAsync(String invoiceName) { @@ -815,7 +806,7 @@ private Mono> getByIdWithResponseAsync(String invoiceName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice by ID. + * @return an invoice by ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByIdWithResponseAsync(String invoiceName, Context context) { @@ -842,19 +833,11 @@ private Mono> getByIdWithResponseAsync(String invoiceName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice by ID. + * @return an invoice by ID on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByIdAsync(String invoiceName) { - return getByIdWithResponseAsync(invoiceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getByIdWithResponseAsync(invoiceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -862,14 +845,15 @@ private Mono getByIdAsync(String invoiceName) { * Agreement or Microsoft Customer Agreement. * * @param invoiceName The ID that uniquely identifies an invoice. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice by ID. + * @return an invoice by ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InvoiceInner getById(String invoiceName) { - return getByIdAsync(invoiceName).block(); + public Response getByIdWithResponse(String invoiceName, Context context) { + return getByIdWithResponseAsync(invoiceName, context).block(); } /** @@ -877,15 +861,14 @@ public InvoiceInner getById(String invoiceName) { * Agreement or Microsoft Customer Agreement. * * @param invoiceName The ID that uniquely identifies an invoice. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an invoice by ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByIdWithResponse(String invoiceName, Context context) { - return getByIdWithResponseAsync(invoiceName, context).block(); + public InvoiceInner getById(String invoiceName) { + return getByIdWithResponse(invoiceName, Context.NONE).getValue(); } /** @@ -898,7 +881,7 @@ public Response getByIdWithResponse(String invoiceName, Context co * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return a URL to download an invoice along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> downloadInvoiceWithResponseAsync( @@ -947,7 +930,7 @@ private Mono>> downloadInvoiceWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return a URL to download an invoice along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> downloadInvoiceWithResponseAsync( @@ -986,7 +969,7 @@ private Mono>> downloadInvoiceWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return the {@link PollerFlux} for polling of a URL to download an invoice. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DownloadUrlInner> beginDownloadInvoiceAsync( @@ -996,7 +979,11 @@ private PollerFlux, DownloadUrlInner> beginDownload return this .client .getLroResult( - mono, this.client.getHttpPipeline(), DownloadUrlInner.class, DownloadUrlInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + DownloadUrlInner.class, + DownloadUrlInner.class, + this.client.getContext()); } /** @@ -1010,7 +997,7 @@ private PollerFlux, DownloadUrlInner> beginDownload * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return the {@link PollerFlux} for polling of a URL to download an invoice. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DownloadUrlInner> beginDownloadInvoiceAsync( @@ -1034,7 +1021,7 @@ private PollerFlux, DownloadUrlInner> beginDownload * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return the {@link SyncPoller} for polling of a URL to download an invoice. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DownloadUrlInner> beginDownloadInvoice( @@ -1053,7 +1040,7 @@ public SyncPoller, DownloadUrlInner> beginDownloadI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return the {@link SyncPoller} for polling of a URL to download an invoice. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DownloadUrlInner> beginDownloadInvoice( @@ -1071,7 +1058,7 @@ public SyncPoller, DownloadUrlInner> beginDownloadI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return a URL to download an invoice on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono downloadInvoiceAsync( @@ -1092,7 +1079,7 @@ private Mono downloadInvoiceAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return a URL to download an invoice on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono downloadInvoiceAsync( @@ -1148,7 +1135,8 @@ public DownloadUrlInner downloadInvoice( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file + * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> downloadMultipleBillingProfileInvoicesWithResponseAsync( @@ -1188,7 +1176,8 @@ private Mono>> downloadMultipleBillingProfileInvoicesW * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file + * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> downloadMultipleBillingProfileInvoicesWithResponseAsync( @@ -1224,7 +1213,8 @@ private Mono>> downloadMultipleBillingProfileInvoicesW * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return the {@link PollerFlux} for polling of a URL to download multiple invoice documents (invoice pdf, tax + * receipts, credit notes) as a zip file. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DownloadUrlInner> beginDownloadMultipleBillingProfileInvoicesAsync( @@ -1234,7 +1224,11 @@ private PollerFlux, DownloadUrlInner> beginDownload return this .client .getLroResult( - mono, this.client.getHttpPipeline(), DownloadUrlInner.class, DownloadUrlInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + DownloadUrlInner.class, + DownloadUrlInner.class, + this.client.getContext()); } /** @@ -1248,7 +1242,8 @@ private PollerFlux, DownloadUrlInner> beginDownload * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return the {@link PollerFlux} for polling of a URL to download multiple invoice documents (invoice pdf, tax + * receipts, credit notes) as a zip file. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DownloadUrlInner> beginDownloadMultipleBillingProfileInvoicesAsync( @@ -1272,7 +1267,8 @@ private PollerFlux, DownloadUrlInner> beginDownload * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return the {@link SyncPoller} for polling of a URL to download multiple invoice documents (invoice pdf, tax + * receipts, credit notes) as a zip file. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DownloadUrlInner> beginDownloadMultipleBillingProfileInvoices( @@ -1291,7 +1287,8 @@ public SyncPoller, DownloadUrlInner> beginDownloadM * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return the {@link SyncPoller} for polling of a URL to download multiple invoice documents (invoice pdf, tax + * receipts, credit notes) as a zip file. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DownloadUrlInner> beginDownloadMultipleBillingProfileInvoices( @@ -1310,7 +1307,8 @@ public SyncPoller, DownloadUrlInner> beginDownloadM * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono downloadMultipleBillingProfileInvoicesAsync( @@ -1331,7 +1329,8 @@ private Mono downloadMultipleBillingProfileInvoicesAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono downloadMultipleBillingProfileInvoicesAsync( @@ -1386,7 +1385,7 @@ public DownloadUrlInner downloadMultipleBillingProfileInvoices( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingSubscriptionSinglePageAsync( @@ -1445,7 +1444,7 @@ private Mono> listByBillingSubscriptionSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingSubscriptionSinglePageAsync( @@ -1500,7 +1499,7 @@ private Mono> listByBillingSubscriptionSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingSubscriptionAsync(String periodStartDate, String periodEndDate) { @@ -1518,7 +1517,7 @@ private PagedFlux listByBillingSubscriptionAsync(String periodStar * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingSubscriptionAsync( @@ -1536,7 +1535,7 @@ private PagedFlux listByBillingSubscriptionAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingSubscription(String periodStartDate, String periodEndDate) { @@ -1552,7 +1551,7 @@ public PagedIterable listByBillingSubscription(String periodStartD * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingSubscription( @@ -1567,7 +1566,8 @@ public PagedIterable listByBillingSubscription( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice by subscription ID and invoice ID. + * @return an invoice by subscription ID and invoice ID along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getBySubscriptionAndInvoiceIdWithResponseAsync(String invoiceName) { @@ -1610,7 +1610,8 @@ private Mono> getBySubscriptionAndInvoiceIdWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice by subscription ID and invoice ID. + * @return an invoice by subscription ID and invoice ID along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getBySubscriptionAndInvoiceIdWithResponseAsync( @@ -1645,48 +1646,41 @@ private Mono> getBySubscriptionAndInvoiceIdWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice by subscription ID and invoice ID. + * @return an invoice by subscription ID and invoice ID on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getBySubscriptionAndInvoiceIdAsync(String invoiceName) { return getBySubscriptionAndInvoiceIdWithResponseAsync(invoiceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets an invoice by subscription ID and invoice ID. * * @param invoiceName The ID that uniquely identifies an invoice. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice by subscription ID and invoice ID. + * @return an invoice by subscription ID and invoice ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InvoiceInner getBySubscriptionAndInvoiceId(String invoiceName) { - return getBySubscriptionAndInvoiceIdAsync(invoiceName).block(); + public Response getBySubscriptionAndInvoiceIdWithResponse(String invoiceName, Context context) { + return getBySubscriptionAndInvoiceIdWithResponseAsync(invoiceName, context).block(); } /** * Gets an invoice by subscription ID and invoice ID. * * @param invoiceName The ID that uniquely identifies an invoice. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an invoice by subscription ID and invoice ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getBySubscriptionAndInvoiceIdWithResponse(String invoiceName, Context context) { - return getBySubscriptionAndInvoiceIdWithResponseAsync(invoiceName, context).block(); + public InvoiceInner getBySubscriptionAndInvoiceId(String invoiceName) { + return getBySubscriptionAndInvoiceIdWithResponse(invoiceName, Context.NONE).getValue(); } /** @@ -1697,7 +1691,7 @@ public Response getBySubscriptionAndInvoiceIdWithResponse(String i * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return a URL to download an invoice along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> downloadBillingSubscriptionInvoiceWithResponseAsync( @@ -1746,7 +1740,7 @@ private Mono>> downloadBillingSubscriptionInvoiceWithR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return a URL to download an invoice along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> downloadBillingSubscriptionInvoiceWithResponseAsync( @@ -1791,7 +1785,7 @@ private Mono>> downloadBillingSubscriptionInvoiceWithR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return the {@link PollerFlux} for polling of a URL to download an invoice. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DownloadUrlInner> beginDownloadBillingSubscriptionInvoiceAsync( @@ -1801,7 +1795,11 @@ private PollerFlux, DownloadUrlInner> beginDownload return this .client .getLroResult( - mono, this.client.getHttpPipeline(), DownloadUrlInner.class, DownloadUrlInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + DownloadUrlInner.class, + DownloadUrlInner.class, + this.client.getContext()); } /** @@ -1813,7 +1811,7 @@ private PollerFlux, DownloadUrlInner> beginDownload * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return the {@link PollerFlux} for polling of a URL to download an invoice. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DownloadUrlInner> beginDownloadBillingSubscriptionInvoiceAsync( @@ -1835,7 +1833,7 @@ private PollerFlux, DownloadUrlInner> beginDownload * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return the {@link SyncPoller} for polling of a URL to download an invoice. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DownloadUrlInner> beginDownloadBillingSubscriptionInvoice( @@ -1852,7 +1850,7 @@ public SyncPoller, DownloadUrlInner> beginDownloadB * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return the {@link SyncPoller} for polling of a URL to download an invoice. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DownloadUrlInner> beginDownloadBillingSubscriptionInvoice( @@ -1868,7 +1866,7 @@ public SyncPoller, DownloadUrlInner> beginDownloadB * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return a URL to download an invoice on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono downloadBillingSubscriptionInvoiceAsync(String invoiceName, String downloadToken) { @@ -1886,7 +1884,7 @@ private Mono downloadBillingSubscriptionInvoiceAsync(String in * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download an invoice. + * @return a URL to download an invoice on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono downloadBillingSubscriptionInvoiceAsync( @@ -1935,7 +1933,8 @@ public DownloadUrlInner downloadBillingSubscriptionInvoice( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file + * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> downloadMultipleBillingSubscriptionInvoicesWithResponseAsync( @@ -1979,7 +1978,8 @@ private Mono>> downloadMultipleBillingSubscriptionInvo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file + * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> downloadMultipleBillingSubscriptionInvoicesWithResponseAsync( @@ -2014,7 +2014,8 @@ private Mono>> downloadMultipleBillingSubscriptionInvo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return the {@link PollerFlux} for polling of a URL to download multiple invoice documents (invoice pdf, tax + * receipts, credit notes) as a zip file. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DownloadUrlInner> @@ -2024,7 +2025,11 @@ private Mono>> downloadMultipleBillingSubscriptionInvo return this .client .getLroResult( - mono, this.client.getHttpPipeline(), DownloadUrlInner.class, DownloadUrlInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + DownloadUrlInner.class, + DownloadUrlInner.class, + this.client.getContext()); } /** @@ -2035,7 +2040,8 @@ private Mono>> downloadMultipleBillingSubscriptionInvo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return the {@link PollerFlux} for polling of a URL to download multiple invoice documents (invoice pdf, tax + * receipts, credit notes) as a zip file. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DownloadUrlInner> @@ -2056,7 +2062,8 @@ private Mono>> downloadMultipleBillingSubscriptionInvo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return the {@link SyncPoller} for polling of a URL to download multiple invoice documents (invoice pdf, tax + * receipts, credit notes) as a zip file. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DownloadUrlInner> beginDownloadMultipleBillingSubscriptionInvoices( @@ -2072,7 +2079,8 @@ public SyncPoller, DownloadUrlInner> beginDownloadM * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return the {@link SyncPoller} for polling of a URL to download multiple invoice documents (invoice pdf, tax + * receipts, credit notes) as a zip file. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DownloadUrlInner> beginDownloadMultipleBillingSubscriptionInvoices( @@ -2087,7 +2095,8 @@ public SyncPoller, DownloadUrlInner> beginDownloadM * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono downloadMultipleBillingSubscriptionInvoicesAsync(List downloadUrls) { @@ -2104,7 +2113,8 @@ private Mono downloadMultipleBillingSubscriptionInvoicesAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. + * @return a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono downloadMultipleBillingSubscriptionInvoicesAsync( @@ -2146,11 +2156,12 @@ public DownloadUrlInner downloadMultipleBillingSubscriptionInvoices(List /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync(String nextLink) { @@ -2182,12 +2193,13 @@ private Mono> listByBillingAccountNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync( @@ -2219,11 +2231,12 @@ private Mono> listByBillingAccountNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync(String nextLink) { @@ -2255,12 +2268,13 @@ private Mono> listByBillingProfileNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync( @@ -2292,11 +2306,12 @@ private Mono> listByBillingProfileNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingSubscriptionNextSinglePageAsync(String nextLink) { @@ -2328,12 +2343,13 @@ private Mono> listByBillingSubscriptionNextSinglePag /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of invoices. + * @return the list of invoices along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingSubscriptionNextSinglePageAsync( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InvoicesImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InvoicesImpl.java index 76d0d8511598..451e91615830 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InvoicesImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/InvoicesImpl.java @@ -15,11 +15,10 @@ import com.azure.resourcemanager.billing.models.DownloadUrl; import com.azure.resourcemanager.billing.models.Invoice; import com.azure.resourcemanager.billing.models.Invoices; -import com.fasterxml.jackson.annotation.JsonIgnore; import java.util.List; public final class InvoicesImpl implements Invoices { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InvoicesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(InvoicesImpl.class); private final InvoicesClient innerClient; @@ -66,15 +65,6 @@ public PagedIterable listByBillingProfile( return Utils.mapPage(inner, inner1 -> new InvoiceImpl(inner1, this.manager())); } - public Invoice get(String billingAccountName, String invoiceName) { - InvoiceInner inner = this.serviceClient().get(billingAccountName, invoiceName); - if (inner != null) { - return new InvoiceImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String billingAccountName, String invoiceName, Context context) { Response inner = this.serviceClient().getWithResponse(billingAccountName, invoiceName, context); if (inner != null) { @@ -88,8 +78,8 @@ public Response getWithResponse(String billingAccountName, String invoi } } - public Invoice getById(String invoiceName) { - InvoiceInner inner = this.serviceClient().getById(invoiceName); + public Invoice get(String billingAccountName, String invoiceName) { + InvoiceInner inner = this.serviceClient().get(billingAccountName, invoiceName); if (inner != null) { return new InvoiceImpl(inner, this.manager()); } else { @@ -110,6 +100,15 @@ public Response getByIdWithResponse(String invoiceName, Context context } } + public Invoice getById(String invoiceName) { + InvoiceInner inner = this.serviceClient().getById(invoiceName); + if (inner != null) { + return new InvoiceImpl(inner, this.manager()); + } else { + return null; + } + } + public DownloadUrl downloadInvoice(String billingAccountName, String invoiceName, String downloadToken) { DownloadUrlInner inner = this.serviceClient().downloadInvoice(billingAccountName, invoiceName, downloadToken); if (inner != null) { @@ -164,15 +163,6 @@ public PagedIterable listByBillingSubscription( return Utils.mapPage(inner, inner1 -> new InvoiceImpl(inner1, this.manager())); } - public Invoice getBySubscriptionAndInvoiceId(String invoiceName) { - InvoiceInner inner = this.serviceClient().getBySubscriptionAndInvoiceId(invoiceName); - if (inner != null) { - return new InvoiceImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getBySubscriptionAndInvoiceIdWithResponse(String invoiceName, Context context) { Response inner = this.serviceClient().getBySubscriptionAndInvoiceIdWithResponse(invoiceName, context); @@ -187,6 +177,15 @@ public Response getBySubscriptionAndInvoiceIdWithResponse(String invoic } } + public Invoice getBySubscriptionAndInvoiceId(String invoiceName) { + InvoiceInner inner = this.serviceClient().getBySubscriptionAndInvoiceId(invoiceName); + if (inner != null) { + return new InvoiceImpl(inner, this.manager()); + } else { + return null; + } + } + public DownloadUrl downloadBillingSubscriptionInvoice(String invoiceName, String downloadToken) { DownloadUrlInner inner = this.serviceClient().downloadBillingSubscriptionInvoice(invoiceName, downloadToken); if (inner != null) { diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/OperationsClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/OperationsClientImpl.java index 2c8dd394d526..d5af5f95a185 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/OperationsClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/OperationsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.OperationsClient; import com.azure.resourcemanager.billing.fluent.models.OperationInner; import com.azure.resourcemanager.billing.models.OperationListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; @@ -85,7 +82,8 @@ Mono> listNext( * * @throws ManagementException 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 of billing operations and a URL link to get the next set of results. + * @return the list of billing operations and a URL link to get the next set of results along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -118,7 +116,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing operations and a URL link to get the next set of results. + * @return the list of billing operations and a URL link to get the next set of results along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -149,7 +148,8 @@ private Mono> listSinglePageAsync(Context context) * * @throws ManagementException 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 of billing operations and a URL link to get the next set of results. + * @return the list of billing operations and a URL link to get the next set of results as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -163,7 +163,8 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing operations and a URL link to get the next set of results. + * @return the list of billing operations and a URL link to get the next set of results as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -176,7 +177,8 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException 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 of billing operations and a URL link to get the next set of results. + * @return the list of billing operations and a URL link to get the next set of results as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -190,7 +192,8 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing operations and a URL link to get the next set of results. + * @return the list of billing operations and a URL link to get the next set of results as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -200,11 +203,13 @@ public PagedIterable list(Context context) { /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing operations and a URL link to get the next set of results. + * @return the list of billing operations and a URL link to get the next set of results along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -235,12 +240,14 @@ private Mono> listNextSinglePageAsync(String nextL /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of billing operations and a URL link to get the next set of results. + * @return the list of billing operations and a URL link to get the next set of results along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/OperationsImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/OperationsImpl.java index 03e76f1aa099..bfb38b193ea8 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/OperationsImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/OperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.billing.fluent.models.OperationInner; import com.azure.resourcemanager.billing.models.Operation; import com.azure.resourcemanager.billing.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/PoliciesClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/PoliciesClientImpl.java index d96b4f5761a0..b72b6ef84e96 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/PoliciesClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/PoliciesClientImpl.java @@ -23,7 +23,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.PoliciesClient; import com.azure.resourcemanager.billing.fluent.models.CustomerPolicyInner; import com.azure.resourcemanager.billing.fluent.models.PolicyInner; @@ -31,8 +30,6 @@ /** An instance of this class provides access to all the operations defined in PoliciesClient. */ public final class PoliciesClientImpl implements PoliciesClient { - private final ClientLogger logger = new ClientLogger(PoliciesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final PoliciesService service; @@ -124,7 +121,7 @@ Mono> updateCustomer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a policy. + * @return a policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByBillingProfileWithResponseAsync( @@ -169,7 +166,7 @@ private Mono> getByBillingProfileWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a policy. + * @return a policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByBillingProfileWithResponseAsync( @@ -205,19 +202,12 @@ private Mono> getByBillingProfileWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a policy. + * @return a policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByBillingProfileAsync(String billingAccountName, String billingProfileName) { return getByBillingProfileWithResponseAsync(billingAccountName, billingProfileName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -226,14 +216,16 @@ private Mono getByBillingProfileAsync(String billingAccountName, St * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a policy. + * @return a policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PolicyInner getByBillingProfile(String billingAccountName, String billingProfileName) { - return getByBillingProfileAsync(billingAccountName, billingProfileName).block(); + public Response getByBillingProfileWithResponse( + String billingAccountName, String billingProfileName, Context context) { + return getByBillingProfileWithResponseAsync(billingAccountName, billingProfileName, context).block(); } /** @@ -242,16 +234,14 @@ public PolicyInner getByBillingProfile(String billingAccountName, String billing * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByBillingProfileWithResponse( - String billingAccountName, String billingProfileName, Context context) { - return getByBillingProfileWithResponseAsync(billingAccountName, billingProfileName, context).block(); + public PolicyInner getByBillingProfile(String billingAccountName, String billingProfileName) { + return getByBillingProfileWithResponse(billingAccountName, billingProfileName, Context.NONE).getValue(); } /** @@ -264,7 +254,7 @@ public Response getByBillingProfileWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a policy. + * @return a policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -316,7 +306,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a policy. + * @return a policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -364,20 +354,13 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a policy. + * @return a policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( String billingAccountName, String billingProfileName, PolicyInner parameters) { return updateWithResponseAsync(billingAccountName, billingProfileName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -387,14 +370,16 @@ private Mono updateAsync( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param parameters Request parameters that are provided to the update policies operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a policy. + * @return a policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PolicyInner update(String billingAccountName, String billingProfileName, PolicyInner parameters) { - return updateAsync(billingAccountName, billingProfileName, parameters).block(); + public Response updateWithResponse( + String billingAccountName, String billingProfileName, PolicyInner parameters, Context context) { + return updateWithResponseAsync(billingAccountName, billingProfileName, parameters, context).block(); } /** @@ -404,16 +389,14 @@ public PolicyInner update(String billingAccountName, String billingProfileName, * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param parameters Request parameters that are provided to the update policies operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String billingAccountName, String billingProfileName, PolicyInner parameters, Context context) { - return updateWithResponseAsync(billingAccountName, billingProfileName, parameters, context).block(); + public PolicyInner update(String billingAccountName, String billingProfileName, PolicyInner parameters) { + return updateWithResponse(billingAccountName, billingProfileName, parameters, Context.NONE).getValue(); } /** @@ -425,7 +408,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the customer's Policy. + * @return the customer's Policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByCustomerWithResponseAsync( @@ -464,7 +447,7 @@ private Mono> getByCustomerWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the customer's Policy. + * @return the customer's Policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByCustomerWithResponseAsync( @@ -498,19 +481,12 @@ private Mono> getByCustomerWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the customer's Policy. + * @return the customer's Policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByCustomerAsync(String billingAccountName, String customerName) { return getByCustomerWithResponseAsync(billingAccountName, customerName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -519,14 +495,16 @@ private Mono getByCustomerAsync(String billingAccountName, * * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the customer's Policy. + * @return the customer's Policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CustomerPolicyInner getByCustomer(String billingAccountName, String customerName) { - return getByCustomerAsync(billingAccountName, customerName).block(); + public Response getByCustomerWithResponse( + String billingAccountName, String customerName, Context context) { + return getByCustomerWithResponseAsync(billingAccountName, customerName, context).block(); } /** @@ -535,16 +513,14 @@ public CustomerPolicyInner getByCustomer(String billingAccountName, String custo * * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the customer's Policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByCustomerWithResponse( - String billingAccountName, String customerName, Context context) { - return getByCustomerWithResponseAsync(billingAccountName, customerName, context).block(); + public CustomerPolicyInner getByCustomer(String billingAccountName, String customerName) { + return getByCustomerWithResponse(billingAccountName, customerName, Context.NONE).getValue(); } /** @@ -557,7 +533,7 @@ public Response getByCustomerWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the customer's Policy. + * @return the customer's Policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateCustomerWithResponseAsync( @@ -608,7 +584,7 @@ private Mono> updateCustomerWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the customer's Policy. + * @return the customer's Policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateCustomerWithResponseAsync( @@ -649,20 +625,13 @@ private Mono> updateCustomerWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the customer's Policy. + * @return the customer's Policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateCustomerAsync( String billingAccountName, String customerName, CustomerPolicyInner parameters) { return updateCustomerWithResponseAsync(billingAccountName, customerName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -672,15 +641,16 @@ private Mono updateCustomerAsync( * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. * @param parameters Request parameters that are provided to the update policies operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the customer's Policy. + * @return the customer's Policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CustomerPolicyInner updateCustomer( - String billingAccountName, String customerName, CustomerPolicyInner parameters) { - return updateCustomerAsync(billingAccountName, customerName, parameters).block(); + public Response updateCustomerWithResponse( + String billingAccountName, String customerName, CustomerPolicyInner parameters, Context context) { + return updateCustomerWithResponseAsync(billingAccountName, customerName, parameters, context).block(); } /** @@ -690,15 +660,14 @@ public CustomerPolicyInner updateCustomer( * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. * @param parameters Request parameters that are provided to the update policies operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the customer's Policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateCustomerWithResponse( - String billingAccountName, String customerName, CustomerPolicyInner parameters, Context context) { - return updateCustomerWithResponseAsync(billingAccountName, customerName, parameters, context).block(); + public CustomerPolicyInner updateCustomer( + String billingAccountName, String customerName, CustomerPolicyInner parameters) { + return updateCustomerWithResponse(billingAccountName, customerName, parameters, Context.NONE).getValue(); } } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/PoliciesImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/PoliciesImpl.java index 5ff31524a507..ef9dc5a97034 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/PoliciesImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/PoliciesImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.billing.models.CustomerPolicy; import com.azure.resourcemanager.billing.models.Policies; import com.azure.resourcemanager.billing.models.Policy; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class PoliciesImpl implements Policies { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PoliciesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PoliciesImpl.class); private final PoliciesClient innerClient; @@ -28,15 +27,6 @@ public PoliciesImpl(PoliciesClient innerClient, com.azure.resourcemanager.billin this.serviceManager = serviceManager; } - public Policy getByBillingProfile(String billingAccountName, String billingProfileName) { - PolicyInner inner = this.serviceClient().getByBillingProfile(billingAccountName, billingProfileName); - if (inner != null) { - return new PolicyImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByBillingProfileWithResponse( String billingAccountName, String billingProfileName, Context context) { Response inner = @@ -52,8 +42,8 @@ public Response getByBillingProfileWithResponse( } } - public Policy update(String billingAccountName, String billingProfileName, PolicyInner parameters) { - PolicyInner inner = this.serviceClient().update(billingAccountName, billingProfileName, parameters); + public Policy getByBillingProfile(String billingAccountName, String billingProfileName) { + PolicyInner inner = this.serviceClient().getByBillingProfile(billingAccountName, billingProfileName); if (inner != null) { return new PolicyImpl(inner, this.manager()); } else { @@ -76,10 +66,10 @@ public Response updateWithResponse( } } - public CustomerPolicy getByCustomer(String billingAccountName, String customerName) { - CustomerPolicyInner inner = this.serviceClient().getByCustomer(billingAccountName, customerName); + public Policy update(String billingAccountName, String billingProfileName, PolicyInner parameters) { + PolicyInner inner = this.serviceClient().update(billingAccountName, billingProfileName, parameters); if (inner != null) { - return new CustomerPolicyImpl(inner, this.manager()); + return new PolicyImpl(inner, this.manager()); } else { return null; } @@ -100,9 +90,8 @@ public Response getByCustomerWithResponse( } } - public CustomerPolicy updateCustomer( - String billingAccountName, String customerName, CustomerPolicyInner parameters) { - CustomerPolicyInner inner = this.serviceClient().updateCustomer(billingAccountName, customerName, parameters); + public CustomerPolicy getByCustomer(String billingAccountName, String customerName) { + CustomerPolicyInner inner = this.serviceClient().getByCustomer(billingAccountName, customerName); if (inner != null) { return new CustomerPolicyImpl(inner, this.manager()); } else { @@ -125,6 +114,16 @@ public Response updateCustomerWithResponse( } } + public CustomerPolicy updateCustomer( + String billingAccountName, String customerName, CustomerPolicyInner parameters) { + CustomerPolicyInner inner = this.serviceClient().updateCustomer(billingAccountName, customerName, parameters); + if (inner != null) { + return new CustomerPolicyImpl(inner, this.manager()); + } else { + return null; + } + } + private PoliciesClient serviceClient() { return this.innerClient; } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/ProductsClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/ProductsClientImpl.java index 0b77f71f1b35..32eb4541a285 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/ProductsClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/ProductsClientImpl.java @@ -28,7 +28,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.ProductsClient; import com.azure.resourcemanager.billing.fluent.models.ProductInner; import com.azure.resourcemanager.billing.fluent.models.ValidateProductTransferEligibilityResultInner; @@ -39,8 +38,6 @@ /** An instance of this class provides access to all the operations defined in ProductsClient. */ public final class ProductsClientImpl implements ProductsClient { - private final ClientLogger logger = new ClientLogger(ProductsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ProductsService service; @@ -222,7 +219,7 @@ Mono> listByInvoiceSectionNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCustomerSinglePageAsync( @@ -270,7 +267,7 @@ private Mono> listByCustomerSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCustomerSinglePageAsync( @@ -313,7 +310,7 @@ private Mono> listByCustomerSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByCustomerAsync(String billingAccountName, String customerName) { @@ -332,7 +329,7 @@ private PagedFlux listByCustomerAsync(String billingAccountName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByCustomerAsync( @@ -351,7 +348,7 @@ private PagedFlux listByCustomerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByCustomer(String billingAccountName, String customerName) { @@ -368,7 +365,7 @@ public PagedIterable listByCustomer(String billingAccountName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByCustomer(String billingAccountName, String customerName, Context context) { @@ -386,7 +383,7 @@ public PagedIterable listByCustomer(String billingAccountName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -433,7 +430,7 @@ private Mono> listByBillingAccountSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -475,7 +472,7 @@ private Mono> listByBillingAccountSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync(String billingAccountName, String filter) { @@ -492,7 +489,7 @@ private PagedFlux listByBillingAccountAsync(String billingAccountN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync(String billingAccountName) { @@ -514,7 +511,7 @@ private PagedFlux listByBillingAccountAsync(String billingAccountN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync( @@ -532,7 +529,7 @@ private PagedFlux listByBillingAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount(String billingAccountName) { @@ -552,7 +549,7 @@ public PagedIterable listByBillingAccount(String billingAccountNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount(String billingAccountName, String filter, Context context) { @@ -571,7 +568,7 @@ public PagedIterable listByBillingAccount(String billingAccountNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -629,7 +626,7 @@ private Mono> listByBillingProfileSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -677,7 +674,7 @@ private Mono> listByBillingProfileSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -696,7 +693,7 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync(String billingAccountName, String billingProfileName) { @@ -719,7 +716,7 @@ private PagedFlux listByBillingProfileAsync(String billingAccountN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -738,7 +735,7 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName) { @@ -759,7 +756,7 @@ public PagedIterable listByBillingProfile(String billingAccountNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -780,7 +777,7 @@ public PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionSinglePageAsync( @@ -844,7 +841,7 @@ private Mono> listByInvoiceSectionSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionSinglePageAsync( @@ -908,7 +905,7 @@ private Mono> listByInvoiceSectionSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByInvoiceSectionAsync( @@ -929,7 +926,7 @@ private PagedFlux listByInvoiceSectionAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByInvoiceSectionAsync( @@ -955,7 +952,7 @@ private PagedFlux listByInvoiceSectionAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByInvoiceSectionAsync( @@ -981,7 +978,7 @@ private PagedFlux listByInvoiceSectionAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByInvoiceSection( @@ -1005,7 +1002,7 @@ public PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByInvoiceSection( @@ -1027,7 +1024,7 @@ public PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a product by ID. + * @return a product by ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String billingAccountName, String productName) { @@ -1064,7 +1061,7 @@ private Mono> getWithResponseAsync(String billingAccountN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a product by ID. + * @return a product by ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -1097,19 +1094,11 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a product by ID. + * @return a product by ID on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String billingAccountName, String productName) { - return getWithResponseAsync(billingAccountName, productName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync(billingAccountName, productName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1118,14 +1107,15 @@ private Mono getAsync(String billingAccountName, String productNam * * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a product by ID. + * @return a product by ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProductInner get(String billingAccountName, String productName) { - return getAsync(billingAccountName, productName).block(); + public Response getWithResponse(String billingAccountName, String productName, Context context) { + return getWithResponseAsync(billingAccountName, productName, context).block(); } /** @@ -1134,15 +1124,14 @@ public ProductInner get(String billingAccountName, String productName) { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a product by ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String billingAccountName, String productName, Context context) { - return getWithResponseAsync(billingAccountName, productName, context).block(); + public ProductInner get(String billingAccountName, String productName) { + return getWithResponse(billingAccountName, productName, Context.NONE).getValue(); } /** @@ -1155,7 +1144,7 @@ public Response getWithResponse(String billingAccountName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a product. + * @return a product along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1206,7 +1195,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a product. + * @return a product along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1247,19 +1236,12 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a product. + * @return a product on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String billingAccountName, String productName, ProductInner parameters) { return updateWithResponseAsync(billingAccountName, productName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1269,14 +1251,16 @@ private Mono updateAsync(String billingAccountName, String product * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. * @param parameters Request parameters that are provided to the update product operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a product. + * @return a product along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProductInner update(String billingAccountName, String productName, ProductInner parameters) { - return updateAsync(billingAccountName, productName, parameters).block(); + public Response updateWithResponse( + String billingAccountName, String productName, ProductInner parameters, Context context) { + return updateWithResponseAsync(billingAccountName, productName, parameters, context).block(); } /** @@ -1286,16 +1270,14 @@ public ProductInner update(String billingAccountName, String productName, Produc * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. * @param parameters Request parameters that are provided to the update product operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a product. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String billingAccountName, String productName, ProductInner parameters, Context context) { - return updateWithResponseAsync(billingAccountName, productName, parameters, context).block(); + public ProductInner update(String billingAccountName, String productName, ProductInner parameters) { + return updateWithResponse(billingAccountName, productName, parameters, Context.NONE).getValue(); } /** @@ -1309,7 +1291,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a product. + * @return a product on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono moveWithResponseAsync( @@ -1361,7 +1343,7 @@ private Mono moveWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a product. + * @return a product on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono moveWithResponseAsync( @@ -1402,20 +1384,13 @@ private Mono moveWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a product. + * @return a product on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono moveAsync( String billingAccountName, String productName, TransferProductRequestProperties parameters) { return moveWithResponseAsync(billingAccountName, productName, parameters) - .flatMap( - (ProductsMoveResponse res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1426,15 +1401,16 @@ private Mono moveAsync( * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. * @param parameters Request parameters that are provided to the move product operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a product. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProductInner move( - String billingAccountName, String productName, TransferProductRequestProperties parameters) { - return moveAsync(billingAccountName, productName, parameters).block(); + public ProductsMoveResponse moveWithResponse( + String billingAccountName, String productName, TransferProductRequestProperties parameters, Context context) { + return moveWithResponseAsync(billingAccountName, productName, parameters, context).block(); } /** @@ -1445,16 +1421,15 @@ public ProductInner move( * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. * @param parameters Request parameters that are provided to the move product operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a product. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProductsMoveResponse moveWithResponse( - String billingAccountName, String productName, TransferProductRequestProperties parameters, Context context) { - return moveWithResponseAsync(billingAccountName, productName, parameters, context).block(); + public ProductInner move( + String billingAccountName, String productName, TransferProductRequestProperties parameters) { + return moveWithResponse(billingAccountName, productName, parameters, Context.NONE).getValue(); } /** @@ -1468,7 +1443,8 @@ public ProductsMoveResponse moveWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the product transfer eligibility validation. + * @return result of the product transfer eligibility validation along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> validateMoveWithResponseAsync( @@ -1520,7 +1496,8 @@ private Mono> validateMo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the product transfer eligibility validation. + * @return result of the product transfer eligibility validation along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> validateMoveWithResponseAsync( @@ -1562,20 +1539,13 @@ private Mono> validateMo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the product transfer eligibility validation. + * @return result of the product transfer eligibility validation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateMoveAsync( String billingAccountName, String productName, TransferProductRequestProperties parameters) { return validateMoveWithResponseAsync(billingAccountName, productName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1586,15 +1556,16 @@ private Mono validateMoveAsync( * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. * @param parameters Request parameters that are provided to the validate move eligibility operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the product transfer eligibility validation. + * @return result of the product transfer eligibility validation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ValidateProductTransferEligibilityResultInner validateMove( - String billingAccountName, String productName, TransferProductRequestProperties parameters) { - return validateMoveAsync(billingAccountName, productName, parameters).block(); + public Response validateMoveWithResponse( + String billingAccountName, String productName, TransferProductRequestProperties parameters, Context context) { + return validateMoveWithResponseAsync(billingAccountName, productName, parameters, context).block(); } /** @@ -1605,26 +1576,26 @@ public ValidateProductTransferEligibilityResultInner validateMove( * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. * @param parameters Request parameters that are provided to the validate move eligibility operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the product transfer eligibility validation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response validateMoveWithResponse( - String billingAccountName, String productName, TransferProductRequestProperties parameters, Context context) { - return validateMoveWithResponseAsync(billingAccountName, productName, parameters, context).block(); + public ValidateProductTransferEligibilityResultInner validateMove( + String billingAccountName, String productName, TransferProductRequestProperties parameters) { + return validateMoveWithResponse(billingAccountName, productName, parameters, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCustomerNextSinglePageAsync(String nextLink) { @@ -1655,12 +1626,13 @@ private Mono> listByCustomerNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCustomerNextSinglePageAsync(String nextLink, Context context) { @@ -1691,11 +1663,12 @@ private Mono> listByCustomerNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync(String nextLink) { @@ -1727,12 +1700,13 @@ private Mono> listByBillingAccountNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync( @@ -1764,11 +1738,12 @@ private Mono> listByBillingAccountNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync(String nextLink) { @@ -1800,12 +1775,13 @@ private Mono> listByBillingProfileNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync( @@ -1837,11 +1813,12 @@ private Mono> listByBillingProfileNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionNextSinglePageAsync(String nextLink) { @@ -1873,12 +1850,13 @@ private Mono> listByInvoiceSectionNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of products. + * @return the list of products along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSectionNextSinglePageAsync( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/ProductsImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/ProductsImpl.java index 690758ee4553..0b370b87e728 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/ProductsImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/ProductsImpl.java @@ -17,10 +17,9 @@ import com.azure.resourcemanager.billing.models.ProductsMoveResponse; import com.azure.resourcemanager.billing.models.TransferProductRequestProperties; import com.azure.resourcemanager.billing.models.ValidateProductTransferEligibilityResult; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ProductsImpl implements Products { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ProductsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ProductsImpl.class); private final ProductsClient innerClient; @@ -86,15 +85,6 @@ public PagedIterable listByInvoiceSection( return Utils.mapPage(inner, inner1 -> new ProductImpl(inner1, this.manager())); } - public Product get(String billingAccountName, String productName) { - ProductInner inner = this.serviceClient().get(billingAccountName, productName); - if (inner != null) { - return new ProductImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String billingAccountName, String productName, Context context) { Response inner = this.serviceClient().getWithResponse(billingAccountName, productName, context); if (inner != null) { @@ -108,8 +98,8 @@ public Response getWithResponse(String billingAccountName, String produ } } - public Product update(String billingAccountName, String productName, ProductInner parameters) { - ProductInner inner = this.serviceClient().update(billingAccountName, productName, parameters); + public Product get(String billingAccountName, String productName) { + ProductInner inner = this.serviceClient().get(billingAccountName, productName); if (inner != null) { return new ProductImpl(inner, this.manager()); } else { @@ -132,8 +122,8 @@ public Response updateWithResponse( } } - public Product move(String billingAccountName, String productName, TransferProductRequestProperties parameters) { - ProductInner inner = this.serviceClient().move(billingAccountName, productName, parameters); + public Product update(String billingAccountName, String productName, ProductInner parameters) { + ProductInner inner = this.serviceClient().update(billingAccountName, productName, parameters); if (inner != null) { return new ProductImpl(inner, this.manager()); } else { @@ -156,12 +146,10 @@ public Response moveWithResponse( } } - public ValidateProductTransferEligibilityResult validateMove( - String billingAccountName, String productName, TransferProductRequestProperties parameters) { - ValidateProductTransferEligibilityResultInner inner = - this.serviceClient().validateMove(billingAccountName, productName, parameters); + public Product move(String billingAccountName, String productName, TransferProductRequestProperties parameters) { + ProductInner inner = this.serviceClient().move(billingAccountName, productName, parameters); if (inner != null) { - return new ValidateProductTransferEligibilityResultImpl(inner, this.manager()); + return new ProductImpl(inner, this.manager()); } else { return null; } @@ -182,6 +170,17 @@ public Response validateMoveWithRespon } } + public ValidateProductTransferEligibilityResult validateMove( + String billingAccountName, String productName, TransferProductRequestProperties parameters) { + ValidateProductTransferEligibilityResultInner inner = + this.serviceClient().validateMove(billingAccountName, productName, parameters); + if (inner != null) { + return new ValidateProductTransferEligibilityResultImpl(inner, this.manager()); + } else { + return null; + } + } + private ProductsClient serviceClient() { return this.innerClient; } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/ReservationsClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/ReservationsClientImpl.java index b3727f3364e3..2ec4214a6595 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/ReservationsClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/ReservationsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.ReservationsClient; import com.azure.resourcemanager.billing.fluent.models.ReservationInner; import com.azure.resourcemanager.billing.models.ReservationsListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in ReservationsClient. */ public final class ReservationsClientImpl implements ReservationsClient { - private final ClientLogger logger = new ClientLogger(ReservationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ReservationsService service; @@ -126,7 +123,8 @@ Mono> listByBillingProfileNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -183,7 +181,8 @@ private Mono> listByBillingAccountSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountSinglePageAsync( @@ -241,7 +240,8 @@ private Mono> listByBillingAccountSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state as paginated + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync( @@ -259,7 +259,8 @@ private PagedFlux listByBillingAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state as paginated + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync(String billingAccountName) { @@ -287,7 +288,8 @@ private PagedFlux listByBillingAccountAsync(String billingAcco * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state as paginated + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingAccountAsync( @@ -311,7 +313,8 @@ private PagedFlux listByBillingAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount(String billingAccountName) { @@ -337,7 +340,8 @@ public PagedIterable listByBillingAccount(String billingAccoun * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingAccount( @@ -365,7 +369,8 @@ public PagedIterable listByBillingAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -433,7 +438,8 @@ private Mono> listByBillingProfileSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileSinglePageAsync( @@ -498,7 +504,8 @@ private Mono> listByBillingProfileSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state as paginated + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -523,7 +530,8 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state as paginated + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -554,7 +562,8 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state as paginated + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBillingProfileAsync( @@ -580,7 +589,8 @@ private PagedFlux listByBillingProfileAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName) { @@ -608,7 +618,8 @@ public PagedIterable listByBillingProfile(String billingAccoun * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBillingProfile( @@ -627,11 +638,13 @@ public PagedIterable listByBillingProfile( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync(String nextLink) { @@ -663,12 +676,14 @@ private Mono> listByBillingAccountNextSinglePage /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingAccountNextSinglePageAsync( @@ -700,11 +715,13 @@ private Mono> listByBillingAccountNextSinglePage /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync(String nextLink) { @@ -736,12 +753,14 @@ private Mono> listByBillingProfileNextSinglePage /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBillingProfileNextSinglePageAsync( diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/ReservationsImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/ReservationsImpl.java index f0e4a5bde6c1..9c1c5969fe4a 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/ReservationsImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/ReservationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.billing.fluent.models.ReservationInner; import com.azure.resourcemanager.billing.models.Reservation; import com.azure.resourcemanager.billing.models.Reservations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ReservationsImpl implements Reservations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ReservationsImpl.class); private final ReservationsClient innerClient; diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/TransactionsClientImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/TransactionsClientImpl.java index a9fbee359a79..a2db1e6b170f 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/TransactionsClientImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/TransactionsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.TransactionsClient; import com.azure.resourcemanager.billing.fluent.models.TransactionInner; import com.azure.resourcemanager.billing.models.TransactionListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in TransactionsClient. */ public final class TransactionsClientImpl implements TransactionsClient { - private final ClientLogger logger = new ClientLogger(TransactionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final TransactionsService service; @@ -90,7 +87,7 @@ Mono> listByInvoiceNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of transactions. + * @return the list of transactions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSinglePageAsync( @@ -137,7 +134,7 @@ private Mono> listByInvoiceSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of transactions. + * @return the list of transactions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceSinglePageAsync( @@ -179,7 +176,7 @@ private Mono> listByInvoiceSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of transactions. + * @return the list of transactions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByInvoiceAsync(String billingAccountName, String invoiceName) { @@ -197,7 +194,7 @@ private PagedFlux listByInvoiceAsync(String billingAccountName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of transactions. + * @return the list of transactions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByInvoiceAsync( @@ -215,7 +212,7 @@ private PagedFlux listByInvoiceAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of transactions. + * @return the list of transactions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByInvoice(String billingAccountName, String invoiceName) { @@ -231,7 +228,7 @@ public PagedIterable listByInvoice(String billingAccountName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of transactions. + * @return the list of transactions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByInvoice( @@ -242,11 +239,12 @@ public PagedIterable listByInvoice( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of transactions. + * @return the list of transactions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceNextSinglePageAsync(String nextLink) { @@ -277,12 +275,13 @@ private Mono> listByInvoiceNextSinglePageAsync(S /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of transactions. + * @return the list of transactions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInvoiceNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/TransactionsImpl.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/TransactionsImpl.java index 5d505fc21058..93d5a0882b4f 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/TransactionsImpl.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/TransactionsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.billing.fluent.models.TransactionInner; import com.azure.resourcemanager.billing.models.Transaction; import com.azure.resourcemanager.billing.models.Transactions; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class TransactionsImpl implements Transactions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransactionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(TransactionsImpl.class); private final TransactionsClient innerClient; diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AcceptanceMode.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AcceptanceMode.java index 107241a07f01..943bcf4cc214 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AcceptanceMode.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AcceptanceMode.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AcceptanceMode. */ +/** The mode of acceptance for an agreement. */ public final class AcceptanceMode extends ExpandableStringEnum { /** Static value ClickToAccept for AcceptanceMode. */ public static final AcceptanceMode CLICK_TO_ACCEPT = fromString("ClickToAccept"); @@ -30,7 +30,11 @@ public static AcceptanceMode fromString(String name) { return fromString(name, AcceptanceMode.class); } - /** @return known AcceptanceMode values. */ + /** + * Gets known AcceptanceMode values. + * + * @return known AcceptanceMode values. + */ public static Collection values() { return values(AcceptanceMode.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AccountStatus.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AccountStatus.java index 2ad647f69cfc..3e313bbb522b 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AccountStatus.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AccountStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AccountStatus. */ +/** The current status of the billing account. */ public final class AccountStatus extends ExpandableStringEnum { /** Static value Active for AccountStatus. */ public static final AccountStatus ACTIVE = fromString("Active"); @@ -42,7 +42,11 @@ public static AccountStatus fromString(String name) { return fromString(name, AccountStatus.class); } - /** @return known AccountStatus values. */ + /** + * Gets known AccountStatus values. + * + * @return known AccountStatus values. + */ public static Collection values() { return values(AccountStatus.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AccountType.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AccountType.java index 5262257801eb..21a50f03a3fc 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AccountType.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AccountType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AccountType. */ +/** The type of customer. */ public final class AccountType extends ExpandableStringEnum { /** Static value Enterprise for AccountType. */ public static final AccountType ENTERPRISE = fromString("Enterprise"); @@ -30,7 +30,11 @@ public static AccountType fromString(String name) { return fromString(name, AccountType.class); } - /** @return known AccountType values. */ + /** + * Gets known AccountType values. + * + * @return known AccountType values. + */ public static Collection values() { return values(AccountType.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Address.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Address.java index b050b59356ac..739ad62255df 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Address.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Address.java @@ -13,22 +13,22 @@ public interface Address { * Validates an address. Use the operation to validate an address before using it as soldTo or a billTo address. * * @param address Address details. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the address validation. + * @return result of the address validation along with {@link Response}. */ - ValidateAddressResponse validate(AddressDetails address); + Response validateWithResponse(AddressDetails address, Context context); /** * Validates an address. Use the operation to validate an address before using it as soldTo or a billTo address. * * @param address Address details. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the address validation. */ - Response validateWithResponse(AddressDetails address, Context context); + ValidateAddressResponse validate(AddressDetails address); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AddressDetails.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AddressDetails.java index 1bac18f0a50c..ff2c4453802d 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AddressDetails.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AddressDetails.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Address details. */ @Fluent public final class AddressDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AddressDetails.class); - /* * First name. */ @@ -98,6 +95,10 @@ public final class AddressDetails { @JsonProperty(value = "phoneNumber") private String phoneNumber; + /** Creates an instance of AddressDetails class. */ + public AddressDetails() { + } + /** * Get the firstName property: First name. * @@ -385,14 +386,16 @@ public AddressDetails withPhoneNumber(String phoneNumber) { */ public void validate() { if (addressLine1() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property addressLine1 in model AddressDetails")); } if (country() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property country in model AddressDetails")); } } + + private static final ClientLogger LOGGER = new ClientLogger(AddressDetails.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AddressValidationStatus.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AddressValidationStatus.java index f01461a54618..22fae51e6be3 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AddressValidationStatus.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AddressValidationStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AddressValidationStatus. */ +/** Status of the address validation. */ public final class AddressValidationStatus extends ExpandableStringEnum { /** Static value Valid for AddressValidationStatus. */ public static final AddressValidationStatus VALID = fromString("Valid"); @@ -27,7 +27,11 @@ public static AddressValidationStatus fromString(String name) { return fromString(name, AddressValidationStatus.class); } - /** @return known AddressValidationStatus values. */ + /** + * Gets known AddressValidationStatus values. + * + * @return known AddressValidationStatus values. + */ public static Collection values() { return values(AddressValidationStatus.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Agreement.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Agreement.java index e6a183f3a8f5..fde5b5b32687 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Agreement.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Agreement.java @@ -52,6 +52,14 @@ public interface Agreement { */ AcceptanceMode acceptanceMode(); + /** + * Gets the billingProfileInfo property: The list of billing profiles associated with agreement and present only for + * specific agreements. + * + * @return the billingProfileInfo value. + */ + BillingProfileInfo billingProfileInfo(); + /** * Gets the effectiveDate property: The date from which the agreement is effective. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AgreementListResult.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AgreementListResult.java index 211b66737c84..6a55ec05b7be 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AgreementListResult.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AgreementListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.AgreementInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Result of listing agreements. */ @Immutable public final class AgreementListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AgreementListResult.class); - /* * The list of agreements. */ @@ -28,6 +24,10 @@ public final class AgreementListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of AgreementListResult class. */ + public AgreementListResult() { + } + /** * Get the value property: The list of agreements. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AgreementType.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AgreementType.java index 4629aaa50fd0..23be4e63572a 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AgreementType.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AgreementType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AgreementType. */ +/** The type of agreement. */ public final class AgreementType extends ExpandableStringEnum { /** Static value MicrosoftCustomerAgreement for AgreementType. */ public static final AgreementType MICROSOFT_CUSTOMER_AGREEMENT = fromString("MicrosoftCustomerAgreement"); @@ -33,7 +33,11 @@ public static AgreementType fromString(String name) { return fromString(name, AgreementType.class); } - /** @return known AgreementType values. */ + /** + * Gets known AgreementType values. + * + * @return known AgreementType values. + */ public static Collection values() { return values(AgreementType.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Agreements.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Agreements.java index 1585663af468..38e414229f42 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Agreements.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Agreements.java @@ -17,7 +17,7 @@ public interface Agreements { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing agreements. + * @return result of listing agreements as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingAccount(String billingAccountName); @@ -30,7 +30,7 @@ public interface Agreements { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing agreements. + * @return result of listing agreements as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingAccount(String billingAccountName, String expand, Context context); @@ -39,25 +39,25 @@ public interface Agreements { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param agreementName The ID that uniquely identifies an agreement. + * @param expand May be used to expand the participants. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an agreement by ID. + * @return an agreement by ID along with {@link Response}. */ - Agreement get(String billingAccountName, String agreementName); + Response getWithResponse( + String billingAccountName, String agreementName, String expand, Context context); /** * Gets an agreement by ID. * * @param billingAccountName The ID that uniquely identifies a billing account. * @param agreementName The ID that uniquely identifies an agreement. - * @param expand May be used to expand the participants. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an agreement by ID. */ - Response getWithResponse( - String billingAccountName, String agreementName, String expand, Context context); + Agreement get(String billingAccountName, String agreementName); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Amount.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Amount.java index e835dfc0d8f7..81a8d20b9d29 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Amount.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Amount.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The amount. */ @Fluent public final class Amount { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Amount.class); - /* * The currency for the amount value. */ @@ -26,6 +22,10 @@ public final class Amount { @JsonProperty(value = "value") private Float value; + /** Creates an instance of Amount class. */ + public Amount() { + } + /** * Get the currency property: The currency for the amount value. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AutoRenew.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AutoRenew.java index 4cde432a75d3..f319dff0537d 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AutoRenew.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AutoRenew.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AutoRenew. */ +/** Indicates whether auto renewal is turned on or off for a product. */ public final class AutoRenew extends ExpandableStringEnum { /** Static value Off for AutoRenew. */ public static final AutoRenew OFF = fromString("Off"); @@ -27,7 +27,11 @@ public static AutoRenew fromString(String name) { return fromString(name, AutoRenew.class); } - /** @return known AutoRenew values. */ + /** + * Gets known AutoRenew values. + * + * @return known AutoRenew values. + */ public static Collection values() { return values(AutoRenew.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AvailableBalances.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AvailableBalances.java index db3cb67b29bb..206474c3a645 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AvailableBalances.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AvailableBalances.java @@ -16,12 +16,13 @@ public interface AvailableBalances { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the latest Azure credit balance. + * @return the latest Azure credit balance along with {@link Response}. */ - AvailableBalance get(String billingAccountName, String billingProfileName); + Response getWithResponse(String billingAccountName, String billingProfileName, Context context); /** * The available credit balance for a billing profile. This is the balance that can be used for pay now to settle @@ -30,11 +31,10 @@ public interface AvailableBalances { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the latest Azure credit balance. */ - Response getWithResponse(String billingAccountName, String billingProfileName, Context context); + AvailableBalance get(String billingAccountName, String billingProfileName); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AzurePlan.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AzurePlan.java index afd025f54c73..86eca5b75ba4 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AzurePlan.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/AzurePlan.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Details of the Azure plan. */ @Fluent public final class AzurePlan { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzurePlan.class); - /* * The sku id. */ @@ -26,6 +22,10 @@ public final class AzurePlan { @JsonProperty(value = "skuDescription", access = JsonProperty.Access.WRITE_ONLY) private String skuDescription; + /** Creates an instance of AzurePlan class. */ + public AzurePlan() { + } + /** * Get the skuId property: The sku id. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingAccountListResult.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingAccountListResult.java index 1e4830e58ee3..8671d7729a76 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingAccountListResult.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingAccountListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.BillingAccountInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of billing accounts. */ @Immutable public final class BillingAccountListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingAccountListResult.class); - /* * The list of billing accounts. */ @@ -28,6 +24,10 @@ public final class BillingAccountListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of BillingAccountListResult class. */ + public BillingAccountListResult() { + } + /** * Get the value property: The list of billing accounts. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingAccountUpdateRequest.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingAccountUpdateRequest.java index acb97373c28d..15afe141a31f 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingAccountUpdateRequest.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingAccountUpdateRequest.java @@ -5,23 +5,23 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.BillingAccountProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The request properties of the billing account that can be updated. */ @Fluent public final class BillingAccountUpdateRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingAccountUpdateRequest.class); - /* * A billing property. */ @JsonProperty(value = "properties") private BillingAccountProperties innerProperties; + /** Creates an instance of BillingAccountUpdateRequest class. */ + public BillingAccountUpdateRequest() { + } + /** * Get the innerProperties property: A billing property. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingAccounts.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingAccounts.java index fbfbd069beed..0846c2adf9c5 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingAccounts.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingAccounts.java @@ -15,7 +15,7 @@ public interface BillingAccounts { * * @throws com.azure.core.management.exception.ManagementException 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 of billing accounts. + * @return the list of billing accounts as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -27,7 +27,7 @@ public interface BillingAccounts { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing accounts. + * @return the list of billing accounts as paginated response with {@link PagedIterable}. */ PagedIterable list(String expand, Context context); @@ -35,25 +35,25 @@ public interface BillingAccounts { * Gets a billing account by its ID. * * @param billingAccountName The ID that uniquely identifies a billing account. + * @param expand May be used to expand the soldTo, invoice sections and billing profiles. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing account by its ID. + * @return a billing account by its ID along with {@link Response}. */ - BillingAccount get(String billingAccountName); + Response getWithResponse(String billingAccountName, String expand, Context context); /** * Gets a billing account by its ID. * * @param billingAccountName The ID that uniquely identifies a billing account. - * @param expand May be used to expand the soldTo, invoice sections and billing profiles. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a billing account by its ID. */ - Response getWithResponse(String billingAccountName, String expand, Context context); + BillingAccount get(String billingAccountName); /** * Updates the properties of a billing account. Currently, displayName and address can be updated. The operation is @@ -90,7 +90,8 @@ public interface BillingAccounts { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoice section properties with create subscription permission. + * @return the list of invoice section properties with create subscription permission as paginated response with + * {@link PagedIterable}. */ PagedIterable listInvoiceSectionsByCreateSubscriptionPermission( String billingAccountName); @@ -104,7 +105,8 @@ PagedIterable listInvoiceSectionsByCreate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoice section properties with create subscription permission. + * @return the list of invoice section properties with create subscription permission as paginated response with + * {@link PagedIterable}. */ PagedIterable listInvoiceSectionsByCreateSubscriptionPermission( String billingAccountName, Context context); diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingFrequency.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingFrequency.java index 3bc102e7aa56..f4a6a48bab3a 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingFrequency.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingFrequency.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for BillingFrequency. */ +/** The frequency at which the product will be billed. */ public final class BillingFrequency extends ExpandableStringEnum { /** Static value OneTime for BillingFrequency. */ public static final BillingFrequency ONE_TIME = fromString("OneTime"); @@ -30,7 +30,11 @@ public static BillingFrequency fromString(String name) { return fromString(name, BillingFrequency.class); } - /** @return known BillingFrequency values. */ + /** + * Gets known BillingFrequency values. + * + * @return known BillingFrequency values. + */ public static Collection values() { return values(BillingFrequency.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingPeriods.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingPeriods.java index e2b820043aa7..7ea051335afc 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingPeriods.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingPeriods.java @@ -17,7 +17,7 @@ public interface BillingPeriods { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing billing periods. + * @return result of listing billing periods as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -36,7 +36,7 @@ public interface BillingPeriods { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing billing periods. + * @return result of listing billing periods as paginated response with {@link PagedIterable}. */ PagedIterable list(String filter, String skiptoken, Integer top, Context context); @@ -45,23 +45,23 @@ public interface BillingPeriods { * which were not purchased directly through the Azure web portal are not supported through this preview API. * * @param billingPeriodName The name of a BillingPeriod resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a named billing period. + * @return a named billing period along with {@link Response}. */ - BillingPeriod get(String billingPeriodName); + Response getWithResponse(String billingPeriodName, Context context); /** * Gets a named billing period. This is only supported for Azure Web-Direct subscriptions. Other subscription types * which were not purchased directly through the Azure web portal are not supported through this preview API. * * @param billingPeriodName The name of a BillingPeriod resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a named billing period. */ - Response getWithResponse(String billingPeriodName, Context context); + BillingPeriod get(String billingPeriodName); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingPeriodsListResult.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingPeriodsListResult.java index eb1b669895b8..8e0037413f78 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingPeriodsListResult.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingPeriodsListResult.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.BillingPeriodInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -16,8 +14,6 @@ */ @Immutable public final class BillingPeriodsListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingPeriodsListResult.class); - /* * The list of billing periods. */ @@ -30,6 +26,10 @@ public final class BillingPeriodsListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of BillingPeriodsListResult class. */ + public BillingPeriodsListResult() { + } + /** * Get the value property: The list of billing periods. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingPermissions.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingPermissions.java index d77726f5684d..db63bcc0dbb6 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingPermissions.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingPermissions.java @@ -17,7 +17,8 @@ public interface BillingPermissions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ PagedIterable listByCustomer(String billingAccountName, String customerName); @@ -30,7 +31,8 @@ public interface BillingPermissions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ PagedIterable listByCustomer( String billingAccountName, String customerName, Context context); @@ -42,7 +44,8 @@ PagedIterable listByCustomer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ PagedIterable listByBillingAccount(String billingAccountName); @@ -54,7 +57,8 @@ PagedIterable listByCustomer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ PagedIterable listByBillingAccount(String billingAccountName, Context context); @@ -67,7 +71,8 @@ PagedIterable listByCustomer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ PagedIterable listByInvoiceSections( String billingAccountName, String billingProfileName, String invoiceSectionName); @@ -82,7 +87,8 @@ PagedIterable listByInvoiceSections( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ PagedIterable listByInvoiceSections( String billingAccountName, String billingProfileName, String invoiceSectionName, Context context); @@ -95,7 +101,8 @@ PagedIterable listByInvoiceSections( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ PagedIterable listByBillingProfile( String billingAccountName, String billingProfileName); @@ -109,7 +116,8 @@ PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of list billingPermissions a caller has on a billing account. + * @return result of list billingPermissions a caller has on a billing account as paginated response with {@link + * PagedIterable}. */ PagedIterable listByBillingProfile( String billingAccountName, String billingProfileName, Context context); diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingPermissionsListResult.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingPermissionsListResult.java index b33bb19f409e..6407b8a85a3a 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingPermissionsListResult.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingPermissionsListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.BillingPermissionsPropertiesInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Result of list billingPermissions a caller has on a billing account. */ @Immutable public final class BillingPermissionsListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingPermissionsListResult.class); - /* * The list of billingPermissions a caller has on a billing account. */ @@ -28,6 +24,10 @@ public final class BillingPermissionsListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of BillingPermissionsListResult class. */ + public BillingPermissionsListResult() { + } + /** * Get the value property: The list of billingPermissions a caller has on a billing account. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileInfo.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileInfo.java new file mode 100644 index 000000000000..d8b35e9983f8 --- /dev/null +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileInfo.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.billing.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Details about billing profile associated with agreement and available only for specific agreements. */ +@Fluent +public final class BillingProfileInfo { + /* + * The unique identifier for the billing profile. + */ + @JsonProperty(value = "billingProfileId") + private String billingProfileId; + + /* + * The name of the billing profile + */ + @JsonProperty(value = "billingProfileDisplayName") + private String billingProfileDisplayName; + + /* + * Billing account name. This property is available for a specific type of agreement. + */ + @JsonProperty(value = "indirectRelationshipOrganizationName") + private String indirectRelationshipOrganizationName; + + /** Creates an instance of BillingProfileInfo class. */ + public BillingProfileInfo() { + } + + /** + * Get the billingProfileId property: The unique identifier for the billing profile. + * + * @return the billingProfileId value. + */ + public String billingProfileId() { + return this.billingProfileId; + } + + /** + * Set the billingProfileId property: The unique identifier for the billing profile. + * + * @param billingProfileId the billingProfileId value to set. + * @return the BillingProfileInfo object itself. + */ + public BillingProfileInfo withBillingProfileId(String billingProfileId) { + this.billingProfileId = billingProfileId; + return this; + } + + /** + * Get the billingProfileDisplayName property: The name of the billing profile. + * + * @return the billingProfileDisplayName value. + */ + public String billingProfileDisplayName() { + return this.billingProfileDisplayName; + } + + /** + * Set the billingProfileDisplayName property: The name of the billing profile. + * + * @param billingProfileDisplayName the billingProfileDisplayName value to set. + * @return the BillingProfileInfo object itself. + */ + public BillingProfileInfo withBillingProfileDisplayName(String billingProfileDisplayName) { + this.billingProfileDisplayName = billingProfileDisplayName; + return this; + } + + /** + * Get the indirectRelationshipOrganizationName property: Billing account name. This property is available for a + * specific type of agreement. + * + * @return the indirectRelationshipOrganizationName value. + */ + public String indirectRelationshipOrganizationName() { + return this.indirectRelationshipOrganizationName; + } + + /** + * Set the indirectRelationshipOrganizationName property: Billing account name. This property is available for a + * specific type of agreement. + * + * @param indirectRelationshipOrganizationName the indirectRelationshipOrganizationName value to set. + * @return the BillingProfileInfo object itself. + */ + public BillingProfileInfo withIndirectRelationshipOrganizationName(String indirectRelationshipOrganizationName) { + this.indirectRelationshipOrganizationName = indirectRelationshipOrganizationName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileListResult.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileListResult.java index d04b645306ba..454ceba27857 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileListResult.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileListResult.java @@ -5,29 +5,35 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.BillingProfileInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of billing profiles. */ @Immutable public final class BillingProfileListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingProfileListResult.class); - /* * The list of billing profiles. */ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; + /* + * Total number of records. + */ + @JsonProperty(value = "totalCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer totalCount; + /* * The link (url) to the next page of results. */ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of BillingProfileListResult class. */ + public BillingProfileListResult() { + } + /** * Get the value property: The list of billing profiles. * @@ -37,6 +43,15 @@ public List value() { return this.value; } + /** + * Get the totalCount property: Total number of records. + * + * @return the totalCount value. + */ + public Integer totalCount() { + return this.totalCount; + } + /** * Get the nextLink property: The link (url) to the next page of results. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileSpendingLimit.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileSpendingLimit.java index 63e71f62c514..c6172fa519ed 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileSpendingLimit.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileSpendingLimit.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for BillingProfileSpendingLimit. */ +/** The billing profile spending limit. */ public final class BillingProfileSpendingLimit extends ExpandableStringEnum { /** Static value Off for BillingProfileSpendingLimit. */ public static final BillingProfileSpendingLimit OFF = fromString("Off"); @@ -27,7 +27,11 @@ public static BillingProfileSpendingLimit fromString(String name) { return fromString(name, BillingProfileSpendingLimit.class); } - /** @return known BillingProfileSpendingLimit values. */ + /** + * Gets known BillingProfileSpendingLimit values. + * + * @return known BillingProfileSpendingLimit values. + */ public static Collection values() { return values(BillingProfileSpendingLimit.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileStatus.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileStatus.java index d6c08a809115..8ede8112c567 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileStatus.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for BillingProfileStatus. */ +/** The status of the billing profile. */ public final class BillingProfileStatus extends ExpandableStringEnum { /** Static value Active for BillingProfileStatus. */ public static final BillingProfileStatus ACTIVE = fromString("Active"); @@ -30,7 +30,11 @@ public static BillingProfileStatus fromString(String name) { return fromString(name, BillingProfileStatus.class); } - /** @return known BillingProfileStatus values. */ + /** + * Gets known BillingProfileStatus values. + * + * @return known BillingProfileStatus values. + */ public static Collection values() { return values(BillingProfileStatus.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileStatusReasonCode.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileStatusReasonCode.java index 6e83246feb2f..18c32a2b0c82 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileStatusReasonCode.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfileStatusReasonCode.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for BillingProfileStatusReasonCode. */ +/** Reason for the specified billing profile status. */ public final class BillingProfileStatusReasonCode extends ExpandableStringEnum { /** Static value PastDue for BillingProfileStatusReasonCode. */ public static final BillingProfileStatusReasonCode PAST_DUE = fromString("PastDue"); @@ -30,7 +30,11 @@ public static BillingProfileStatusReasonCode fromString(String name) { return fromString(name, BillingProfileStatusReasonCode.class); } - /** @return known BillingProfileStatusReasonCode values. */ + /** + * Gets known BillingProfileStatusReasonCode values. + * + * @return known BillingProfileStatusReasonCode values. + */ public static Collection values() { return values(BillingProfileStatusReasonCode.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfiles.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfiles.java index 963647c7ca36..a07795c96dc0 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfiles.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfiles.java @@ -19,7 +19,7 @@ public interface BillingProfiles { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing profiles. + * @return the list of billing profiles as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingAccount(String billingAccountName); @@ -33,7 +33,7 @@ public interface BillingProfiles { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing profiles. + * @return the list of billing profiles as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingAccount(String billingAccountName, String expand, Context context); @@ -43,12 +43,15 @@ public interface BillingProfiles { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param expand May be used to expand the invoice sections. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing profile by its ID. + * @return a billing profile by its ID along with {@link Response}. */ - BillingProfile get(String billingAccountName, String billingProfileName); + Response getWithResponse( + String billingAccountName, String billingProfileName, String expand, Context context); /** * Gets a billing profile by its ID. The operation is supported for billing accounts with agreement type Microsoft @@ -56,15 +59,12 @@ public interface BillingProfiles { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. - * @param expand May be used to expand the invoice sections. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a billing profile by its ID. */ - Response getWithResponse( - String billingAccountName, String billingProfileName, String expand, Context context); + BillingProfile get(String billingAccountName, String billingProfileName); /** * Creates or updates a billing profile. The operation is supported for billing accounts with agreement type diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfilesCreateOrUpdateHeaders.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfilesCreateOrUpdateHeaders.java deleted file mode 100644 index 0e3de662525e..000000000000 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfilesCreateOrUpdateHeaders.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.billing.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The BillingProfilesCreateOrUpdateHeaders model. */ -@Fluent -public final class BillingProfilesCreateOrUpdateHeaders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingProfilesCreateOrUpdateHeaders.class); - - /* - * The Retry-After property. - */ - @JsonProperty(value = "Retry-After") - private Integer retryAfter; - - /* - * The Location property. - */ - @JsonProperty(value = "Location") - private String location; - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public Integer retryAfter() { - return this.retryAfter; - } - - /** - * Set the retryAfter property: The Retry-After property. - * - * @param retryAfter the retryAfter value to set. - * @return the BillingProfilesCreateOrUpdateHeaders object itself. - */ - public BillingProfilesCreateOrUpdateHeaders withRetryAfter(Integer retryAfter) { - this.retryAfter = retryAfter; - return this; - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The Location property. - * - * @param location the location value to set. - * @return the BillingProfilesCreateOrUpdateHeaders object itself. - */ - public BillingProfilesCreateOrUpdateHeaders withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfilesCreateOrUpdateResponse.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfilesCreateOrUpdateResponse.java deleted file mode 100644 index 4e96dc6ce51f..000000000000 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfilesCreateOrUpdateResponse.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.billing.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.billing.fluent.models.BillingProfileInner; - -/** Contains all response data for the createOrUpdate operation. */ -public final class BillingProfilesCreateOrUpdateResponse - extends ResponseBase { - /** - * Creates an instance of BillingProfilesCreateOrUpdateResponse. - * - * @param request the request which resulted in this BillingProfilesCreateOrUpdateResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public BillingProfilesCreateOrUpdateResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - BillingProfileInner value, - BillingProfilesCreateOrUpdateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public BillingProfileInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfilesOnExpand.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfilesOnExpand.java index 973e9d0a6a5a..065cefc415ee 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfilesOnExpand.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfilesOnExpand.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.BillingProfileInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,13 +15,9 @@ */ @Fluent public final class BillingProfilesOnExpand { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingProfilesOnExpand.class); - /* - * Indicates whether there are more billing profiles than the ones listed - * in this collection. The collection lists a maximum of 50 billing - * profiles. To get all billing profiles, use the list billing profiles - * API. + * Indicates whether there are more billing profiles than the ones listed in this collection. The collection lists + * a maximum of 50 billing profiles. To get all billing profiles, use the list billing profiles API. */ @JsonProperty(value = "hasMoreResults", access = JsonProperty.Access.WRITE_ONLY) private Boolean hasMoreResults; @@ -34,6 +28,10 @@ public final class BillingProfilesOnExpand { @JsonProperty(value = "value") private List value; + /** Creates an instance of BillingProfilesOnExpand class. */ + public BillingProfilesOnExpand() { + } + /** * Get the hasMoreResults property: Indicates whether there are more billing profiles than the ones listed in this * collection. The collection lists a maximum of 50 billing profiles. To get all billing profiles, use the list diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProperties.java index f14257349f5c..84c357a8fe6e 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProperties.java @@ -14,46 +14,46 @@ public interface BillingProperties { * Get the billing properties for a subscription. This operation is not supported for billing accounts with * agreement type Enterprise Agreement. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the billing properties for a subscription. + * @return the billing properties for a subscription along with {@link Response}. */ - BillingProperty get(); + Response getWithResponse(Context context); /** * Get the billing properties for a subscription. This operation is not supported for billing accounts with * agreement type Enterprise Agreement. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the billing properties for a subscription. */ - Response getWithResponse(Context context); + BillingProperty get(); /** * Updates the billing property of a subscription. Currently, cost center can be updated. The operation is supported * only for billing accounts with agreement type Microsoft Customer Agreement. * * @param parameters Request parameters that are provided to the update billing property operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing property. + * @return a billing property along with {@link Response}. */ - BillingProperty update(BillingPropertyInner parameters); + Response updateWithResponse(BillingPropertyInner parameters, Context context); /** * Updates the billing property of a subscription. Currently, cost center can be updated. The operation is supported * only for billing accounts with agreement type Microsoft Customer Agreement. * * @param parameters Request parameters that are provided to the update billing property operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a billing property. */ - Response updateWithResponse(BillingPropertyInner parameters, Context context); + BillingProperty update(BillingPropertyInner parameters); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRelationshipType.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRelationshipType.java index 17da8c5e2223..894d8231e252 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRelationshipType.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRelationshipType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for BillingRelationshipType. */ +/** Identifies which services and purchases are paid by a billing profile. */ public final class BillingRelationshipType extends ExpandableStringEnum { /** Static value Direct for BillingRelationshipType. */ public static final BillingRelationshipType DIRECT = fromString("Direct"); @@ -33,7 +33,11 @@ public static BillingRelationshipType fromString(String name) { return fromString(name, BillingRelationshipType.class); } - /** @return known BillingRelationshipType values. */ + /** + * Gets known BillingRelationshipType values. + * + * @return known BillingRelationshipType values. + */ public static Collection values() { return values(BillingRelationshipType.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRoleAssignmentListResult.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRoleAssignmentListResult.java index c6af8ad08b55..0c8573b0a5f9 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRoleAssignmentListResult.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRoleAssignmentListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.BillingRoleAssignmentInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of role assignments. */ @Immutable public final class BillingRoleAssignmentListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingRoleAssignmentListResult.class); - /* * The list of role assignments. */ @@ -28,6 +24,10 @@ public final class BillingRoleAssignmentListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of BillingRoleAssignmentListResult class. */ + public BillingRoleAssignmentListResult() { + } + /** * Get the value property: The list of role assignments. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRoleAssignments.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRoleAssignments.java index db514c419c63..b97391901fb8 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRoleAssignments.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRoleAssignments.java @@ -16,12 +16,14 @@ public interface BillingRoleAssignments { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a role assignment for the caller on a billing account. + * @return a role assignment for the caller on a billing account along with {@link Response}. */ - BillingRoleAssignment getByBillingAccount(String billingAccountName, String billingRoleAssignmentName); + Response getByBillingAccountWithResponse( + String billingAccountName, String billingRoleAssignmentName, Context context); /** * Gets a role assignment for the caller on a billing account. The operation is supported for billing accounts with @@ -29,14 +31,12 @@ public interface BillingRoleAssignments { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a role assignment for the caller on a billing account. */ - Response getByBillingAccountWithResponse( - String billingAccountName, String billingRoleAssignmentName, Context context); + BillingRoleAssignment getByBillingAccount(String billingAccountName, String billingRoleAssignmentName); /** * Deletes a role assignment for the caller on a billing account. The operation is supported for billing accounts @@ -44,12 +44,14 @@ Response getByBillingAccountWithResponse( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the role assignment. + * @return the role assignment along with {@link Response}. */ - BillingRoleAssignment deleteByBillingAccount(String billingAccountName, String billingRoleAssignmentName); + Response deleteByBillingAccountWithResponse( + String billingAccountName, String billingRoleAssignmentName, Context context); /** * Deletes a role assignment for the caller on a billing account. The operation is supported for billing accounts @@ -57,14 +59,12 @@ Response getByBillingAccountWithResponse( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the role assignment. */ - Response deleteByBillingAccountWithResponse( - String billingAccountName, String billingRoleAssignmentName, Context context); + BillingRoleAssignment deleteByBillingAccount(String billingAccountName, String billingRoleAssignmentName); /** * Gets a role assignment for the caller on an invoice section. The operation is supported for billing accounts with @@ -74,16 +74,18 @@ Response deleteByBillingAccountWithResponse( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a role assignment for the caller on an invoice section. + * @return a role assignment for the caller on an invoice section along with {@link Response}. */ - BillingRoleAssignment getByInvoiceSection( + Response getByInvoiceSectionWithResponse( String billingAccountName, String billingProfileName, String invoiceSectionName, - String billingRoleAssignmentName); + String billingRoleAssignmentName, + Context context); /** * Gets a role assignment for the caller on an invoice section. The operation is supported for billing accounts with @@ -93,18 +95,16 @@ BillingRoleAssignment getByInvoiceSection( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a role assignment for the caller on an invoice section. */ - Response getByInvoiceSectionWithResponse( + BillingRoleAssignment getByInvoiceSection( String billingAccountName, String billingProfileName, String invoiceSectionName, - String billingRoleAssignmentName, - Context context); + String billingRoleAssignmentName); /** * Deletes a role assignment for the caller on an invoice section. The operation is supported for billing accounts @@ -114,16 +114,18 @@ Response getByInvoiceSectionWithResponse( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the role assignment. + * @return the role assignment along with {@link Response}. */ - BillingRoleAssignment deleteByInvoiceSection( + Response deleteByInvoiceSectionWithResponse( String billingAccountName, String billingProfileName, String invoiceSectionName, - String billingRoleAssignmentName); + String billingRoleAssignmentName, + Context context); /** * Deletes a role assignment for the caller on an invoice section. The operation is supported for billing accounts @@ -133,18 +135,16 @@ BillingRoleAssignment deleteByInvoiceSection( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the role assignment. */ - Response deleteByInvoiceSectionWithResponse( + BillingRoleAssignment deleteByInvoiceSection( String billingAccountName, String billingProfileName, String invoiceSectionName, - String billingRoleAssignmentName, - Context context); + String billingRoleAssignmentName); /** * Gets a role assignment for the caller on a billing profile. The operation is supported for billing accounts with @@ -153,13 +153,14 @@ Response deleteByInvoiceSectionWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a role assignment for the caller on a billing profile. + * @return a role assignment for the caller on a billing profile along with {@link Response}. */ - BillingRoleAssignment getByBillingProfile( - String billingAccountName, String billingProfileName, String billingRoleAssignmentName); + Response getByBillingProfileWithResponse( + String billingAccountName, String billingProfileName, String billingRoleAssignmentName, Context context); /** * Gets a role assignment for the caller on a billing profile. The operation is supported for billing accounts with @@ -168,14 +169,13 @@ BillingRoleAssignment getByBillingProfile( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a role assignment for the caller on a billing profile. */ - Response getByBillingProfileWithResponse( - String billingAccountName, String billingProfileName, String billingRoleAssignmentName, Context context); + BillingRoleAssignment getByBillingProfile( + String billingAccountName, String billingProfileName, String billingRoleAssignmentName); /** * Deletes a role assignment for the caller on a billing profile. The operation is supported for billing accounts @@ -184,13 +184,14 @@ Response getByBillingProfileWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the role assignment. + * @return the role assignment along with {@link Response}. */ - BillingRoleAssignment deleteByBillingProfile( - String billingAccountName, String billingProfileName, String billingRoleAssignmentName); + Response deleteByBillingProfileWithResponse( + String billingAccountName, String billingProfileName, String billingRoleAssignmentName, Context context); /** * Deletes a role assignment for the caller on a billing profile. The operation is supported for billing accounts @@ -199,14 +200,13 @@ BillingRoleAssignment deleteByBillingProfile( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the role assignment. */ - Response deleteByBillingProfileWithResponse( - String billingAccountName, String billingProfileName, String billingRoleAssignmentName, Context context); + BillingRoleAssignment deleteByBillingProfile( + String billingAccountName, String billingProfileName, String billingRoleAssignmentName); /** * Lists the role assignments for the caller on a billing account. The operation is supported for billing accounts @@ -216,7 +216,7 @@ Response deleteByBillingProfileWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingAccount(String billingAccountName); @@ -229,7 +229,7 @@ Response deleteByBillingProfileWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingAccount(String billingAccountName, Context context); @@ -243,7 +243,7 @@ Response deleteByBillingProfileWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedIterable}. */ PagedIterable listByInvoiceSection( String billingAccountName, String billingProfileName, String invoiceSectionName); @@ -259,7 +259,7 @@ PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedIterable}. */ PagedIterable listByInvoiceSection( String billingAccountName, String billingProfileName, String invoiceSectionName, Context context); @@ -273,7 +273,7 @@ PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName); @@ -287,7 +287,7 @@ PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role assignments. + * @return the list of role assignments as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingProfile( String billingAccountName, String billingProfileName, Context context); diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRoleDefinitionListResult.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRoleDefinitionListResult.java index f91d44eddcf3..80c001a0a086 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRoleDefinitionListResult.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRoleDefinitionListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.BillingRoleDefinitionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of role definitions. */ @Immutable public final class BillingRoleDefinitionListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingRoleDefinitionListResult.class); - /* * The role definitions. */ @@ -28,6 +24,10 @@ public final class BillingRoleDefinitionListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of BillingRoleDefinitionListResult class. */ + public BillingRoleDefinitionListResult() { + } + /** * Get the value property: The role definitions. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRoleDefinitions.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRoleDefinitions.java index 9fc865e32bf9..2bad7e3a7929 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRoleDefinitions.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingRoleDefinitions.java @@ -16,12 +16,14 @@ public interface BillingRoleDefinitions { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the definition for a role on a billing account. + * @return the definition for a role on a billing account along with {@link Response}. */ - BillingRoleDefinition getByBillingAccount(String billingAccountName, String billingRoleDefinitionName); + Response getByBillingAccountWithResponse( + String billingAccountName, String billingRoleDefinitionName, Context context); /** * Gets the definition for a role on a billing account. The operation is supported for billing accounts with @@ -29,14 +31,12 @@ public interface BillingRoleDefinitions { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the definition for a role on a billing account. */ - Response getByBillingAccountWithResponse( - String billingAccountName, String billingRoleDefinitionName, Context context); + BillingRoleDefinition getByBillingAccount(String billingAccountName, String billingRoleDefinitionName); /** * Gets the definition for a role on an invoice section. The operation is supported only for billing accounts with @@ -46,16 +46,18 @@ Response getByBillingAccountWithResponse( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the definition for a role on an invoice section. + * @return the definition for a role on an invoice section along with {@link Response}. */ - BillingRoleDefinition getByInvoiceSection( + Response getByInvoiceSectionWithResponse( String billingAccountName, String billingProfileName, String invoiceSectionName, - String billingRoleDefinitionName); + String billingRoleDefinitionName, + Context context); /** * Gets the definition for a role on an invoice section. The operation is supported only for billing accounts with @@ -65,18 +67,16 @@ BillingRoleDefinition getByInvoiceSection( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the definition for a role on an invoice section. */ - Response getByInvoiceSectionWithResponse( + BillingRoleDefinition getByInvoiceSection( String billingAccountName, String billingProfileName, String invoiceSectionName, - String billingRoleDefinitionName, - Context context); + String billingRoleDefinitionName); /** * Gets the definition for a role on a billing profile. The operation is supported for billing accounts with @@ -85,13 +85,14 @@ Response getByInvoiceSectionWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the definition for a role on a billing profile. + * @return the definition for a role on a billing profile along with {@link Response}. */ - BillingRoleDefinition getByBillingProfile( - String billingAccountName, String billingProfileName, String billingRoleDefinitionName); + Response getByBillingProfileWithResponse( + String billingAccountName, String billingProfileName, String billingRoleDefinitionName, Context context); /** * Gets the definition for a role on a billing profile. The operation is supported for billing accounts with @@ -100,14 +101,13 @@ BillingRoleDefinition getByBillingProfile( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the definition for a role on a billing profile. */ - Response getByBillingProfileWithResponse( - String billingAccountName, String billingProfileName, String billingRoleDefinitionName, Context context); + BillingRoleDefinition getByBillingProfile( + String billingAccountName, String billingProfileName, String billingRoleDefinitionName); /** * Lists the role definitions for a billing account. The operation is supported for billing accounts with agreement @@ -117,7 +117,7 @@ Response getByBillingProfileWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingAccount(String billingAccountName); @@ -130,7 +130,7 @@ Response getByBillingProfileWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingAccount(String billingAccountName, Context context); @@ -144,7 +144,7 @@ Response getByBillingProfileWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedIterable}. */ PagedIterable listByInvoiceSection( String billingAccountName, String billingProfileName, String invoiceSectionName); @@ -160,7 +160,7 @@ PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedIterable}. */ PagedIterable listByInvoiceSection( String billingAccountName, String billingProfileName, String invoiceSectionName, Context context); @@ -174,7 +174,7 @@ PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName); @@ -188,7 +188,7 @@ PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of role definitions. + * @return the list of role definitions as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingProfile( String billingAccountName, String billingProfileName, Context context); diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingSubscriptionStatusType.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingSubscriptionStatusType.java index a2ca1265ed9a..f7516f05dfae 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingSubscriptionStatusType.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingSubscriptionStatusType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for BillingSubscriptionStatusType. */ +/** The current billing status of the subscription. */ public final class BillingSubscriptionStatusType extends ExpandableStringEnum { /** Static value Active for BillingSubscriptionStatusType. */ public static final BillingSubscriptionStatusType ACTIVE = fromString("Active"); @@ -36,7 +36,11 @@ public static BillingSubscriptionStatusType fromString(String name) { return fromString(name, BillingSubscriptionStatusType.class); } - /** @return known BillingSubscriptionStatusType values. */ + /** + * Gets known BillingSubscriptionStatusType values. + * + * @return known BillingSubscriptionStatusType values. + */ public static Collection values() { return values(BillingSubscriptionStatusType.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingSubscriptions.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingSubscriptions.java index 4d9fed6033d1..f2898f82f82a 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingSubscriptions.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingSubscriptions.java @@ -20,7 +20,7 @@ public interface BillingSubscriptions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ PagedIterable listByCustomer(String billingAccountName, String customerName); @@ -34,7 +34,7 @@ public interface BillingSubscriptions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ PagedIterable listByCustomer(String billingAccountName, String customerName, Context context); @@ -46,7 +46,7 @@ public interface BillingSubscriptions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingAccount(String billingAccountName); @@ -59,7 +59,7 @@ public interface BillingSubscriptions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingAccount(String billingAccountName, Context context); @@ -72,7 +72,7 @@ public interface BillingSubscriptions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName); @@ -86,7 +86,7 @@ public interface BillingSubscriptions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingProfile( String billingAccountName, String billingProfileName, Context context); @@ -101,7 +101,7 @@ PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ PagedIterable listByInvoiceSection( String billingAccountName, String billingProfileName, String invoiceSectionName); @@ -117,7 +117,7 @@ PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing subscriptions. + * @return the list of billing subscriptions as paginated response with {@link PagedIterable}. */ PagedIterable listByInvoiceSection( String billingAccountName, String billingProfileName, String invoiceSectionName, Context context); @@ -127,25 +127,25 @@ PagedIterable listByInvoiceSection( * Customer Agreement and Microsoft Partner Agreement. * * @param billingAccountName The ID that uniquely identifies a billing account. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a subscription by its ID. + * @return a subscription by its ID along with {@link Response}. */ - BillingSubscription get(String billingAccountName); + Response getWithResponse(String billingAccountName, Context context); /** * Gets a subscription by its ID. The operation is supported for billing accounts with agreement type Microsoft * Customer Agreement and Microsoft Partner Agreement. * * @param billingAccountName The ID that uniquely identifies a billing account. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a subscription by its ID. */ - Response getWithResponse(String billingAccountName, Context context); + BillingSubscription get(String billingAccountName); /** * Updates the properties of a billing subscription. Currently, cost center can be updated. The operation is @@ -153,12 +153,14 @@ PagedIterable listByInvoiceSection( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param parameters Request parameters that are provided to the update billing subscription operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a billing subscription. + * @return a billing subscription along with {@link Response}. */ - BillingSubscription update(String billingAccountName, BillingSubscriptionInner parameters); + Response updateWithResponse( + String billingAccountName, BillingSubscriptionInner parameters, Context context); /** * Updates the properties of a billing subscription. Currently, cost center can be updated. The operation is @@ -166,14 +168,12 @@ PagedIterable listByInvoiceSection( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param parameters Request parameters that are provided to the update billing subscription operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a billing subscription. */ - Response updateWithResponse( - String billingAccountName, BillingSubscriptionInner parameters, Context context); + BillingSubscription update(String billingAccountName, BillingSubscriptionInner parameters); /** * Moves a subscription's charges to a new invoice section. The new invoice section must belong to the same billing @@ -211,13 +211,14 @@ BillingSubscription move( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param parameters Request parameters that are provided to the validate move eligibility operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the transfer eligibility validation. + * @return result of the transfer eligibility validation along with {@link Response}. */ - ValidateSubscriptionTransferEligibilityResult validateMove( - String billingAccountName, TransferBillingSubscriptionRequestProperties parameters); + Response validateMoveWithResponse( + String billingAccountName, TransferBillingSubscriptionRequestProperties parameters, Context context); /** * Validates if a subscription's charges can be moved to a new invoice section. This operation is supported for @@ -225,12 +226,11 @@ ValidateSubscriptionTransferEligibilityResult validateMove( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param parameters Request parameters that are provided to the validate move eligibility operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the transfer eligibility validation. */ - Response validateMoveWithResponse( - String billingAccountName, TransferBillingSubscriptionRequestProperties parameters, Context context); + ValidateSubscriptionTransferEligibilityResult validateMove( + String billingAccountName, TransferBillingSubscriptionRequestProperties parameters); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingSubscriptionsListResult.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingSubscriptionsListResult.java index 8da7ec2f2385..9593b2711cd0 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingSubscriptionsListResult.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingSubscriptionsListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.BillingSubscriptionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of billing subscriptions. */ @Immutable public final class BillingSubscriptionsListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingSubscriptionsListResult.class); - /* * The list of billing subscriptions. */ @@ -34,6 +30,10 @@ public final class BillingSubscriptionsListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of BillingSubscriptionsListResult class. */ + public BillingSubscriptionsListResult() { + } + /** * Get the value property: The list of billing subscriptions. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingSubscriptionsMoveHeaders.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingSubscriptionsMoveHeaders.java deleted file mode 100644 index 28d4593ed591..000000000000 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingSubscriptionsMoveHeaders.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.billing.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The BillingSubscriptionsMoveHeaders model. */ -@Fluent -public final class BillingSubscriptionsMoveHeaders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingSubscriptionsMoveHeaders.class); - - /* - * The Retry-After property. - */ - @JsonProperty(value = "Retry-After") - private Integer retryAfter; - - /* - * The Location property. - */ - @JsonProperty(value = "Location") - private String location; - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public Integer retryAfter() { - return this.retryAfter; - } - - /** - * Set the retryAfter property: The Retry-After property. - * - * @param retryAfter the retryAfter value to set. - * @return the BillingSubscriptionsMoveHeaders object itself. - */ - public BillingSubscriptionsMoveHeaders withRetryAfter(Integer retryAfter) { - this.retryAfter = retryAfter; - return this; - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The Location property. - * - * @param location the location value to set. - * @return the BillingSubscriptionsMoveHeaders object itself. - */ - public BillingSubscriptionsMoveHeaders withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingSubscriptionsMoveResponse.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingSubscriptionsMoveResponse.java deleted file mode 100644 index 1017331eedcc..000000000000 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingSubscriptionsMoveResponse.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.billing.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.billing.fluent.models.BillingSubscriptionInner; - -/** Contains all response data for the move operation. */ -public final class BillingSubscriptionsMoveResponse - extends ResponseBase { - /** - * Creates an instance of BillingSubscriptionsMoveResponse. - * - * @param request the request which resulted in this BillingSubscriptionsMoveResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public BillingSubscriptionsMoveResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - BillingSubscriptionInner value, - BillingSubscriptionsMoveHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public BillingSubscriptionInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Category.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Category.java index c82bc4744571..af84ebf83c4c 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Category.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Category.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Category. */ +/** The category of the agreement signed by a customer. */ public final class Category extends ExpandableStringEnum { /** Static value MicrosoftCustomerAgreement for Category. */ public static final Category MICROSOFT_CUSTOMER_AGREEMENT = fromString("MicrosoftCustomerAgreement"); @@ -30,7 +30,11 @@ public static Category fromString(String name) { return fromString(name, Category.class); } - /** @return known Category values. */ + /** + * Gets known Category values. + * + * @return known Category values. + */ public static Collection values() { return values(Category.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/CustomerListResult.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/CustomerListResult.java index c6b771c4b6d9..771a360eb85e 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/CustomerListResult.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/CustomerListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.CustomerInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of customers. */ @Immutable public final class CustomerListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomerListResult.class); - /* * The list of customers. */ @@ -34,6 +30,10 @@ public final class CustomerListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of CustomerListResult class. */ + public CustomerListResult() { + } + /** * Get the value property: The list of customers. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Customers.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Customers.java index dde20eec5f20..1cf38aede92c 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Customers.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Customers.java @@ -19,7 +19,7 @@ public interface Customers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of customers. + * @return the list of customers as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName); @@ -36,7 +36,7 @@ public interface Customers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of customers. + * @return the list of customers as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingProfile( String billingAccountName, String billingProfileName, String search, String filter, Context context); @@ -49,7 +49,7 @@ PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of customers. + * @return the list of customers as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingAccount(String billingAccountName); @@ -65,7 +65,7 @@ PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of customers. + * @return the list of customers as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingAccount( String billingAccountName, String search, String filter, Context context); @@ -76,12 +76,14 @@ PagedIterable listByBillingAccount( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. + * @param expand May be used to expand enabledAzurePlans and resellers. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a customer by its ID. + * @return a customer by its ID along with {@link Response}. */ - Customer get(String billingAccountName, String customerName); + Response getWithResponse(String billingAccountName, String customerName, String expand, Context context); /** * Gets a customer by its ID. The operation is supported only for billing accounts with agreement type Microsoft @@ -89,12 +91,10 @@ PagedIterable listByBillingAccount( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. - * @param expand May be used to expand enabledAzurePlans and resellers. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a customer by its ID. */ - Response getWithResponse(String billingAccountName, String customerName, String expand, Context context); + Customer get(String billingAccountName, String customerName); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Department.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Department.java index 3ae2b4a76287..f706b53a7be9 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Department.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Department.java @@ -6,23 +6,23 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.DepartmentProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A department. */ @Fluent public final class Department extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Department.class); - /* * A department. */ @JsonProperty(value = "properties") private DepartmentProperties innerProperties; + /** Creates an instance of Department class. */ + public Department() { + } + /** * Get the innerProperties property: A department. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Document.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Document.java index b220edb350a9..38c0dada032a 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Document.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Document.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties of a document. */ @Immutable public final class Document { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Document.class); - /* * The type of the document. */ @@ -27,12 +23,15 @@ public final class Document { private String url; /* - * The source of the document. ENF for Brazil and DRS for rest of the - * world. + * The source of the document. ENF for Brazil and DRS for rest of the world. */ @JsonProperty(value = "source", access = JsonProperty.Access.WRITE_ONLY) private DocumentSource source; + /** Creates an instance of Document class. */ + public Document() { + } + /** * Get the kind property: The type of the document. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/DocumentSource.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/DocumentSource.java index 05c5bde83de4..0deb8d4f15ea 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/DocumentSource.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/DocumentSource.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DocumentSource. */ +/** The source of the document. ENF for Brazil and DRS for rest of the world. */ public final class DocumentSource extends ExpandableStringEnum { /** Static value DRS for DocumentSource. */ public static final DocumentSource DRS = fromString("DRS"); @@ -27,7 +27,11 @@ public static DocumentSource fromString(String name) { return fromString(name, DocumentSource.class); } - /** @return known DocumentSource values. */ + /** + * Gets known DocumentSource values. + * + * @return known DocumentSource values. + */ public static Collection values() { return values(DocumentSource.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/DocumentType.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/DocumentType.java index f838d2ce83e7..7837fe8b203c 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/DocumentType.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/DocumentType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DocumentType. */ +/** The type of the document. */ public final class DocumentType extends ExpandableStringEnum { /** Static value Invoice for DocumentType. */ public static final DocumentType INVOICE = fromString("Invoice"); @@ -33,7 +33,11 @@ public static DocumentType fromString(String name) { return fromString(name, DocumentType.class); } - /** @return known DocumentType values. */ + /** + * Gets known DocumentType values. + * + * @return known DocumentType values. + */ public static Collection values() { return values(DocumentType.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Enrollment.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Enrollment.java index 853e8ab502ad..0655e4378224 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Enrollment.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Enrollment.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** The properties of an enrollment. */ @Fluent public final class Enrollment { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Enrollment.class); - /* * The start date of the enrollment. */ @@ -69,6 +65,10 @@ public final class Enrollment { @JsonProperty(value = "billingCycle", access = JsonProperty.Access.WRITE_ONLY) private String billingCycle; + /** Creates an instance of Enrollment class. */ + public Enrollment() { + } + /** * Get the startDate property: The start date of the enrollment. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/EnrollmentAccount.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/EnrollmentAccount.java index d0d7e9372ed0..c1209ebcf0d7 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/EnrollmentAccount.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/EnrollmentAccount.java @@ -6,23 +6,23 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.EnrollmentAccountProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** An enrollment account. */ @Fluent public final class EnrollmentAccount extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnrollmentAccount.class); - /* * The properties of an enrollment account. */ @JsonProperty(value = "properties") private EnrollmentAccountProperties innerProperties; + /** Creates an instance of EnrollmentAccount class. */ + public EnrollmentAccount() { + } + /** * Get the innerProperties property: The properties of an enrollment account. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/EnrollmentAccountListResult.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/EnrollmentAccountListResult.java index 76252ce9848a..e27dab10a0af 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/EnrollmentAccountListResult.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/EnrollmentAccountListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.EnrollmentAccountSummaryInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Result of listing enrollment accounts. */ @Immutable public final class EnrollmentAccountListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnrollmentAccountListResult.class); - /* * The list of enrollment accounts. */ @@ -28,6 +24,10 @@ public final class EnrollmentAccountListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of EnrollmentAccountListResult class. */ + public EnrollmentAccountListResult() { + } + /** * Get the value property: The list of enrollment accounts. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/EnrollmentAccounts.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/EnrollmentAccounts.java index 243221dcb517..556421ab3c39 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/EnrollmentAccounts.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/EnrollmentAccounts.java @@ -15,7 +15,7 @@ public interface EnrollmentAccounts { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing enrollment accounts. + * @return result of listing enrollment accounts as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -26,7 +26,7 @@ public interface EnrollmentAccounts { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing enrollment accounts. + * @return result of listing enrollment accounts as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -34,22 +34,22 @@ public interface EnrollmentAccounts { * Gets a enrollment account by name. * * @param name Enrollment Account name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a enrollment account by name. + * @return a enrollment account by name along with {@link Response}. */ - EnrollmentAccountSummary get(String name); + Response getWithResponse(String name, Context context); /** * Gets a enrollment account by name. * * @param name Enrollment Account name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a enrollment account by name. */ - Response getWithResponse(String name, Context context); + EnrollmentAccountSummary get(String name); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/EnrollmentPolicies.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/EnrollmentPolicies.java index 4a8a324445e5..ee53bffd0ca6 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/EnrollmentPolicies.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/EnrollmentPolicies.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The policies for Enterprise Agreement enrollments. */ @Immutable public final class EnrollmentPolicies { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnrollmentPolicies.class); - /* * The policy that controls whether Account Owners can view charges. */ @@ -21,26 +17,27 @@ public final class EnrollmentPolicies { private Boolean accountOwnerViewCharges; /* - * The policy that controls whether Department Administrators can view - * charges. + * The policy that controls whether Department Administrators can view charges. */ @JsonProperty(value = "departmentAdminViewCharges", access = JsonProperty.Access.WRITE_ONLY) private Boolean departmentAdminViewCharges; /* - * The policy that controls whether Azure marketplace purchases are allowed - * in the enrollment. + * The policy that controls whether Azure marketplace purchases are allowed in the enrollment. */ @JsonProperty(value = "marketplaceEnabled", access = JsonProperty.Access.WRITE_ONLY) private Boolean marketplaceEnabled; /* - * The policy that controls whether Azure reservation purchases are allowed - * in the enrollment. + * The policy that controls whether Azure reservation purchases are allowed in the enrollment. */ @JsonProperty(value = "reservedInstancesEnabled", access = JsonProperty.Access.WRITE_ONLY) private Boolean reservedInstancesEnabled; + /** Creates an instance of EnrollmentPolicies class. */ + public EnrollmentPolicies() { + } + /** * Get the accountOwnerViewCharges property: The policy that controls whether Account Owners can view charges. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/IndirectRelationshipInfo.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/IndirectRelationshipInfo.java index 7a7349698cb1..23b1a61c4839 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/IndirectRelationshipInfo.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/IndirectRelationshipInfo.java @@ -5,25 +5,19 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The billing profile details of the partner of the customer for an indirect motion. */ @Fluent public final class IndirectRelationshipInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IndirectRelationshipInfo.class); - /* - * The billing account name of the partner or the customer for an indirect - * motion. + * The billing account name of the partner or the customer for an indirect motion. */ @JsonProperty(value = "billingAccountName") private String billingAccountName; /* - * The billing profile name of the partner or the customer for an indirect - * motion. + * The billing profile name of the partner or the customer for an indirect motion. */ @JsonProperty(value = "billingProfileName") private String billingProfileName; @@ -34,6 +28,10 @@ public final class IndirectRelationshipInfo { @JsonProperty(value = "displayName") private String displayName; + /** Creates an instance of IndirectRelationshipInfo class. */ + public IndirectRelationshipInfo() { + } + /** * Get the billingAccountName property: The billing account name of the partner or the customer for an indirect * motion. diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InstructionListResult.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InstructionListResult.java index ffa38b2217d0..c5c21be50463 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InstructionListResult.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InstructionListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.InstructionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of billing instructions used during invoice generation. */ @Immutable public final class InstructionListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InstructionListResult.class); - /* * The list of billing instructions used during invoice generation. */ @@ -28,6 +24,10 @@ public final class InstructionListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of InstructionListResult class. */ + public InstructionListResult() { + } + /** * Get the value property: The list of billing instructions used during invoice generation. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Instructions.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Instructions.java index c103d55aac7b..cb9c96e4b574 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Instructions.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Instructions.java @@ -19,7 +19,8 @@ public interface Instructions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing instructions used during invoice generation. + * @return the list of billing instructions used during invoice generation as paginated response with {@link + * PagedIterable}. */ PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName); @@ -32,7 +33,8 @@ public interface Instructions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing instructions used during invoice generation. + * @return the list of billing instructions used during invoice generation as paginated response with {@link + * PagedIterable}. */ PagedIterable listByBillingProfile( String billingAccountName, String billingProfileName, Context context); @@ -43,12 +45,14 @@ PagedIterable listByBillingProfile( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param instructionName Instruction Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the instruction by name. + * @return the instruction by name along with {@link Response}. */ - Instruction get(String billingAccountName, String billingProfileName, String instructionName); + Response getWithResponse( + String billingAccountName, String billingProfileName, String instructionName, Context context); /** * Get the instruction by name. These are custom billing instructions and are only applicable for certain customers. @@ -56,14 +60,12 @@ PagedIterable listByBillingProfile( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param instructionName Instruction Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the instruction by name. */ - Response getWithResponse( - String billingAccountName, String billingProfileName, String instructionName, Context context); + Instruction get(String billingAccountName, String billingProfileName, String instructionName); /** * Creates or updates an instruction. These are custom billing instructions and are only applicable for certain @@ -73,13 +75,18 @@ Response getWithResponse( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param instructionName Instruction Name. * @param parameters The new instruction. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instruction. + * @return an instruction along with {@link Response}. */ - Instruction put( - String billingAccountName, String billingProfileName, String instructionName, InstructionInner parameters); + Response putWithResponse( + String billingAccountName, + String billingProfileName, + String instructionName, + InstructionInner parameters, + Context context); /** * Creates or updates an instruction. These are custom billing instructions and are only applicable for certain @@ -89,16 +96,11 @@ Instruction put( * @param billingProfileName The ID that uniquely identifies a billing profile. * @param instructionName Instruction Name. * @param parameters The new instruction. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an instruction. */ - Response putWithResponse( - String billingAccountName, - String billingProfileName, - String instructionName, - InstructionInner parameters, - Context context); + Instruction put( + String billingAccountName, String billingProfileName, String instructionName, InstructionInner parameters); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceDocumentType.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceDocumentType.java index 9f0fec604b55..400f29b17887 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceDocumentType.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceDocumentType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for InvoiceDocumentType. */ +/** The type of the document. */ public final class InvoiceDocumentType extends ExpandableStringEnum { /** Static value Invoice for InvoiceDocumentType. */ public static final InvoiceDocumentType INVOICE = fromString("Invoice"); @@ -27,7 +27,11 @@ public static InvoiceDocumentType fromString(String name) { return fromString(name, InvoiceDocumentType.class); } - /** @return known InvoiceDocumentType values. */ + /** + * Gets known InvoiceDocumentType values. + * + * @return known InvoiceDocumentType values. + */ public static Collection values() { return values(InvoiceDocumentType.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceListResult.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceListResult.java index d4b590e7e985..ce13fcbc1a01 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceListResult.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.InvoiceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of invoices. */ @Immutable public final class InvoiceListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InvoiceListResult.class); - /* * The list of invoices. */ @@ -28,6 +24,16 @@ public final class InvoiceListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /* + * Total number of records. + */ + @JsonProperty(value = "totalCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer totalCount; + + /** Creates an instance of InvoiceListResult class. */ + public InvoiceListResult() { + } + /** * Get the value property: The list of invoices. * @@ -46,6 +52,15 @@ public String nextLink() { return this.nextLink; } + /** + * Get the totalCount property: Total number of records. + * + * @return the totalCount value. + */ + public Integer totalCount() { + return this.totalCount; + } + /** * Validates the instance. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionListResult.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionListResult.java index d39eaef775ff..6f2e48d840c5 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionListResult.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.InvoiceSectionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of invoice sections. */ @Immutable public final class InvoiceSectionListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InvoiceSectionListResult.class); - /* * The list of invoice sections. */ @@ -34,6 +30,10 @@ public final class InvoiceSectionListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of InvoiceSectionListResult class. */ + public InvoiceSectionListResult() { + } + /** * Get the value property: The list of invoice sections. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionListWithCreateSubPermissionResult.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionListWithCreateSubPermissionResult.java index b08686544b67..aa8564c38ab5 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionListWithCreateSubPermissionResult.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionListWithCreateSubPermissionResult.java @@ -5,21 +5,15 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.InvoiceSectionWithCreateSubPermissionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of invoice section properties with create subscription permission. */ @Fluent public final class InvoiceSectionListWithCreateSubPermissionResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(InvoiceSectionListWithCreateSubPermissionResult.class); - /* - * The list of invoice section properties with create subscription - * permission. + * The list of invoice section properties with create subscription permission. */ @JsonProperty(value = "value") private List value; @@ -30,6 +24,10 @@ public final class InvoiceSectionListWithCreateSubPermissionResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of InvoiceSectionListWithCreateSubPermissionResult class. */ + public InvoiceSectionListWithCreateSubPermissionResult() { + } + /** * Get the value property: The list of invoice section properties with create subscription permission. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionState.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionState.java index cf4620ae2294..619c62a3a27b 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionState.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for InvoiceSectionState. */ +/** Identifies the state of an invoice section. */ public final class InvoiceSectionState extends ExpandableStringEnum { /** Static value Active for InvoiceSectionState. */ public static final InvoiceSectionState ACTIVE = fromString("Active"); @@ -27,7 +27,11 @@ public static InvoiceSectionState fromString(String name) { return fromString(name, InvoiceSectionState.class); } - /** @return known InvoiceSectionState values. */ + /** + * Gets known InvoiceSectionState values. + * + * @return known InvoiceSectionState values. + */ public static Collection values() { return values(InvoiceSectionState.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSections.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSections.java index b76e9dad4aed..82e25a50ccdf 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSections.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSections.java @@ -20,7 +20,7 @@ public interface InvoiceSections { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoice sections. + * @return the list of invoice sections as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName); @@ -34,7 +34,7 @@ public interface InvoiceSections { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoice sections. + * @return the list of invoice sections as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingProfile( String billingAccountName, String billingProfileName, Context context); @@ -46,12 +46,14 @@ PagedIterable listByBillingProfile( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice section by its ID. + * @return an invoice section by its ID along with {@link Response}. */ - InvoiceSection get(String billingAccountName, String billingProfileName, String invoiceSectionName); + Response getWithResponse( + String billingAccountName, String billingProfileName, String invoiceSectionName, Context context); /** * Gets an invoice section by its ID. The operation is supported only for billing accounts with agreement type @@ -60,14 +62,12 @@ PagedIterable listByBillingProfile( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param invoiceSectionName The ID that uniquely identifies an invoice section. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an invoice section by its ID. */ - Response getWithResponse( - String billingAccountName, String billingProfileName, String invoiceSectionName, Context context); + InvoiceSection get(String billingAccountName, String billingProfileName, String invoiceSectionName); /** * Creates or updates an invoice section. The operation is supported only for billing accounts with agreement type diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionsCreateOrUpdateHeaders.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionsCreateOrUpdateHeaders.java deleted file mode 100644 index 393d88051aca..000000000000 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionsCreateOrUpdateHeaders.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.billing.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The InvoiceSectionsCreateOrUpdateHeaders model. */ -@Fluent -public final class InvoiceSectionsCreateOrUpdateHeaders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InvoiceSectionsCreateOrUpdateHeaders.class); - - /* - * The Retry-After property. - */ - @JsonProperty(value = "Retry-After") - private Integer retryAfter; - - /* - * The Location property. - */ - @JsonProperty(value = "Location") - private String location; - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public Integer retryAfter() { - return this.retryAfter; - } - - /** - * Set the retryAfter property: The Retry-After property. - * - * @param retryAfter the retryAfter value to set. - * @return the InvoiceSectionsCreateOrUpdateHeaders object itself. - */ - public InvoiceSectionsCreateOrUpdateHeaders withRetryAfter(Integer retryAfter) { - this.retryAfter = retryAfter; - return this; - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The Location property. - * - * @param location the location value to set. - * @return the InvoiceSectionsCreateOrUpdateHeaders object itself. - */ - public InvoiceSectionsCreateOrUpdateHeaders withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionsCreateOrUpdateResponse.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionsCreateOrUpdateResponse.java deleted file mode 100644 index d340d6d03eda..000000000000 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionsCreateOrUpdateResponse.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.billing.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.billing.fluent.models.InvoiceSectionInner; - -/** Contains all response data for the createOrUpdate operation. */ -public final class InvoiceSectionsCreateOrUpdateResponse - extends ResponseBase { - /** - * Creates an instance of InvoiceSectionsCreateOrUpdateResponse. - * - * @param request the request which resulted in this InvoiceSectionsCreateOrUpdateResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public InvoiceSectionsCreateOrUpdateResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - InvoiceSectionInner value, - InvoiceSectionsCreateOrUpdateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public InvoiceSectionInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionsOnExpand.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionsOnExpand.java index fe8e65e1c165..2ad9ff909e9d 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionsOnExpand.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceSectionsOnExpand.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.InvoiceSectionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,13 +15,9 @@ */ @Fluent public final class InvoiceSectionsOnExpand { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InvoiceSectionsOnExpand.class); - /* - * Indicates whether there are more invoice sections than the ones listed - * in this collection. The collection lists a maximum of 50 invoice - * sections. To get all invoice sections, use the list invoice sections - * API. + * Indicates whether there are more invoice sections than the ones listed in this collection. The collection lists + * a maximum of 50 invoice sections. To get all invoice sections, use the list invoice sections API. */ @JsonProperty(value = "hasMoreResults", access = JsonProperty.Access.WRITE_ONLY) private Boolean hasMoreResults; @@ -34,6 +28,10 @@ public final class InvoiceSectionsOnExpand { @JsonProperty(value = "value") private List value; + /** Creates an instance of InvoiceSectionsOnExpand class. */ + public InvoiceSectionsOnExpand() { + } + /** * Get the hasMoreResults property: Indicates whether there are more invoice sections than the ones listed in this * collection. The collection lists a maximum of 50 invoice sections. To get all invoice sections, use the list diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceStatus.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceStatus.java index 0bed6fdc4749..d19234bfa736 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceStatus.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for InvoiceStatus. */ +/** The current status of the invoice. */ public final class InvoiceStatus extends ExpandableStringEnum { /** Static value Due for InvoiceStatus. */ public static final InvoiceStatus DUE = fromString("Due"); @@ -33,7 +33,11 @@ public static InvoiceStatus fromString(String name) { return fromString(name, InvoiceStatus.class); } - /** @return known InvoiceStatus values. */ + /** + * Gets known InvoiceStatus values. + * + * @return known InvoiceStatus values. + */ public static Collection values() { return values(InvoiceStatus.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceType.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceType.java index b548529d1392..9909531dc9a0 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceType.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoiceType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for InvoiceType. */ +/** Invoice type. */ public final class InvoiceType extends ExpandableStringEnum { /** Static value AzureService for InvoiceType. */ public static final InvoiceType AZURE_SERVICE = fromString("AzureService"); @@ -30,7 +30,11 @@ public static InvoiceType fromString(String name) { return fromString(name, InvoiceType.class); } - /** @return known InvoiceType values. */ + /** + * Gets known InvoiceType values. + * + * @return known InvoiceType values. + */ public static Collection values() { return values(InvoiceType.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Invoices.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Invoices.java index a505ffbd0fba..a9b21a5dcb9e 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Invoices.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Invoices.java @@ -21,7 +21,7 @@ public interface Invoices { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingAccount( String billingAccountName, String periodStartDate, String periodEndDate); @@ -37,7 +37,7 @@ PagedIterable listByBillingAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingAccount( String billingAccountName, String periodStartDate, String periodEndDate, Context context); @@ -53,7 +53,7 @@ PagedIterable listByBillingAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingProfile( String billingAccountName, String billingProfileName, String periodStartDate, String periodEndDate); @@ -70,7 +70,7 @@ PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingProfile( String billingAccountName, @@ -85,12 +85,13 @@ PagedIterable listByBillingProfile( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param invoiceName The ID that uniquely identifies an invoice. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice by billing account name and ID. + * @return an invoice by billing account name and ID along with {@link Response}. */ - Invoice get(String billingAccountName, String invoiceName); + Response getWithResponse(String billingAccountName, String invoiceName, Context context); /** * Gets an invoice by billing account name and ID. The operation is supported for billing accounts with agreement @@ -98,38 +99,37 @@ PagedIterable listByBillingProfile( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param invoiceName The ID that uniquely identifies an invoice. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an invoice by billing account name and ID. */ - Response getWithResponse(String billingAccountName, String invoiceName, Context context); + Invoice get(String billingAccountName, String invoiceName); /** * Gets an invoice by ID. The operation is supported for billing accounts with agreement type Microsoft Partner * Agreement or Microsoft Customer Agreement. * * @param invoiceName The ID that uniquely identifies an invoice. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice by ID. + * @return an invoice by ID along with {@link Response}. */ - Invoice getById(String invoiceName); + Response getByIdWithResponse(String invoiceName, Context context); /** * Gets an invoice by ID. The operation is supported for billing accounts with agreement type Microsoft Partner * Agreement or Microsoft Customer Agreement. * * @param invoiceName The ID that uniquely identifies an invoice. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an invoice by ID. */ - Response getByIdWithResponse(String invoiceName, Context context); + Invoice getById(String invoiceName); /** * Gets a URL to download an invoice. The operation is supported for billing accounts with agreement type Microsoft @@ -198,7 +198,7 @@ DownloadUrl downloadMultipleBillingProfileInvoices( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingSubscription(String periodStartDate, String periodEndDate); @@ -211,7 +211,7 @@ DownloadUrl downloadMultipleBillingProfileInvoices( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of invoices. + * @return the list of invoices as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingSubscription(String periodStartDate, String periodEndDate, Context context); @@ -219,24 +219,24 @@ DownloadUrl downloadMultipleBillingProfileInvoices( * Gets an invoice by subscription ID and invoice ID. * * @param invoiceName The ID that uniquely identifies an invoice. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an invoice by subscription ID and invoice ID. + * @return an invoice by subscription ID and invoice ID along with {@link Response}. */ - Invoice getBySubscriptionAndInvoiceId(String invoiceName); + Response getBySubscriptionAndInvoiceIdWithResponse(String invoiceName, Context context); /** * Gets an invoice by subscription ID and invoice ID. * * @param invoiceName The ID that uniquely identifies an invoice. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an invoice by subscription ID and invoice ID. */ - Response getBySubscriptionAndInvoiceIdWithResponse(String invoiceName, Context context); + Invoice getBySubscriptionAndInvoiceId(String invoiceName); /** * Gets a URL to download an invoice. diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadBillingSubscriptionInvoiceHeaders.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadBillingSubscriptionInvoiceHeaders.java deleted file mode 100644 index 8fc84163d9a3..000000000000 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadBillingSubscriptionInvoiceHeaders.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.billing.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The InvoicesDownloadBillingSubscriptionInvoiceHeaders model. */ -@Fluent -public final class InvoicesDownloadBillingSubscriptionInvoiceHeaders { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(InvoicesDownloadBillingSubscriptionInvoiceHeaders.class); - - /* - * The Retry-After property. - */ - @JsonProperty(value = "Retry-After") - private String retryAfter; - - /* - * The Location property. - */ - @JsonProperty(value = "Location") - private String location; - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public String retryAfter() { - return this.retryAfter; - } - - /** - * Set the retryAfter property: The Retry-After property. - * - * @param retryAfter the retryAfter value to set. - * @return the InvoicesDownloadBillingSubscriptionInvoiceHeaders object itself. - */ - public InvoicesDownloadBillingSubscriptionInvoiceHeaders withRetryAfter(String retryAfter) { - this.retryAfter = retryAfter; - return this; - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The Location property. - * - * @param location the location value to set. - * @return the InvoicesDownloadBillingSubscriptionInvoiceHeaders object itself. - */ - public InvoicesDownloadBillingSubscriptionInvoiceHeaders withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadBillingSubscriptionInvoiceResponse.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadBillingSubscriptionInvoiceResponse.java deleted file mode 100644 index 6962b97d010c..000000000000 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadBillingSubscriptionInvoiceResponse.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.billing.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.billing.fluent.models.DownloadUrlInner; - -/** Contains all response data for the downloadBillingSubscriptionInvoice operation. */ -public final class InvoicesDownloadBillingSubscriptionInvoiceResponse - extends ResponseBase { - /** - * Creates an instance of InvoicesDownloadBillingSubscriptionInvoiceResponse. - * - * @param request the request which resulted in this InvoicesDownloadBillingSubscriptionInvoiceResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public InvoicesDownloadBillingSubscriptionInvoiceResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - DownloadUrlInner value, - InvoicesDownloadBillingSubscriptionInvoiceHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public DownloadUrlInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadInvoiceHeaders.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadInvoiceHeaders.java deleted file mode 100644 index 80bc52a4bc68..000000000000 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadInvoiceHeaders.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.billing.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The InvoicesDownloadInvoiceHeaders model. */ -@Fluent -public final class InvoicesDownloadInvoiceHeaders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InvoicesDownloadInvoiceHeaders.class); - - /* - * The Retry-After property. - */ - @JsonProperty(value = "Retry-After") - private String retryAfter; - - /* - * The Location property. - */ - @JsonProperty(value = "Location") - private String location; - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public String retryAfter() { - return this.retryAfter; - } - - /** - * Set the retryAfter property: The Retry-After property. - * - * @param retryAfter the retryAfter value to set. - * @return the InvoicesDownloadInvoiceHeaders object itself. - */ - public InvoicesDownloadInvoiceHeaders withRetryAfter(String retryAfter) { - this.retryAfter = retryAfter; - return this; - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The Location property. - * - * @param location the location value to set. - * @return the InvoicesDownloadInvoiceHeaders object itself. - */ - public InvoicesDownloadInvoiceHeaders withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadInvoiceResponse.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadInvoiceResponse.java deleted file mode 100644 index f188f1e503a7..000000000000 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadInvoiceResponse.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.billing.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.billing.fluent.models.DownloadUrlInner; - -/** Contains all response data for the downloadInvoice operation. */ -public final class InvoicesDownloadInvoiceResponse - extends ResponseBase { - /** - * Creates an instance of InvoicesDownloadInvoiceResponse. - * - * @param request the request which resulted in this InvoicesDownloadInvoiceResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public InvoicesDownloadInvoiceResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - DownloadUrlInner value, - InvoicesDownloadInvoiceHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public DownloadUrlInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadMultipleBillingProfileInvoicesHeaders.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadMultipleBillingProfileInvoicesHeaders.java deleted file mode 100644 index cff7c6478db0..000000000000 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadMultipleBillingProfileInvoicesHeaders.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.billing.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The InvoicesDownloadMultipleBillingProfileInvoicesHeaders model. */ -@Fluent -public final class InvoicesDownloadMultipleBillingProfileInvoicesHeaders { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(InvoicesDownloadMultipleBillingProfileInvoicesHeaders.class); - - /* - * The Retry-After property. - */ - @JsonProperty(value = "Retry-After") - private String retryAfter; - - /* - * The Location property. - */ - @JsonProperty(value = "Location") - private String location; - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public String retryAfter() { - return this.retryAfter; - } - - /** - * Set the retryAfter property: The Retry-After property. - * - * @param retryAfter the retryAfter value to set. - * @return the InvoicesDownloadMultipleBillingProfileInvoicesHeaders object itself. - */ - public InvoicesDownloadMultipleBillingProfileInvoicesHeaders withRetryAfter(String retryAfter) { - this.retryAfter = retryAfter; - return this; - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The Location property. - * - * @param location the location value to set. - * @return the InvoicesDownloadMultipleBillingProfileInvoicesHeaders object itself. - */ - public InvoicesDownloadMultipleBillingProfileInvoicesHeaders withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadMultipleBillingProfileInvoicesResponse.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadMultipleBillingProfileInvoicesResponse.java deleted file mode 100644 index 8338b7830254..000000000000 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadMultipleBillingProfileInvoicesResponse.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.billing.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.billing.fluent.models.DownloadUrlInner; - -/** Contains all response data for the downloadMultipleBillingProfileInvoices operation. */ -public final class InvoicesDownloadMultipleBillingProfileInvoicesResponse - extends ResponseBase { - /** - * Creates an instance of InvoicesDownloadMultipleBillingProfileInvoicesResponse. - * - * @param request the request which resulted in this InvoicesDownloadMultipleBillingProfileInvoicesResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public InvoicesDownloadMultipleBillingProfileInvoicesResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - DownloadUrlInner value, - InvoicesDownloadMultipleBillingProfileInvoicesHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public DownloadUrlInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadMultipleBillingSubscriptionInvoicesHeaders.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadMultipleBillingSubscriptionInvoicesHeaders.java deleted file mode 100644 index 4e6063d83b42..000000000000 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadMultipleBillingSubscriptionInvoicesHeaders.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.billing.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The InvoicesDownloadMultipleBillingSubscriptionInvoicesHeaders model. */ -@Fluent -public final class InvoicesDownloadMultipleBillingSubscriptionInvoicesHeaders { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(InvoicesDownloadMultipleBillingSubscriptionInvoicesHeaders.class); - - /* - * The Retry-After property. - */ - @JsonProperty(value = "Retry-After") - private String retryAfter; - - /* - * The Location property. - */ - @JsonProperty(value = "Location") - private String location; - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public String retryAfter() { - return this.retryAfter; - } - - /** - * Set the retryAfter property: The Retry-After property. - * - * @param retryAfter the retryAfter value to set. - * @return the InvoicesDownloadMultipleBillingSubscriptionInvoicesHeaders object itself. - */ - public InvoicesDownloadMultipleBillingSubscriptionInvoicesHeaders withRetryAfter(String retryAfter) { - this.retryAfter = retryAfter; - return this; - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The Location property. - * - * @param location the location value to set. - * @return the InvoicesDownloadMultipleBillingSubscriptionInvoicesHeaders object itself. - */ - public InvoicesDownloadMultipleBillingSubscriptionInvoicesHeaders withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadMultipleBillingSubscriptionInvoicesResponse.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadMultipleBillingSubscriptionInvoicesResponse.java deleted file mode 100644 index 42e5dd1cffe6..000000000000 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/InvoicesDownloadMultipleBillingSubscriptionInvoicesResponse.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.billing.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.billing.fluent.models.DownloadUrlInner; - -/** Contains all response data for the downloadMultipleBillingSubscriptionInvoices operation. */ -public final class InvoicesDownloadMultipleBillingSubscriptionInvoicesResponse - extends ResponseBase { - /** - * Creates an instance of InvoicesDownloadMultipleBillingSubscriptionInvoicesResponse. - * - * @param request the request which resulted in this InvoicesDownloadMultipleBillingSubscriptionInvoicesResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public InvoicesDownloadMultipleBillingSubscriptionInvoicesResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - DownloadUrlInner value, - InvoicesDownloadMultipleBillingSubscriptionInvoicesHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public DownloadUrlInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/MarketplacePurchasesPolicy.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/MarketplacePurchasesPolicy.java index 6ab3dbfabc31..55c6a088af4c 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/MarketplacePurchasesPolicy.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/MarketplacePurchasesPolicy.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for MarketplacePurchasesPolicy. */ +/** The policy that controls whether Azure marketplace purchases are allowed for a billing profile. */ public final class MarketplacePurchasesPolicy extends ExpandableStringEnum { /** Static value AllAllowed for MarketplacePurchasesPolicy. */ public static final MarketplacePurchasesPolicy ALL_ALLOWED = fromString("AllAllowed"); @@ -30,7 +30,11 @@ public static MarketplacePurchasesPolicy fromString(String name) { return fromString(name, MarketplacePurchasesPolicy.class); } - /** @return known MarketplacePurchasesPolicy values. */ + /** + * Gets known MarketplacePurchasesPolicy values. + * + * @return known MarketplacePurchasesPolicy values. + */ public static Collection values() { return values(MarketplacePurchasesPolicy.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/OperationDisplay.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/OperationDisplay.java index 3d9ddb4797e2..9dbcadbfa3e1 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/OperationDisplay.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/OperationDisplay.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The object that represents the operation. */ @Immutable public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - /* * Service provider: Microsoft.Billing. */ @@ -21,8 +17,7 @@ public final class OperationDisplay { private String provider; /* - * Resource on which the operation is performed such as invoice and billing - * subscription. + * Resource on which the operation is performed such as invoice and billing subscription. */ @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) private String resource; @@ -39,6 +34,10 @@ public final class OperationDisplay { @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; + /** Creates an instance of OperationDisplay class. */ + public OperationDisplay() { + } + /** * Get the provider property: Service provider: Microsoft.Billing. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/OperationListResult.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/OperationListResult.java index f6e3f2abf305..9bac4604cb54 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/OperationListResult.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/OperationListResult.java @@ -5,20 +5,15 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of billing operations and a URL link to get the next set of results. */ @Immutable public final class OperationListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResult.class); - /* - * The list of billing operations supported by the Microsoft.Billing - * resource provider. + * The list of billing operations supported by the Microsoft.Billing resource provider. */ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; @@ -29,6 +24,10 @@ public final class OperationListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of OperationListResult class. */ + public OperationListResult() { + } + /** * Get the value property: The list of billing operations supported by the Microsoft.Billing resource provider. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Operations.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Operations.java index 92c83f2661d8..bdd2d70c2d9b 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Operations.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Operations.java @@ -14,7 +14,8 @@ public interface Operations { * * @throws com.azure.core.management.exception.ManagementException 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 of billing operations and a URL link to get the next set of results. + * @return the list of billing operations and a URL link to get the next set of results as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); @@ -25,7 +26,8 @@ public interface Operations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of billing operations and a URL link to get the next set of results. + * @return the list of billing operations and a URL link to get the next set of results as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Participants.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Participants.java index 520774a3bb4b..68e57371376b 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Participants.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Participants.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** The details about a participant. */ @Immutable public final class Participants { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Participants.class); - /* * The acceptance status of the participant. */ @@ -33,6 +29,10 @@ public final class Participants { @JsonProperty(value = "email", access = JsonProperty.Access.WRITE_ONLY) private String email; + /** Creates an instance of Participants class. */ + public Participants() { + } + /** * Get the status property: The acceptance status of the participant. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/PaymentMethodFamily.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/PaymentMethodFamily.java index d7626062ca7e..85e4a1d6944b 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/PaymentMethodFamily.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/PaymentMethodFamily.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PaymentMethodFamily. */ +/** The family of payment method. */ public final class PaymentMethodFamily extends ExpandableStringEnum { /** Static value Credits for PaymentMethodFamily. */ public static final PaymentMethodFamily CREDITS = fromString("Credits"); @@ -33,7 +33,11 @@ public static PaymentMethodFamily fromString(String name) { return fromString(name, PaymentMethodFamily.class); } - /** @return known PaymentMethodFamily values. */ + /** + * Gets known PaymentMethodFamily values. + * + * @return known PaymentMethodFamily values. + */ public static Collection values() { return values(PaymentMethodFamily.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/PaymentProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/PaymentProperties.java index c8fc84a8640d..671c093c5b67 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/PaymentProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/PaymentProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** The properties of a payment. */ @Fluent public final class PaymentProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PaymentProperties.class); - /* * The type of payment. */ @@ -45,6 +41,10 @@ public final class PaymentProperties { @JsonProperty(value = "paymentMethodType", access = JsonProperty.Access.WRITE_ONLY) private String paymentMethodType; + /** Creates an instance of PaymentProperties class. */ + public PaymentProperties() { + } + /** * Get the paymentType property: The type of payment. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Policies.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Policies.java index fa5e41f1795e..d797634d6296 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Policies.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Policies.java @@ -17,12 +17,14 @@ public interface Policies { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a policy. + * @return a policy along with {@link Response}. */ - Policy getByBillingProfile(String billingAccountName, String billingProfileName); + Response getByBillingProfileWithResponse( + String billingAccountName, String billingProfileName, Context context); /** * Lists the policies for a billing profile. This operation is supported only for billing accounts with agreement @@ -30,14 +32,12 @@ public interface Policies { * * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a policy. */ - Response getByBillingProfileWithResponse( - String billingAccountName, String billingProfileName, Context context); + Policy getByBillingProfile(String billingAccountName, String billingProfileName); /** * Updates the policies for a billing profile. This operation is supported only for billing accounts with agreement @@ -46,12 +46,14 @@ Response getByBillingProfileWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param parameters Request parameters that are provided to the update policies operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a policy. + * @return a policy along with {@link Response}. */ - Policy update(String billingAccountName, String billingProfileName, PolicyInner parameters); + Response updateWithResponse( + String billingAccountName, String billingProfileName, PolicyInner parameters, Context context); /** * Updates the policies for a billing profile. This operation is supported only for billing accounts with agreement @@ -60,14 +62,12 @@ Response getByBillingProfileWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param billingProfileName The ID that uniquely identifies a billing profile. * @param parameters Request parameters that are provided to the update policies operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a policy. */ - Response updateWithResponse( - String billingAccountName, String billingProfileName, PolicyInner parameters, Context context); + Policy update(String billingAccountName, String billingProfileName, PolicyInner parameters); /** * Lists the policies for a customer. This operation is supported only for billing accounts with agreement type @@ -75,12 +75,13 @@ Response updateWithResponse( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the customer's Policy. + * @return the customer's Policy along with {@link Response}. */ - CustomerPolicy getByCustomer(String billingAccountName, String customerName); + Response getByCustomerWithResponse(String billingAccountName, String customerName, Context context); /** * Lists the policies for a customer. This operation is supported only for billing accounts with agreement type @@ -88,13 +89,12 @@ Response updateWithResponse( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the customer's Policy. */ - Response getByCustomerWithResponse(String billingAccountName, String customerName, Context context); + CustomerPolicy getByCustomer(String billingAccountName, String customerName); /** * Updates the policies for a customer. This operation is supported only for billing accounts with agreement type @@ -103,12 +103,14 @@ Response updateWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. * @param parameters Request parameters that are provided to the update policies operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the customer's Policy. + * @return the customer's Policy along with {@link Response}. */ - CustomerPolicy updateCustomer(String billingAccountName, String customerName, CustomerPolicyInner parameters); + Response updateCustomerWithResponse( + String billingAccountName, String customerName, CustomerPolicyInner parameters, Context context); /** * Updates the policies for a customer. This operation is supported only for billing accounts with agreement type @@ -117,12 +119,10 @@ Response updateWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param customerName The ID that uniquely identifies a customer. * @param parameters Request parameters that are provided to the update policies operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the customer's Policy. */ - Response updateCustomerWithResponse( - String billingAccountName, String customerName, CustomerPolicyInner parameters, Context context); + CustomerPolicy updateCustomer(String billingAccountName, String customerName, CustomerPolicyInner parameters); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductStatusType.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductStatusType.java index a103a0b37b6a..ffd6752a28e7 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductStatusType.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductStatusType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ProductStatusType. */ +/** The current status of the product. */ public final class ProductStatusType extends ExpandableStringEnum { /** Static value Active for ProductStatusType. */ public static final ProductStatusType ACTIVE = fromString("Active"); @@ -45,7 +45,11 @@ public static ProductStatusType fromString(String name) { return fromString(name, ProductStatusType.class); } - /** @return known ProductStatusType values. */ + /** + * Gets known ProductStatusType values. + * + * @return known ProductStatusType values. + */ public static Collection values() { return values(ProductStatusType.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductTransferValidationErrorCode.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductTransferValidationErrorCode.java index 8ab5ce76a292..bb8014d013b4 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductTransferValidationErrorCode.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductTransferValidationErrorCode.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ProductTransferValidationErrorCode. */ +/** Error code of the transfer validation response. */ public final class ProductTransferValidationErrorCode extends ExpandableStringEnum { /** Static value InvalidSource for ProductTransferValidationErrorCode. */ public static final ProductTransferValidationErrorCode INVALID_SOURCE = fromString("InvalidSource"); @@ -55,7 +55,11 @@ public static ProductTransferValidationErrorCode fromString(String name) { return fromString(name, ProductTransferValidationErrorCode.class); } - /** @return known ProductTransferValidationErrorCode values. */ + /** + * Gets known ProductTransferValidationErrorCode values. + * + * @return known ProductTransferValidationErrorCode values. + */ public static Collection values() { return values(ProductTransferValidationErrorCode.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Products.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Products.java index 5b39cb0ec326..9d0ce896b9e9 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Products.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Products.java @@ -20,7 +20,7 @@ public interface Products { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ PagedIterable listByCustomer(String billingAccountName, String customerName); @@ -34,7 +34,7 @@ public interface Products { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ PagedIterable listByCustomer(String billingAccountName, String customerName, Context context); @@ -46,7 +46,7 @@ public interface Products { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingAccount(String billingAccountName); @@ -62,7 +62,7 @@ public interface Products { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingAccount(String billingAccountName, String filter, Context context); @@ -75,7 +75,7 @@ public interface Products { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName); @@ -92,7 +92,7 @@ public interface Products { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ PagedIterable listByBillingProfile( String billingAccountName, String billingProfileName, String filter, Context context); @@ -107,7 +107,7 @@ PagedIterable listByBillingProfile( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ PagedIterable listByInvoiceSection( String billingAccountName, String billingProfileName, String invoiceSectionName); @@ -126,7 +126,7 @@ PagedIterable listByInvoiceSection( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of products. + * @return the list of products as paginated response with {@link PagedIterable}. */ PagedIterable listByInvoiceSection( String billingAccountName, @@ -141,12 +141,13 @@ PagedIterable listByInvoiceSection( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a product by ID. + * @return a product by ID along with {@link Response}. */ - Product get(String billingAccountName, String productName); + Response getWithResponse(String billingAccountName, String productName, Context context); /** * Gets a product by ID. The operation is supported only for billing accounts with agreement type Microsoft Customer @@ -154,13 +155,12 @@ PagedIterable listByInvoiceSection( * * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a product by ID. */ - Response getWithResponse(String billingAccountName, String productName, Context context); + Product get(String billingAccountName, String productName); /** * Updates the properties of a Product. Currently, auto renew can be updated. The operation is supported only for @@ -169,12 +169,14 @@ PagedIterable listByInvoiceSection( * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. * @param parameters Request parameters that are provided to the update product operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a product. + * @return a product along with {@link Response}. */ - Product update(String billingAccountName, String productName, ProductInner parameters); + Response updateWithResponse( + String billingAccountName, String productName, ProductInner parameters, Context context); /** * Updates the properties of a Product. Currently, auto renew can be updated. The operation is supported only for @@ -183,14 +185,12 @@ PagedIterable listByInvoiceSection( * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. * @param parameters Request parameters that are provided to the update product operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a product. */ - Response updateWithResponse( - String billingAccountName, String productName, ProductInner parameters, Context context); + Product update(String billingAccountName, String productName, ProductInner parameters); /** * Moves a product's charges to a new invoice section. The new invoice section must belong to the same billing @@ -200,12 +200,14 @@ Response updateWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. * @param parameters Request parameters that are provided to the move product operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a product. */ - Product move(String billingAccountName, String productName, TransferProductRequestProperties parameters); + Response moveWithResponse( + String billingAccountName, String productName, TransferProductRequestProperties parameters, Context context); /** * Moves a product's charges to a new invoice section. The new invoice section must belong to the same billing @@ -215,14 +217,12 @@ Response updateWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. * @param parameters Request parameters that are provided to the move product operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a product. */ - Response moveWithResponse( - String billingAccountName, String productName, TransferProductRequestProperties parameters, Context context); + Product move(String billingAccountName, String productName, TransferProductRequestProperties parameters); /** * Validates if a product's charges can be moved to a new invoice section. This operation is supported only for @@ -232,13 +232,14 @@ Response moveWithResponse( * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. * @param parameters Request parameters that are provided to the validate move eligibility operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the product transfer eligibility validation. + * @return result of the product transfer eligibility validation along with {@link Response}. */ - ValidateProductTransferEligibilityResult validateMove( - String billingAccountName, String productName, TransferProductRequestProperties parameters); + Response validateMoveWithResponse( + String billingAccountName, String productName, TransferProductRequestProperties parameters, Context context); /** * Validates if a product's charges can be moved to a new invoice section. This operation is supported only for @@ -248,12 +249,11 @@ ValidateProductTransferEligibilityResult validateMove( * @param billingAccountName The ID that uniquely identifies a billing account. * @param productName The ID that uniquely identifies a product. * @param parameters Request parameters that are provided to the validate move eligibility operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the product transfer eligibility validation. */ - Response validateMoveWithResponse( - String billingAccountName, String productName, TransferProductRequestProperties parameters, Context context); + ValidateProductTransferEligibilityResult validateMove( + String billingAccountName, String productName, TransferProductRequestProperties parameters); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductsListResult.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductsListResult.java index e7a81b44a09e..8b2aa24b2751 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductsListResult.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductsListResult.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.ProductInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,8 +15,6 @@ */ @Immutable public final class ProductsListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ProductsListResult.class); - /* * The list of products. */ @@ -37,6 +33,10 @@ public final class ProductsListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ProductsListResult class. */ + public ProductsListResult() { + } + /** * Get the value property: The list of products. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductsMoveHeaders.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductsMoveHeaders.java index e2c92545cc57..7b44a5b89467 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductsMoveHeaders.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductsMoveHeaders.java @@ -5,15 +5,12 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; /** The ProductsMoveHeaders model. */ @Fluent public final class ProductsMoveHeaders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ProductsMoveHeaders.class); - /* * The Retry-After property. */ @@ -26,6 +23,20 @@ public final class ProductsMoveHeaders { @JsonProperty(value = "Location") private String location; + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ProductsMoveHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ProductsMoveHeaders(HttpHeaders rawHeaders) { + String retryAfter = rawHeaders.getValue("Retry-After"); + if (retryAfter != null) { + this.retryAfter = Integer.parseInt(retryAfter); + } + this.location = rawHeaders.getValue("Location"); + } + /** * Get the retryAfter property: The Retry-After property. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductsMoveResponse.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductsMoveResponse.java index 3ebd7863dfc0..f328dbe14e5e 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductsMoveResponse.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ProductsMoveResponse.java @@ -25,7 +25,11 @@ public ProductsMoveResponse( super(request, statusCode, rawHeaders, value, headers); } - /** @return the deserialized response body. */ + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ @Override public ProductInner getValue() { return super.getValue(); diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/RebillDetails.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/RebillDetails.java index 40b49bec98db..9a6552cd6b61 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/RebillDetails.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/RebillDetails.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +12,6 @@ /** The rebill details of an invoice. */ @Immutable public final class RebillDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RebillDetails.class); - /* * The ID of credit note. */ @@ -35,6 +31,10 @@ public final class RebillDetails { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map rebillDetails; + /** Creates an instance of RebillDetails class. */ + public RebillDetails() { + } + /** * Get the creditNoteDocumentId property: The ID of credit note. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Reseller.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Reseller.java index 3d925897ed34..ac30a2d0394d 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Reseller.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Reseller.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Details of the reseller. */ @Immutable public final class Reseller { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Reseller.class); - /* * The MPN ID of the reseller. */ @@ -26,6 +22,10 @@ public final class Reseller { @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; + /** Creates an instance of Reseller class. */ + public Reseller() { + } + /** * Get the resellerId property: The MPN ID of the reseller. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationPropertyUtilization.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationPropertyUtilization.java index 4091bbaa950c..2498b8c592e1 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationPropertyUtilization.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationPropertyUtilization.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Reservation utilization. */ @Fluent public final class ReservationPropertyUtilization { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationPropertyUtilization.class); - /* * The number of days trend for a reservation */ @@ -27,6 +23,10 @@ public final class ReservationPropertyUtilization { @JsonProperty(value = "aggregates") private List aggregates; + /** Creates an instance of ReservationPropertyUtilization class. */ + public ReservationPropertyUtilization() { + } + /** * Get the trend property: The number of days trend for a reservation. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationPurchasesPolicy.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationPurchasesPolicy.java index 3db5dd97924f..73b7d8d519a7 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationPurchasesPolicy.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationPurchasesPolicy.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ReservationPurchasesPolicy. */ +/** The policy that controls whether Azure reservation purchases are allowed for a billing profile. */ public final class ReservationPurchasesPolicy extends ExpandableStringEnum { /** Static value Allowed for ReservationPurchasesPolicy. */ public static final ReservationPurchasesPolicy ALLOWED = fromString("Allowed"); @@ -27,7 +27,11 @@ public static ReservationPurchasesPolicy fromString(String name) { return fromString(name, ReservationPurchasesPolicy.class); } - /** @return known ReservationPurchasesPolicy values. */ + /** + * Gets known ReservationPurchasesPolicy values. + * + * @return known ReservationPurchasesPolicy values. + */ public static Collection values() { return values(ReservationPurchasesPolicy.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationSkuProperty.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationSkuProperty.java index 656bbf653299..1f9ceb8671d1 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationSkuProperty.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationSkuProperty.java @@ -5,21 +5,21 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The property of reservation sku object. */ @Immutable public final class ReservationSkuProperty { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationSkuProperty.class); - /* * The name of the reservation sku. */ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; + /** Creates an instance of ReservationSkuProperty class. */ + public ReservationSkuProperty() { + } + /** * Get the name property: The name of the reservation sku. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationSummary.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationSummary.java index 67eb6ee38b7e..3e4d3c0e8d04 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationSummary.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationSummary.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The roll up count summary of reservations in each state. */ @Immutable public final class ReservationSummary { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationSummary.class); - /* * The number of reservation in Succeeded state */ @@ -50,6 +46,10 @@ public final class ReservationSummary { @JsonProperty(value = "cancelledCount", access = JsonProperty.Access.WRITE_ONLY) private Float cancelledCount; + /** Creates an instance of ReservationSummary class. */ + public ReservationSummary() { + } + /** * Get the succeededCount property: The number of reservation in Succeeded state. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationType.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationType.java index 3aae730572aa..136b5b24df34 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationType.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ReservationType. */ +/** The type of transaction. */ public final class ReservationType extends ExpandableStringEnum { /** Static value Purchase for ReservationType. */ public static final ReservationType PURCHASE = fromString("Purchase"); @@ -27,7 +27,11 @@ public static ReservationType fromString(String name) { return fromString(name, ReservationType.class); } - /** @return known ReservationType values. */ + /** + * Gets known ReservationType values. + * + * @return known ReservationType values. + */ public static Collection values() { return values(ReservationType.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationUtilizationAggregates.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationUtilizationAggregates.java index d6db26851bf2..f7f9c9ed8124 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationUtilizationAggregates.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationUtilizationAggregates.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The aggregate values of reservation utilization. */ @Immutable public final class ReservationUtilizationAggregates { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationUtilizationAggregates.class); - /* * The grain of the aggregate */ @@ -38,6 +34,10 @@ public final class ReservationUtilizationAggregates { @JsonProperty(value = "valueUnit", access = JsonProperty.Access.WRITE_ONLY) private String valueUnit; + /** Creates an instance of ReservationUtilizationAggregates class. */ + public ReservationUtilizationAggregates() { + } + /** * Get the grain property: The grain of the aggregate. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Reservations.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Reservations.java index b18a95f43b93..9a72b508b0ba 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Reservations.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Reservations.java @@ -16,7 +16,8 @@ public interface Reservations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state as paginated + * response with {@link PagedIterable}. */ PagedIterable listByBillingAccount(String billingAccountName); @@ -34,7 +35,8 @@ public interface Reservations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state as paginated + * response with {@link PagedIterable}. */ PagedIterable listByBillingAccount( String billingAccountName, @@ -52,7 +54,8 @@ PagedIterable listByBillingAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state as paginated + * response with {@link PagedIterable}. */ PagedIterable listByBillingProfile(String billingAccountName, String billingProfileName); @@ -71,7 +74,8 @@ PagedIterable listByBillingAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of reservations and summary of roll out count of reservations in each state. + * @return the list of reservations and summary of roll out count of reservations in each state as paginated + * response with {@link PagedIterable}. */ PagedIterable listByBillingProfile( String billingAccountName, diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationsListResult.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationsListResult.java index 3ee6e25ecaea..8127320772a4 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationsListResult.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ReservationsListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.ReservationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of reservations and summary of roll out count of reservations in each state. */ @Fluent public final class ReservationsListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationsListResult.class); - /* * The list of reservations. */ @@ -34,6 +30,10 @@ public final class ReservationsListResult { @JsonProperty(value = "summary") private ReservationSummary summary; + /** Creates an instance of ReservationsListResult class. */ + public ReservationsListResult() { + } + /** * Get the value property: The list of reservations. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/SpendingLimit.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/SpendingLimit.java index bc2eefb4089f..a0bbec599bc5 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/SpendingLimit.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/SpendingLimit.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SpendingLimit. */ +/** The billing profile spending limit. */ public final class SpendingLimit extends ExpandableStringEnum { /** Static value Off for SpendingLimit. */ public static final SpendingLimit OFF = fromString("Off"); @@ -27,7 +27,11 @@ public static SpendingLimit fromString(String name) { return fromString(name, SpendingLimit.class); } - /** @return known SpendingLimit values. */ + /** + * Gets known SpendingLimit values. + * + * @return known SpendingLimit values. + */ public static Collection values() { return values(SpendingLimit.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/SpendingLimitForBillingProfile.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/SpendingLimitForBillingProfile.java index 736007d66636..92cbcc9ad6ee 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/SpendingLimitForBillingProfile.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/SpendingLimitForBillingProfile.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SpendingLimitForBillingProfile. */ +/** The billing profile spending limit. */ public final class SpendingLimitForBillingProfile extends ExpandableStringEnum { /** Static value Off for SpendingLimitForBillingProfile. */ public static final SpendingLimitForBillingProfile OFF = fromString("Off"); @@ -27,7 +27,11 @@ public static SpendingLimitForBillingProfile fromString(String name) { return fromString(name, SpendingLimitForBillingProfile.class); } - /** @return known SpendingLimitForBillingProfile values. */ + /** + * Gets known SpendingLimitForBillingProfile values. + * + * @return known SpendingLimitForBillingProfile values. + */ public static Collection values() { return values(SpendingLimitForBillingProfile.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/StatusReasonCode.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/StatusReasonCode.java index 19e9b366d610..0fd61229fa06 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/StatusReasonCode.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/StatusReasonCode.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for StatusReasonCode. */ +/** Reason for the specified billing profile status. */ public final class StatusReasonCode extends ExpandableStringEnum { /** Static value PastDue for StatusReasonCode. */ public static final StatusReasonCode PAST_DUE = fromString("PastDue"); @@ -30,7 +30,11 @@ public static StatusReasonCode fromString(String name) { return fromString(name, StatusReasonCode.class); } - /** @return known StatusReasonCode values. */ + /** + * Gets known StatusReasonCode values. + * + * @return known StatusReasonCode values. + */ public static Collection values() { return values(StatusReasonCode.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/StatusReasonCodeForBillingProfile.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/StatusReasonCodeForBillingProfile.java index c09ba125b96c..324392be90c5 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/StatusReasonCodeForBillingProfile.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/StatusReasonCodeForBillingProfile.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for StatusReasonCodeForBillingProfile. */ +/** Reason for the specified billing profile status. */ public final class StatusReasonCodeForBillingProfile extends ExpandableStringEnum { /** Static value PastDue for StatusReasonCodeForBillingProfile. */ public static final StatusReasonCodeForBillingProfile PAST_DUE = fromString("PastDue"); @@ -30,7 +30,11 @@ public static StatusReasonCodeForBillingProfile fromString(String name) { return fromString(name, StatusReasonCodeForBillingProfile.class); } - /** @return known StatusReasonCodeForBillingProfile values. */ + /** + * Gets known StatusReasonCodeForBillingProfile values. + * + * @return known StatusReasonCodeForBillingProfile values. + */ public static Collection values() { return values(StatusReasonCodeForBillingProfile.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/SubscriptionTransferValidationErrorCode.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/SubscriptionTransferValidationErrorCode.java index 1ef1a25c3611..9b8d43eed148 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/SubscriptionTransferValidationErrorCode.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/SubscriptionTransferValidationErrorCode.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SubscriptionTransferValidationErrorCode. */ +/** Error code of the transfer validation response. */ public final class SubscriptionTransferValidationErrorCode extends ExpandableStringEnum { /** Static value BillingAccountInactive for SubscriptionTransferValidationErrorCode. */ @@ -98,7 +98,11 @@ public static SubscriptionTransferValidationErrorCode fromString(String name) { return fromString(name, SubscriptionTransferValidationErrorCode.class); } - /** @return known SubscriptionTransferValidationErrorCode values. */ + /** + * Gets known SubscriptionTransferValidationErrorCode values. + * + * @return known SubscriptionTransferValidationErrorCode values. + */ public static Collection values() { return values(SubscriptionTransferValidationErrorCode.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TargetCloud.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TargetCloud.java index 1ce20b9cfb7c..299bcacfbc81 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TargetCloud.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TargetCloud.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for TargetCloud. */ +/** Possible cloud environments. */ public final class TargetCloud extends ExpandableStringEnum { /** Static value USGov for TargetCloud. */ public static final TargetCloud USGOV = fromString("USGov"); @@ -30,7 +30,11 @@ public static TargetCloud fromString(String name) { return fromString(name, TargetCloud.class); } - /** @return known TargetCloud values. */ + /** + * Gets known TargetCloud values. + * + * @return known TargetCloud values. + */ public static Collection values() { return values(TargetCloud.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TransactionListResult.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TransactionListResult.java index 45e11fd7eda1..16ecbebca4d3 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TransactionListResult.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TransactionListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.billing.fluent.models.TransactionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of transactions. */ @Immutable public final class TransactionListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransactionListResult.class); - /* * The list of transactions. */ @@ -34,6 +30,10 @@ public final class TransactionListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of TransactionListResult class. */ + public TransactionListResult() { + } + /** * Get the value property: The list of transactions. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TransactionTypeKind.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TransactionTypeKind.java index 1690605d16dc..9a7914e0294c 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TransactionTypeKind.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TransactionTypeKind.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for TransactionTypeKind. */ +/** The kind of transaction. Options are all or reservation. */ public final class TransactionTypeKind extends ExpandableStringEnum { /** Static value all for TransactionTypeKind. */ public static final TransactionTypeKind ALL = fromString("all"); @@ -27,7 +27,11 @@ public static TransactionTypeKind fromString(String name) { return fromString(name, TransactionTypeKind.class); } - /** @return known TransactionTypeKind values. */ + /** + * Gets known TransactionTypeKind values. + * + * @return known TransactionTypeKind values. + */ public static Collection values() { return values(TransactionTypeKind.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Transactions.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Transactions.java index 8b2a1f219b40..83c44ea52759 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Transactions.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/Transactions.java @@ -17,7 +17,7 @@ public interface Transactions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of transactions. + * @return the list of transactions as paginated response with {@link PagedIterable}. */ PagedIterable listByInvoice(String billingAccountName, String invoiceName); @@ -30,7 +30,7 @@ public interface Transactions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of transactions. + * @return the list of transactions as paginated response with {@link PagedIterable}. */ PagedIterable listByInvoice(String billingAccountName, String invoiceName, Context context); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TransferBillingSubscriptionRequestProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TransferBillingSubscriptionRequestProperties.java index 5c9d8529cd71..87f43e0da6c5 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TransferBillingSubscriptionRequestProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TransferBillingSubscriptionRequestProperties.java @@ -6,21 +6,21 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Request parameters to transfer billing subscription. */ @Fluent public final class TransferBillingSubscriptionRequestProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(TransferBillingSubscriptionRequestProperties.class); - /* * The destination invoice section id. */ @JsonProperty(value = "destinationInvoiceSectionId", required = true) private String destinationInvoiceSectionId; + /** Creates an instance of TransferBillingSubscriptionRequestProperties class. */ + public TransferBillingSubscriptionRequestProperties() { + } + /** * Get the destinationInvoiceSectionId property: The destination invoice section id. * @@ -49,11 +49,13 @@ public TransferBillingSubscriptionRequestProperties withDestinationInvoiceSectio */ public void validate() { if (destinationInvoiceSectionId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property destinationInvoiceSectionId in model" + " TransferBillingSubscriptionRequestProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(TransferBillingSubscriptionRequestProperties.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TransferProductRequestProperties.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TransferProductRequestProperties.java index eec0db1652f8..8aa7f6904004 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TransferProductRequestProperties.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/TransferProductRequestProperties.java @@ -5,21 +5,21 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties of the product to initiate a transfer. */ @Fluent public final class TransferProductRequestProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransferProductRequestProperties.class); - /* * The destination invoice section id. */ @JsonProperty(value = "destinationInvoiceSectionId") private String destinationInvoiceSectionId; + /** Creates an instance of TransferProductRequestProperties class. */ + public TransferProductRequestProperties() { + } + /** * Get the destinationInvoiceSectionId property: The destination invoice section id. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ValidateProductTransferEligibilityError.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ValidateProductTransferEligibilityError.java index 4791cff63ce6..05141ea1bff9 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ValidateProductTransferEligibilityError.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ValidateProductTransferEligibilityError.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Error details of the product transfer eligibility validation. */ @Fluent public final class ValidateProductTransferEligibilityError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidateProductTransferEligibilityError.class); - /* * Error code for the product transfer validation. */ @@ -32,6 +28,10 @@ public final class ValidateProductTransferEligibilityError { @JsonProperty(value = "details") private String details; + /** Creates an instance of ValidateProductTransferEligibilityError class. */ + public ValidateProductTransferEligibilityError() { + } + /** * Get the code property: Error code for the product transfer validation. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ValidateSubscriptionTransferEligibilityError.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ValidateSubscriptionTransferEligibilityError.java index e1453c963477..d7fa61fceaa0 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ValidateSubscriptionTransferEligibilityError.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ValidateSubscriptionTransferEligibilityError.java @@ -5,16 +5,11 @@ package com.azure.resourcemanager.billing.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Error details of the transfer eligibility validation. */ @Fluent public final class ValidateSubscriptionTransferEligibilityError { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ValidateSubscriptionTransferEligibilityError.class); - /* * Error code for the product transfer validation. */ @@ -33,6 +28,10 @@ public final class ValidateSubscriptionTransferEligibilityError { @JsonProperty(value = "details") private String details; + /** Creates an instance of ValidateSubscriptionTransferEligibilityError class. */ + public ValidateSubscriptionTransferEligibilityError() { + } + /** * Get the code property: Error code for the product transfer validation. * diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ViewCharges.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ViewCharges.java index bb7d5614f78c..0dc81c4dd18b 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ViewCharges.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ViewCharges.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ViewCharges. */ +/** The policy that controls whether the users in customer's organization can view charges at pay-as-you-go prices. */ public final class ViewCharges extends ExpandableStringEnum { /** Static value Allowed for ViewCharges. */ public static final ViewCharges ALLOWED = fromString("Allowed"); @@ -27,7 +27,11 @@ public static ViewCharges fromString(String name) { return fromString(name, ViewCharges.class); } - /** @return known ViewCharges values. */ + /** + * Gets known ViewCharges values. + * + * @return known ViewCharges values. + */ public static Collection values() { return values(ViewCharges.class); } diff --git a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ViewChargesPolicy.java b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ViewChargesPolicy.java index 1d1c67748f39..c0dfc1d08e24 100644 --- a/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ViewChargesPolicy.java +++ b/sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/ViewChargesPolicy.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ViewChargesPolicy. */ +/** The policy that controls whether users with Azure RBAC access to a subscription can view its charges. */ public final class ViewChargesPolicy extends ExpandableStringEnum { /** Static value Allowed for ViewChargesPolicy. */ public static final ViewChargesPolicy ALLOWED = fromString("Allowed"); @@ -27,7 +27,11 @@ public static ViewChargesPolicy fromString(String name) { return fromString(name, ViewChargesPolicy.class); } - /** @return known ViewChargesPolicy values. */ + /** + * Gets known ViewChargesPolicy values. + * + * @return known ViewChargesPolicy values. + */ public static Collection values() { return values(ViewChargesPolicy.class); }