From 6ea8f1fde72fae4a875b24166f4de0e58935aad1 Mon Sep 17 00:00:00 2001
From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Date: Mon, 20 Nov 2023 23:05:24 -0800
Subject: [PATCH] [Automation] Generate Fluent Lite from
quota#package-2023-02-01 (#37754)
* [Automation] External Change
* [Automation] Generate Fluent Lite from quota#package-2023-02-01
---
eng/versioning/version_client.txt | 2 +-
.../azure-resourcemanager-quota/CHANGELOG.md | 10 +-
.../azure-resourcemanager-quota/README.md | 8 +-
.../azure-resourcemanager-quota/SAMPLE.md | 263 ++---
sdk/quota/azure-resourcemanager-quota/pom.xml | 2 +-
.../resourcemanager/quota/QuotaManager.java | 90 +-
.../quota/fluent/AzureQuotaExtensionApi.java | 20 +-
.../quota/fluent/QuotaOperationsClient.java | 16 +-
.../fluent/QuotaRequestStatusClient.java | 57 +-
.../quota/fluent/QuotasClient.java | 236 +++--
.../quota/fluent/UsagesClient.java | 56 +-
.../models/CurrentQuotaLimitBaseInner.java | 14 +-
.../fluent/models/CurrentUsagesBaseInner.java | 14 +-
.../fluent/models/OperationResponseInner.java | 22 +-
.../models/QuotaRequestDetailsInner.java | 32 +-
.../fluent/models/QuotaRequestProperties.java | 24 +-
.../quota/fluent/models/package-info.java | 5 +-
.../quota/fluent/package-info.java | 5 +-
.../AzureQuotaExtensionApiBuilder.java | 39 +-
.../AzureQuotaExtensionApiImpl.java | 106 +-
.../CurrentQuotaLimitBaseImpl.java | 43 +-
.../implementation/CurrentUsagesBaseImpl.java | 4 +-
.../implementation/OperationResponseImpl.java | 4 +-
.../QuotaOperationsClientImpl.java | 171 ++--
.../implementation/QuotaOperationsImpl.java | 4 +-
.../QuotaRequestDetailsImpl.java | 4 +-
.../QuotaRequestStatusClientImpl.java | 378 ++++---
.../QuotaRequestStatusImpl.java | 17 +-
.../implementation/QuotasClientImpl.java | 927 ++++++++----------
.../quota/implementation/QuotasImpl.java | 51 +-
.../implementation/UsagesClientImpl.java | 305 +++---
.../quota/implementation/UsagesImpl.java | 5 +-
.../quota/implementation/Utils.java | 43 +-
.../quota/implementation/package-info.java | 5 +-
.../quota/models/CurrentQuotaLimitBase.java | 80 +-
.../quota/models/CurrentUsagesBase.java | 14 +-
.../quota/models/LimitJsonObject.java | 12 +-
.../quota/models/LimitObject.java | 18 +-
.../quota/models/LimitType.java | 14 +-
.../quota/models/OperationDisplay.java | 26 +-
.../quota/models/OperationList.java | 18 +-
.../quota/models/OperationResponse.java | 12 +-
.../quota/models/QuotaLimitTypes.java | 18 +-
.../quota/models/QuotaLimits.java | 18 +-
.../quota/models/QuotaOperations.java | 16 +-
.../quota/models/QuotaProperties.java | 40 +-
.../quota/models/QuotaRequestDetails.java | 22 +-
.../quota/models/QuotaRequestDetailsList.java | 26 +-
.../quota/models/QuotaRequestState.java | 30 +-
.../quota/models/QuotaRequestStatus.java | 57 +-
.../resourcemanager/quota/models/Quotas.java | 62 +-
.../quota/models/QuotasGetHeaders.java | 12 +-
.../quota/models/QuotasGetResponse.java | 16 +-
.../quota/models/QuotasListHeaders.java | 12 +-
.../quota/models/QuotasListNextHeaders.java | 12 +-
.../quota/models/QuotasListNextResponse.java | 12 +-
.../quota/models/QuotasListResponse.java | 12 +-
.../quota/models/ResourceName.java | 16 +-
.../quota/models/ServiceErrorDetail.java | 14 +-
.../quota/models/SubRequest.java | 38 +-
.../resourcemanager/quota/models/Usages.java | 56 +-
.../quota/models/UsagesGetHeaders.java | 12 +-
.../quota/models/UsagesGetResponse.java | 14 +-
.../quota/models/UsagesLimits.java | 18 +-
.../quota/models/UsagesListHeaders.java | 12 +-
.../quota/models/UsagesListNextHeaders.java | 12 +-
.../quota/models/UsagesListNextResponse.java | 14 +-
.../quota/models/UsagesListResponse.java | 12 +-
.../quota/models/UsagesObject.java | 18 +-
.../quota/models/UsagesProperties.java | 40 +-
.../quota/models/UsagesTypes.java | 18 +-
.../quota/models/package-info.java | 5 +-
.../resourcemanager/quota/package-info.java | 5 +-
.../src/main/java/module-info.java | 8 +-
.../proxy-config.json | 1 +
.../reflect-config.json | 141 +++
.../generated/QuotaCreateOrUpdateSamples.java | 72 +-
.../quota/generated/QuotaGetSamples.java | 32 +-
.../quota/generated/QuotaListSamples.java | 47 +-
.../generated/QuotaOperationListSamples.java | 9 +-
.../QuotaRequestStatusGetSamples.java | 47 +-
.../QuotaRequestStatusListSamples.java | 20 +-
.../quota/generated/QuotaUpdateSamples.java | 61 +-
.../quota/generated/UsagesGetSamples.java | 32 +-
.../quota/generated/UsagesListSamples.java | 44 +-
.../CurrentQuotaLimitBaseInnerTests.java | 27 +-
.../CurrentUsagesBaseInnerTests.java | 20 +-
.../quota/generated/LimitJsonObjectTests.java | 4 +-
.../quota/generated/LimitObjectTests.java | 15 +-
.../generated/OperationDisplayTests.java | 32 +-
.../quota/generated/OperationListTests.java | 71 +-
.../OperationResponseInnerTests.java | 45 +-
.../quota/generated/QuotaLimitsTests.java | 52 +-
.../QuotaOperationsListMockTests.java | 45 +-
.../quota/generated/QuotaPropertiesTests.java | 25 +-
.../QuotaRequestDetailsListTests.java | 37 -
.../QuotasCreateOrUpdateMockTests.java | 60 +-
.../QuotasGetWithResponseMockTests.java | 41 +-
.../quota/generated/QuotasListMockTests.java | 41 +-
.../quota/generated/ResourceNameTests.java | 6 +-
.../quota/generated/SubRequestTests.java | 23 +-
.../UsagesGetWithResponseMockTests.java | 43 +-
.../quota/generated/UsagesLimitsTests.java | 49 +-
.../quota/generated/UsagesListMockTests.java | 42 +-
.../quota/generated/UsagesObjectTests.java | 4 +-
.../generated/UsagesPropertiesTests.java | 17 +-
106 files changed, 2429 insertions(+), 2629 deletions(-)
create mode 100644 sdk/quota/azure-resourcemanager-quota/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-quota/proxy-config.json
create mode 100644 sdk/quota/azure-resourcemanager-quota/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-quota/reflect-config.json
delete mode 100644 sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaRequestDetailsListTests.java
diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index d657bef117cc0..5295f29349ac0 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -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
diff --git a/sdk/quota/azure-resourcemanager-quota/CHANGELOG.md b/sdk/quota/azure-resourcemanager-quota/CHANGELOG.md
index 84e27ac37a628..bcae59bac4512 100644
--- a/sdk/quota/azure-resourcemanager-quota/CHANGELOG.md
+++ b/sdk/quota/azure-resourcemanager-quota/CHANGELOG.md
@@ -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)
diff --git a/sdk/quota/azure-resourcemanager-quota/README.md b/sdk/quota/azure-resourcemanager-quota/README.md
index 91326e71c7528..fb550434e82fb 100644
--- a/sdk/quota/azure-resourcemanager-quota/README.md
+++ b/sdk/quota/azure-resourcemanager-quota/README.md
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-quota
- 1.0.0-beta.3
+ 1.0.0
```
[//]: # ({x-version-update-end})
@@ -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.
@@ -94,7 +94,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[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
@@ -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)
diff --git a/sdk/quota/azure-resourcemanager-quota/SAMPLE.md b/sdk/quota/azure-resourcemanager-quota/SAMPLE.md
index 257c2498bb06e..59f922a1d6a54 100644
--- a/sdk/quota/azure-resourcemanager-quota/SAMPLE.md
+++ b/sdk/quota/azure-resourcemanager-quota/SAMPLE.md
@@ -28,29 +28,20 @@ import com.azure.resourcemanager.quota.models.LimitObject;
import com.azure.resourcemanager.quota.models.QuotaProperties;
import com.azure.resourcemanager.quota.models.ResourceName;
-/** Samples for Quota CreateOrUpdate. */
+/**
+ * Samples for Quota CreateOrUpdate.
+ */
public final class QuotaCreateOrUpdateSamples {
/*
* x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/putMachineLearningServicesQuotaRequestLowPriority.json
*/
/**
* Sample code: Quotas_Request_ForMachineLearningServices_LowPriorityResource.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
- public static void quotasRequestForMachineLearningServicesLowPriorityResource(
- com.azure.resourcemanager.quota.QuotaManager manager) {
- manager
- .quotas()
- .define("TotalLowPriorityCores")
- .withExistingScope(
- "subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.MachineLearningServices/locations/eastus")
- .withProperties(
- new QuotaProperties()
- .withLimit(new LimitObject().withValue(10))
- .withName(new ResourceName().withValue("TotalLowPriorityCores"))
- .withResourceType("lowPriority"))
- .create();
+ public static void quotasRequestForMachineLearningServicesLowPriorityResource(com.azure.resourcemanager.quota.QuotaManager manager) {
+ manager.quotas().define("TotalLowPriorityCores").withExistingScope("subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.MachineLearningServices/locations/eastus").withProperties(new QuotaProperties().withLimit(new LimitObject().withValue(10)).withName(new ResourceName().withValue("TotalLowPriorityCores")).withResourceType("lowPriority")).create();
}
/*
@@ -58,22 +49,11 @@ public final class QuotaCreateOrUpdateSamples {
*/
/**
* Sample code: Quotas_PutRequest_ForNetwork_StandardSkuPublicIpAddressesResource.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
- public static void quotasPutRequestForNetworkStandardSkuPublicIpAddressesResource(
- com.azure.resourcemanager.quota.QuotaManager manager) {
- manager
- .quotas()
- .define("StandardSkuPublicIpAddresses")
- .withExistingScope(
- "subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Network/locations/eastus")
- .withProperties(
- new QuotaProperties()
- .withLimit(new LimitObject().withValue(10))
- .withName(new ResourceName().withValue("StandardSkuPublicIpAddresses"))
- .withResourceType("PublicIpAddresses"))
- .create();
+ public static void quotasPutRequestForNetworkStandardSkuPublicIpAddressesResource(com.azure.resourcemanager.quota.QuotaManager manager) {
+ manager.quotas().define("StandardSkuPublicIpAddresses").withExistingScope("subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Network/locations/eastus").withProperties(new QuotaProperties().withLimit(new LimitObject().withValue(10)).withName(new ResourceName().withValue("StandardSkuPublicIpAddresses")).withResourceType("PublicIpAddresses")).create();
}
/*
@@ -81,20 +61,11 @@ public final class QuotaCreateOrUpdateSamples {
*/
/**
* Sample code: Quotas_Put_Request_ForCompute.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
public static void quotasPutRequestForCompute(com.azure.resourcemanager.quota.QuotaManager manager) {
- manager
- .quotas()
- .define("standardFSv2Family")
- .withExistingScope(
- "subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus")
- .withProperties(
- new QuotaProperties()
- .withLimit(new LimitObject().withValue(10))
- .withName(new ResourceName().withValue("standardFSv2Family")))
- .create();
+ manager.quotas().define("standardFSv2Family").withExistingScope("subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus").withProperties(new QuotaProperties().withLimit(new LimitObject().withValue(10)).withName(new ResourceName().withValue("standardFSv2Family"))).create();
}
/*
@@ -102,21 +73,11 @@ public final class QuotaCreateOrUpdateSamples {
*/
/**
* Sample code: Quotas_PutRequest_ForNetwork.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
public static void quotasPutRequestForNetwork(com.azure.resourcemanager.quota.QuotaManager manager) {
- manager
- .quotas()
- .define("MinPublicIpInterNetworkPrefixLength")
- .withExistingScope(
- "subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Network/locations/eastus")
- .withProperties(
- new QuotaProperties()
- .withLimit(new LimitObject().withValue(10))
- .withName(new ResourceName().withValue("MinPublicIpInterNetworkPrefixLength"))
- .withResourceType("MinPublicIpInterNetworkPrefixLength"))
- .create();
+ manager.quotas().define("MinPublicIpInterNetworkPrefixLength").withExistingScope("subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Network/locations/eastus").withProperties(new QuotaProperties().withLimit(new LimitObject().withValue(10)).withName(new ResourceName().withValue("MinPublicIpInterNetworkPrefixLength")).withResourceType("MinPublicIpInterNetworkPrefixLength")).create();
}
}
```
@@ -124,23 +85,20 @@ public final class QuotaCreateOrUpdateSamples {
### Quota_Get
```java
-/** Samples for Quota Get. */
+/**
+ * Samples for Quota Get.
+ */
public final class QuotaGetSamples {
/*
* x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getNetworkOneSkuQuotaLimit.json
*/
/**
* Sample code: Quotas_UsagesRequest_ForNetwork.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
public static void quotasUsagesRequestForNetwork(com.azure.resourcemanager.quota.QuotaManager manager) {
- manager
- .quotas()
- .getWithResponse(
- "MinPublicIpInterNetworkPrefixLength",
- "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus",
- com.azure.core.util.Context.NONE);
+ manager.quotas().getWithResponse("MinPublicIpInterNetworkPrefixLength", "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus", com.azure.core.util.Context.NONE);
}
/*
@@ -148,16 +106,11 @@ public final class QuotaGetSamples {
*/
/**
* Sample code: Quotas_Get_Request_ForCompute.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
public static void quotasGetRequestForCompute(com.azure.resourcemanager.quota.QuotaManager manager) {
- manager
- .quotas()
- .getWithResponse(
- "standardNDSFamily",
- "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus",
- com.azure.core.util.Context.NONE);
+ manager.quotas().getWithResponse("standardNDSFamily", "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus", com.azure.core.util.Context.NONE);
}
}
```
@@ -165,23 +118,20 @@ public final class QuotaGetSamples {
### Quota_List
```java
-/** Samples for Quota List. */
+/**
+ * Samples for Quota List.
+ */
public final class QuotaListSamples {
/*
* x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getMachineLearningServicesQuotaLimits.json
*/
/**
* Sample code: Quotas_listQuotaLimitsMachineLearningServices.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
- public static void quotasListQuotaLimitsMachineLearningServices(
- com.azure.resourcemanager.quota.QuotaManager manager) {
- manager
- .quotas()
- .list(
- "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/eastus",
- com.azure.core.util.Context.NONE);
+ public static void quotasListQuotaLimitsMachineLearningServices(com.azure.resourcemanager.quota.QuotaManager manager) {
+ manager.quotas().list("subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/eastus", com.azure.core.util.Context.NONE);
}
/*
@@ -189,15 +139,11 @@ public final class QuotaListSamples {
*/
/**
* Sample code: Quotas_listQuotaLimitsForCompute.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
public static void quotasListQuotaLimitsForCompute(com.azure.resourcemanager.quota.QuotaManager manager) {
- manager
- .quotas()
- .list(
- "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus",
- com.azure.core.util.Context.NONE);
+ manager.quotas().list("subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus", com.azure.core.util.Context.NONE);
}
/*
@@ -205,15 +151,11 @@ public final class QuotaListSamples {
*/
/**
* Sample code: Quotas_listQuotaLimitsForNetwork.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
public static void quotasListQuotaLimitsForNetwork(com.azure.resourcemanager.quota.QuotaManager manager) {
- manager
- .quotas()
- .list(
- "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus",
- com.azure.core.util.Context.NONE);
+ manager.quotas().list("subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus", com.azure.core.util.Context.NONE);
}
}
```
@@ -226,32 +168,21 @@ import com.azure.resourcemanager.quota.models.LimitObject;
import com.azure.resourcemanager.quota.models.QuotaProperties;
import com.azure.resourcemanager.quota.models.ResourceName;
-/** Samples for Quota Update. */
+/**
+ * Samples for Quota Update.
+ */
public final class QuotaUpdateSamples {
/*
* x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/patchComputeQuotaRequest.json
*/
/**
* Sample code: Quotas_Request_PatchForCompute.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
public static void quotasRequestPatchForCompute(com.azure.resourcemanager.quota.QuotaManager manager) {
- CurrentQuotaLimitBase resource =
- manager
- .quotas()
- .getWithResponse(
- "standardFSv2Family",
- "subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus",
- com.azure.core.util.Context.NONE)
- .getValue();
- resource
- .update()
- .withProperties(
- new QuotaProperties()
- .withLimit(new LimitObject().withValue(10))
- .withName(new ResourceName().withValue("standardFSv2Family")))
- .apply();
+ CurrentQuotaLimitBase resource = manager.quotas().getWithResponse("standardFSv2Family", "subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus", com.azure.core.util.Context.NONE).getValue();
+ resource.update().withProperties(new QuotaProperties().withLimit(new LimitObject().withValue(10)).withName(new ResourceName().withValue("standardFSv2Family"))).apply();
}
/*
@@ -259,26 +190,12 @@ public final class QuotaUpdateSamples {
*/
/**
* Sample code: Quotas_Request_PatchForNetwork.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
public static void quotasRequestPatchForNetwork(com.azure.resourcemanager.quota.QuotaManager manager) {
- CurrentQuotaLimitBase resource =
- manager
- .quotas()
- .getWithResponse(
- "MinPublicIpInterNetworkPrefixLength",
- "subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Network/locations/eastus",
- com.azure.core.util.Context.NONE)
- .getValue();
- resource
- .update()
- .withProperties(
- new QuotaProperties()
- .withLimit(new LimitObject().withValue(10))
- .withName(new ResourceName().withValue("MinPublicIpInterNetworkPrefixLength"))
- .withResourceType("MinPublicIpInterNetworkPrefixLength"))
- .apply();
+ CurrentQuotaLimitBase resource = manager.quotas().getWithResponse("MinPublicIpInterNetworkPrefixLength", "subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Network/locations/eastus", com.azure.core.util.Context.NONE).getValue();
+ resource.update().withProperties(new QuotaProperties().withLimit(new LimitObject().withValue(10)).withName(new ResourceName().withValue("MinPublicIpInterNetworkPrefixLength")).withResourceType("MinPublicIpInterNetworkPrefixLength")).apply();
}
}
```
@@ -286,14 +203,16 @@ public final class QuotaUpdateSamples {
### QuotaOperation_List
```java
-/** Samples for QuotaOperation List. */
+/**
+ * Samples for QuotaOperation List.
+ */
public final class QuotaOperationListSamples {
/*
* x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/GetOperations.json
*/
/**
* Sample code: GetOperations.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
public static void getOperations(com.azure.resourcemanager.quota.QuotaManager manager) {
@@ -305,23 +224,20 @@ public final class QuotaOperationListSamples {
### QuotaRequestStatus_Get
```java
-/** Samples for QuotaRequestStatus Get. */
+/**
+ * Samples for QuotaRequestStatus Get.
+ */
public final class QuotaRequestStatusGetSamples {
/*
* x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getQuotaRequestStatusFailed.json
*/
/**
* Sample code: QuotaRequestFailed.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
public static void quotaRequestFailed(com.azure.resourcemanager.quota.QuotaManager manager) {
- manager
- .quotaRequestStatus()
- .getWithResponse(
- "2B5C8515-37D8-4B6A-879B-CD641A2CF605",
- "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus",
- com.azure.core.util.Context.NONE);
+ manager.quotaRequestStatus().getWithResponse("2B5C8515-37D8-4B6A-879B-CD641A2CF605", "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus", com.azure.core.util.Context.NONE);
}
/*
@@ -329,16 +245,11 @@ public final class QuotaRequestStatusGetSamples {
*/
/**
* Sample code: QuotaRequestStatus.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
public static void quotaRequestStatus(com.azure.resourcemanager.quota.QuotaManager manager) {
- manager
- .quotaRequestStatus()
- .getWithResponse(
- "2B5C8515-37D8-4B6A-879B-CD641A2CF605",
- "subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus",
- com.azure.core.util.Context.NONE);
+ manager.quotaRequestStatus().getWithResponse("2B5C8515-37D8-4B6A-879B-CD641A2CF605", "subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus", com.azure.core.util.Context.NONE);
}
/*
@@ -346,16 +257,11 @@ public final class QuotaRequestStatusGetSamples {
*/
/**
* Sample code: QuotaRequestInProgress.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
public static void quotaRequestInProgress(com.azure.resourcemanager.quota.QuotaManager manager) {
- manager
- .quotaRequestStatus()
- .getWithResponse(
- "2B5C8515-37D8-4B6A-879B-CD641A2CF605",
- "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus",
- com.azure.core.util.Context.NONE);
+ manager.quotaRequestStatus().getWithResponse("2B5C8515-37D8-4B6A-879B-CD641A2CF605", "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus", com.azure.core.util.Context.NONE);
}
}
```
@@ -363,25 +269,20 @@ public final class QuotaRequestStatusGetSamples {
### QuotaRequestStatus_List
```java
-/** Samples for QuotaRequestStatus List. */
+/**
+ * Samples for QuotaRequestStatus List.
+ */
public final class QuotaRequestStatusListSamples {
/*
* x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getQuotaRequestsHistory.json
*/
/**
* Sample code: QuotaRequestHistory.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
public static void quotaRequestHistory(com.azure.resourcemanager.quota.QuotaManager manager) {
- manager
- .quotaRequestStatus()
- .list(
- "subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus",
- null,
- null,
- null,
- com.azure.core.util.Context.NONE);
+ manager.quotaRequestStatus().list("subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus", null, null, null, com.azure.core.util.Context.NONE);
}
}
```
@@ -389,23 +290,20 @@ public final class QuotaRequestStatusListSamples {
### Usages_Get
```java
-/** Samples for Usages Get. */
+/**
+ * Samples for Usages Get.
+ */
public final class UsagesGetSamples {
/*
* x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getNetworkOneSkuUsages.json
*/
/**
* Sample code: Quotas_UsagesRequest_ForNetwork.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
public static void quotasUsagesRequestForNetwork(com.azure.resourcemanager.quota.QuotaManager manager) {
- manager
- .usages()
- .getWithResponse(
- "MinPublicIpInterNetworkPrefixLength",
- "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus",
- com.azure.core.util.Context.NONE);
+ manager.usages().getWithResponse("MinPublicIpInterNetworkPrefixLength", "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus", com.azure.core.util.Context.NONE);
}
/*
@@ -413,16 +311,11 @@ public final class UsagesGetSamples {
*/
/**
* Sample code: Quotas_UsagesRequest_ForCompute.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
public static void quotasUsagesRequestForCompute(com.azure.resourcemanager.quota.QuotaManager manager) {
- manager
- .usages()
- .getWithResponse(
- "standardNDSFamily",
- "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus",
- com.azure.core.util.Context.NONE);
+ manager.usages().getWithResponse("standardNDSFamily", "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus", com.azure.core.util.Context.NONE);
}
}
```
@@ -430,22 +323,20 @@ public final class UsagesGetSamples {
### Usages_List
```java
-/** Samples for Usages List. */
+/**
+ * Samples for Usages List.
+ */
public final class UsagesListSamples {
/*
* x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getComputeUsages.json
*/
/**
* Sample code: Quotas_listUsagesForCompute.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
public static void quotasListUsagesForCompute(com.azure.resourcemanager.quota.QuotaManager manager) {
- manager
- .usages()
- .list(
- "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus",
- com.azure.core.util.Context.NONE);
+ manager.usages().list("subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus", com.azure.core.util.Context.NONE);
}
/*
@@ -453,15 +344,11 @@ public final class UsagesListSamples {
*/
/**
* Sample code: Quotas_listUsagesForNetwork.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
public static void quotasListUsagesForNetwork(com.azure.resourcemanager.quota.QuotaManager manager) {
- manager
- .usages()
- .list(
- "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus",
- com.azure.core.util.Context.NONE);
+ manager.usages().list("subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus", com.azure.core.util.Context.NONE);
}
/*
@@ -469,15 +356,11 @@ public final class UsagesListSamples {
*/
/**
* Sample code: Quotas_listUsagesMachineLearningServices.
- *
+ *
* @param manager Entry point to QuotaManager.
*/
public static void quotasListUsagesMachineLearningServices(com.azure.resourcemanager.quota.QuotaManager manager) {
- manager
- .usages()
- .list(
- "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/eastus",
- com.azure.core.util.Context.NONE);
+ manager.usages().list("subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/eastus", 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 5937be78c4999..9901b0e357ef9 100644
--- a/sdk/quota/azure-resourcemanager-quota/pom.xml
+++ b/sdk/quota/azure-resourcemanager-quota/pom.xml
@@ -14,7 +14,7 @@
com.azure.resourcemanager
azure-resourcemanager-quota
- 1.0.0-beta.4
+ 1.0.0
jar
Microsoft Azure SDK for quota Management
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 1414f561b6e51..90c0b5eb63eed 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
@@ -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;
@@ -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.
@@ -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.
@@ -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);
@@ -170,8 +172,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
/**
* Sets the retry options for the HTTP pipeline retry policy.
- *
- *
This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * 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.
@@ -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"));
@@ -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)");
}
@@ -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() {
@@ -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() {
@@ -297,7 +277,7 @@ public Quotas quotas() {
/**
* Gets the resource collection API of QuotaRequestStatus.
- *
+ *
* @return Resource collection API of QuotaRequestStatus.
*/
public QuotaRequestStatus quotaRequestStatus() {
@@ -309,7 +289,7 @@ public QuotaRequestStatus quotaRequestStatus() {
/**
* Gets the resource collection API of QuotaOperations.
- *
+ *
* @return Resource collection API of QuotaOperations.
*/
public QuotaOperations quotaOperations() {
@@ -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;
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/AzureQuotaExtensionApi.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/AzureQuotaExtensionApi.java
index ca752d9f946d6..4c17cce79487a 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/AzureQuotaExtensionApi.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/AzureQuotaExtensionApi.java
@@ -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();
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 8d3be7c697f59..b7e733fc886cd 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
@@ -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.
- *
- *
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}.
@@ -26,9 +28,9 @@ public interface QuotaOperationsClient {
/**
* GET quota operations.
- *
- *
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.
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 8f87e72182da5..64cdf507b6822 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
@@ -11,23 +11,25 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.quota.fluent.models.QuotaRequestDetailsInner;
-/** An instance of this class provides access to all the operations defined in QuotaRequestStatusClient. */
+/**
+ * An instance of this class provides access to all the operations defined in QuotaRequestStatusClient.
+ */
public interface QuotaRequestStatusClient {
/**
* Get the quota request details and status by quota request ID for the resources of the resource provider at a
* specific location. The quota request ID **id** is returned in the response of the PUT operation.
- *
+ *
* @param id Quota request ID.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 along with {@link Response}.
+ * specific location along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(String id, String scope, Context context);
@@ -35,17 +37,17 @@ public interface QuotaRequestStatusClient {
/**
* Get the quota request details and status by quota request ID for the resources of the resource provider at a
* specific location. The quota request ID **id** is returned in the response of the PUT operation.
- *
+ *
* @param id Quota request ID.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException 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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
QuotaRequestDetailsInner get(String id, String scope);
@@ -53,11 +55,11 @@ public interface QuotaRequestStatusClient {
/**
* For the specified scope, get the current quota requests for a one year period ending at the time is made. Use the
* **oData** filter to select quota requests.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -69,18 +71,21 @@ public interface QuotaRequestStatusClient {
/**
* For the specified scope, get the current quota requests for a one year period ending at the time is made. Use the
* **oData** filter to select quota requests.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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 filter | Field | Supported operators |---------------------|------------------------
- * |requestSubmitTime | ge, le, eq, gt, lt |provisioningState eq {QuotaRequestState} |resourceName eq
- * {resourceName}.
+ * `/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 filter | Field | Supported operators
+ * |---------------------|------------------------
+ *
+ * |requestSubmitTime | ge, le, eq, gt, lt
+ * |provisioningState eq {QuotaRequestState}
+ * |resourceName eq {resourceName}.
* @param top Number of records to return.
* @param skiptoken The **Skiptoken** parameter is used only if a previous operation returned a partial result. If a
- * previous response contains a **nextLink** element, its value includes a **skiptoken** parameter that
- * specifies a starting point to use for subsequent calls.
+ * previous response contains a **nextLink** element, its value includes a **skiptoken** parameter that specifies a
+ * starting point to use for subsequent calls.
* @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.
@@ -88,6 +93,6 @@ public interface QuotaRequestStatusClient {
* @return quota request information as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(
- String scope, String filter, Integer top, String skiptoken, Context context);
+ PagedIterable list(String scope, String filter, Integer top, String skiptoken,
+ Context context);
}
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 7d87b0e6a7403..e33112cd6b5ac 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
@@ -13,18 +13,22 @@
import com.azure.resourcemanager.quota.fluent.models.CurrentQuotaLimitBaseInner;
import com.azure.resourcemanager.quota.models.QuotasGetResponse;
-/** An instance of this class provides access to all the operations defined in QuotasClient. */
+/**
+ * An instance of this class provides access to all the operations defined in QuotasClient.
+ */
public interface QuotasClient {
/**
* Get the quota limit of a resource. The response can be used to determine the remaining quota to calculate a new
* quota limit that can be submitted with a PUT request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
@@ -37,13 +41,15 @@ public interface QuotasClient {
/**
* Get the quota limit of a resource. The response can be used to determine the remaining quota to calculate a new
* quota limit that can be submitted with a PUT request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -54,18 +60,21 @@ public interface QuotasClient {
/**
* Create or update the quota limit for the specified resource with the requested value. To update the quota, follow
- * these steps: 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific
- * resource and to calculate the new quota limit. These steps are detailed in [this
+ * these steps:
+ * 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and
+ * to calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota request payload.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -73,23 +82,26 @@ public interface QuotasClient {
* @return the {@link SyncPoller} for polling of quota limit.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, CurrentQuotaLimitBaseInner> beginCreateOrUpdate(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest);
+ SyncPoller, CurrentQuotaLimitBaseInner>
+ beginCreateOrUpdate(String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest);
/**
* Create or update the quota limit for the specified resource with the requested value. To update the quota, follow
- * these steps: 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific
- * resource and to calculate the new quota limit. These steps are detailed in [this
+ * these steps:
+ * 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and
+ * to calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota request payload.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -103,18 +115,21 @@ SyncPoller, CurrentQuotaLimitBaseInner> b
/**
* Create or update the quota limit for the specified resource with the requested value. To update the quota, follow
- * these steps: 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific
- * resource and to calculate the new quota limit. These steps are detailed in [this
+ * these steps:
+ * 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and
+ * to calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota request payload.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -122,23 +137,26 @@ SyncPoller, CurrentQuotaLimitBaseInner> b
* @return quota limit.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- CurrentQuotaLimitBaseInner createOrUpdate(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest);
+ CurrentQuotaLimitBaseInner createOrUpdate(String resourceName, String scope,
+ CurrentQuotaLimitBaseInner createQuotaRequest);
/**
* Create or update the quota limit for the specified resource with the requested value. To update the quota, follow
- * these steps: 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific
- * resource and to calculate the new quota limit. These steps are detailed in [this
+ * these steps:
+ * 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and
+ * to calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota request payload.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -147,23 +165,25 @@ CurrentQuotaLimitBaseInner createOrUpdate(
* @return quota limit.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- CurrentQuotaLimitBaseInner createOrUpdate(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context);
+ CurrentQuotaLimitBaseInner createOrUpdate(String resourceName, String scope,
+ CurrentQuotaLimitBaseInner createQuotaRequest, Context context);
/**
- * Update the quota limit for a specific resource to the specified value: 1. Use the Usages-GET and Quota-GET
- * operations to determine the remaining quota for the specific resource and to calculate the new quota limit. These
- * steps are detailed in [this
+ * Update the quota limit for a specific resource to the specified value:
+ * 1. Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to
+ * calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota requests payload.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -171,23 +191,25 @@ CurrentQuotaLimitBaseInner createOrUpdate(
* @return the {@link SyncPoller} for polling of quota limit.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, CurrentQuotaLimitBaseInner> beginUpdate(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest);
+ SyncPoller, CurrentQuotaLimitBaseInner> beginUpdate(String resourceName,
+ String scope, CurrentQuotaLimitBaseInner createQuotaRequest);
/**
- * Update the quota limit for a specific resource to the specified value: 1. Use the Usages-GET and Quota-GET
- * operations to determine the remaining quota for the specific resource and to calculate the new quota limit. These
- * steps are detailed in [this
+ * Update the quota limit for a specific resource to the specified value:
+ * 1. Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to
+ * calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota requests payload.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -196,23 +218,25 @@ SyncPoller, CurrentQuotaLimitBaseInner> b
* @return the {@link SyncPoller} for polling of quota limit.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, CurrentQuotaLimitBaseInner> beginUpdate(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context);
+ SyncPoller, CurrentQuotaLimitBaseInner> beginUpdate(String resourceName,
+ String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context);
/**
- * Update the quota limit for a specific resource to the specified value: 1. Use the Usages-GET and Quota-GET
- * operations to determine the remaining quota for the specific resource and to calculate the new quota limit. These
- * steps are detailed in [this
+ * Update the quota limit for a specific resource to the specified value:
+ * 1. Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to
+ * calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota requests payload.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -223,19 +247,21 @@ SyncPoller, CurrentQuotaLimitBaseInner> b
CurrentQuotaLimitBaseInner update(String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest);
/**
- * Update the quota limit for a specific resource to the specified value: 1. Use the Usages-GET and Quota-GET
- * operations to determine the remaining quota for the specific resource and to calculate the new quota limit. These
- * steps are detailed in [this
+ * Update the quota limit for a specific resource to the specified value:
+ * 1. Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to
+ * calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota requests payload.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -244,22 +270,22 @@ SyncPoller, CurrentQuotaLimitBaseInner> b
* @return quota limit.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- CurrentQuotaLimitBaseInner update(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context);
+ CurrentQuotaLimitBaseInner update(String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest,
+ Context context);
/**
* Get a list of current quota limits of all resources for the specified scope. The response from this GET operation
* can be leveraged to submit requests to update a quota.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.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 as paginated response with {@link
- * PagedIterable}.
+ * @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);
@@ -267,17 +293,17 @@ CurrentQuotaLimitBaseInner update(
/**
* Get a list of current quota limits of all resources for the specified scope. The response from this GET operation
* can be leveraged to submit requests to update a quota.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 a list of current quota limits of all resources for the specified scope as paginated response with {@link
- * PagedIterable}.
+ * @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 261500e26e186..c30839477f711 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
@@ -11,17 +11,21 @@
import com.azure.resourcemanager.quota.fluent.models.CurrentUsagesBaseInner;
import com.azure.resourcemanager.quota.models.UsagesGetResponse;
-/** An instance of this class provides access to all the operations defined in UsagesClient. */
+/**
+ * An instance of this class provides access to all the operations defined in UsagesClient.
+ */
public interface UsagesClient {
/**
* Get the current usage of a resource.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
@@ -33,13 +37,15 @@ public interface UsagesClient {
/**
* Get the current usage of a resource.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -50,33 +56,33 @@ public interface UsagesClient {
/**
* Get a list of current usage for all resources for the scope specified.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.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 as paginated response with {@link
- * PagedIterable}.
+ * @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);
/**
* Get a list of current usage for all resources for the scope specified.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 a list of current usage for all resources for the scope specified as paginated response with {@link
- * PagedIterable}.
+ * @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 3579f753d0701..fe2411aa33ae9 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
@@ -9,7 +9,9 @@
import com.azure.resourcemanager.quota.models.QuotaProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** Quota limit. */
+/**
+ * Quota limit.
+ */
@Fluent
public final class CurrentQuotaLimitBaseInner extends ProxyResource {
/*
@@ -18,14 +20,16 @@ public final class CurrentQuotaLimitBaseInner extends ProxyResource {
@JsonProperty(value = "properties")
private QuotaProperties properties;
- /** Creates an instance of CurrentQuotaLimitBaseInner class. */
+ /**
+ * 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.
- *
+ *
* @return the properties value.
*/
public QuotaProperties properties() {
@@ -35,7 +39,7 @@ public QuotaProperties properties() {
/**
* Set the properties property: Quota properties for the specified resource, based on the API called, Quotas or
* Usages.
- *
+ *
* @param properties the properties value to set.
* @return the CurrentQuotaLimitBaseInner object itself.
*/
@@ -46,7 +50,7 @@ public CurrentQuotaLimitBaseInner withProperties(QuotaProperties properties) {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
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 eba27c405dbfe..589bc3ef54438 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
@@ -9,7 +9,9 @@
import com.azure.resourcemanager.quota.models.UsagesProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** Resource usage. */
+/**
+ * Resource usage.
+ */
@Fluent
public final class CurrentUsagesBaseInner extends ProxyResource {
/*
@@ -18,13 +20,15 @@ public final class CurrentUsagesBaseInner extends ProxyResource {
@JsonProperty(value = "properties")
private UsagesProperties properties;
- /** Creates an instance of CurrentUsagesBaseInner class. */
+ /**
+ * Creates an instance of CurrentUsagesBaseInner class.
+ */
public CurrentUsagesBaseInner() {
}
/**
* Get the properties property: Usage properties for the specified resource.
- *
+ *
* @return the properties value.
*/
public UsagesProperties properties() {
@@ -33,7 +37,7 @@ public UsagesProperties properties() {
/**
* Set the properties property: Usage properties for the specified resource.
- *
+ *
* @param properties the properties value to set.
* @return the CurrentUsagesBaseInner object itself.
*/
@@ -44,7 +48,7 @@ public CurrentUsagesBaseInner withProperties(UsagesProperties properties) {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
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 edbc3d6f23c23..6452a39c7b017 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
@@ -8,7 +8,9 @@
import com.azure.resourcemanager.quota.models.OperationDisplay;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** The OperationResponse model. */
+/**
+ * The OperationResponse model.
+ */
@Fluent
public final class OperationResponseInner {
/*
@@ -29,13 +31,15 @@ public final class OperationResponseInner {
@JsonProperty(value = "origin")
private String origin;
- /** Creates an instance of OperationResponseInner class. */
+ /**
+ * Creates an instance of OperationResponseInner class.
+ */
public OperationResponseInner() {
}
/**
* Get the name property: The name property.
- *
+ *
* @return the name value.
*/
public String name() {
@@ -44,7 +48,7 @@ public String name() {
/**
* Set the name property: The name property.
- *
+ *
* @param name the name value to set.
* @return the OperationResponseInner object itself.
*/
@@ -55,7 +59,7 @@ public OperationResponseInner withName(String name) {
/**
* Get the display property: The display property.
- *
+ *
* @return the display value.
*/
public OperationDisplay display() {
@@ -64,7 +68,7 @@ public OperationDisplay display() {
/**
* Set the display property: The display property.
- *
+ *
* @param display the display value to set.
* @return the OperationResponseInner object itself.
*/
@@ -75,7 +79,7 @@ public OperationResponseInner withDisplay(OperationDisplay display) {
/**
* Get the origin property: The origin property.
- *
+ *
* @return the origin value.
*/
public String origin() {
@@ -84,7 +88,7 @@ public String origin() {
/**
* Set the origin property: The origin property.
- *
+ *
* @param origin the origin value to set.
* @return the OperationResponseInner object itself.
*/
@@ -95,7 +99,7 @@ public OperationResponseInner withOrigin(String origin) {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
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 e1c2accf8393e..a6a8f213fd015 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
@@ -12,7 +12,9 @@
import java.time.OffsetDateTime;
import java.util.List;
-/** List of quota requests with details. */
+/**
+ * List of quota requests with details.
+ */
@Fluent
public final class QuotaRequestDetailsInner {
/*
@@ -39,13 +41,15 @@ public final class QuotaRequestDetailsInner {
@JsonProperty(value = "properties")
private QuotaRequestProperties innerProperties;
- /** Creates an instance of QuotaRequestDetailsInner class. */
+ /**
+ * Creates an instance of QuotaRequestDetailsInner class.
+ */
public QuotaRequestDetailsInner() {
}
/**
* Get the id property: Quota request ID.
- *
+ *
* @return the id value.
*/
public String id() {
@@ -54,7 +58,7 @@ public String id() {
/**
* Get the name property: Quota request name.
- *
+ *
* @return the name value.
*/
public String name() {
@@ -63,7 +67,7 @@ public String name() {
/**
* Get the type property: Resource type. "Microsoft.Quota/quotas".
- *
+ *
* @return the type value.
*/
public String type() {
@@ -72,7 +76,7 @@ public String type() {
/**
* Get the innerProperties property: Quota request details.
- *
+ *
* @return the innerProperties value.
*/
private QuotaRequestProperties innerProperties() {
@@ -81,7 +85,7 @@ private QuotaRequestProperties innerProperties() {
/**
* Get the provisioningState property: The quota request status.
- *
+ *
* @return the provisioningState value.
*/
public QuotaRequestState provisioningState() {
@@ -90,7 +94,7 @@ public QuotaRequestState provisioningState() {
/**
* Get the message property: User-friendly status message.
- *
+ *
* @return the message value.
*/
public String message() {
@@ -99,7 +103,7 @@ public String message() {
/**
* Get the error property: Error details of the quota request.
- *
+ *
* @return the error value.
*/
public ServiceErrorDetail error() {
@@ -108,7 +112,7 @@ public ServiceErrorDetail error() {
/**
* Set the error property: Error details of the quota request.
- *
+ *
* @param error the error value to set.
* @return the QuotaRequestDetailsInner object itself.
*/
@@ -123,7 +127,7 @@ public QuotaRequestDetailsInner withError(ServiceErrorDetail error) {
/**
* Get the requestSubmitTime property: The quota request submission time. The date conforms to the following format
* specified by the ISO 8601 standard: yyyy-MM-ddTHH:mm:ssZ.
- *
+ *
* @return the requestSubmitTime value.
*/
public OffsetDateTime requestSubmitTime() {
@@ -132,7 +136,7 @@ public OffsetDateTime requestSubmitTime() {
/**
* Get the value property: Quota request details.
- *
+ *
* @return the value value.
*/
public List value() {
@@ -141,7 +145,7 @@ public List value() {
/**
* Set the value property: Quota request details.
- *
+ *
* @param value the value value to set.
* @return the QuotaRequestDetailsInner object itself.
*/
@@ -155,7 +159,7 @@ public QuotaRequestDetailsInner withValue(List value) {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
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 64f5f7cf59e8b..e292c13ee6a18 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
@@ -12,7 +12,9 @@
import java.time.OffsetDateTime;
import java.util.List;
-/** Quota request properties. */
+/**
+ * Quota request properties.
+ */
@Fluent
public final class QuotaRequestProperties {
/*
@@ -46,13 +48,15 @@ public final class QuotaRequestProperties {
@JsonProperty(value = "value")
private List value;
- /** Creates an instance of QuotaRequestProperties class. */
+ /**
+ * Creates an instance of QuotaRequestProperties class.
+ */
public QuotaRequestProperties() {
}
/**
* Get the provisioningState property: The quota request status.
- *
+ *
* @return the provisioningState value.
*/
public QuotaRequestState provisioningState() {
@@ -61,7 +65,7 @@ public QuotaRequestState provisioningState() {
/**
* Get the message property: User-friendly status message.
- *
+ *
* @return the message value.
*/
public String message() {
@@ -70,7 +74,7 @@ public String message() {
/**
* Get the error property: Error details of the quota request.
- *
+ *
* @return the error value.
*/
public ServiceErrorDetail error() {
@@ -79,7 +83,7 @@ public ServiceErrorDetail error() {
/**
* Set the error property: Error details of the quota request.
- *
+ *
* @param error the error value to set.
* @return the QuotaRequestProperties object itself.
*/
@@ -91,7 +95,7 @@ public QuotaRequestProperties withError(ServiceErrorDetail error) {
/**
* Get the requestSubmitTime property: The quota request submission time. The date conforms to the following format
* specified by the ISO 8601 standard: yyyy-MM-ddTHH:mm:ssZ.
- *
+ *
* @return the requestSubmitTime value.
*/
public OffsetDateTime requestSubmitTime() {
@@ -100,7 +104,7 @@ public OffsetDateTime requestSubmitTime() {
/**
* Get the value property: Quota request details.
- *
+ *
* @return the value value.
*/
public List value() {
@@ -109,7 +113,7 @@ public List value() {
/**
* Set the value property: Quota request details.
- *
+ *
* @param value the value value to set.
* @return the QuotaRequestProperties object itself.
*/
@@ -120,7 +124,7 @@ public QuotaRequestProperties withValue(List value) {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/package-info.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/package-info.java
index 674fb9e78bb06..e06dc95da3e7c 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/package-info.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/models/package-info.java
@@ -2,5 +2,8 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-/** Package containing the inner data models for AzureQuotaExtensionApi. Microsoft Azure Quota Resource Provider. */
+/**
+ * Package containing the inner data models for AzureQuotaExtensionApi.
+ * Microsoft Azure Quota Resource Provider.
+ */
package com.azure.resourcemanager.quota.fluent.models;
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/package-info.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/package-info.java
index f9b7490e09e3a..b097d92c9fdf9 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/package-info.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/package-info.java
@@ -2,5 +2,8 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-/** Package containing the service clients for AzureQuotaExtensionApi. Microsoft Azure Quota Resource Provider. */
+/**
+ * Package containing the service clients for AzureQuotaExtensionApi.
+ * Microsoft Azure Quota Resource Provider.
+ */
package com.azure.resourcemanager.quota.fluent;
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 a54ca0ebb91e4..8b8ef6b581210 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
@@ -14,8 +14,10 @@
import com.azure.core.util.serializer.SerializerAdapter;
import java.time.Duration;
-/** A builder for creating a new instance of the AzureQuotaExtensionApiImpl type. */
-@ServiceClientBuilder(serviceClients = {AzureQuotaExtensionApiImpl.class})
+/**
+ * A builder for creating a new instance of the AzureQuotaExtensionApiImpl type.
+ */
+@ServiceClientBuilder(serviceClients = { AzureQuotaExtensionApiImpl.class })
public final class AzureQuotaExtensionApiBuilder {
/*
* server parameter
@@ -24,7 +26,7 @@ public final class AzureQuotaExtensionApiBuilder {
/**
* Sets server parameter.
- *
+ *
* @param endpoint the endpoint value.
* @return the AzureQuotaExtensionApiBuilder.
*/
@@ -40,7 +42,7 @@ public AzureQuotaExtensionApiBuilder endpoint(String endpoint) {
/**
* Sets The environment to connect to.
- *
+ *
* @param environment the environment value.
* @return the AzureQuotaExtensionApiBuilder.
*/
@@ -56,7 +58,7 @@ public AzureQuotaExtensionApiBuilder environment(AzureEnvironment environment) {
/**
* Sets The HTTP pipeline to send requests through.
- *
+ *
* @param pipeline the pipeline value.
* @return the AzureQuotaExtensionApiBuilder.
*/
@@ -72,7 +74,7 @@ public AzureQuotaExtensionApiBuilder pipeline(HttpPipeline pipeline) {
/**
* Sets The default poll interval for long-running operation.
- *
+ *
* @param defaultPollInterval the defaultPollInterval value.
* @return the AzureQuotaExtensionApiBuilder.
*/
@@ -88,7 +90,7 @@ public AzureQuotaExtensionApiBuilder defaultPollInterval(Duration defaultPollInt
/**
* Sets The serializer to serialize an object into a string.
- *
+ *
* @param serializerAdapter the serializerAdapter value.
* @return the AzureQuotaExtensionApiBuilder.
*/
@@ -99,25 +101,20 @@ public AzureQuotaExtensionApiBuilder serializerAdapter(SerializerAdapter seriali
/**
* Builds an instance of AzureQuotaExtensionApiImpl with the provided parameters.
- *
+ *
* @return an instance of AzureQuotaExtensionApiImpl.
*/
public AzureQuotaExtensionApiImpl buildClient() {
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(
- localPipeline, localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint);
+ 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(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 47b8c21419419..cee6d58ccb73c 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
@@ -36,111 +36,131 @@
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
-/** Initializes a new instance of the AzureQuotaExtensionApiImpl type. */
+/**
+ * Initializes a new instance of the AzureQuotaExtensionApiImpl type.
+ */
@ServiceClient(builder = AzureQuotaExtensionApiBuilder.class)
public final class AzureQuotaExtensionApiImpl implements AzureQuotaExtensionApi {
- /** server parameter. */
+ /**
+ * server parameter.
+ */
private final String endpoint;
/**
* Gets server parameter.
- *
+ *
* @return the endpoint value.
*/
public String getEndpoint() {
return this.endpoint;
}
- /** Api Version. */
+ /**
+ * Api Version.
+ */
private final String apiVersion;
/**
* Gets Api Version.
- *
+ *
* @return the apiVersion value.
*/
public String getApiVersion() {
return this.apiVersion;
}
- /** The HTTP pipeline to send requests through. */
+ /**
+ * The HTTP pipeline to send requests through.
+ */
private final HttpPipeline httpPipeline;
/**
* Gets The HTTP pipeline to send requests through.
- *
+ *
* @return the httpPipeline value.
*/
public HttpPipeline getHttpPipeline() {
return this.httpPipeline;
}
- /** The serializer to serialize an object into a string. */
+ /**
+ * The serializer to serialize an object into a string.
+ */
private final SerializerAdapter serializerAdapter;
/**
* Gets The serializer to serialize an object into a string.
- *
+ *
* @return the serializerAdapter value.
*/
SerializerAdapter getSerializerAdapter() {
return this.serializerAdapter;
}
- /** The default poll interval for long-running operation. */
+ /**
+ * The default poll interval for long-running operation.
+ */
private final Duration defaultPollInterval;
/**
* Gets The default poll interval for long-running operation.
- *
+ *
* @return the defaultPollInterval value.
*/
public Duration getDefaultPollInterval() {
return this.defaultPollInterval;
}
- /** The UsagesClient object to access its operations. */
+ /**
+ * The UsagesClient object to access its operations.
+ */
private final UsagesClient usages;
/**
* Gets the UsagesClient object to access its operations.
- *
+ *
* @return the UsagesClient object.
*/
public UsagesClient getUsages() {
return this.usages;
}
- /** The QuotasClient object to access its operations. */
+ /**
+ * The QuotasClient object to access its operations.
+ */
private final QuotasClient quotas;
/**
* Gets the QuotasClient object to access its operations.
- *
+ *
* @return the QuotasClient object.
*/
public QuotasClient getQuotas() {
return this.quotas;
}
- /** The QuotaRequestStatusClient object to access its operations. */
+ /**
+ * The QuotaRequestStatusClient object to access its operations.
+ */
private final QuotaRequestStatusClient quotaRequestStatus;
/**
* Gets the QuotaRequestStatusClient object to access its operations.
- *
+ *
* @return the QuotaRequestStatusClient object.
*/
public QuotaRequestStatusClient getQuotaRequestStatus() {
return this.quotaRequestStatus;
}
- /** The QuotaOperationsClient object to access its operations. */
+ /**
+ * The QuotaOperationsClient object to access its operations.
+ */
private final QuotaOperationsClient quotaOperations;
/**
* Gets the QuotaOperationsClient object to access its operations.
- *
+ *
* @return the QuotaOperationsClient object.
*/
public QuotaOperationsClient getQuotaOperations() {
@@ -149,19 +169,15 @@ public QuotaOperationsClient getQuotaOperations() {
/**
* Initializes an instance of AzureQuotaExtensionApi client.
- *
+ *
* @param httpPipeline The HTTP pipeline to send requests through.
* @param serializerAdapter The serializer to serialize an object into a string.
* @param defaultPollInterval The default poll interval for long-running operation.
* @param environment The Azure environment.
* @param endpoint server parameter.
*/
- AzureQuotaExtensionApiImpl(
- HttpPipeline httpPipeline,
- SerializerAdapter serializerAdapter,
- Duration defaultPollInterval,
- AzureEnvironment environment,
- String endpoint) {
+ AzureQuotaExtensionApiImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval, AzureEnvironment environment, String endpoint) {
this.httpPipeline = httpPipeline;
this.serializerAdapter = serializerAdapter;
this.defaultPollInterval = defaultPollInterval;
@@ -175,7 +191,7 @@ public QuotaOperationsClient getQuotaOperations() {
/**
* Gets default client context.
- *
+ *
* @return the default client context.
*/
public Context getContext() {
@@ -184,7 +200,7 @@ public Context getContext() {
/**
* Merges default client context with provided context.
- *
+ *
* @param context the context to be merged with default client context.
* @return the merged context.
*/
@@ -194,7 +210,7 @@ public Context mergeContext(Context context) {
/**
* Gets long running operation result.
- *
+ *
* @param activationResponse the response of activation operation.
* @param httpPipeline the http pipeline.
* @param pollResultType type of poll result.
@@ -204,26 +220,15 @@ public Context mergeContext(Context context) {
* @param type of final result.
* @return poller flux for poll result and final result.
*/
- public PollerFlux, U> getLroResult(
- Mono>> activationResponse,
- HttpPipeline httpPipeline,
- Type pollResultType,
- Type finalResultType,
- Context context) {
- return PollerFactory
- .create(
- serializerAdapter,
- httpPipeline,
- pollResultType,
- finalResultType,
- defaultPollInterval,
- activationResponse,
- context);
+ public PollerFlux, U> getLroResult(Mono>> activationResponse,
+ HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) {
+ return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, activationResponse, context);
}
/**
* Gets the final result, or an error, based on last async poll response.
- *
+ *
* @param response the last async poll response.
* @param type of poll result.
* @param type of final result.
@@ -236,19 +241,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse,
HttpResponse errorResponse = null;
PollResult.Error lroError = response.getValue().getError();
if (lroError != null) {
- errorResponse =
- new HttpResponseImpl(
- lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody());
+ errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(),
+ lroError.getResponseBody());
errorMessage = response.getValue().getError().getMessage();
String errorBody = response.getValue().getError().getResponseBody();
if (errorBody != null) {
// try to deserialize error body to ManagementError
try {
- managementError =
- this
- .getSerializerAdapter()
- .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
+ managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class,
+ SerializerEncoding.JSON);
if (managementError.getCode() == null || managementError.getMessage() == null) {
managementError = null;
}
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/CurrentQuotaLimitBaseImpl.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/CurrentQuotaLimitBaseImpl.java
index 689dec0359d01..df7886082d808 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/CurrentQuotaLimitBaseImpl.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/CurrentQuotaLimitBaseImpl.java
@@ -49,17 +49,14 @@ public CurrentQuotaLimitBaseImpl withExistingScope(String scope) {
}
public CurrentQuotaLimitBase create() {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getQuotas()
- .createOrUpdate(resourceName, scope, this.innerModel(), Context.NONE);
+ this.innerObject = serviceManager.serviceClient().getQuotas().createOrUpdate(resourceName, scope,
+ this.innerModel(), Context.NONE);
return this;
}
public CurrentQuotaLimitBase create(Context context) {
- this.innerObject =
- serviceManager.serviceClient().getQuotas().createOrUpdate(resourceName, scope, this.innerModel(), context);
+ this.innerObject = serviceManager.serviceClient().getQuotas().createOrUpdate(resourceName, scope,
+ this.innerModel(), context);
return this;
}
@@ -74,40 +71,36 @@ public CurrentQuotaLimitBaseImpl update() {
}
public CurrentQuotaLimitBase apply() {
- this.innerObject =
- serviceManager.serviceClient().getQuotas().update(resourceName, scope, this.innerModel(), Context.NONE);
+ this.innerObject
+ = serviceManager.serviceClient().getQuotas().update(resourceName, scope, this.innerModel(), Context.NONE);
return this;
}
public CurrentQuotaLimitBase apply(Context context) {
- this.innerObject =
- serviceManager.serviceClient().getQuotas().update(resourceName, scope, this.innerModel(), context);
+ this.innerObject
+ = serviceManager.serviceClient().getQuotas().update(resourceName, scope, this.innerModel(), context);
return this;
}
- CurrentQuotaLimitBaseImpl(
- CurrentQuotaLimitBaseInner innerObject, com.azure.resourcemanager.quota.QuotaManager serviceManager) {
+ CurrentQuotaLimitBaseImpl(CurrentQuotaLimitBaseInner innerObject,
+ com.azure.resourcemanager.quota.QuotaManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceName =
- Utils
- .getValueFromIdByParameterName(
- innerObject.id(), "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}", "resourceName");
- this.scope =
- Utils
- .getValueFromIdByParameterName(
- innerObject.id(), "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}", "scope");
+ this.resourceName = Utils.getValueFromIdByParameterName(innerObject.id(),
+ "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}", "resourceName");
+ this.scope = Utils.getValueFromIdByParameterName(innerObject.id(),
+ "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}", "scope");
}
public CurrentQuotaLimitBase refresh() {
- this.innerObject =
- serviceManager.serviceClient().getQuotas().getWithResponse(resourceName, scope, Context.NONE).getValue();
+ this.innerObject
+ = serviceManager.serviceClient().getQuotas().getWithResponse(resourceName, scope, Context.NONE).getValue();
return this;
}
public CurrentQuotaLimitBase refresh(Context context) {
- this.innerObject =
- serviceManager.serviceClient().getQuotas().getWithResponse(resourceName, scope, context).getValue();
+ this.innerObject
+ = serviceManager.serviceClient().getQuotas().getWithResponse(resourceName, scope, context).getValue();
return this;
}
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/CurrentUsagesBaseImpl.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/CurrentUsagesBaseImpl.java
index 1a1fb6f75eba7..54d6ee226868f 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/CurrentUsagesBaseImpl.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/CurrentUsagesBaseImpl.java
@@ -13,8 +13,8 @@ public final class CurrentUsagesBaseImpl implements CurrentUsagesBase {
private final com.azure.resourcemanager.quota.QuotaManager serviceManager;
- CurrentUsagesBaseImpl(
- CurrentUsagesBaseInner innerObject, com.azure.resourcemanager.quota.QuotaManager serviceManager) {
+ CurrentUsagesBaseImpl(CurrentUsagesBaseInner innerObject,
+ com.azure.resourcemanager.quota.QuotaManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/OperationResponseImpl.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/OperationResponseImpl.java
index a175ac88897d2..c1c653579e3c2 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/OperationResponseImpl.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/OperationResponseImpl.java
@@ -13,8 +13,8 @@ public final class OperationResponseImpl implements OperationResponse {
private final com.azure.resourcemanager.quota.QuotaManager serviceManager;
- OperationResponseImpl(
- OperationResponseInner innerObject, com.azure.resourcemanager.quota.QuotaManager serviceManager) {
+ OperationResponseImpl(OperationResponseInner innerObject,
+ com.azure.resourcemanager.quota.QuotaManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaOperationsClientImpl.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaOperationsClientImpl.java
index bfa7ab00a576a..c5d8941d33b74 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaOperationsClientImpl.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaOperationsClientImpl.java
@@ -30,58 +30,58 @@
import com.azure.resourcemanager.quota.models.OperationList;
import reactor.core.publisher.Mono;
-/** 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 final class QuotaOperationsClientImpl implements QuotaOperationsClient {
- /** The proxy service used to perform REST calls. */
+ /**
+ * The proxy service used to perform REST calls.
+ */
private final QuotaOperationsService service;
- /** The service client containing this operation class. */
+ /**
+ * The service client containing this operation class.
+ */
private final AzureQuotaExtensionApiImpl client;
/**
* Initializes an instance of QuotaOperationsClientImpl.
- *
+ *
* @param client the instance of the service client containing this operation class.
*/
QuotaOperationsClientImpl(AzureQuotaExtensionApiImpl client) {
- this.service =
- RestProxy.create(QuotaOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.service
+ = RestProxy.create(QuotaOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for AzureQuotaExtensionApiQuotaOperations to be used by the proxy service
- * to perform REST calls.
+ * The interface defining all the services for AzureQuotaExtensionApiQuotaOperations to be used by the proxy
+ * service to perform REST calls.
*/
@Host("{$host}")
@ServiceInterface(name = "AzureQuotaExtensionA")
public interface QuotaOperationsService {
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("/providers/Microsoft.Quota/operations")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono> list(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
}
/**
* GET quota operations.
- *
- * List all the operations supported by the Microsoft.Quota resource provider.
- *
+ *
+ * List all the operations supported by the Microsoft.Quota resource provider.
+ *
* @throws ManagementException 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 body along with {@link PagedResponse} on successful completion of {@link Mono}.
@@ -89,32 +89,23 @@ Mono> listNext(
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
return FluxUtil
.withContext(
context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* GET quota operations.
- *
- * 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 ManagementException thrown if the request is rejected by server.
@@ -124,31 +115,21 @@ private Mono> listSinglePageAsync() {
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
+ return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
}
/**
* GET quota operations.
- *
- * List all the operations supported by the Microsoft.Quota resource provider.
- *
+ *
+ * List all the operations supported by the Microsoft.Quota resource provider.
+ *
* @throws ManagementException 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 PagedFlux}.
@@ -160,9 +141,9 @@ private PagedFlux listAsync() {
/**
* GET quota operations.
- *
- * 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 ManagementException thrown if the request is rejected by server.
@@ -171,15 +152,15 @@ private PagedFlux listAsync() {
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
- return new PagedFlux<>(
- () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ return new PagedFlux<>(() -> listSinglePageAsync(context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
}
/**
* GET quota operations.
- *
- * List all the operations supported by the Microsoft.Quota resource provider.
- *
+ *
+ * List all the operations supported by the Microsoft.Quota resource provider.
+ *
* @throws ManagementException 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}.
@@ -191,9 +172,9 @@ public PagedIterable list() {
/**
* GET quota operations.
- *
- * 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 ManagementException thrown if the request is rejected by server.
@@ -207,9 +188,10 @@ public PagedIterable list(Context context) {
/**
* Get the next page of items.
- *
+ *
* @param nextLink The URL to get the next list of items
- * The nextLink parameter.
+ *
+ * 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.
@@ -221,31 +203,22 @@ private Mono> listNextSinglePageAsync(Stri
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Get the next page of items.
- *
+ *
* @param nextLink The URL to get the next list of items
- * The nextLink parameter.
+ *
+ * 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.
@@ -258,23 +231,13 @@ private Mono> listNextSinglePageAsync(Stri
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .listNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
+ return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
}
}
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaOperationsImpl.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaOperationsImpl.java
index fb88cf1583649..d057f3f718244 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaOperationsImpl.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaOperationsImpl.java
@@ -19,8 +19,8 @@ public final class QuotaOperationsImpl implements QuotaOperations {
private final com.azure.resourcemanager.quota.QuotaManager serviceManager;
- public QuotaOperationsImpl(
- QuotaOperationsClient innerClient, com.azure.resourcemanager.quota.QuotaManager serviceManager) {
+ public QuotaOperationsImpl(QuotaOperationsClient innerClient,
+ com.azure.resourcemanager.quota.QuotaManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaRequestDetailsImpl.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaRequestDetailsImpl.java
index 0f716c8e90b31..3ac4761e9e3b6 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaRequestDetailsImpl.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaRequestDetailsImpl.java
@@ -18,8 +18,8 @@ public final class QuotaRequestDetailsImpl implements QuotaRequestDetails {
private final com.azure.resourcemanager.quota.QuotaManager serviceManager;
- QuotaRequestDetailsImpl(
- QuotaRequestDetailsInner innerObject, com.azure.resourcemanager.quota.QuotaManager serviceManager) {
+ QuotaRequestDetailsImpl(QuotaRequestDetailsInner innerObject,
+ com.azure.resourcemanager.quota.QuotaManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaRequestStatusClientImpl.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaRequestStatusClientImpl.java
index c0b917410533c..a324f95c771e1 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaRequestStatusClientImpl.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaRequestStatusClientImpl.java
@@ -30,22 +30,28 @@
import com.azure.resourcemanager.quota.models.QuotaRequestDetailsList;
import reactor.core.publisher.Mono;
-/** An instance of this class provides access to all the operations defined in QuotaRequestStatusClient. */
+/**
+ * An instance of this class provides access to all the operations defined in QuotaRequestStatusClient.
+ */
public final class QuotaRequestStatusClientImpl implements QuotaRequestStatusClient {
- /** The proxy service used to perform REST calls. */
+ /**
+ * The proxy service used to perform REST calls.
+ */
private final QuotaRequestStatusService service;
- /** The service client containing this operation class. */
+ /**
+ * The service client containing this operation class.
+ */
private final AzureQuotaExtensionApiImpl client;
/**
* Initializes an instance of QuotaRequestStatusClientImpl.
- *
+ *
* @param client the instance of the service client containing this operation class.
*/
QuotaRequestStatusClientImpl(AzureQuotaExtensionApiImpl client) {
- this.service =
- RestProxy.create(QuotaRequestStatusService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.service = RestProxy.create(QuotaRequestStatusService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
this.client = client;
}
@@ -56,65 +62,51 @@ public final class QuotaRequestStatusClientImpl implements QuotaRequestStatusCli
@Host("{$host}")
@ServiceInterface(name = "AzureQuotaExtensionA")
public interface QuotaRequestStatusService {
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("/{scope}/providers/Microsoft.Quota/quotaRequests/{id}")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> get(
- @HostParam("$host") String endpoint,
- @PathParam("id") String id,
- @QueryParam("api-version") String apiVersion,
- @PathParam(value = "scope", encoded = true) String scope,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono> get(@HostParam("$host") String endpoint, @PathParam("id") String id,
+ @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope,
+ @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("/{scope}/providers/Microsoft.Quota/quotaRequests")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam(value = "scope", encoded = true) String scope,
- @QueryParam("$filter") String filter,
- @QueryParam("$top") Integer top,
- @QueryParam("$skiptoken") String skiptoken,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono> list(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope,
+ @QueryParam("$filter") String filter, @QueryParam("$top") Integer top,
+ @QueryParam("$skiptoken") String skiptoken, @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
}
/**
* Get the quota request details and status by quota request ID for the resources of the resource provider at a
* specific location. The quota request ID **id** is returned in the response of the PUT operation.
- *
+ *
* @param id Quota request ID.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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 along with {@link Response} on successful completion of {@link Mono}.
+ * specific location along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(String id, String scope) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (id == null) {
return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null."));
@@ -123,36 +115,32 @@ private Mono> getWithResponseAsync(String id,
return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
}
final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service.get(this.client.getEndpoint(), id, this.client.getApiVersion(), scope, accept, context))
+ return FluxUtil.withContext(
+ context -> service.get(this.client.getEndpoint(), id, this.client.getApiVersion(), scope, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Get the quota request details and status by quota request ID for the resources of the resource provider at a
* specific location. The quota request ID **id** is returned in the response of the PUT operation.
- *
+ *
* @param id Quota request ID.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 ManagementException 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 along with {@link Response} on successful completion of {@link Mono}.
+ * specific location along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(String id, String scope, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (id == null) {
return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null."));
@@ -168,17 +156,17 @@ private Mono> getWithResponseAsync(String id,
/**
* Get the quota request details and status by quota request ID for the resources of the resource provider at a
* specific location. The quota request ID **id** is returned in the response of the PUT operation.
- *
+ *
* @param id Quota request ID.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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 on successful completion of {@link Mono}.
+ * specific location on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getAsync(String id, String scope) {
@@ -188,18 +176,18 @@ private Mono getAsync(String id, String scope) {
/**
* Get the quota request details and status by quota request ID for the resources of the resource provider at a
* specific location. The quota request ID **id** is returned in the response of the PUT operation.
- *
+ *
* @param id Quota request ID.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 ManagementException 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 along with {@link Response}.
+ * specific location along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(String id, String scope, Context context) {
@@ -209,17 +197,17 @@ public Response getWithResponse(String id, String scop
/**
* Get the quota request details and status by quota request ID for the resources of the resource provider at a
* specific location. The quota request ID **id** is returned in the response of the PUT operation.
- *
+ *
* @param id Quota request ID.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public QuotaRequestDetailsInner get(String id, String scope) {
@@ -229,76 +217,63 @@ public 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
* **oData** filter to select quota requests.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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 filter | Field | Supported operators |---------------------|------------------------
- * |requestSubmitTime | ge, le, eq, gt, lt |provisioningState eq {QuotaRequestState} |resourceName eq
- * {resourceName}.
+ * `/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 filter | Field | Supported operators
+ * |---------------------|------------------------
+ *
+ * |requestSubmitTime | ge, le, eq, gt, lt
+ * |provisioningState eq {QuotaRequestState}
+ * |resourceName eq {resourceName}.
* @param top Number of records to return.
* @param skiptoken The **Skiptoken** parameter is used only if a previous operation returned a partial result. If a
- * previous response contains a **nextLink** element, its value includes a **skiptoken** parameter that
- * specifies a starting point to use for subsequent calls.
+ * previous response contains a **nextLink** element, its value includes a **skiptoken** parameter that specifies a
+ * starting point to use for subsequent calls.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(
- String scope, String filter, Integer top, String skiptoken) {
+ private Mono> listSinglePageAsync(String scope, String filter, Integer top,
+ String skiptoken) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (scope == null) {
return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
}
final String accept = "application/json";
return FluxUtil
- .withContext(
- context ->
- service
- .list(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- scope,
- filter,
- top,
- skiptoken,
- accept,
- context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), scope, filter,
+ top, skiptoken, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* For the specified scope, get the current quota requests for a one year period ending at the time is made. Use the
* **oData** filter to select quota requests.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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 filter | Field | Supported operators |---------------------|------------------------
- * |requestSubmitTime | ge, le, eq, gt, lt |provisioningState eq {QuotaRequestState} |resourceName eq
- * {resourceName}.
+ * `/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 filter | Field | Supported operators
+ * |---------------------|------------------------
+ *
+ * |requestSubmitTime | ge, le, eq, gt, lt
+ * |provisioningState eq {QuotaRequestState}
+ * |resourceName eq {resourceName}.
* @param top Number of records to return.
* @param skiptoken The **Skiptoken** parameter is used only if a previous operation returned a partial result. If a
- * previous response contains a **nextLink** element, its value includes a **skiptoken** parameter that
- * specifies a starting point to use for subsequent calls.
+ * previous response contains a **nextLink** element, its value includes a **skiptoken** parameter that specifies a
+ * starting point to use for subsequent calls.
* @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.
@@ -306,13 +281,11 @@ private Mono> listSinglePageAsync(
* @return quota request information along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(
- String scope, String filter, Integer top, String skiptoken, Context context) {
+ private Mono> listSinglePageAsync(String scope, String filter, Integer top,
+ String skiptoken, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (scope == null) {
return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
@@ -320,34 +293,30 @@ private Mono> listSinglePageAsync(
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .list(
- this.client.getEndpoint(), this.client.getApiVersion(), scope, filter, top, skiptoken, accept, context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), scope, filter, top, skiptoken, accept,
+ context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
}
/**
* For the specified scope, get the current quota requests for a one year period ending at the time is made. Use the
* **oData** filter to select quota requests.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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 filter | Field | Supported operators |---------------------|------------------------
- * |requestSubmitTime | ge, le, eq, gt, lt |provisioningState eq {QuotaRequestState} |resourceName eq
- * {resourceName}.
+ * `/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 filter | Field | Supported operators
+ * |---------------------|------------------------
+ *
+ * |requestSubmitTime | ge, le, eq, gt, lt
+ * |provisioningState eq {QuotaRequestState}
+ * |resourceName eq {resourceName}.
* @param top Number of records to return.
* @param skiptoken The **Skiptoken** parameter is used only if a previous operation returned a partial result. If a
- * previous response contains a **nextLink** element, its value includes a **skiptoken** parameter that
- * specifies a starting point to use for subsequent calls.
+ * previous response contains a **nextLink** element, its value includes a **skiptoken** parameter that specifies a
+ * starting point to use for subsequent calls.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -355,18 +324,18 @@ private Mono> listSinglePageAsync(
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String scope, String filter, Integer top, String skiptoken) {
- return new PagedFlux<>(
- () -> listSinglePageAsync(scope, filter, top, skiptoken), nextLink -> listNextSinglePageAsync(nextLink));
+ return new PagedFlux<>(() -> listSinglePageAsync(scope, filter, top, skiptoken),
+ nextLink -> listNextSinglePageAsync(nextLink));
}
/**
* For the specified scope, get the current quota requests for a one year period ending at the time is made. Use the
* **oData** filter to select quota requests.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -377,25 +346,28 @@ private PagedFlux listAsync(String scope) {
final String filter = null;
final Integer top = null;
final String skiptoken = null;
- return new PagedFlux<>(
- () -> listSinglePageAsync(scope, filter, top, skiptoken), nextLink -> listNextSinglePageAsync(nextLink));
+ return new PagedFlux<>(() -> listSinglePageAsync(scope, filter, top, skiptoken),
+ nextLink -> listNextSinglePageAsync(nextLink));
}
/**
* For the specified scope, get the current quota requests for a one year period ending at the time is made. Use the
* **oData** filter to select quota requests.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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 filter | Field | Supported operators |---------------------|------------------------
- * |requestSubmitTime | ge, le, eq, gt, lt |provisioningState eq {QuotaRequestState} |resourceName eq
- * {resourceName}.
+ * `/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 filter | Field | Supported operators
+ * |---------------------|------------------------
+ *
+ * |requestSubmitTime | ge, le, eq, gt, lt
+ * |provisioningState eq {QuotaRequestState}
+ * |resourceName eq {resourceName}.
* @param top Number of records to return.
* @param skiptoken The **Skiptoken** parameter is used only if a previous operation returned a partial result. If a
- * previous response contains a **nextLink** element, its value includes a **skiptoken** parameter that
- * specifies a starting point to use for subsequent calls.
+ * previous response contains a **nextLink** element, its value includes a **skiptoken** parameter that specifies a
+ * starting point to use for subsequent calls.
* @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.
@@ -403,21 +375,20 @@ private PagedFlux listAsync(String scope) {
* @return quota request information as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(
- String scope, String filter, Integer top, String skiptoken, Context context) {
- return new PagedFlux<>(
- () -> listSinglePageAsync(scope, filter, top, skiptoken, context),
+ private PagedFlux listAsync(String scope, String filter, Integer top, String skiptoken,
+ Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(scope, filter, top, skiptoken, context),
nextLink -> listNextSinglePageAsync(nextLink, context));
}
/**
* For the specified scope, get the current quota requests for a one year period ending at the time is made. Use the
* **oData** filter to select quota requests.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -434,18 +405,21 @@ public PagedIterable list(String scope) {
/**
* For the specified scope, get the current quota requests for a one year period ending at the time is made. Use the
* **oData** filter to select quota requests.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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 filter | Field | Supported operators |---------------------|------------------------
- * |requestSubmitTime | ge, le, eq, gt, lt |provisioningState eq {QuotaRequestState} |resourceName eq
- * {resourceName}.
+ * `/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 filter | Field | Supported operators
+ * |---------------------|------------------------
+ *
+ * |requestSubmitTime | ge, le, eq, gt, lt
+ * |provisioningState eq {QuotaRequestState}
+ * |resourceName eq {resourceName}.
* @param top Number of records to return.
* @param skiptoken The **Skiptoken** parameter is used only if a previous operation returned a partial result. If a
- * previous response contains a **nextLink** element, its value includes a **skiptoken** parameter that
- * specifies a starting point to use for subsequent calls.
+ * previous response contains a **nextLink** element, its value includes a **skiptoken** parameter that specifies a
+ * starting point to use for subsequent calls.
* @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.
@@ -453,16 +427,17 @@ public PagedIterable list(String scope) {
* @return quota request information as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(
- String scope, String filter, Integer top, String skiptoken, Context context) {
+ public PagedIterable list(String scope, String filter, Integer top, String skiptoken,
+ Context context) {
return new PagedIterable<>(listAsync(scope, filter, top, skiptoken, context));
}
/**
* Get the next page of items.
- *
+ *
* @param nextLink The URL to get the next list of items
- * The nextLink parameter.
+ *
+ * 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.
@@ -474,31 +449,22 @@ private Mono> listNextSinglePageAsync(St
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Get the next page of items.
- *
+ *
* @param nextLink The URL to get the next list of items
- * The nextLink parameter.
+ *
+ * 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.
@@ -511,23 +477,13 @@ private Mono> listNextSinglePageAsync(St
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .listNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
+ return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
}
}
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaRequestStatusImpl.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaRequestStatusImpl.java
index 8ab7c4bff3546..82cf77fc1f6f1 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaRequestStatusImpl.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaRequestStatusImpl.java
@@ -21,8 +21,8 @@ public final class QuotaRequestStatusImpl implements QuotaRequestStatus {
private final com.azure.resourcemanager.quota.QuotaManager serviceManager;
- public QuotaRequestStatusImpl(
- QuotaRequestStatusClient innerClient, com.azure.resourcemanager.quota.QuotaManager serviceManager) {
+ public QuotaRequestStatusImpl(QuotaRequestStatusClient innerClient,
+ com.azure.resourcemanager.quota.QuotaManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -30,10 +30,7 @@ public QuotaRequestStatusImpl(
public Response getWithResponse(String id, String scope, Context context) {
Response inner = this.serviceClient().getWithResponse(id, scope, context);
if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new QuotaRequestDetailsImpl(inner.getValue(), this.manager()));
} else {
return null;
@@ -54,10 +51,10 @@ public PagedIterable list(String scope) {
return Utils.mapPage(inner, inner1 -> new QuotaRequestDetailsImpl(inner1, this.manager()));
}
- public PagedIterable list(
- String scope, String filter, Integer top, String skiptoken, Context context) {
- PagedIterable inner =
- this.serviceClient().list(scope, filter, top, skiptoken, context);
+ public PagedIterable list(String scope, String filter, Integer top, String skiptoken,
+ Context context) {
+ PagedIterable inner
+ = this.serviceClient().list(scope, filter, top, skiptoken, context);
return Utils.mapPage(inner, inner1 -> new QuotaRequestDetailsImpl(inner1, this.manager()));
}
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotasClientImpl.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotasClientImpl.java
index 267f460ee08d4..d122211e50536 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotasClientImpl.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotasClientImpl.java
@@ -40,17 +40,23 @@
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
-/** An instance of this class provides access to all the operations defined in QuotasClient. */
+/**
+ * An instance of this class provides access to all the operations defined in QuotasClient.
+ */
public final class QuotasClientImpl implements QuotasClient {
- /** The proxy service used to perform REST calls. */
+ /**
+ * The proxy service used to perform REST calls.
+ */
private final QuotasService service;
- /** The service client containing this operation class. */
+ /**
+ * The service client containing this operation class.
+ */
private final AzureQuotaExtensionApiImpl client;
/**
* Initializes an instance of QuotasClientImpl.
- *
+ *
* @param client the instance of the service client containing this operation class.
*/
QuotasClientImpl(AzureQuotaExtensionApiImpl client) {
@@ -65,76 +71,62 @@ public final class QuotasClientImpl implements QuotasClient {
@Host("{$host}")
@ServiceInterface(name = "AzureQuotaExtensionA")
public interface QuotasService {
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("/{scope}/providers/Microsoft.Quota/quotas/{resourceName}")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono get(
- @HostParam("$host") String endpoint,
- @PathParam("resourceName") String resourceName,
- @QueryParam("api-version") String apiVersion,
- @PathParam(value = "scope", encoded = true) String scope,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono get(@HostParam("$host") String endpoint, @PathParam("resourceName") String resourceName,
+ @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope,
+ @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Put("/{scope}/providers/Microsoft.Quota/quotas/{resourceName}")
- @ExpectedResponses({200, 202})
+ @ExpectedResponses({ 200, 202 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> createOrUpdate(
- @HostParam("$host") String endpoint,
- @PathParam("resourceName") String resourceName,
- @QueryParam("api-version") String apiVersion,
+ Mono>> createOrUpdate(@HostParam("$host") String endpoint,
+ @PathParam("resourceName") String resourceName, @QueryParam("api-version") String apiVersion,
@PathParam(value = "scope", encoded = true) String scope,
@BodyParam("application/json") CurrentQuotaLimitBaseInner createQuotaRequest,
- @HeaderParam("Accept") String accept,
- Context context);
+ @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Patch("/{scope}/providers/Microsoft.Quota/quotas/{resourceName}")
- @ExpectedResponses({200, 202})
+ @ExpectedResponses({ 200, 202 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> update(
- @HostParam("$host") String endpoint,
- @PathParam("resourceName") String resourceName,
- @QueryParam("api-version") String apiVersion,
+ Mono>> update(@HostParam("$host") String endpoint,
+ @PathParam("resourceName") String resourceName, @QueryParam("api-version") String apiVersion,
@PathParam(value = "scope", encoded = true) String scope,
@BodyParam("application/json") CurrentQuotaLimitBaseInner createQuotaRequest,
- @HeaderParam("Accept") String accept,
- Context context);
+ @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("/{scope}/providers/Microsoft.Quota/quotas")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono list(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam(value = "scope", encoded = true) String scope,
- @HeaderParam("Accept") String accept,
+ Mono list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "scope", encoded = true) String scope, @HeaderParam("Accept") String accept,
Context context);
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono listNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
}
/**
* Get the quota limit of a resource. The response can be used to determine the remaining quota to calculate a new
* quota limit that can be submitted with a PUT request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -143,10 +135,8 @@ Mono listNext(
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getWithResponseAsync(String resourceName, String scope) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (resourceName == null) {
return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
@@ -156,29 +146,23 @@ private Mono getWithResponseAsync(String resourceName, String
}
final String accept = "application/json";
return FluxUtil
- .withContext(
- context ->
- service
- .get(
- this.client.getEndpoint(),
- resourceName,
- this.client.getApiVersion(),
- scope,
- accept,
- context))
+ .withContext(context -> service.get(this.client.getEndpoint(), resourceName, this.client.getApiVersion(),
+ scope, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Get the quota limit of a resource. The response can be used to determine the remaining quota to calculate a new
* quota limit that can be submitted with a PUT request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 ManagementException thrown if the request is rejected by server.
@@ -188,10 +172,8 @@ private Mono getWithResponseAsync(String resourceName, String
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getWithResponseAsync(String resourceName, String scope, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (resourceName == null) {
return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
@@ -201,20 +183,22 @@ private Mono getWithResponseAsync(String resourceName, String
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .get(this.client.getEndpoint(), resourceName, this.client.getApiVersion(), scope, accept, context);
+ return service.get(this.client.getEndpoint(), resourceName, this.client.getApiVersion(), scope, accept,
+ context);
}
/**
* Get the quota limit of a resource. The response can be used to determine the remaining quota to calculate a new
* quota limit that can be submitted with a PUT request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -228,13 +212,15 @@ private Mono getAsync(String resourceName, String sc
/**
* Get the quota limit of a resource. The response can be used to determine the remaining quota to calculate a new
* quota limit that can be submitted with a PUT request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 ManagementException thrown if the request is rejected by server.
@@ -249,13 +235,15 @@ public QuotasGetResponse getWithResponse(String resourceName, String scope, Cont
/**
* Get the quota limit of a resource. The response can be used to determine the remaining quota to calculate a new
* quota limit that can be submitted with a PUT request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -268,18 +256,21 @@ public 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
- * these steps: 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific
- * resource and to calculate the new quota limit. These steps are detailed in [this
+ * these steps:
+ * 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and
+ * to calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota request payload.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -287,13 +278,11 @@ public CurrentQuotaLimitBaseInner get(String resourceName, String scope) {
* @return quota limit along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createOrUpdateWithResponseAsync(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest) {
+ private Mono>> createOrUpdateWithResponseAsync(String resourceName, String scope,
+ CurrentQuotaLimitBaseInner createQuotaRequest) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (resourceName == null) {
return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
@@ -309,34 +298,28 @@ private Mono>> createOrUpdateWithResponseAsync(
}
final String accept = "application/json";
return FluxUtil
- .withContext(
- context ->
- service
- .createOrUpdate(
- this.client.getEndpoint(),
- resourceName,
- this.client.getApiVersion(),
- scope,
- createQuotaRequest,
- accept,
- context))
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceName,
+ this.client.getApiVersion(), scope, createQuotaRequest, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Create or update the quota limit for the specified resource with the requested value. To update the quota, follow
- * these steps: 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific
- * resource and to calculate the new quota limit. These steps are detailed in [this
+ * these steps:
+ * 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and
+ * to calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota request payload.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -345,13 +328,11 @@ private Mono>> createOrUpdateWithResponseAsync(
* @return quota limit along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createOrUpdateWithResponseAsync(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
+ private Mono>> createOrUpdateWithResponseAsync(String resourceName, String scope,
+ CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (resourceName == null) {
return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
@@ -367,31 +348,27 @@ private Mono>> createOrUpdateWithResponseAsync(
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .createOrUpdate(
- this.client.getEndpoint(),
- resourceName,
- this.client.getApiVersion(),
- scope,
- createQuotaRequest,
- accept,
- context);
+ return service.createOrUpdate(this.client.getEndpoint(), resourceName, this.client.getApiVersion(), scope,
+ createQuotaRequest, accept, context);
}
/**
* Create or update the quota limit for the specified resource with the requested value. To update the quota, follow
- * these steps: 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific
- * resource and to calculate the new quota limit. These steps are detailed in [this
+ * these steps:
+ * 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and
+ * to calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota request payload.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -399,34 +376,32 @@ private Mono>> createOrUpdateWithResponseAsync(
* @return the {@link PollerFlux} for polling of quota limit.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, CurrentQuotaLimitBaseInner> beginCreateOrUpdateAsync(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest) {
- Mono>> mono =
- createOrUpdateWithResponseAsync(resourceName, scope, createQuotaRequest);
- return this
- .client
- .getLroResult(
- mono,
- this.client.getHttpPipeline(),
- CurrentQuotaLimitBaseInner.class,
- CurrentQuotaLimitBaseInner.class,
- this.client.getContext());
+ private PollerFlux, CurrentQuotaLimitBaseInner>
+ beginCreateOrUpdateAsync(String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest) {
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceName, scope, createQuotaRequest);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), CurrentQuotaLimitBaseInner.class, CurrentQuotaLimitBaseInner.class,
+ this.client.getContext());
}
/**
* Create or update the quota limit for the specified resource with the requested value. To update the quota, follow
- * these steps: 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific
- * resource and to calculate the new quota limit. These steps are detailed in [this
+ * these steps:
+ * 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and
+ * to calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota request payload.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -438,32 +413,29 @@ private PollerFlux, CurrentQuotaLimitBase
private PollerFlux, CurrentQuotaLimitBaseInner> beginCreateOrUpdateAsync(
String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
context = this.client.mergeContext(context);
- Mono>> mono =
- createOrUpdateWithResponseAsync(resourceName, scope, createQuotaRequest, context);
- return this
- .client
- .getLroResult(
- mono,
- this.client.getHttpPipeline(),
- CurrentQuotaLimitBaseInner.class,
- CurrentQuotaLimitBaseInner.class,
- context);
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceName, scope, createQuotaRequest, context);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), CurrentQuotaLimitBaseInner.class, CurrentQuotaLimitBaseInner.class, context);
}
/**
* Create or update the quota limit for the specified resource with the requested value. To update the quota, follow
- * these steps: 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific
- * resource and to calculate the new quota limit. These steps are detailed in [this
+ * these steps:
+ * 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and
+ * to calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota request payload.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -471,25 +443,28 @@ private PollerFlux, CurrentQuotaLimitBase
* @return the {@link SyncPoller} for polling of quota limit.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, CurrentQuotaLimitBaseInner> beginCreateOrUpdate(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest) {
+ public SyncPoller, CurrentQuotaLimitBaseInner>
+ beginCreateOrUpdate(String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest) {
return this.beginCreateOrUpdateAsync(resourceName, scope, createQuotaRequest).getSyncPoller();
}
/**
* Create or update the quota limit for the specified resource with the requested value. To update the quota, follow
- * these steps: 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific
- * resource and to calculate the new quota limit. These steps are detailed in [this
+ * these steps:
+ * 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and
+ * to calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota request payload.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -505,18 +480,21 @@ public SyncPoller, CurrentQuotaLimitBaseI
/**
* Create or update the quota limit for the specified resource with the requested value. To update the quota, follow
- * these steps: 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific
- * resource and to calculate the new quota limit. These steps are detailed in [this
+ * these steps:
+ * 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and
+ * to calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota request payload.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -524,27 +502,29 @@ public SyncPoller, CurrentQuotaLimitBaseI
* @return quota limit on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAsync(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest) {
- return beginCreateOrUpdateAsync(resourceName, scope, createQuotaRequest)
- .last()
+ private Mono createOrUpdateAsync(String resourceName, String scope,
+ CurrentQuotaLimitBaseInner createQuotaRequest) {
+ return beginCreateOrUpdateAsync(resourceName, scope, createQuotaRequest).last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
* Create or update the quota limit for the specified resource with the requested value. To update the quota, follow
- * these steps: 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific
- * resource and to calculate the new quota limit. These steps are detailed in [this
+ * these steps:
+ * 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and
+ * to calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota request payload.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -553,27 +533,29 @@ private Mono createOrUpdateAsync(
* @return quota limit on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAsync(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
- return beginCreateOrUpdateAsync(resourceName, scope, createQuotaRequest, context)
- .last()
+ private Mono createOrUpdateAsync(String resourceName, String scope,
+ CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
+ return beginCreateOrUpdateAsync(resourceName, scope, createQuotaRequest, context).last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
* Create or update the quota limit for the specified resource with the requested value. To update the quota, follow
- * these steps: 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific
- * resource and to calculate the new quota limit. These steps are detailed in [this
+ * these steps:
+ * 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and
+ * to calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota request payload.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -581,25 +563,28 @@ private Mono createOrUpdateAsync(
* @return quota limit.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public CurrentQuotaLimitBaseInner createOrUpdate(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest) {
+ public CurrentQuotaLimitBaseInner createOrUpdate(String resourceName, String scope,
+ CurrentQuotaLimitBaseInner createQuotaRequest) {
return createOrUpdateAsync(resourceName, scope, createQuotaRequest).block();
}
/**
* Create or update the quota limit for the specified resource with the requested value. To update the quota, follow
- * these steps: 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific
- * resource and to calculate the new quota limit. These steps are detailed in [this
+ * these steps:
+ * 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and
+ * to calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota request payload.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -608,25 +593,27 @@ public CurrentQuotaLimitBaseInner createOrUpdate(
* @return quota limit.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public CurrentQuotaLimitBaseInner createOrUpdate(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
+ public CurrentQuotaLimitBaseInner createOrUpdate(String resourceName, String scope,
+ CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
return createOrUpdateAsync(resourceName, scope, createQuotaRequest, context).block();
}
/**
- * Update the quota limit for a specific resource to the specified value: 1. Use the Usages-GET and Quota-GET
- * operations to determine the remaining quota for the specific resource and to calculate the new quota limit. These
- * steps are detailed in [this
+ * Update the quota limit for a specific resource to the specified value:
+ * 1. Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to
+ * calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota requests payload.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -634,13 +621,11 @@ public CurrentQuotaLimitBaseInner createOrUpdate(
* @return quota limit along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest) {
+ private Mono>> updateWithResponseAsync(String resourceName, String scope,
+ CurrentQuotaLimitBaseInner createQuotaRequest) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (resourceName == null) {
return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
@@ -656,34 +641,27 @@ private Mono>> updateWithResponseAsync(
}
final String accept = "application/json";
return FluxUtil
- .withContext(
- context ->
- service
- .update(
- this.client.getEndpoint(),
- resourceName,
- this.client.getApiVersion(),
- scope,
- createQuotaRequest,
- accept,
- context))
+ .withContext(context -> service.update(this.client.getEndpoint(), resourceName, this.client.getApiVersion(),
+ scope, createQuotaRequest, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Update the quota limit for a specific resource to the specified value: 1. Use the Usages-GET and Quota-GET
- * operations to determine the remaining quota for the specific resource and to calculate the new quota limit. These
- * steps are detailed in [this
+ * Update the quota limit for a specific resource to the specified value:
+ * 1. Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to
+ * calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota requests payload.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -692,13 +670,11 @@ private Mono>> updateWithResponseAsync(
* @return quota limit along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
+ private Mono>> updateWithResponseAsync(String resourceName, String scope,
+ CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (resourceName == null) {
return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
@@ -714,31 +690,26 @@ private Mono>> updateWithResponseAsync(
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .update(
- this.client.getEndpoint(),
- resourceName,
- this.client.getApiVersion(),
- scope,
- createQuotaRequest,
- accept,
- context);
+ return service.update(this.client.getEndpoint(), resourceName, this.client.getApiVersion(), scope,
+ createQuotaRequest, accept, context);
}
/**
- * Update the quota limit for a specific resource to the specified value: 1. Use the Usages-GET and Quota-GET
- * operations to determine the remaining quota for the specific resource and to calculate the new quota limit. These
- * steps are detailed in [this
+ * Update the quota limit for a specific resource to the specified value:
+ * 1. Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to
+ * calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota requests payload.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -746,33 +717,30 @@ private Mono>> updateWithResponseAsync(
* @return the {@link PollerFlux} for polling of quota limit.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, CurrentQuotaLimitBaseInner> beginUpdateAsync(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest) {
+ private PollerFlux, CurrentQuotaLimitBaseInner>
+ beginUpdateAsync(String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest) {
Mono>> mono = updateWithResponseAsync(resourceName, scope, createQuotaRequest);
- return this
- .client
- .getLroResult(
- mono,
- this.client.getHttpPipeline(),
- CurrentQuotaLimitBaseInner.class,
- CurrentQuotaLimitBaseInner.class,
- this.client.getContext());
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), CurrentQuotaLimitBaseInner.class, CurrentQuotaLimitBaseInner.class,
+ this.client.getContext());
}
/**
- * Update the quota limit for a specific resource to the specified value: 1. Use the Usages-GET and Quota-GET
- * operations to determine the remaining quota for the specific resource and to calculate the new quota limit. These
- * steps are detailed in [this
+ * Update the quota limit for a specific resource to the specified value:
+ * 1. Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to
+ * calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota requests payload.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -784,32 +752,28 @@ private PollerFlux, CurrentQuotaLimitBase
private PollerFlux, CurrentQuotaLimitBaseInner> beginUpdateAsync(
String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
context = this.client.mergeContext(context);
- Mono>> mono =
- updateWithResponseAsync(resourceName, scope, createQuotaRequest, context);
- return this
- .client
- .getLroResult(
- mono,
- this.client.getHttpPipeline(),
- CurrentQuotaLimitBaseInner.class,
- CurrentQuotaLimitBaseInner.class,
- context);
+ Mono>> mono
+ = updateWithResponseAsync(resourceName, scope, createQuotaRequest, context);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), CurrentQuotaLimitBaseInner.class, CurrentQuotaLimitBaseInner.class, context);
}
/**
- * Update the quota limit for a specific resource to the specified value: 1. Use the Usages-GET and Quota-GET
- * operations to determine the remaining quota for the specific resource and to calculate the new quota limit. These
- * steps are detailed in [this
+ * Update the quota limit for a specific resource to the specified value:
+ * 1. Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to
+ * calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota requests payload.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -817,25 +781,27 @@ private PollerFlux, CurrentQuotaLimitBase
* @return the {@link SyncPoller} for polling of quota limit.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, CurrentQuotaLimitBaseInner> beginUpdate(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest) {
+ public SyncPoller, CurrentQuotaLimitBaseInner>
+ beginUpdate(String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest) {
return this.beginUpdateAsync(resourceName, scope, createQuotaRequest).getSyncPoller();
}
/**
- * Update the quota limit for a specific resource to the specified value: 1. Use the Usages-GET and Quota-GET
- * operations to determine the remaining quota for the specific resource and to calculate the new quota limit. These
- * steps are detailed in [this
+ * Update the quota limit for a specific resource to the specified value:
+ * 1. Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to
+ * calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota requests payload.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -844,25 +810,27 @@ public SyncPoller, CurrentQuotaLimitBaseI
* @return the {@link SyncPoller} for polling of quota limit.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, CurrentQuotaLimitBaseInner> beginUpdate(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
+ public SyncPoller, CurrentQuotaLimitBaseInner>
+ beginUpdate(String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
return this.beginUpdateAsync(resourceName, scope, createQuotaRequest, context).getSyncPoller();
}
/**
- * Update the quota limit for a specific resource to the specified value: 1. Use the Usages-GET and Quota-GET
- * operations to determine the remaining quota for the specific resource and to calculate the new quota limit. These
- * steps are detailed in [this
+ * Update the quota limit for a specific resource to the specified value:
+ * 1. Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to
+ * calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota requests payload.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -870,27 +838,28 @@ public SyncPoller, CurrentQuotaLimitBaseI
* @return quota limit on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest) {
- return beginUpdateAsync(resourceName, scope, createQuotaRequest)
- .last()
+ private Mono updateAsync(String resourceName, String scope,
+ CurrentQuotaLimitBaseInner createQuotaRequest) {
+ return beginUpdateAsync(resourceName, scope, createQuotaRequest).last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Update the quota limit for a specific resource to the specified value: 1. Use the Usages-GET and Quota-GET
- * operations to determine the remaining quota for the specific resource and to calculate the new quota limit. These
- * steps are detailed in [this
+ * Update the quota limit for a specific resource to the specified value:
+ * 1. Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to
+ * calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota requests payload.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -899,27 +868,28 @@ private Mono updateAsync(
* @return quota limit on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
- return beginUpdateAsync(resourceName, scope, createQuotaRequest, context)
- .last()
+ private Mono updateAsync(String resourceName, String scope,
+ CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
+ return beginUpdateAsync(resourceName, scope, createQuotaRequest, context).last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Update the quota limit for a specific resource to the specified value: 1. Use the Usages-GET and Quota-GET
- * operations to determine the remaining quota for the specific resource and to calculate the new quota limit. These
- * steps are detailed in [this
+ * Update the quota limit for a specific resource to the specified value:
+ * 1. Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to
+ * calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota requests payload.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -927,25 +897,27 @@ private Mono updateAsync(
* @return quota limit.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public CurrentQuotaLimitBaseInner update(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest) {
+ public CurrentQuotaLimitBaseInner update(String resourceName, String scope,
+ CurrentQuotaLimitBaseInner createQuotaRequest) {
return updateAsync(resourceName, scope, createQuotaRequest).block();
}
/**
- * Update the quota limit for a specific resource to the specified value: 1. Use the Usages-GET and Quota-GET
- * operations to determine the remaining quota for the specific resource and to calculate the new quota limit. These
- * steps are detailed in [this
+ * Update the quota limit for a specific resource to the specified value:
+ * 1. Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to
+ * calculate the new quota limit. These steps are detailed in [this
* example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).
* 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed
* status of the request.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 createQuotaRequest Quota requests payload.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -954,32 +926,30 @@ public CurrentQuotaLimitBaseInner update(
* @return quota limit.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public CurrentQuotaLimitBaseInner update(
- String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
+ public CurrentQuotaLimitBaseInner update(String resourceName, String scope,
+ CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
return updateAsync(resourceName, scope, createQuotaRequest, context).block();
}
/**
* Get a list of current quota limits of all resources for the specified scope. The response from this GET operation
* can be leveraged to submit requests to update a quota.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 along with {@link PagedResponse}
- * on successful completion of {@link Mono}.
+ * on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(String scope) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (scope == null) {
return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
@@ -989,71 +959,55 @@ private Mono> listSinglePageAsync(Stri
.withContext(
context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), scope, accept, context))
.>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- res.getDeserializedHeaders()))
+ res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), res.getDeserializedHeaders()))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Get a list of current quota limits of all resources for the specified scope. The response from this GET operation
* can be leveraged to submit requests to update a quota.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 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 along with {@link PagedResponse}
- * on successful completion of {@link Mono}.
+ * on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(String scope, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (scope == null) {
return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), this.client.getApiVersion(), scope, accept, context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- res.getDeserializedHeaders()));
+ return service.list(this.client.getEndpoint(), this.client.getApiVersion(), scope, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), res.getDeserializedHeaders()));
}
/**
* Get a list of current quota limits of all resources for the specified scope. The response from this GET operation
* can be leveraged to submit requests to update a quota.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 as paginated response with {@link
- * PagedFlux}.
+ * @return a list of current quota limits of all resources for the specified scope as paginated response with
+ * {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String scope) {
@@ -1063,37 +1017,37 @@ private PagedFlux listAsync(String scope) {
/**
* Get a list of current quota limits of all resources for the specified scope. The response from this GET operation
* can be leveraged to submit requests to update a quota.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 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 as paginated response with {@link
- * PagedFlux}.
+ * @return a list of current quota limits of all resources for the specified scope as paginated response with
+ * {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String scope, Context context) {
- return new PagedFlux<>(
- () -> listSinglePageAsync(scope, context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ return new PagedFlux<>(() -> listSinglePageAsync(scope, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
}
/**
* Get a list of current quota limits of all resources for the specified scope. The response from this GET operation
* can be leveraged to submit requests to update a quota.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 as paginated response with {@link
- * PagedIterable}.
+ * @return a list of current quota limits of all resources for the specified scope as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String scope) {
@@ -1103,17 +1057,17 @@ public PagedIterable list(String scope) {
/**
* Get a list of current quota limits of all resources for the specified scope. The response from this GET operation
* can be leveraged to submit requests to update a quota.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 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 as paginated response with {@link
- * PagedIterable}.
+ * @return a list of current quota limits of all resources for the specified scope as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String scope, Context context) {
@@ -1122,9 +1076,10 @@ public PagedIterable list(String scope, Context cont
/**
* Get the next page of items.
- *
+ *
* @param nextLink The URL to get the next list of items
- * The nextLink parameter.
+ *
+ * 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.
@@ -1136,31 +1091,23 @@ private Mono> listNextSinglePageAsync(
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
.>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- res.getDeserializedHeaders()))
+ res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), res.getDeserializedHeaders()))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Get the next page of items.
- *
+ *
* @param nextLink The URL to get the next list of items
- * The nextLink parameter.
+ *
+ * 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.
@@ -1173,23 +1120,13 @@ private Mono> listNextSinglePageAsync(
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .listNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- res.getDeserializedHeaders()));
+ return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), res.getDeserializedHeaders()));
}
}
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotasImpl.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotasImpl.java
index b58c1b1bebfb7..7dc0e41dd2b56 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotasImpl.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotasImpl.java
@@ -30,10 +30,7 @@ public QuotasImpl(QuotasClient innerClient, com.azure.resourcemanager.quota.Quot
public Response getWithResponse(String resourceName, String scope, Context context) {
QuotasGetResponse inner = this.serviceClient().getWithResponse(resourceName, scope, context);
if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new CurrentQuotaLimitBaseImpl(inner.getValue(), this.manager()));
} else {
return null;
@@ -60,47 +57,33 @@ public PagedIterable list(String scope, Context context)
}
public CurrentQuotaLimitBase getById(String id) {
- String resourceName =
- Utils
- .getValueFromIdByParameterName(
- id, "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}", "resourceName");
+ String resourceName = Utils.getValueFromIdByParameterName(id,
+ "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}", "resourceName");
if (resourceName == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'quotas'.", id)));
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'quotas'.", id)));
}
- String scope =
- Utils
- .getValueFromIdByParameterName(id, "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}", "scope");
+ String scope = Utils.getValueFromIdByParameterName(id,
+ "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}", "scope");
if (scope == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
}
return this.getWithResponse(resourceName, scope, Context.NONE).getValue();
}
public Response getByIdWithResponse(String id, Context context) {
- String resourceName =
- Utils
- .getValueFromIdByParameterName(
- id, "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}", "resourceName");
+ String resourceName = Utils.getValueFromIdByParameterName(id,
+ "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}", "resourceName");
if (resourceName == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'quotas'.", id)));
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'quotas'.", id)));
}
- String scope =
- Utils
- .getValueFromIdByParameterName(id, "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}", "scope");
+ String scope = Utils.getValueFromIdByParameterName(id,
+ "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}", "scope");
if (scope == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
}
return this.getWithResponse(resourceName, scope, context);
}
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/UsagesClientImpl.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/UsagesClientImpl.java
index fba4b3393d72c..57001c4cd7d6d 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/UsagesClientImpl.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/UsagesClientImpl.java
@@ -31,17 +31,23 @@
import com.azure.resourcemanager.quota.models.UsagesListResponse;
import reactor.core.publisher.Mono;
-/** An instance of this class provides access to all the operations defined in UsagesClient. */
+/**
+ * An instance of this class provides access to all the operations defined in UsagesClient.
+ */
public final class UsagesClientImpl implements UsagesClient {
- /** The proxy service used to perform REST calls. */
+ /**
+ * The proxy service used to perform REST calls.
+ */
private final UsagesService service;
- /** The service client containing this operation class. */
+ /**
+ * The service client containing this operation class.
+ */
private final AzureQuotaExtensionApiImpl client;
/**
* Initializes an instance of UsagesClientImpl.
- *
+ *
* @param client the instance of the service client containing this operation class.
*/
UsagesClientImpl(AzureQuotaExtensionApiImpl client) {
@@ -56,49 +62,41 @@ public final class UsagesClientImpl implements UsagesClient {
@Host("{$host}")
@ServiceInterface(name = "AzureQuotaExtensionA")
public interface UsagesService {
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("/{scope}/providers/Microsoft.Quota/usages/{resourceName}")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono get(
- @HostParam("$host") String endpoint,
- @PathParam("resourceName") String resourceName,
- @QueryParam("api-version") String apiVersion,
- @PathParam(value = "scope", encoded = true) String scope,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono get(@HostParam("$host") String endpoint, @PathParam("resourceName") String resourceName,
+ @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope,
+ @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("/{scope}/providers/Microsoft.Quota/usages")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono list(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam(value = "scope", encoded = true) String scope,
- @HeaderParam("Accept") String accept,
+ Mono list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "scope", encoded = true) String scope, @HeaderParam("Accept") String accept,
Context context);
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono listNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
}
/**
* Get the current usage of a resource.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -107,10 +105,8 @@ Mono listNext(
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getWithResponseAsync(String resourceName, String scope) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (resourceName == null) {
return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
@@ -120,28 +116,22 @@ private Mono getWithResponseAsync(String resourceName, String
}
final String accept = "application/json";
return FluxUtil
- .withContext(
- context ->
- service
- .get(
- this.client.getEndpoint(),
- resourceName,
- this.client.getApiVersion(),
- scope,
- accept,
- context))
+ .withContext(context -> service.get(this.client.getEndpoint(), resourceName, this.client.getApiVersion(),
+ scope, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Get the current usage of a resource.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 ManagementException thrown if the request is rejected by server.
@@ -151,10 +141,8 @@ private Mono getWithResponseAsync(String resourceName, String
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getWithResponseAsync(String resourceName, String scope, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (resourceName == null) {
return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
@@ -164,19 +152,21 @@ private Mono getWithResponseAsync(String resourceName, String
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .get(this.client.getEndpoint(), resourceName, this.client.getApiVersion(), scope, accept, context);
+ return service.get(this.client.getEndpoint(), resourceName, this.client.getApiVersion(), scope, accept,
+ context);
}
/**
* Get the current usage of a resource.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -189,13 +179,15 @@ private Mono getAsync(String resourceName, String scope)
/**
* Get the current usage of a resource.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 ManagementException thrown if the request is rejected by server.
@@ -209,13 +201,15 @@ public UsagesGetResponse getWithResponse(String resourceName, String scope, Cont
/**
* Get the current usage of a resource.
- *
- * @param resourceName Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute -
- * SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ *
+ * @param resourceName Resource name for a given resource provider. For example:
+ * - SKU name for Microsoft.Compute
+ * - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ * For Microsoft.Network PublicIPAddresses.
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -228,24 +222,22 @@ public CurrentUsagesBaseInner get(String resourceName, String scope) {
/**
* Get a list of current usage for all resources for the scope specified.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 along with {@link PagedResponse} on
- * successful completion of {@link Mono}.
+ * successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(String scope) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (scope == null) {
return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
@@ -255,69 +247,53 @@ private Mono> listSinglePageAsync(String s
.withContext(
context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), scope, accept, context))
.>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- res.getDeserializedHeaders()))
+ res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), res.getDeserializedHeaders()))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Get a list of current usage for all resources for the scope specified.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 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 along with {@link PagedResponse} on
- * successful completion of {@link Mono}.
+ * successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(String scope, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (scope == null) {
return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), this.client.getApiVersion(), scope, accept, context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- res.getDeserializedHeaders()));
+ return service.list(this.client.getEndpoint(), this.client.getApiVersion(), scope, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), res.getDeserializedHeaders()));
}
/**
* Get a list of current usage for all resources for the scope specified.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 as paginated response with {@link
- * PagedFlux}.
+ * @return a list of current usage for all resources for the scope specified as paginated response with
+ * {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String scope) {
@@ -326,36 +302,36 @@ private PagedFlux listAsync(String scope) {
/**
* Get a list of current usage for all resources for the scope specified.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 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 as paginated response with {@link
- * PagedFlux}.
+ * @return a list of current usage for all resources for the scope specified as paginated response with
+ * {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String scope, Context context) {
- return new PagedFlux<>(
- () -> listSinglePageAsync(scope, context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ return new PagedFlux<>(() -> listSinglePageAsync(scope, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
}
/**
* Get a list of current usage for all resources for the scope specified.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 as paginated response with {@link
- * PagedIterable}.
+ * @return a list of current usage for all resources for the scope specified as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String scope) {
@@ -364,17 +340,17 @@ public PagedIterable list(String scope) {
/**
* Get a list of current usage for all resources for the scope specified.
- *
+ *
* @param scope The target Azure resource URI. For example,
- * `/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.
+ * `/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 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 as paginated response with {@link
- * PagedIterable}.
+ * @return a list of current usage for all resources for the scope specified as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String scope, Context context) {
@@ -383,9 +359,10 @@ public PagedIterable list(String scope, Context context)
/**
* Get the next page of items.
- *
+ *
* @param nextLink The URL to get the next list of items
- * The nextLink parameter.
+ *
+ * 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.
@@ -397,31 +374,23 @@ private Mono> listNextSinglePageAsync(Stri
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
.>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- res.getDeserializedHeaders()))
+ res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), res.getDeserializedHeaders()))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Get the next page of items.
- *
+ *
* @param nextLink The URL to get the next list of items
- * The nextLink parameter.
+ *
+ * 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.
@@ -434,23 +403,13 @@ private Mono> listNextSinglePageAsync(Stri
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .listNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- res.getDeserializedHeaders()));
+ return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), res.getDeserializedHeaders()));
}
}
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/UsagesImpl.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/UsagesImpl.java
index f10021f9e46b7..93af704315dea 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/UsagesImpl.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/UsagesImpl.java
@@ -30,10 +30,7 @@ public UsagesImpl(UsagesClient innerClient, com.azure.resourcemanager.quota.Quot
public Response getWithResponse(String resourceName, String scope, Context context) {
UsagesGetResponse inner = this.serviceClient().getWithResponse(resourceName, scope, context);
if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new CurrentUsagesBaseImpl(inner.getValue(), this.manager()));
} else {
return null;
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/Utils.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/Utils.java
index b893884d3edad..822b68b71b045 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/Utils.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/Utils.java
@@ -20,6 +20,9 @@
import reactor.core.publisher.Flux;
final class Utils {
+ private Utils() {
+ }
+
static String getValueFromIdByName(String id, String name) {
if (id == null) {
return null;
@@ -38,6 +41,7 @@ static String getValueFromIdByName(String id, String name) {
}
}
return null;
+
}
static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) {
@@ -60,7 +64,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri
segments.add(idSegment);
idItrReverted.forEachRemaining(segments::add);
Collections.reverse(segments);
- if (segments.size() > 0 && segments.get(0).isEmpty()) {
+ if (!segments.isEmpty() && segments.get(0).isEmpty()) {
segments.remove(0);
}
return String.join("/", segments);
@@ -71,10 +75,11 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri
}
}
return null;
+
}
static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) {
- return new PagedIterableImpl(pageIterable, mapper);
+ return new PagedIterableImpl<>(pageIterable, mapper);
}
private static final class PagedIterableImpl extends PagedIterable {
@@ -84,26 +89,17 @@ private static final class PagedIterableImpl extends PagedIterable