diff --git a/sdk/quota/azure-resourcemanager-quota/CHANGELOG.md b/sdk/quota/azure-resourcemanager-quota/CHANGELOG.md
index 93dfc1d9c0d4..08bf75511fd6 100644
--- a/sdk/quota/azure-resourcemanager-quota/CHANGELOG.md
+++ b/sdk/quota/azure-resourcemanager-quota/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.3 (Unreleased)
+## 1.0.0-beta.1 (2023-03-20)
+
+- 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).
### Features Added
diff --git a/sdk/quota/azure-resourcemanager-quota/README.md b/sdk/quota/azure-resourcemanager-quota/README.md
index 551fa366fec2..91326e71c752 100644
--- a/sdk/quota/azure-resourcemanager-quota/README.md
+++ b/sdk/quota/azure-resourcemanager-quota/README.md
@@ -2,7 +2,7 @@
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).
+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).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanagerazure-resourcemanager-quota
- 1.0.0-beta.2
+ 1.0.0-beta.3
```
[//]: # ({x-version-update-end})
@@ -41,19 +41,19 @@ Various documentation is available to help you get started
Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
-[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation.
### Authentication
-By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+By default, Azure Active Directory 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.
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
-In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-With above configuration, `azure` client can be authenticated by following code:
+With above configuration, `azure` client can be authenticated using the following code:
```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on
## Contributing
-For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
+For details on contributing to this repository, see the [contributing guide][cg].
-1. Fork it
-1. Create your feature branch (`git checkout -b my-new-feature`)
-1. Commit your changes (`git commit -am 'Add some feature'`)
-1. Push to the branch (`git push origin my-new-feature`)
-1. Create new Pull Request
+This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit .
+
+When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
+
+This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments.
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
@@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
+[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/
diff --git a/sdk/quota/azure-resourcemanager-quota/SAMPLE.md b/sdk/quota/azure-resourcemanager-quota/SAMPLE.md
index f371ebb5029a..257c2498bb06 100644
--- a/sdk/quota/azure-resourcemanager-quota/SAMPLE.md
+++ b/sdk/quota/azure-resourcemanager-quota/SAMPLE.md
@@ -31,7 +31,7 @@ import com.azure.resourcemanager.quota.models.ResourceName;
/** Samples for Quota CreateOrUpdate. */
public final class QuotaCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/putMachineLearningServicesQuotaRequestLowPriority.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/putMachineLearningServicesQuotaRequestLowPriority.json
*/
/**
* Sample code: Quotas_Request_ForMachineLearningServices_LowPriorityResource.
@@ -54,7 +54,7 @@ public final class QuotaCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/putNetworkOneSkuQuotaRequestStandardSkuPublicIpAddresses.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/putNetworkOneSkuQuotaRequestStandardSkuPublicIpAddresses.json
*/
/**
* Sample code: Quotas_PutRequest_ForNetwork_StandardSkuPublicIpAddressesResource.
@@ -77,7 +77,7 @@ public final class QuotaCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/putComputeOneSkuQuotaRequest.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/putComputeOneSkuQuotaRequest.json
*/
/**
* Sample code: Quotas_Put_Request_ForCompute.
@@ -98,7 +98,7 @@ public final class QuotaCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/putNetworkOneSkuQuotaRequest.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/putNetworkOneSkuQuotaRequest.json
*/
/**
* Sample code: Quotas_PutRequest_ForNetwork.
@@ -124,12 +124,10 @@ public final class QuotaCreateOrUpdateSamples {
### Quota_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for Quota Get. */
public final class QuotaGetSamples {
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/getNetworkOneSkuQuotaLimit.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getNetworkOneSkuQuotaLimit.json
*/
/**
* Sample code: Quotas_UsagesRequest_ForNetwork.
@@ -142,11 +140,11 @@ public final class QuotaGetSamples {
.getWithResponse(
"MinPublicIpInterNetworkPrefixLength",
"subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/getComputeOneSkuQuotaLimit.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getComputeOneSkuQuotaLimit.json
*/
/**
* Sample code: Quotas_Get_Request_ForCompute.
@@ -159,7 +157,7 @@ public final class QuotaGetSamples {
.getWithResponse(
"standardNDSFamily",
"subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -167,12 +165,10 @@ public final class QuotaGetSamples {
### Quota_List
```java
-import com.azure.core.util.Context;
-
/** Samples for Quota List. */
public final class QuotaListSamples {
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/getMachineLearningServicesQuotaLimits.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getMachineLearningServicesQuotaLimits.json
*/
/**
* Sample code: Quotas_listQuotaLimitsMachineLearningServices.
@@ -185,11 +181,11 @@ public final class QuotaListSamples {
.quotas()
.list(
"subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/eastus",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/getComputeQuotaLimits.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getComputeQuotaLimits.json
*/
/**
* Sample code: Quotas_listQuotaLimitsForCompute.
@@ -201,11 +197,11 @@ public final class QuotaListSamples {
.quotas()
.list(
"subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/getNetworkQuotaLimits.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getNetworkQuotaLimits.json
*/
/**
* Sample code: Quotas_listQuotaLimitsForNetwork.
@@ -217,7 +213,7 @@ public final class QuotaListSamples {
.quotas()
.list(
"subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -225,7 +221,6 @@ public final class QuotaListSamples {
### Quota_Update
```java
-import com.azure.core.util.Context;
import com.azure.resourcemanager.quota.models.CurrentQuotaLimitBase;
import com.azure.resourcemanager.quota.models.LimitObject;
import com.azure.resourcemanager.quota.models.QuotaProperties;
@@ -234,7 +229,7 @@ import com.azure.resourcemanager.quota.models.ResourceName;
/** Samples for Quota Update. */
public final class QuotaUpdateSamples {
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/patchComputeQuotaRequest.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/patchComputeQuotaRequest.json
*/
/**
* Sample code: Quotas_Request_PatchForCompute.
@@ -248,7 +243,7 @@ public final class QuotaUpdateSamples {
.getWithResponse(
"standardFSv2Family",
"subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus",
- Context.NONE)
+ com.azure.core.util.Context.NONE)
.getValue();
resource
.update()
@@ -260,7 +255,7 @@ public final class QuotaUpdateSamples {
}
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/patchNetworkOneSkuQuotaRequest.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/patchNetworkOneSkuQuotaRequest.json
*/
/**
* Sample code: Quotas_Request_PatchForNetwork.
@@ -274,7 +269,7 @@ public final class QuotaUpdateSamples {
.getWithResponse(
"MinPublicIpInterNetworkPrefixLength",
"subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Network/locations/eastus",
- Context.NONE)
+ com.azure.core.util.Context.NONE)
.getValue();
resource
.update()
@@ -291,12 +286,10 @@ public final class QuotaUpdateSamples {
### QuotaOperation_List
```java
-import com.azure.core.util.Context;
-
/** Samples for QuotaOperation List. */
public final class QuotaOperationListSamples {
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/GetOperations.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/GetOperations.json
*/
/**
* Sample code: GetOperations.
@@ -304,7 +297,7 @@ public final class QuotaOperationListSamples {
* @param manager Entry point to QuotaManager.
*/
public static void getOperations(com.azure.resourcemanager.quota.QuotaManager manager) {
- manager.quotaOperations().list(Context.NONE);
+ manager.quotaOperations().list(com.azure.core.util.Context.NONE);
}
}
```
@@ -312,12 +305,10 @@ public final class QuotaOperationListSamples {
### QuotaRequestStatus_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for QuotaRequestStatus Get. */
public final class QuotaRequestStatusGetSamples {
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/getQuotaRequestStatusFailed.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getQuotaRequestStatusFailed.json
*/
/**
* Sample code: QuotaRequestFailed.
@@ -330,11 +321,11 @@ public final class QuotaRequestStatusGetSamples {
.getWithResponse(
"2B5C8515-37D8-4B6A-879B-CD641A2CF605",
"subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/getQuotaRequestStatusById.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getQuotaRequestStatusById.json
*/
/**
* Sample code: QuotaRequestStatus.
@@ -347,11 +338,11 @@ public final class QuotaRequestStatusGetSamples {
.getWithResponse(
"2B5C8515-37D8-4B6A-879B-CD641A2CF605",
"subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/getQuotaRequestStatusInProgress.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getQuotaRequestStatusInProgress.json
*/
/**
* Sample code: QuotaRequestInProgress.
@@ -364,7 +355,7 @@ public final class QuotaRequestStatusGetSamples {
.getWithResponse(
"2B5C8515-37D8-4B6A-879B-CD641A2CF605",
"subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -372,12 +363,10 @@ public final class QuotaRequestStatusGetSamples {
### QuotaRequestStatus_List
```java
-import com.azure.core.util.Context;
-
/** Samples for QuotaRequestStatus List. */
public final class QuotaRequestStatusListSamples {
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/getQuotaRequestsHistory.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getQuotaRequestsHistory.json
*/
/**
* Sample code: QuotaRequestHistory.
@@ -392,7 +381,7 @@ public final class QuotaRequestStatusListSamples {
null,
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -400,12 +389,10 @@ public final class QuotaRequestStatusListSamples {
### Usages_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for Usages Get. */
public final class UsagesGetSamples {
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/getNetworkOneSkuUsages.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getNetworkOneSkuUsages.json
*/
/**
* Sample code: Quotas_UsagesRequest_ForNetwork.
@@ -418,11 +405,11 @@ public final class UsagesGetSamples {
.getWithResponse(
"MinPublicIpInterNetworkPrefixLength",
"subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/getComputeOneSkuUsages.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getComputeOneSkuUsages.json
*/
/**
* Sample code: Quotas_UsagesRequest_ForCompute.
@@ -435,7 +422,7 @@ public final class UsagesGetSamples {
.getWithResponse(
"standardNDSFamily",
"subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -443,12 +430,10 @@ public final class UsagesGetSamples {
### Usages_List
```java
-import com.azure.core.util.Context;
-
/** Samples for Usages List. */
public final class UsagesListSamples {
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/getComputeUsages.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getComputeUsages.json
*/
/**
* Sample code: Quotas_listUsagesForCompute.
@@ -460,11 +445,11 @@ public final class UsagesListSamples {
.usages()
.list(
"subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/getNetworkUsages.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getNetworkUsages.json
*/
/**
* Sample code: Quotas_listUsagesForNetwork.
@@ -476,11 +461,11 @@ public final class UsagesListSamples {
.usages()
.list(
"subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/getMachineLearningServicesUsages.json
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getMachineLearningServicesUsages.json
*/
/**
* Sample code: Quotas_listUsagesMachineLearningServices.
@@ -492,7 +477,7 @@ public final class UsagesListSamples {
.usages()
.list(
"subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/eastus",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
diff --git a/sdk/quota/azure-resourcemanager-quota/pom.xml b/sdk/quota/azure-resourcemanager-quota/pom.xml
index 29e539c9f388..e17d3ee38264 100644
--- a/sdk/quota/azure-resourcemanager-quota/pom.xml
+++ b/sdk/quota/azure-resourcemanager-quota/pom.xml
@@ -1,3 +1,8 @@
+
4.0.0
@@ -13,7 +18,7 @@
jarMicrosoft Azure SDK for quota Management
- This package contains Microsoft Azure SDK for quota Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft Azure Quota Resource Provider. Package tag package-2021-03-15-preview.
+ This package contains Microsoft Azure SDK for quota Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft Azure Quota Resource Provider. Package tag package-2023-02-01.https://github.com/Azure/azure-sdk-for-java
@@ -38,7 +43,8 @@
UTF-8
- true
+ 0
+ 0
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/QuotaManager.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/QuotaManager.java
index 55375329881c..3850a07fb8bc 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/QuotaManager.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/QuotaManager.java
@@ -10,11 +10,13 @@
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;
@@ -74,6 +76,19 @@ public static QuotaManager authenticate(TokenCredential credential, AzureProfile
return configure().authenticate(credential, profile);
}
+ /**
+ * 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.
+ */
+ public static QuotaManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return new QuotaManager(httpPipeline, profile, null);
+ }
+
/**
* Gets a Configurable instance that can be used to create QuotaManager with optional configuration.
*
@@ -85,13 +100,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() {
@@ -152,6 +168,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.
*
@@ -159,9 +188,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;
}
@@ -183,7 +214,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(" (")
@@ -201,10 +232,15 @@ public QuotaManager authenticate(TokenCredential credential, AzureProfile profil
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(
@@ -235,7 +271,11 @@ public QuotaManager authenticate(TokenCredential credential, AzureProfile profil
}
}
- /** @return Resource collection API of Usages. */
+ /**
+ * Gets the resource collection API of Usages.
+ *
+ * @return Resource collection API of Usages.
+ */
public Usages usages() {
if (this.usages == null) {
this.usages = new UsagesImpl(clientObject.getUsages(), this);
@@ -243,7 +283,11 @@ public Usages usages() {
return usages;
}
- /** @return Resource collection API of Quotas. */
+ /**
+ * Gets the resource collection API of Quotas. It manages CurrentQuotaLimitBase.
+ *
+ * @return Resource collection API of Quotas.
+ */
public Quotas quotas() {
if (this.quotas == null) {
this.quotas = new QuotasImpl(clientObject.getQuotas(), this);
@@ -251,7 +295,11 @@ public Quotas quotas() {
return quotas;
}
- /** @return Resource collection API of QuotaRequestStatus. */
+ /**
+ * Gets the resource collection API of QuotaRequestStatus.
+ *
+ * @return Resource collection API of QuotaRequestStatus.
+ */
public QuotaRequestStatus quotaRequestStatus() {
if (this.quotaRequestStatus == null) {
this.quotaRequestStatus = new QuotaRequestStatusImpl(clientObject.getQuotaRequestStatus(), this);
@@ -259,7 +307,11 @@ public QuotaRequestStatus quotaRequestStatus() {
return quotaRequestStatus;
}
- /** @return Resource collection API of QuotaOperations. */
+ /**
+ * Gets the resource collection API of QuotaOperations.
+ *
+ * @return Resource collection API of QuotaOperations.
+ */
public QuotaOperations quotaOperations() {
if (this.quotaOperations == null) {
this.quotaOperations = new QuotaOperationsImpl(clientObject.getQuotaOperations(), this);
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotaOperationsClient.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotaOperationsClient.java
index 7f8084915ea5..8d3be7c697f5 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotaOperationsClient.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotaOperationsClient.java
@@ -13,23 +13,27 @@
/** An instance of this class provides access to all the operations defined in QuotaOperationsClient. */
public interface QuotaOperationsClient {
/**
- * List all the operations supported by the Microsoft.Quota resource provider.
+ * GET quota operations.
+ *
+ *
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 response.
+ * @return the paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
/**
- * List all the operations supported by the Microsoft.Quota resource provider.
+ * GET quota operations.
+ *
+ *
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.
* @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 list(Context context);
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotaRequestStatusClient.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotaRequestStatusClient.java
index 1c1eb6e5d869..8f87e72182da 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotaRequestStatusClient.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotaRequestStatusClient.java
@@ -22,14 +22,15 @@ public interface QuotaRequestStatusClient {
* `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
* This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after
* `/quotas`, then it's the target Azure resource URI in the GET operation for the specific 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 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)
- QuotaRequestDetailsInner get(String id, String scope);
+ Response getWithResponse(String id, String scope, Context context);
/**
* Get the quota request details and status by quota request ID for the resources of the resource provider at a
@@ -40,7 +41,6 @@ public interface QuotaRequestStatusClient {
* `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
* This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after
* `/quotas`, then it's the target Azure resource URI in the GET operation for the specific 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.
@@ -48,7 +48,7 @@ public interface QuotaRequestStatusClient {
* specific location.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String id, String scope, Context context);
+ QuotaRequestDetailsInner get(String id, String scope);
/**
* For the specified scope, get the current quota requests for a one year period ending at the time is made. Use the
@@ -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 list(String scope);
@@ -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 list(
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotasClient.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotasClient.java
index 81a5b5ab9865..7d87b0e6a740 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotasClient.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotasClient.java
@@ -25,13 +25,14 @@ public interface QuotasClient {
* `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
* This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after
* `/quotas`, then it's the target Azure resource URI in the GET operation for the specific 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 the quota limit of a resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- CurrentQuotaLimitBaseInner get(String resourceName, String scope);
+ QuotasGetResponse getWithResponse(String resourceName, String scope, Context context);
/**
* Get the quota limit of a resource. The response can be used to determine the remaining quota to calculate a new
@@ -43,14 +44,13 @@ public interface QuotasClient {
* `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
* This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after
* `/quotas`, then it's the target Azure resource URI in the GET operation for the specific 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 the quota limit of a resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- QuotasGetResponse getWithResponse(String resourceName, String scope, Context context);
+ CurrentQuotaLimitBaseInner get(String resourceName, String scope);
/**
* Create or update the quota limit for the specified resource with the requested value. To update the quota, follow
@@ -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, CurrentQuotaLimitBaseInner> beginCreateOrUpdate(
@@ -95,7 +95,7 @@ SyncPoller, 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, CurrentQuotaLimitBaseInner> beginCreateOrUpdate(
@@ -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, CurrentQuotaLimitBaseInner> beginUpdate(
@@ -193,7 +193,7 @@ SyncPoller, 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, CurrentQuotaLimitBaseInner> beginUpdate(
@@ -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 list(String scope);
@@ -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 list(String scope, Context context);
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/UsagesClient.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/UsagesClient.java
index d310edd06f01..261500e26e18 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/UsagesClient.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/UsagesClient.java
@@ -22,13 +22,14 @@ public interface UsagesClient {
* `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
* This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after
* `/quotas`, then it's the target Azure resource URI in the GET operation for the specific 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 the current usage of a resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- CurrentUsagesBaseInner get(String resourceName, String scope);
+ UsagesGetResponse getWithResponse(String resourceName, String scope, Context context);
/**
* Get the current usage of a resource.
@@ -39,14 +40,13 @@ public interface UsagesClient {
* `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
* This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after
* `/quotas`, then it's the target Azure resource URI in the GET operation for the specific 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 the current usage of a resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- UsagesGetResponse getWithResponse(String resourceName, String scope, Context context);
+ CurrentUsagesBaseInner get(String resourceName, String scope);
/**
* Get a list of current usage for all resources for the scope specified.
@@ -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 list(String scope);
@@ -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 list(String scope, Context context);
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/CurrentQuotaLimitBaseInner.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/CurrentQuotaLimitBaseInner.java
index f745135c494f..3579f753d070 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/CurrentQuotaLimitBaseInner.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/CurrentQuotaLimitBaseInner.java
@@ -6,23 +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.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.
+ * Quota properties for the specified resource, based on the API called, Quotas or Usages.
*/
@JsonProperty(value = "properties")
private QuotaProperties properties;
+ /** Creates an instance of CurrentQuotaLimitBaseInner class. */
+ public CurrentQuotaLimitBaseInner() {
+ }
+
/**
* Get the properties property: Quota properties for the specified resource, based on the API called, Quotas or
* Usages.
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/CurrentUsagesBaseInner.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/CurrentUsagesBaseInner.java
index 95f30df1b0b4..eba27c405dbf 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/CurrentUsagesBaseInner.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/CurrentUsagesBaseInner.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.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.
*/
@JsonProperty(value = "properties")
private UsagesProperties properties;
+ /** Creates an instance of CurrentUsagesBaseInner class. */
+ public CurrentUsagesBaseInner() {
+ }
+
/**
* Get the properties property: Usage properties for the specified resource.
*
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/OperationResponseInner.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/OperationResponseInner.java
index 68486082b5cd..edbc3d6f23c2 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/OperationResponseInner.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/OperationResponseInner.java
@@ -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.
*/
@@ -33,6 +29,10 @@ public final class OperationResponseInner {
@JsonProperty(value = "origin")
private String origin;
+ /** Creates an instance of OperationResponseInner class. */
+ public OperationResponseInner() {
+ }
+
/**
* Get the name property: The name property.
*
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/QuotaRequestDetailsInner.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/QuotaRequestDetailsInner.java
index b134be033c08..e1c2accf8393 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/QuotaRequestDetailsInner.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/QuotaRequestDetailsInner.java
@@ -5,11 +5,9 @@
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;
@@ -17,8 +15,6 @@
/** List of quota requests with details. */
@Fluent
public final class QuotaRequestDetailsInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(QuotaRequestDetailsInner.class);
-
/*
* Quota request ID.
*/
@@ -43,6 +39,10 @@ public final class QuotaRequestDetailsInner {
@JsonProperty(value = "properties")
private QuotaRequestProperties innerProperties;
+ /** Creates an instance of QuotaRequestDetailsInner class. */
+ public QuotaRequestDetailsInner() {
+ }
+
/**
* Get the id property: Quota request ID.
*
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/QuotaRequestProperties.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/QuotaRequestProperties.java
index f6bad69644ab..64f5f7cf59e8 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/QuotaRequestProperties.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/QuotaRequestProperties.java
@@ -5,11 +5,9 @@
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;
@@ -17,8 +15,6 @@
/** Quota request properties. */
@Fluent
public final class QuotaRequestProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(QuotaRequestProperties.class);
-
/*
* The quota request status.
*/
@@ -38,8 +34,8 @@ public final class QuotaRequestProperties {
private ServiceErrorDetail error;
/*
- * The quota request submission time. The date conforms to the following
- * format specified by the ISO 8601 standard: yyyy-MM-ddTHH:mm:ssZ
+ * The quota request submission time. The date conforms to the following format specified by the ISO 8601 standard:
+ * yyyy-MM-ddTHH:mm:ssZ
*/
@JsonProperty(value = "requestSubmitTime", access = JsonProperty.Access.WRITE_ONLY)
private OffsetDateTime requestSubmitTime;
@@ -50,6 +46,10 @@ public final class QuotaRequestProperties {
@JsonProperty(value = "value")
private List value;
+ /** Creates an instance of QuotaRequestProperties class. */
+ public QuotaRequestProperties() {
+ }
+
/**
* Get the provisioningState property: The quota request status.
*
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/AzureQuotaExtensionApiBuilder.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/AzureQuotaExtensionApiBuilder.java
index 3b8210d62047..a54ca0ebb91e 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/AzureQuotaExtensionApiBuilder.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/AzureQuotaExtensionApiBuilder.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;
@@ -51,34 +50,34 @@ public AzureQuotaExtensionApiBuilder 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 AzureQuotaExtensionApiBuilder.
*/
- public AzureQuotaExtensionApiBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public AzureQuotaExtensionApiBuilder 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 AzureQuotaExtensionApiBuilder.
*/
- public AzureQuotaExtensionApiBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public AzureQuotaExtensionApiBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -104,26 +103,21 @@ public AzureQuotaExtensionApiBuilder serializerAdapter(SerializerAdapter seriali
* @return an instance of AzureQuotaExtensionApiImpl.
*/
public AzureQuotaExtensionApiImpl 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();
AzureQuotaExtensionApiImpl client =
- new AzureQuotaExtensionApiImpl(pipeline, serializerAdapter, defaultPollInterval, environment, endpoint);
+ new AzureQuotaExtensionApiImpl(
+ localPipeline, localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint);
return client;
}
}
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/AzureQuotaExtensionApiImpl.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/AzureQuotaExtensionApiImpl.java
index e5a964cf36ee..47b8c2141941 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/AzureQuotaExtensionApiImpl.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/AzureQuotaExtensionApiImpl.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;
@@ -32,15 +33,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 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;
@@ -168,7 +166,7 @@ public QuotaOperationsClient getQuotaOperations() {
this.serializerAdapter = serializerAdapter;
this.defaultPollInterval = defaultPollInterval;
this.endpoint = endpoint;
- this.apiVersion = "2021-03-15-preview";
+ this.apiVersion = "2023-02-01";
this.usages = new UsagesClientImpl(this);
this.quotas = new QuotasClientImpl(this);
this.quotaRequestStatus = new QuotaRequestStatusClientImpl(this);
@@ -191,10 +189,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry