Skip to content

Commit

Permalink
[Automation] Generate Fluent Lite from quota#package-2023-02-01 (Azur…
Browse files Browse the repository at this point in the history
…e#37754)

* [Automation] External Change

* [Automation] Generate Fluent Lite from quota#package-2023-02-01
  • Loading branch information
azure-sdk authored Nov 21, 2023
1 parent a30c605 commit 6ea8f1f
Show file tree
Hide file tree
Showing 106 changed files with 2,429 additions and 2,629 deletions.
2 changes: 1 addition & 1 deletion eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ com.azure.resourcemanager:azure-resourcemanager-hybridnetwork;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-purview;1.0.0-beta.2;1.0.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-mysqlflexibleserver;1.0.0-beta.4;1.0.0-beta.5
com.azure.resourcemanager:azure-resourcemanager-baremetalinfrastructure;1.0.0-beta.3;1.0.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-quota;1.0.0-beta.3;1.0.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-quota;1.0.0-beta.3;1.0.0
com.azure.resourcemanager:azure-resourcemanager-extendedlocation;1.0.0-beta.2;1.0.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-logz;1.0.0-beta.2;1.0.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-storagepool;1.0.0-beta.2;1.0.0-beta.3
Expand Down
10 changes: 2 additions & 8 deletions sdk/quota/azure-resourcemanager-quota/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
# Release History

## 1.0.0-beta.4 (Unreleased)
## 1.0.0 (2023-11-21)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
- 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-2023-02-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## 1.0.0-beta.3 (2023-04-17)

Expand Down
8 changes: 5 additions & 3 deletions 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.3</version>
<version>1.0.0</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand All @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen

### Authentication

By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
Expand Down Expand Up @@ -94,7 +94,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
<!-- LINKS -->
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
[docs]: https://azure.github.io/azure-sdk-for-java/
[jdk]: https://docs.microsoft.com/java/azure/jdk/
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
Expand All @@ -103,3 +103,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fquota%2Fazure-resourcemanager-quota%2FREADME.png)
263 changes: 73 additions & 190 deletions sdk/quota/azure-resourcemanager-quota/SAMPLE.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdk/quota/azure-resourcemanager-quota/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-quota</artifactId>
<version>1.0.0-beta.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-quota;current} -->
<version>1.0.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-quota;current} -->
<packaging>jar</packaging>

<name>Microsoft Azure SDK for quota Management</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@
import java.util.Objects;
import java.util.stream.Collectors;

/** Entry point to QuotaManager. Microsoft Azure Quota Resource Provider. */
/**
* Entry point to QuotaManager.
* Microsoft Azure Quota Resource Provider.
*/
public final class QuotaManager {
private Usages usages;

Expand All @@ -55,17 +58,14 @@ public final class QuotaManager {
private QuotaManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
this.clientObject =
new AzureQuotaExtensionApiBuilder()
.pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.defaultPollInterval(defaultPollInterval)
.buildClient();
this.clientObject = new AzureQuotaExtensionApiBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint()).defaultPollInterval(defaultPollInterval)
.buildClient();
}

/**
* Creates an instance of quota service API entry point.
*
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
* @return the quota service API instance.
Expand All @@ -78,7 +78,7 @@ public static QuotaManager authenticate(TokenCredential credential, AzureProfile

/**
* Creates an instance of quota service API entry point.
*
*
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
* @param profile the Azure profile for client.
* @return the quota service API instance.
Expand All @@ -91,14 +91,16 @@ public static QuotaManager authenticate(HttpPipeline httpPipeline, AzureProfile

/**
* Gets a Configurable instance that can be used to create QuotaManager with optional configuration.
*
*
* @return the Configurable instance allowing configurations.
*/
public static Configurable configure() {
return new QuotaManager.Configurable();
}

/** The Configurable allowing configurations to be set. */
/**
* The Configurable allowing configurations to be set.
*/
public static final class Configurable {
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);

Expand Down Expand Up @@ -170,8 +172,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {

/**
* Sets the retry options for the HTTP pipeline retry policy.
*
* <p>This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
* <p>
* 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.
Expand All @@ -188,8 +190,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval =
Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
this.defaultPollInterval
= Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
throw LOGGER
.logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
Expand All @@ -209,21 +211,12 @@ public QuotaManager authenticate(TokenCredential credential, AzureProfile profil
Objects.requireNonNull(profile, "'profile' cannot be null.");

StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder
.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.quota")
.append("/")
.append("1.0.0-beta.3");
userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.quota").append("/")
.append("1.0.0");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
.append("; ")
.append(Configuration.getGlobalConfiguration().get("os.name"))
.append("; ")
.append(Configuration.getGlobalConfiguration().get("os.version"))
.append("; auto-generated)");
userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version"))
.append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ")
.append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)");
} else {
userAgentBuilder.append(" (auto-generated)");
}
Expand All @@ -242,38 +235,25 @@ public QuotaManager authenticate(TokenCredential credential, AzureProfile profil
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()));
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
.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
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 =
new HttpPipelineBuilder()
.httpClient(httpClient)
.policies(policies.toArray(new HttpPipelinePolicy[0]))
.build();
HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
.policies(policies.toArray(new HttpPipelinePolicy[0])).build();
return new QuotaManager(httpPipeline, profile, defaultPollInterval);
}
}

/**
* Gets the resource collection API of Usages.
*
*
* @return Resource collection API of Usages.
*/
public Usages usages() {
Expand All @@ -285,7 +265,7 @@ public Usages usages() {

/**
* Gets the resource collection API of Quotas. It manages CurrentQuotaLimitBase.
*
*
* @return Resource collection API of Quotas.
*/
public Quotas quotas() {
Expand All @@ -297,7 +277,7 @@ public Quotas quotas() {

/**
* Gets the resource collection API of QuotaRequestStatus.
*
*
* @return Resource collection API of QuotaRequestStatus.
*/
public QuotaRequestStatus quotaRequestStatus() {
Expand All @@ -309,7 +289,7 @@ public QuotaRequestStatus quotaRequestStatus() {

/**
* Gets the resource collection API of QuotaOperations.
*
*
* @return Resource collection API of QuotaOperations.
*/
public QuotaOperations quotaOperations() {
Expand All @@ -320,8 +300,10 @@ public QuotaOperations quotaOperations() {
}

/**
* @return Wrapped service client AzureQuotaExtensionApi providing direct access to the underlying auto-generated
* API implementation, based on Azure REST API.
* Gets wrapped service client AzureQuotaExtensionApi providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
*
* @return Wrapped service client AzureQuotaExtensionApi.
*/
public AzureQuotaExtensionApi serviceClient() {
return this.clientObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,60 +7,62 @@
import com.azure.core.http.HttpPipeline;
import java.time.Duration;

/** The interface for AzureQuotaExtensionApi class. */
/**
* The interface for AzureQuotaExtensionApi class.
*/
public interface AzureQuotaExtensionApi {
/**
* Gets server parameter.
*
*
* @return the endpoint value.
*/
String getEndpoint();

/**
* Gets Api Version.
*
*
* @return the apiVersion value.
*/
String getApiVersion();

/**
* Gets The HTTP pipeline to send requests through.
*
*
* @return the httpPipeline value.
*/
HttpPipeline getHttpPipeline();

/**
* Gets The default poll interval for long-running operation.
*
*
* @return the defaultPollInterval value.
*/
Duration getDefaultPollInterval();

/**
* Gets the UsagesClient object to access its operations.
*
*
* @return the UsagesClient object.
*/
UsagesClient getUsages();

/**
* Gets the QuotasClient object to access its operations.
*
*
* @return the QuotasClient object.
*/
QuotasClient getQuotas();

/**
* Gets the QuotaRequestStatusClient object to access its operations.
*
*
* @return the QuotaRequestStatusClient object.
*/
QuotaRequestStatusClient getQuotaRequestStatus();

/**
* Gets the QuotaOperationsClient object to access its operations.
*
*
* @return the QuotaOperationsClient object.
*/
QuotaOperationsClient getQuotaOperations();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.quota.fluent.models.OperationResponseInner;

/** An instance of this class provides access to all the operations defined in QuotaOperationsClient. */
/**
* An instance of this class provides access to all the operations defined in QuotaOperationsClient.
*/
public interface QuotaOperationsClient {
/**
* GET quota operations.
*
* <p>List all the operations supported by the Microsoft.Quota resource provider.
*
*
* List all the operations supported by the Microsoft.Quota resource provider.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the paginated response with {@link PagedIterable}.
Expand All @@ -26,9 +28,9 @@ public interface QuotaOperationsClient {

/**
* GET quota operations.
*
* <p>List all the operations supported by the Microsoft.Quota resource provider.
*
*
* List all the operations supported by the Microsoft.Quota resource provider.
*
* @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.
Expand Down
Loading

0 comments on commit 6ea8f1f

Please sign in to comment.