Skip to content

Commit

Permalink
CodeGen from PR 18229 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 49fefb5790e41915827f7b7a45c346f1ce6b9052 into 2abe647120f14bb145968a5543ead8ed51394498
  • Loading branch information
SDKAuto committed Mar 15, 2022
1 parent 48cb91c commit 4f87dd5
Show file tree
Hide file tree
Showing 44 changed files with 124 additions and 212 deletions.
4 changes: 3 additions & 1 deletion sdk/quota/azure-resourcemanager-quota/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.3 (Unreleased)
## 1.0.0-beta.1 (2022-03-15)

- Azure Resource Manager quota client library for Java. This package contains Microsoft Azure SDK for quota Management SDK. Microsoft Azure Quota Resource Provider. Package tag package-2021-03-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
2 changes: 1 addition & 1 deletion sdk/quota/azure-resourcemanager-quota/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-quota</artifactId>
<version>1.0.0-beta.2</version>
<version>1.0.0-beta.3</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ 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;
Expand Down Expand Up @@ -159,9 +159,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;
}
Expand All @@ -183,7 +185,7 @@ public QuotaManager authenticate(TokenCredential credential, AzureProfile profil
.append("-")
.append("com.azure.resourcemanager.quota")
.append("/")
.append("1.0.0-beta.2");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public interface QuotaOperationsClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
* @return the paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<OperationResponseInner> list();
Expand All @@ -29,7 +29,7 @@ public interface QuotaOperationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
* @return the paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<OperationResponseInner> list(Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public interface QuotaRequestStatusClient {
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the quota request details and status by quota request ID for the resources of the resource provider at a
* specific location.
* specific location along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<QuotaRequestDetailsInner> getWithResponse(String id, String scope, Context context);
Expand All @@ -61,7 +61,7 @@ public interface QuotaRequestStatusClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return quota request information.
* @return quota request information as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<QuotaRequestDetailsInner> list(String scope);
Expand All @@ -85,7 +85,7 @@ public interface QuotaRequestStatusClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return quota request information.
* @return quota request information as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<QuotaRequestDetailsInner> list(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public interface QuotasClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return quota limit.
* @return the {@link SyncPoller} for polling of quota limit.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<CurrentQuotaLimitBaseInner>, CurrentQuotaLimitBaseInner> beginCreateOrUpdate(
Expand All @@ -95,7 +95,7 @@ SyncPoller<PollResult<CurrentQuotaLimitBaseInner>, CurrentQuotaLimitBaseInner> b
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return quota limit.
* @return the {@link SyncPoller} for polling of quota limit.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<CurrentQuotaLimitBaseInner>, CurrentQuotaLimitBaseInner> beginCreateOrUpdate(
Expand Down Expand Up @@ -168,7 +168,7 @@ CurrentQuotaLimitBaseInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return quota limit.
* @return the {@link SyncPoller} for polling of quota limit.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<CurrentQuotaLimitBaseInner>, CurrentQuotaLimitBaseInner> beginUpdate(
Expand All @@ -193,7 +193,7 @@ SyncPoller<PollResult<CurrentQuotaLimitBaseInner>, CurrentQuotaLimitBaseInner> b
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return quota limit.
* @return the {@link SyncPoller} for polling of quota limit.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<CurrentQuotaLimitBaseInner>, CurrentQuotaLimitBaseInner> beginUpdate(
Expand Down Expand Up @@ -258,7 +258,8 @@ CurrentQuotaLimitBaseInner update(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.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 list of current quota limits of all resources for the specified scope.
* @return a list of current quota limits of all resources for the specified scope as paginated response with {@link
* PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<CurrentQuotaLimitBaseInner> list(String scope);
Expand All @@ -275,7 +276,8 @@ CurrentQuotaLimitBaseInner update(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.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 list of current quota limits of all resources for the specified scope.
* @return a list of current quota limits of all resources for the specified scope as paginated response with {@link
* PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<CurrentQuotaLimitBaseInner> list(String scope, Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public interface UsagesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.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 list of current usage for all resources for the scope specified.
* @return a list of current usage for all resources for the scope specified as paginated response with {@link
* PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<CurrentUsagesBaseInner> list(String scope);
Expand All @@ -74,7 +75,8 @@ public interface UsagesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.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 list of current usage for all resources for the scope specified.
* @return a list of current usage for all resources for the scope specified as paginated response with {@link
* PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<CurrentUsagesBaseInner> list(String scope, Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.quota.models.QuotaProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Quota limit. */
@Fluent
public final class CurrentQuotaLimitBaseInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(CurrentQuotaLimitBaseInner.class);

/*
* Quota properties for the specified resource, based on the API called,
* Quotas or Usages.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.quota.models.UsagesProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Resource usage. */
@Fluent
public final class CurrentUsagesBaseInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(CurrentUsagesBaseInner.class);

/*
* Usage properties for the specified resource.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@
package com.azure.resourcemanager.quota.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.quota.models.OperationDisplay;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The OperationResponse model. */
@Fluent
public final class OperationResponseInner {
@JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResponseInner.class);

/*
* The name property.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,16 @@
package com.azure.resourcemanager.quota.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.quota.models.QuotaRequestState;
import com.azure.resourcemanager.quota.models.ServiceErrorDetail;
import com.azure.resourcemanager.quota.models.SubRequest;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;

/** List of quota requests with details. */
@Fluent
public final class QuotaRequestDetailsInner {
@JsonIgnore private final ClientLogger logger = new ClientLogger(QuotaRequestDetailsInner.class);

/*
* Quota request ID.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,16 @@
package com.azure.resourcemanager.quota.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.quota.models.QuotaRequestState;
import com.azure.resourcemanager.quota.models.ServiceErrorDetail;
import com.azure.resourcemanager.quota.models.SubRequest;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;

/** Quota request properties. */
@Fluent
public final class QuotaRequestProperties {
@JsonIgnore private final ClientLogger logger = new ClientLogger(QuotaRequestProperties.class);

/*
* The quota request status.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
/** Initializes a new instance of the AzureQuotaExtensionApiImpl type. */
@ServiceClient(builder = AzureQuotaExtensionApiBuilder.class)
public final class AzureQuotaExtensionApiImpl implements AzureQuotaExtensionApi {
private final ClientLogger logger = new ClientLogger(AzureQuotaExtensionApiImpl.class);

/** server parameter. */
private final String endpoint;

Expand Down Expand Up @@ -258,7 +256,7 @@ public <T, U> Mono<U> getLroFinalResultOrError(AsyncPollResponse<PollResult<T>,
managementError = null;
}
} catch (IOException | RuntimeException ioe) {
logger.logThrowableAsWarning(ioe);
LOGGER.logThrowableAsWarning(ioe);
}
}
} else {
Expand Down Expand Up @@ -317,4 +315,6 @@ public Mono<String> getBodyAsString(Charset charset) {
return Mono.just(new String(responseBody, charset));
}
}

private static final ClientLogger LOGGER = new ClientLogger(AzureQuotaExtensionApiImpl.class);
}
Loading

0 comments on commit 4f87dd5

Please sign in to comment.