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 { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override @@ -133,30 +129,27 @@ public Stream> streamByPage(String continuationToken, int prefe @Override public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); + return new IteratorImpl<>(pagedIterable.iterator(), mapper); } @Override public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); } @Override public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); } } @@ -198,7 +191,7 @@ private IterableImpl(Iterable iterable, Function mapper) { @Override public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); + return new IteratorImpl<>(iterable.iterator(), mapper); } } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/package-info.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/package-info.java index 84f250ba9a927..6d8f04a00ef22 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/package-info.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the implementations for AzureQuotaExtensionApi. Microsoft Azure Quota Resource Provider. */ +/** + * Package containing the implementations for AzureQuotaExtensionApi. + * Microsoft Azure Quota Resource Provider. + */ package com.azure.resourcemanager.quota.implementation; diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/CurrentQuotaLimitBase.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/CurrentQuotaLimitBase.java index e17b2c44c1285..66cf6e60c04e2 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/CurrentQuotaLimitBase.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/CurrentQuotaLimitBase.java @@ -7,25 +7,27 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.quota.fluent.models.CurrentQuotaLimitBaseInner; -/** An immutable client-side representation of CurrentQuotaLimitBase. */ +/** + * An immutable client-side representation of CurrentQuotaLimitBase. + */ public interface CurrentQuotaLimitBase { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); @@ -33,40 +35,50 @@ public interface CurrentQuotaLimitBase { /** * Gets the properties property: Quota properties for the specified resource, based on the API called, Quotas or * Usages. - * + * * @return the properties value. */ QuotaProperties properties(); /** * Gets the inner com.azure.resourcemanager.quota.fluent.models.CurrentQuotaLimitBaseInner object. - * + * * @return the inner object. */ CurrentQuotaLimitBaseInner innerModel(); - /** The entirety of the CurrentQuotaLimitBase definition. */ + /** + * The entirety of the CurrentQuotaLimitBase definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithScope, DefinitionStages.WithCreate { } - /** The CurrentQuotaLimitBase definition stages. */ + + /** + * The CurrentQuotaLimitBase definition stages. + */ interface DefinitionStages { - /** The first stage of the CurrentQuotaLimitBase definition. */ + /** + * The first stage of the CurrentQuotaLimitBase definition. + */ interface Blank extends WithScope { } - /** The stage of the CurrentQuotaLimitBase definition allowing to specify parent resource. */ + + /** + * The stage of the CurrentQuotaLimitBase definition allowing to specify parent resource. + */ interface WithScope { /** * Specifies scope. - * + * * @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. * @return the next definition stage. */ WithCreate withExistingScope(String scope); } + /** * The stage of the CurrentQuotaLimitBase definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. @@ -74,79 +86,91 @@ interface WithScope { interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ CurrentQuotaLimitBase create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ CurrentQuotaLimitBase create(Context context); } - /** The stage of the CurrentQuotaLimitBase definition allowing to specify properties. */ + + /** + * The stage of the CurrentQuotaLimitBase definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Quota properties for the specified resource, based on the API called, * Quotas or Usages.. - * + * * @param properties Quota properties for the specified resource, based on the API called, Quotas or Usages. * @return the next definition stage. */ WithCreate withProperties(QuotaProperties properties); } } + /** * Begins update for the CurrentQuotaLimitBase resource. - * + * * @return the stage of resource update. */ CurrentQuotaLimitBase.Update update(); - /** The template for CurrentQuotaLimitBase update. */ + /** + * The template for CurrentQuotaLimitBase update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ CurrentQuotaLimitBase apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ CurrentQuotaLimitBase apply(Context context); } - /** The CurrentQuotaLimitBase update stages. */ + + /** + * The CurrentQuotaLimitBase update stages. + */ interface UpdateStages { - /** The stage of the CurrentQuotaLimitBase update allowing to specify properties. */ + /** + * The stage of the CurrentQuotaLimitBase update allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Quota properties for the specified resource, based on the API called, * Quotas or Usages.. - * + * * @param properties Quota properties for the specified resource, based on the API called, Quotas or Usages. * @return the next definition stage. */ Update withProperties(QuotaProperties properties); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ CurrentQuotaLimitBase refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/CurrentUsagesBase.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/CurrentUsagesBase.java index e406afed5eb89..881599cdeb21b 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/CurrentUsagesBase.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/CurrentUsagesBase.java @@ -6,39 +6,41 @@ import com.azure.resourcemanager.quota.fluent.models.CurrentUsagesBaseInner; -/** An immutable client-side representation of CurrentUsagesBase. */ +/** + * An immutable client-side representation of CurrentUsagesBase. + */ public interface CurrentUsagesBase { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the properties property: Usage properties for the specified resource. - * + * * @return the properties value. */ UsagesProperties properties(); /** * Gets the inner com.azure.resourcemanager.quota.fluent.models.CurrentUsagesBaseInner object. - * + * * @return the inner object. */ CurrentUsagesBaseInner innerModel(); diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitJsonObject.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitJsonObject.java index e44b371cb2ee0..07dd20d07a924 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitJsonObject.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitJsonObject.java @@ -9,23 +9,27 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** LimitJson abstract class. */ +/** + * LimitJson abstract class. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "limitObjectType", defaultImpl = LimitJsonObject.class) @JsonTypeName("LimitJsonObject") -@JsonSubTypes({@JsonSubTypes.Type(name = "LimitValue", value = LimitObject.class)}) +@JsonSubTypes({ @JsonSubTypes.Type(name = "LimitValue", value = LimitObject.class) }) @Immutable public class LimitJsonObject { - /** Creates an instance of LimitJsonObject class. */ + /** + * Creates an instance of LimitJsonObject class. + */ public LimitJsonObject() { } /** * 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/models/LimitObject.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitObject.java index a1b3e15058e0e..0ad8d420ba252 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitObject.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitObject.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The resource quota limit value. */ +/** + * The resource quota limit value. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "limitObjectType") @JsonTypeName("LimitValue") @Fluent @@ -26,13 +28,15 @@ public final class LimitObject extends LimitJsonObject { @JsonProperty(value = "limitType") private QuotaLimitTypes limitType; - /** Creates an instance of LimitObject class. */ + /** + * Creates an instance of LimitObject class. + */ public LimitObject() { } /** * Get the value property: The quota/limit value. - * + * * @return the value value. */ public int value() { @@ -41,7 +45,7 @@ public int value() { /** * Set the value property: The quota/limit value. - * + * * @param value the value value to set. * @return the LimitObject object itself. */ @@ -52,7 +56,7 @@ public LimitObject withValue(int value) { /** * Get the limitType property: The quota or usages limit types. - * + * * @return the limitType value. */ public QuotaLimitTypes limitType() { @@ -61,7 +65,7 @@ public QuotaLimitTypes limitType() { /** * Set the limitType property: The quota or usages limit types. - * + * * @param limitType the limitType value to set. * @return the LimitObject object itself. */ @@ -72,7 +76,7 @@ public LimitObject withLimitType(QuotaLimitTypes limitType) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitType.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitType.java index 8df020cb91347..c84bfb8fdee2d 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitType.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitType.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The limit object type. */ +/** + * The limit object type. + */ public final class LimitType extends ExpandableStringEnum { - /** Static value LimitValue for LimitType. */ + /** + * Static value LimitValue for LimitType. + */ public static final LimitType LIMIT_VALUE = fromString("LimitValue"); /** * Creates a new instance of LimitType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public LimitType() { /** * Creates or finds a LimitType from its string representation. - * + * * @param name a name to look for. * @return the corresponding LimitType. */ @@ -35,7 +39,7 @@ public static LimitType fromString(String name) { /** * Gets known LimitType values. - * + * * @return known LimitType values. */ public static Collection values() { diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/OperationDisplay.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/OperationDisplay.java index 4d3eeba3c0db1..1559c002c678e 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/OperationDisplay.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/OperationDisplay.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The OperationDisplay model. */ +/** + * The OperationDisplay model. + */ @Fluent public final class OperationDisplay { /* @@ -34,13 +36,15 @@ public final class OperationDisplay { @JsonProperty(value = "description") private String description; - /** Creates an instance of OperationDisplay class. */ + /** + * Creates an instance of OperationDisplay class. + */ public OperationDisplay() { } /** * Get the provider property: Provider name. - * + * * @return the provider value. */ public String provider() { @@ -49,7 +53,7 @@ public String provider() { /** * Set the provider property: Provider name. - * + * * @param provider the provider value to set. * @return the OperationDisplay object itself. */ @@ -60,7 +64,7 @@ public OperationDisplay withProvider(String provider) { /** * Get the resource property: Resource name. - * + * * @return the resource value. */ public String resource() { @@ -69,7 +73,7 @@ public String resource() { /** * Set the resource property: Resource name. - * + * * @param resource the resource value to set. * @return the OperationDisplay object itself. */ @@ -80,7 +84,7 @@ public OperationDisplay withResource(String resource) { /** * Get the operation property: Operation name. - * + * * @return the operation value. */ public String operation() { @@ -89,7 +93,7 @@ public String operation() { /** * Set the operation property: Operation name. - * + * * @param operation the operation value to set. * @return the OperationDisplay object itself. */ @@ -100,7 +104,7 @@ public OperationDisplay withOperation(String operation) { /** * Get the description property: Operation description. - * + * * @return the description value. */ public String description() { @@ -109,7 +113,7 @@ public String description() { /** * Set the description property: Operation description. - * + * * @param description the description value to set. * @return the OperationDisplay object itself. */ @@ -120,7 +124,7 @@ public OperationDisplay withDescription(String description) { /** * 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/models/OperationList.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/OperationList.java index 8412a7794c0b3..bdf4dfee9d2fd 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/OperationList.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/OperationList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The OperationList model. */ +/** + * The OperationList model. + */ @Fluent public final class OperationList { /* @@ -24,13 +26,15 @@ public final class OperationList { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of OperationList class. */ + /** + * Creates an instance of OperationList class. + */ public OperationList() { } /** * Get the value property: The value property. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: The value property. - * + * * @param value the value value to set. * @return the OperationList object itself. */ @@ -50,7 +54,7 @@ public OperationList withValue(List value) { /** * Get the nextLink property: URL to get the next page of items. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Set the nextLink property: URL to get the next page of items. - * + * * @param nextLink the nextLink value to set. * @return the OperationList object itself. */ @@ -70,7 +74,7 @@ public OperationList withNextLink(String nextLink) { /** * 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/models/OperationResponse.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/OperationResponse.java index ab1891ee80f67..6c51c2dbdda04 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/OperationResponse.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/OperationResponse.java @@ -6,32 +6,34 @@ import com.azure.resourcemanager.quota.fluent.models.OperationResponseInner; -/** An immutable client-side representation of OperationResponse. */ +/** + * An immutable client-side representation of OperationResponse. + */ public interface OperationResponse { /** * Gets the name property: The name property. - * + * * @return the name value. */ String name(); /** * Gets the display property: The display property. - * + * * @return the display value. */ OperationDisplay display(); /** * Gets the origin property: The origin property. - * + * * @return the origin value. */ String origin(); /** * Gets the inner com.azure.resourcemanager.quota.fluent.models.OperationResponseInner object. - * + * * @return the inner object. */ OperationResponseInner innerModel(); diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaLimitTypes.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaLimitTypes.java index 1eaa6b0ed5999..23048914ed589 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaLimitTypes.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaLimitTypes.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The quota or usages limit types. */ +/** + * The quota or usages limit types. + */ public final class QuotaLimitTypes extends ExpandableStringEnum { - /** Static value Independent for QuotaLimitTypes. */ + /** + * Static value Independent for QuotaLimitTypes. + */ public static final QuotaLimitTypes INDEPENDENT = fromString("Independent"); - /** Static value Shared for QuotaLimitTypes. */ + /** + * Static value Shared for QuotaLimitTypes. + */ public static final QuotaLimitTypes SHARED = fromString("Shared"); /** * Creates a new instance of QuotaLimitTypes value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public QuotaLimitTypes() { /** * Creates or finds a QuotaLimitTypes from its string representation. - * + * * @param name a name to look for. * @return the corresponding QuotaLimitTypes. */ @@ -38,7 +44,7 @@ public static QuotaLimitTypes fromString(String name) { /** * Gets known QuotaLimitTypes values. - * + * * @return known QuotaLimitTypes values. */ public static Collection values() { diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaLimits.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaLimits.java index 2f1aa4d9d6dc0..e0cb218d960aa 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaLimits.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaLimits.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Quota limits. */ +/** + * Quota limits. + */ @Fluent public final class QuotaLimits { /* @@ -24,13 +26,15 @@ public final class QuotaLimits { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of QuotaLimits class. */ + /** + * Creates an instance of QuotaLimits class. + */ public QuotaLimits() { } /** * Get the value property: List of quota limits. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: List of quota limits. - * + * * @param value the value value to set. * @return the QuotaLimits object itself. */ @@ -51,7 +55,7 @@ public QuotaLimits withValue(List value) { /** * Get the nextLink property: The URI used to fetch the next page of quota limits. When there are no more pages, * this string is null. - * + * * @return the nextLink value. */ public String nextLink() { @@ -61,7 +65,7 @@ public String nextLink() { /** * Set the nextLink property: The URI used to fetch the next page of quota limits. When there are no more pages, * this string is null. - * + * * @param nextLink the nextLink value to set. * @return the QuotaLimits object itself. */ @@ -72,7 +76,7 @@ public QuotaLimits withNextLink(String nextLink) { /** * 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/models/QuotaOperations.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaOperations.java index 52b38d2eee2a2..c2bff14c23aeb 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaOperations.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaOperations.java @@ -7,13 +7,15 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of QuotaOperations. */ +/** + * Resource collection API of QuotaOperations. + */ public interface QuotaOperations { /** * 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}. @@ -22,9 +24,9 @@ public interface QuotaOperations { /** * 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/models/QuotaProperties.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaProperties.java index 201518aba34cb..14120b2ec9a17 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaProperties.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Quota properties for the specified resource. */ +/** + * Quota properties for the specified resource. + */ @Fluent public final class QuotaProperties { /* @@ -57,13 +59,15 @@ public final class QuotaProperties { @JsonProperty(value = "properties") private Object properties; - /** Creates an instance of QuotaProperties class. */ + /** + * Creates an instance of QuotaProperties class. + */ public QuotaProperties() { } /** * Get the limit property: Resource quota limit properties. - * + * * @return the limit value. */ public LimitJsonObject limit() { @@ -72,7 +76,7 @@ public LimitJsonObject limit() { /** * Set the limit property: Resource quota limit properties. - * + * * @param limit the limit value to set. * @return the QuotaProperties object itself. */ @@ -84,7 +88,7 @@ public QuotaProperties withLimit(LimitJsonObject limit) { /** * Get the unit property: The quota units, such as Count and Bytes. When requesting quota, use the **unit** value * returned in the GET response in the request body of your PUT operation. - * + * * @return the unit value. */ public String unit() { @@ -94,7 +98,7 @@ public String unit() { /** * Get the name property: Resource name provided by the resource provider. Use this property name when requesting * quota. - * + * * @return the name value. */ public ResourceName name() { @@ -104,7 +108,7 @@ public ResourceName name() { /** * Set the name property: Resource name provided by the resource provider. Use this property name when requesting * quota. - * + * * @param name the name value to set. * @return the QuotaProperties object itself. */ @@ -115,7 +119,7 @@ public QuotaProperties withName(ResourceName name) { /** * Get the resourceType property: The name of the resource type. Optional field. - * + * * @return the resourceType value. */ public String resourceType() { @@ -124,7 +128,7 @@ public String resourceType() { /** * Set the resourceType property: The name of the resource type. Optional field. - * + * * @param resourceType the resourceType value to set. * @return the QuotaProperties object itself. */ @@ -134,10 +138,12 @@ public QuotaProperties withResourceType(String resourceType) { } /** - * Get the quotaPeriod property: The time period over which the quota usage values are summarized. For example: *P1D - * (per one day) *PT1M (per one minute) *PT1S (per one second). This parameter is optional because, for some - * resources like compute, the period is irrelevant. - * + * Get the quotaPeriod property: The time period over which the quota usage values are summarized. For example: + * *P1D (per one day) + * *PT1M (per one minute) + * *PT1S (per one second). + * This parameter is optional because, for some resources like compute, the period is irrelevant. + * * @return the quotaPeriod value. */ public String quotaPeriod() { @@ -146,7 +152,7 @@ public String quotaPeriod() { /** * Get the isQuotaApplicable property: States if quota can be requested for this resource. - * + * * @return the isQuotaApplicable value. */ public Boolean isQuotaApplicable() { @@ -155,7 +161,7 @@ public Boolean isQuotaApplicable() { /** * Get the properties property: Additional properties for the specific resource provider. - * + * * @return the properties value. */ public Object properties() { @@ -164,7 +170,7 @@ public Object properties() { /** * Set the properties property: Additional properties for the specific resource provider. - * + * * @param properties the properties value to set. * @return the QuotaProperties object itself. */ @@ -175,7 +181,7 @@ public QuotaProperties withProperties(Object 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/models/QuotaRequestDetails.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaRequestDetails.java index 53ac6d7c8e257..910e8a9d16ced 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaRequestDetails.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaRequestDetails.java @@ -8,46 +8,48 @@ import java.time.OffsetDateTime; import java.util.List; -/** An immutable client-side representation of QuotaRequestDetails. */ +/** + * An immutable client-side representation of QuotaRequestDetails. + */ public interface QuotaRequestDetails { /** * Gets the id property: Quota request ID. - * + * * @return the id value. */ String id(); /** * Gets the name property: Quota request name. - * + * * @return the name value. */ String name(); /** * Gets the type property: Resource type. "Microsoft.Quota/quotas". - * + * * @return the type value. */ String type(); /** * Gets the provisioningState property: The quota request status. - * + * * @return the provisioningState value. */ QuotaRequestState provisioningState(); /** * Gets the message property: User-friendly status message. - * + * * @return the message value. */ String message(); /** * Gets the error property: Error details of the quota request. - * + * * @return the error value. */ ServiceErrorDetail error(); @@ -55,21 +57,21 @@ public interface QuotaRequestDetails { /** * Gets 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. */ OffsetDateTime requestSubmitTime(); /** * Gets the value property: Quota request details. - * + * * @return the value value. */ List value(); /** * Gets the inner com.azure.resourcemanager.quota.fluent.models.QuotaRequestDetailsInner object. - * + * * @return the inner object. */ QuotaRequestDetailsInner innerModel(); diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaRequestDetailsList.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaRequestDetailsList.java index 6608e48df1e5f..8368d72bf5766 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaRequestDetailsList.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaRequestDetailsList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Quota request information. */ +/** + * Quota request information. + */ @Fluent public final class QuotaRequestDetailsList { /* @@ -24,13 +26,15 @@ public final class QuotaRequestDetailsList { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of QuotaRequestDetailsList class. */ + /** + * Creates an instance of QuotaRequestDetailsList class. + */ public QuotaRequestDetailsList() { } /** * Get the value property: Quota request details. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: Quota request details. - * + * * @param value the value value to set. * @return the QuotaRequestDetailsList object itself. */ @@ -49,9 +53,9 @@ public QuotaRequestDetailsList withValue(List value) { } /** - * Get the nextLink property: The URI for fetching the next page of quota limits. When there are no more pages, this - * string is null. - * + * Get the nextLink property: The URI for fetching the next page of quota limits. When there are no more pages, + * this string is null. + * * @return the nextLink value. */ public String nextLink() { @@ -59,9 +63,9 @@ public String nextLink() { } /** - * Set the nextLink property: The URI for fetching the next page of quota limits. When there are no more pages, this - * string is null. - * + * Set the nextLink property: The URI for fetching the next page of quota limits. When there are no more pages, + * this string is null. + * * @param nextLink the nextLink value to set. * @return the QuotaRequestDetailsList object itself. */ @@ -72,7 +76,7 @@ public QuotaRequestDetailsList withNextLink(String nextLink) { /** * 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/models/QuotaRequestState.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaRequestState.java index f15d85227459e..f32f498799c2c 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaRequestState.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaRequestState.java @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Quota request status. */ +/** + * Quota request status. + */ public final class QuotaRequestState extends ExpandableStringEnum { - /** Static value Accepted for QuotaRequestState. */ + /** + * Static value Accepted for QuotaRequestState. + */ public static final QuotaRequestState ACCEPTED = fromString("Accepted"); - /** Static value Invalid for QuotaRequestState. */ + /** + * Static value Invalid for QuotaRequestState. + */ public static final QuotaRequestState INVALID = fromString("Invalid"); - /** Static value Succeeded for QuotaRequestState. */ + /** + * Static value Succeeded for QuotaRequestState. + */ public static final QuotaRequestState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for QuotaRequestState. */ + /** + * Static value Failed for QuotaRequestState. + */ public static final QuotaRequestState FAILED = fromString("Failed"); - /** Static value InProgress for QuotaRequestState. */ + /** + * Static value InProgress for QuotaRequestState. + */ public static final QuotaRequestState IN_PROGRESS = fromString("InProgress"); /** * Creates a new instance of QuotaRequestState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public QuotaRequestState() { /** * Creates or finds a QuotaRequestState from its string representation. - * + * * @param name a name to look for. * @return the corresponding QuotaRequestState. */ @@ -47,7 +59,7 @@ public static QuotaRequestState fromString(String name) { /** * Gets known QuotaRequestState values. - * + * * @return known QuotaRequestState values. */ public static Collection values() { diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaRequestStatus.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaRequestStatus.java index 03621a5417db4..ee6f2f61f16d1 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaRequestStatus.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaRequestStatus.java @@ -8,51 +8,53 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of QuotaRequestStatus. */ +/** + * Resource collection API of QuotaRequestStatus. + */ public interface QuotaRequestStatus { /** * 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}. */ Response getWithResponse(String id, String scope, Context context); /** * Get the quota request details and status by quota request ID for the resources of the resource provider at a * 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. */ QuotaRequestDetails 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. + * `/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. @@ -63,24 +65,27 @@ public interface QuotaRequestStatus { /** * 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return quota request information as paginated response with {@link PagedIterable}. */ - 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/models/Quotas.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/Quotas.java index 42775b2e8e02b..e27515c439cf2 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/Quotas.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/Quotas.java @@ -8,18 +8,22 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Quotas. */ +/** + * Resource collection API of Quotas. + */ public interface Quotas { /** * 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. @@ -31,13 +35,15 @@ public interface Quotas { /** * 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. @@ -48,40 +54,40 @@ public interface Quotas { /** * 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}. */ 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 com.azure.core.management.exception.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}. */ PagedIterable list(String scope, Context context); /** * Get the quota limit of a resource. The response can be used to determine the remaining quota to calculate a new * quota limit that can be submitted with a PUT request. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -93,7 +99,7 @@ public interface Quotas { /** * 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 id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -105,7 +111,7 @@ public interface Quotas { /** * Begins definition for a new CurrentQuotaLimitBase resource. - * + * * @param name resource name. * @return the first stage of the new CurrentQuotaLimitBase definition. */ diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasGetHeaders.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasGetHeaders.java index 686c1fe796786..5039101e5982f 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasGetHeaders.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasGetHeaders.java @@ -9,7 +9,9 @@ import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; -/** The QuotasGetHeaders model. */ +/** + * The QuotasGetHeaders model. + */ @Fluent public final class QuotasGetHeaders { /* @@ -21,7 +23,7 @@ public final class QuotasGetHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of QuotasGetHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public QuotasGetHeaders(HttpHeaders rawHeaders) { @@ -30,7 +32,7 @@ public QuotasGetHeaders(HttpHeaders rawHeaders) { /** * Get the etag property: The Etag property. - * + * * @return the etag value. */ public String etag() { @@ -39,7 +41,7 @@ public String etag() { /** * Set the etag property: The Etag property. - * + * * @param etag the etag value to set. * @return the QuotasGetHeaders object itself. */ @@ -50,7 +52,7 @@ public QuotasGetHeaders withEtag(String etag) { /** * 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/models/QuotasGetResponse.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasGetResponse.java index 533ce36385961..b571d6be27c99 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasGetResponse.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasGetResponse.java @@ -9,29 +9,27 @@ import com.azure.core.http.rest.ResponseBase; import com.azure.resourcemanager.quota.fluent.models.CurrentQuotaLimitBaseInner; -/** Contains all response data for the get operation. */ +/** + * Contains all response data for the get operation. + */ public final class QuotasGetResponse extends ResponseBase { /** * Creates an instance of QuotasGetResponse. - * + * * @param request the request which resulted in this QuotasGetResponse. * @param statusCode the status code of the HTTP response. * @param rawHeaders the raw headers of the HTTP response. * @param value the deserialized value of the HTTP response. * @param headers the deserialized headers of the HTTP response. */ - public QuotasGetResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - CurrentQuotaLimitBaseInner value, - QuotasGetHeaders headers) { + public QuotasGetResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, + CurrentQuotaLimitBaseInner value, QuotasGetHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } /** * Gets the deserialized response body. - * + * * @return the deserialized response body. */ @Override diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasListHeaders.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasListHeaders.java index 6daba64faef9e..741d3ec679479 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasListHeaders.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasListHeaders.java @@ -9,7 +9,9 @@ import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; -/** The QuotasListHeaders model. */ +/** + * The QuotasListHeaders model. + */ @Fluent public final class QuotasListHeaders { /* @@ -21,7 +23,7 @@ public final class QuotasListHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of QuotasListHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public QuotasListHeaders(HttpHeaders rawHeaders) { @@ -30,7 +32,7 @@ public QuotasListHeaders(HttpHeaders rawHeaders) { /** * Get the etag property: The Etag property. - * + * * @return the etag value. */ public String etag() { @@ -39,7 +41,7 @@ public String etag() { /** * Set the etag property: The Etag property. - * + * * @param etag the etag value to set. * @return the QuotasListHeaders object itself. */ @@ -50,7 +52,7 @@ public QuotasListHeaders withEtag(String etag) { /** * 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/models/QuotasListNextHeaders.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasListNextHeaders.java index 40af89d8edd4d..4e0d573ac9a53 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasListNextHeaders.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasListNextHeaders.java @@ -9,7 +9,9 @@ import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; -/** The QuotasListNextHeaders model. */ +/** + * The QuotasListNextHeaders model. + */ @Fluent public final class QuotasListNextHeaders { /* @@ -21,7 +23,7 @@ public final class QuotasListNextHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of QuotasListNextHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public QuotasListNextHeaders(HttpHeaders rawHeaders) { @@ -30,7 +32,7 @@ public QuotasListNextHeaders(HttpHeaders rawHeaders) { /** * Get the etag property: The Etag property. - * + * * @return the etag value. */ public String etag() { @@ -39,7 +41,7 @@ public String etag() { /** * Set the etag property: The Etag property. - * + * * @param etag the etag value to set. * @return the QuotasListNextHeaders object itself. */ @@ -50,7 +52,7 @@ public QuotasListNextHeaders withEtag(String etag) { /** * 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/models/QuotasListNextResponse.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasListNextResponse.java index 66839c7231152..5940503ae0352 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasListNextResponse.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasListNextResponse.java @@ -8,25 +8,27 @@ import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; -/** Contains all response data for the listNext operation. */ +/** + * Contains all response data for the listNext operation. + */ public final class QuotasListNextResponse extends ResponseBase { /** * Creates an instance of QuotasListNextResponse. - * + * * @param request the request which resulted in this QuotasListNextResponse. * @param statusCode the status code of the HTTP response. * @param rawHeaders the raw headers of the HTTP response. * @param value the deserialized value of the HTTP response. * @param headers the deserialized headers of the HTTP response. */ - public QuotasListNextResponse( - HttpRequest request, int statusCode, HttpHeaders rawHeaders, QuotaLimits value, QuotasListNextHeaders headers) { + public QuotasListNextResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, QuotaLimits value, + QuotasListNextHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } /** * Gets the deserialized response body. - * + * * @return the deserialized response body. */ @Override diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasListResponse.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasListResponse.java index 0ba71d9a11bbc..d78ee42e5a770 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasListResponse.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotasListResponse.java @@ -8,25 +8,27 @@ import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; -/** Contains all response data for the list operation. */ +/** + * Contains all response data for the list operation. + */ public final class QuotasListResponse extends ResponseBase { /** * Creates an instance of QuotasListResponse. - * + * * @param request the request which resulted in this QuotasListResponse. * @param statusCode the status code of the HTTP response. * @param rawHeaders the raw headers of the HTTP response. * @param value the deserialized value of the HTTP response. * @param headers the deserialized headers of the HTTP response. */ - public QuotasListResponse( - HttpRequest request, int statusCode, HttpHeaders rawHeaders, QuotaLimits value, QuotasListHeaders headers) { + public QuotasListResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, QuotaLimits value, + QuotasListHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } /** * Gets the deserialized response body. - * + * * @return the deserialized response body. */ @Override diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/ResourceName.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/ResourceName.java index eab57c4daa232..16deb65e0fbe6 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/ResourceName.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/ResourceName.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Name of the resource provided by the resource Provider. When requesting quota, use this property name. */ +/** + * Name of the resource provided by the resource Provider. When requesting quota, use this property name. + */ @Fluent public final class ResourceName { /* @@ -22,13 +24,15 @@ public final class ResourceName { @JsonProperty(value = "localizedValue", access = JsonProperty.Access.WRITE_ONLY) private String localizedValue; - /** Creates an instance of ResourceName class. */ + /** + * Creates an instance of ResourceName class. + */ public ResourceName() { } /** * Get the value property: Resource name. - * + * * @return the value value. */ public String value() { @@ -37,7 +41,7 @@ public String value() { /** * Set the value property: Resource name. - * + * * @param value the value value to set. * @return the ResourceName object itself. */ @@ -48,7 +52,7 @@ public ResourceName withValue(String value) { /** * Get the localizedValue property: Resource display name. - * + * * @return the localizedValue value. */ public String localizedValue() { @@ -57,7 +61,7 @@ public String localizedValue() { /** * 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/models/ServiceErrorDetail.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/ServiceErrorDetail.java index 0ea3c62b7983e..144ff8521231f 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/ServiceErrorDetail.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/ServiceErrorDetail.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Error details. */ +/** + * Error details. + */ @Immutable public final class ServiceErrorDetail { /* @@ -22,13 +24,15 @@ public final class ServiceErrorDetail { @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) private String message; - /** Creates an instance of ServiceErrorDetail class. */ + /** + * Creates an instance of ServiceErrorDetail class. + */ public ServiceErrorDetail() { } /** * Get the code property: Error code. - * + * * @return the code value. */ public String code() { @@ -37,7 +41,7 @@ public String code() { /** * Get the message property: Error message. - * + * * @return the message value. */ public String message() { @@ -46,7 +50,7 @@ public String message() { /** * 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/models/SubRequest.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/SubRequest.java index d6a0e1dee6f48..39a371584bd95 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/SubRequest.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/SubRequest.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Request property. */ +/** + * Request property. + */ @Fluent public final class SubRequest { /* @@ -53,13 +55,15 @@ public final class SubRequest { @JsonProperty(value = "limit") private LimitJsonObject limit; - /** Creates an instance of SubRequest class. */ + /** + * Creates an instance of SubRequest class. + */ public SubRequest() { } /** * Get the name property: Resource name. - * + * * @return the name value. */ public ResourceName name() { @@ -68,7 +72,7 @@ public ResourceName name() { /** * Set the name property: Resource name. - * + * * @param name the name value to set. * @return the SubRequest object itself. */ @@ -79,7 +83,7 @@ public SubRequest withName(ResourceName name) { /** * Get the resourceType property: Resource type for which the quota properties were requested. - * + * * @return the resourceType value. */ public String resourceType() { @@ -87,9 +91,9 @@ public String resourceType() { } /** - * Get the unit property: Quota limit units, such as Count and Bytes. When requesting quota, use the **unit** value - * returned in the GET response in the request body of your PUT operation. - * + * Get the unit property: Quota limit units, such as Count and Bytes. When requesting quota, use the **unit** + * value returned in the GET response in the request body of your PUT operation. + * * @return the unit value. */ public String unit() { @@ -97,9 +101,9 @@ public String unit() { } /** - * Set the unit property: Quota limit units, such as Count and Bytes. When requesting quota, use the **unit** value - * returned in the GET response in the request body of your PUT operation. - * + * Set the unit property: Quota limit units, such as Count and Bytes. When requesting quota, use the **unit** + * value returned in the GET response in the request body of your PUT operation. + * * @param unit the unit value to set. * @return the SubRequest object itself. */ @@ -110,7 +114,7 @@ public SubRequest withUnit(String unit) { /** * Get the provisioningState property: The quota request status. - * + * * @return the provisioningState value. */ public QuotaRequestState provisioningState() { @@ -119,7 +123,7 @@ public QuotaRequestState provisioningState() { /** * Get the message property: User-friendly status message. - * + * * @return the message value. */ public String message() { @@ -128,7 +132,7 @@ public String message() { /** * Get the subRequestId property: Quota request ID. - * + * * @return the subRequestId value. */ public String subRequestId() { @@ -137,7 +141,7 @@ public String subRequestId() { /** * Get the limit property: Resource quota limit properties. - * + * * @return the limit value. */ public LimitJsonObject limit() { @@ -146,7 +150,7 @@ public LimitJsonObject limit() { /** * Set the limit property: Resource quota limit properties. - * + * * @param limit the limit value to set. * @return the SubRequest object itself. */ @@ -157,7 +161,7 @@ public SubRequest withLimit(LimitJsonObject limit) { /** * 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/models/Usages.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/Usages.java index f3cccdfa05466..a4dd90204fce6 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/Usages.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/Usages.java @@ -8,17 +8,21 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Usages. */ +/** + * Resource collection API of Usages. + */ public interface Usages { /** * 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. @@ -29,13 +33,15 @@ public interface Usages { /** * 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. @@ -45,32 +51,32 @@ public interface Usages { /** * 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}. */ 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}. */ PagedIterable list(String scope, Context context); } diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesGetHeaders.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesGetHeaders.java index ec84eff8f0d21..930f750f7e507 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesGetHeaders.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesGetHeaders.java @@ -9,7 +9,9 @@ import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; -/** The UsagesGetHeaders model. */ +/** + * The UsagesGetHeaders model. + */ @Fluent public final class UsagesGetHeaders { /* @@ -21,7 +23,7 @@ public final class UsagesGetHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of UsagesGetHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public UsagesGetHeaders(HttpHeaders rawHeaders) { @@ -30,7 +32,7 @@ public UsagesGetHeaders(HttpHeaders rawHeaders) { /** * Get the etag property: The Etag property. - * + * * @return the etag value. */ public String etag() { @@ -39,7 +41,7 @@ public String etag() { /** * Set the etag property: The Etag property. - * + * * @param etag the etag value to set. * @return the UsagesGetHeaders object itself. */ @@ -50,7 +52,7 @@ public UsagesGetHeaders withEtag(String etag) { /** * 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/models/UsagesGetResponse.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesGetResponse.java index d6b4d582ce6d9..750f1302777f7 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesGetResponse.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesGetResponse.java @@ -9,29 +9,27 @@ import com.azure.core.http.rest.ResponseBase; import com.azure.resourcemanager.quota.fluent.models.CurrentUsagesBaseInner; -/** Contains all response data for the get operation. */ +/** + * Contains all response data for the get operation. + */ public final class UsagesGetResponse extends ResponseBase { /** * Creates an instance of UsagesGetResponse. - * + * * @param request the request which resulted in this UsagesGetResponse. * @param statusCode the status code of the HTTP response. * @param rawHeaders the raw headers of the HTTP response. * @param value the deserialized value of the HTTP response. * @param headers the deserialized headers of the HTTP response. */ - public UsagesGetResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - CurrentUsagesBaseInner value, + public UsagesGetResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, CurrentUsagesBaseInner value, UsagesGetHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } /** * Gets the deserialized response body. - * + * * @return the deserialized response body. */ @Override diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesLimits.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesLimits.java index 312f417b6a774..426ab30357de8 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesLimits.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesLimits.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Quota limits. */ +/** + * Quota limits. + */ @Fluent public final class UsagesLimits { /* @@ -24,13 +26,15 @@ public final class UsagesLimits { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of UsagesLimits class. */ + /** + * Creates an instance of UsagesLimits class. + */ public UsagesLimits() { } /** * Get the value property: List of quota limits. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: List of quota limits. - * + * * @param value the value value to set. * @return the UsagesLimits object itself. */ @@ -51,7 +55,7 @@ public UsagesLimits withValue(List value) { /** * Get the nextLink property: The URI used to fetch the next page of quota limits. When there are no more pages, * this is null. - * + * * @return the nextLink value. */ public String nextLink() { @@ -61,7 +65,7 @@ public String nextLink() { /** * Set the nextLink property: The URI used to fetch the next page of quota limits. When there are no more pages, * this is null. - * + * * @param nextLink the nextLink value to set. * @return the UsagesLimits object itself. */ @@ -72,7 +76,7 @@ public UsagesLimits withNextLink(String nextLink) { /** * 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/models/UsagesListHeaders.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesListHeaders.java index 9c501ccdc52b5..b9cf9f08c47af 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesListHeaders.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesListHeaders.java @@ -9,7 +9,9 @@ import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; -/** The UsagesListHeaders model. */ +/** + * The UsagesListHeaders model. + */ @Fluent public final class UsagesListHeaders { /* @@ -21,7 +23,7 @@ public final class UsagesListHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of UsagesListHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public UsagesListHeaders(HttpHeaders rawHeaders) { @@ -30,7 +32,7 @@ public UsagesListHeaders(HttpHeaders rawHeaders) { /** * Get the etag property: The Etag property. - * + * * @return the etag value. */ public String etag() { @@ -39,7 +41,7 @@ public String etag() { /** * Set the etag property: The Etag property. - * + * * @param etag the etag value to set. * @return the UsagesListHeaders object itself. */ @@ -50,7 +52,7 @@ public UsagesListHeaders withEtag(String etag) { /** * 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/models/UsagesListNextHeaders.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesListNextHeaders.java index feb6842317d55..3453f697ebd18 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesListNextHeaders.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesListNextHeaders.java @@ -9,7 +9,9 @@ import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; -/** The UsagesListNextHeaders model. */ +/** + * The UsagesListNextHeaders model. + */ @Fluent public final class UsagesListNextHeaders { /* @@ -21,7 +23,7 @@ public final class UsagesListNextHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of UsagesListNextHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public UsagesListNextHeaders(HttpHeaders rawHeaders) { @@ -30,7 +32,7 @@ public UsagesListNextHeaders(HttpHeaders rawHeaders) { /** * Get the etag property: The Etag property. - * + * * @return the etag value. */ public String etag() { @@ -39,7 +41,7 @@ public String etag() { /** * Set the etag property: The Etag property. - * + * * @param etag the etag value to set. * @return the UsagesListNextHeaders object itself. */ @@ -50,7 +52,7 @@ public UsagesListNextHeaders withEtag(String etag) { /** * 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/models/UsagesListNextResponse.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesListNextResponse.java index 5162c2b31f2bd..3f2e78338b161 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesListNextResponse.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesListNextResponse.java @@ -8,29 +8,27 @@ import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; -/** Contains all response data for the listNext operation. */ +/** + * Contains all response data for the listNext operation. + */ public final class UsagesListNextResponse extends ResponseBase { /** * Creates an instance of UsagesListNextResponse. - * + * * @param request the request which resulted in this UsagesListNextResponse. * @param statusCode the status code of the HTTP response. * @param rawHeaders the raw headers of the HTTP response. * @param value the deserialized value of the HTTP response. * @param headers the deserialized headers of the HTTP response. */ - public UsagesListNextResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - UsagesLimits value, + public UsagesListNextResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, UsagesLimits value, UsagesListNextHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } /** * Gets the deserialized response body. - * + * * @return the deserialized response body. */ @Override diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesListResponse.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesListResponse.java index 190d813862047..410b83d1a074e 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesListResponse.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesListResponse.java @@ -8,25 +8,27 @@ import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; -/** Contains all response data for the list operation. */ +/** + * Contains all response data for the list operation. + */ public final class UsagesListResponse extends ResponseBase { /** * Creates an instance of UsagesListResponse. - * + * * @param request the request which resulted in this UsagesListResponse. * @param statusCode the status code of the HTTP response. * @param rawHeaders the raw headers of the HTTP response. * @param value the deserialized value of the HTTP response. * @param headers the deserialized headers of the HTTP response. */ - public UsagesListResponse( - HttpRequest request, int statusCode, HttpHeaders rawHeaders, UsagesLimits value, UsagesListHeaders headers) { + public UsagesListResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, UsagesLimits value, + UsagesListHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } /** * Gets the deserialized response body. - * + * * @return the deserialized response body. */ @Override diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesObject.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesObject.java index 78406bb9f8541..443ce4461d4fa 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesObject.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesObject.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The resource usages value. */ +/** + * The resource usages value. + */ @Fluent public final class UsagesObject { /* @@ -22,13 +24,15 @@ public final class UsagesObject { @JsonProperty(value = "usagesType") private UsagesTypes usagesType; - /** Creates an instance of UsagesObject class. */ + /** + * Creates an instance of UsagesObject class. + */ public UsagesObject() { } /** * Get the value property: The usages value. - * + * * @return the value value. */ public int value() { @@ -37,7 +41,7 @@ public int value() { /** * Set the value property: The usages value. - * + * * @param value the value value to set. * @return the UsagesObject object itself. */ @@ -48,7 +52,7 @@ public UsagesObject withValue(int value) { /** * Get the usagesType property: The quota or usages limit types. - * + * * @return the usagesType value. */ public UsagesTypes usagesType() { @@ -57,7 +61,7 @@ public UsagesTypes usagesType() { /** * Set the usagesType property: The quota or usages limit types. - * + * * @param usagesType the usagesType value to set. * @return the UsagesObject object itself. */ @@ -68,7 +72,7 @@ public UsagesObject withUsagesType(UsagesTypes usagesType) { /** * 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/models/UsagesProperties.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesProperties.java index f0367cfc94276..2161576e46c2b 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesProperties.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Usage properties for the specified resource. */ +/** + * Usage properties for the specified resource. + */ @Fluent public final class UsagesProperties { /* @@ -57,13 +59,15 @@ public final class UsagesProperties { @JsonProperty(value = "properties") private Object properties; - /** Creates an instance of UsagesProperties class. */ + /** + * Creates an instance of UsagesProperties class. + */ public UsagesProperties() { } /** * Get the usages property: The quota limit properties for this resource. - * + * * @return the usages value. */ public UsagesObject usages() { @@ -72,7 +76,7 @@ public UsagesObject usages() { /** * Set the usages property: The quota limit properties for this resource. - * + * * @param usages the usages value to set. * @return the UsagesProperties object itself. */ @@ -84,7 +88,7 @@ public UsagesProperties withUsages(UsagesObject usages) { /** * Get the unit property: The units for the quota usage, such as Count and Bytes. When requesting quota, use the * **unit** value returned in the GET response in the request body of your PUT operation. - * + * * @return the unit value. */ public String unit() { @@ -94,7 +98,7 @@ public String unit() { /** * Get the name property: Resource name provided by the resource provider. Use this property name when requesting * quota. - * + * * @return the name value. */ public ResourceName name() { @@ -104,7 +108,7 @@ public ResourceName name() { /** * Set the name property: Resource name provided by the resource provider. Use this property name when requesting * quota. - * + * * @param name the name value to set. * @return the UsagesProperties object itself. */ @@ -115,7 +119,7 @@ public UsagesProperties withName(ResourceName name) { /** * Get the resourceType property: The name of the resource type. Optional field. - * + * * @return the resourceType value. */ public String resourceType() { @@ -124,7 +128,7 @@ public String resourceType() { /** * Set the resourceType property: The name of the resource type. Optional field. - * + * * @param resourceType the resourceType value to set. * @return the UsagesProperties object itself. */ @@ -134,10 +138,12 @@ public UsagesProperties withResourceType(String resourceType) { } /** - * Get the quotaPeriod property: The time period for the summary of the quota usage values. For example: *P1D (per - * one day) *PT1M (per one minute) *PT1S (per one second). This parameter is optional because it is not relevant for - * all resources such as compute. - * + * Get the quotaPeriod property: The time period for the summary of the quota usage values. For example: + * *P1D (per one day) + * *PT1M (per one minute) + * *PT1S (per one second). + * This parameter is optional because it is not relevant for all resources such as compute. + * * @return the quotaPeriod value. */ public String quotaPeriod() { @@ -146,7 +152,7 @@ public String quotaPeriod() { /** * Get the isQuotaApplicable property: States if quota can be requested for this resource. - * + * * @return the isQuotaApplicable value. */ public Boolean isQuotaApplicable() { @@ -155,7 +161,7 @@ public Boolean isQuotaApplicable() { /** * Get the properties property: Additional properties for the specific resource provider. - * + * * @return the properties value. */ public Object properties() { @@ -164,7 +170,7 @@ public Object properties() { /** * Set the properties property: Additional properties for the specific resource provider. - * + * * @param properties the properties value to set. * @return the UsagesProperties object itself. */ @@ -175,7 +181,7 @@ public UsagesProperties withProperties(Object 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/models/UsagesTypes.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesTypes.java index 99ba12a5d9612..5fad324175e14 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesTypes.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/UsagesTypes.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The quota or usages limit types. */ +/** + * The quota or usages limit types. + */ public final class UsagesTypes extends ExpandableStringEnum { - /** Static value Individual for UsagesTypes. */ + /** + * Static value Individual for UsagesTypes. + */ public static final UsagesTypes INDIVIDUAL = fromString("Individual"); - /** Static value Combined for UsagesTypes. */ + /** + * Static value Combined for UsagesTypes. + */ public static final UsagesTypes COMBINED = fromString("Combined"); /** * Creates a new instance of UsagesTypes value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public UsagesTypes() { /** * Creates or finds a UsagesTypes from its string representation. - * + * * @param name a name to look for. * @return the corresponding UsagesTypes. */ @@ -38,7 +44,7 @@ public static UsagesTypes fromString(String name) { /** * Gets known UsagesTypes values. - * + * * @return known UsagesTypes values. */ public static Collection values() { diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/package-info.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/package-info.java index 2bc29ac9d800f..4a00e7a09ee14 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/package-info.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the data models for AzureQuotaExtensionApi. Microsoft Azure Quota Resource Provider. */ +/** + * Package containing the data models for AzureQuotaExtensionApi. + * Microsoft Azure Quota Resource Provider. + */ package com.azure.resourcemanager.quota.models; diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/package-info.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/package-info.java index 8fa6b5e13b6cf..c90046d8b9351 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/package-info.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the classes for AzureQuotaExtensionApi. Microsoft Azure Quota Resource Provider. */ +/** + * Package containing the classes for AzureQuotaExtensionApi. + * Microsoft Azure Quota Resource Provider. + */ package com.azure.resourcemanager.quota; diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/module-info.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/module-info.java index 9a6fbebe2e286..5201b78d731c3 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/main/java/module-info.java +++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/module-info.java @@ -10,10 +10,6 @@ exports com.azure.resourcemanager.quota.fluent.models; exports com.azure.resourcemanager.quota.models; - opens com.azure.resourcemanager.quota.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.quota.models to - com.azure.core, - com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.quota.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.quota.models to com.azure.core, com.fasterxml.jackson.databind; } diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-quota/proxy-config.json b/sdk/quota/azure-resourcemanager-quota/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-quota/proxy-config.json new file mode 100644 index 0000000000000..9695f5b9fae1b --- /dev/null +++ b/sdk/quota/azure-resourcemanager-quota/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-quota/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.quota.implementation.UsagesClientImpl$UsagesService" ], [ "com.azure.resourcemanager.quota.implementation.QuotasClientImpl$QuotasService" ], [ "com.azure.resourcemanager.quota.implementation.QuotaRequestStatusClientImpl$QuotaRequestStatusService" ], [ "com.azure.resourcemanager.quota.implementation.QuotaOperationsClientImpl$QuotaOperationsService" ] ] \ No newline at end of file diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-quota/reflect-config.json b/sdk/quota/azure-resourcemanager-quota/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-quota/reflect-config.json new file mode 100644 index 0000000000000..8e4ca0a73ef49 --- /dev/null +++ b/sdk/quota/azure-resourcemanager-quota/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-quota/reflect-config.json @@ -0,0 +1,141 @@ +[ { + "name" : "com.azure.resourcemanager.quota.fluent.models.CurrentUsagesBaseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.UsagesProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.UsagesObject", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.ResourceName", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.ServiceErrorDetail", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.UsagesLimits", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.fluent.models.CurrentQuotaLimitBaseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.QuotaProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.LimitJsonObject", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.QuotaLimits", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.fluent.models.QuotaRequestDetailsInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.fluent.models.QuotaRequestProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.SubRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.QuotaRequestDetailsList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.OperationList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.fluent.models.OperationResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.OperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.LimitObject", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.UsagesGetHeaders", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.UsagesListHeaders", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.UsagesListNextHeaders", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.QuotasGetHeaders", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.QuotasListHeaders", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.QuotasListNextHeaders", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.UsagesTypes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.LimitType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.QuotaRequestState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quota.models.QuotaLimitTypes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file diff --git a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaCreateOrUpdateSamples.java b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaCreateOrUpdateSamples.java index e18805cd65c18..90e936d64ff5d 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaCreateOrUpdateSamples.java +++ b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaCreateOrUpdateSamples.java @@ -8,94 +8,82 @@ 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 + * 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")) + 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(); } /* - * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/putNetworkOneSkuQuotaRequestStandardSkuPublicIpAddresses.json + * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/ + * putNetworkOneSkuQuotaRequestStandardSkuPublicIpAddresses.json */ /** * Sample code: Quotas_PutRequest_ForNetwork_StandardSkuPublicIpAddressesResource. - * + * * @param manager Entry point to QuotaManager. */ public static void quotasPutRequestForNetworkStandardSkuPublicIpAddressesResource( com.azure.resourcemanager.quota.QuotaManager manager) { - manager - .quotas() - .define("StandardSkuPublicIpAddresses") + 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")) + .withProperties(new QuotaProperties().withLimit(new LimitObject().withValue(10)) + .withName(new ResourceName().withValue("StandardSkuPublicIpAddresses")) + .withResourceType("PublicIpAddresses")) .create(); } /* - * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/putComputeOneSkuQuotaRequest.json + * x-ms-original-file: + * specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/putComputeOneSkuQuotaRequest.json */ /** * Sample code: Quotas_Put_Request_ForCompute. - * + * * @param manager Entry point to QuotaManager. */ public static void quotasPutRequestForCompute(com.azure.resourcemanager.quota.QuotaManager manager) { - manager - .quotas() - .define("standardFSv2Family") + 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"))) + .withProperties(new QuotaProperties().withLimit(new LimitObject().withValue(10)) + .withName(new ResourceName().withValue("standardFSv2Family"))) .create(); } /* - * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/putNetworkOneSkuQuotaRequest.json + * x-ms-original-file: + * specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/putNetworkOneSkuQuotaRequest.json */ /** * Sample code: Quotas_PutRequest_ForNetwork. - * + * * @param manager Entry point to QuotaManager. */ public static void quotasPutRequestForNetwork(com.azure.resourcemanager.quota.QuotaManager manager) { - manager - .quotas() - .define("MinPublicIpInterNetworkPrefixLength") + 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")) + .withProperties(new QuotaProperties().withLimit(new LimitObject().withValue(10)) + .withName(new ResourceName().withValue("MinPublicIpInterNetworkPrefixLength")) + .withResourceType("MinPublicIpInterNetworkPrefixLength")) .create(); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaGetSamples.java b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaGetSamples.java index 627ad493dc3d3..bbda82c84bd1f 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaGetSamples.java +++ b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaGetSamples.java @@ -4,39 +4,37 @@ package com.azure.resourcemanager.quota.generated; -/** 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 + * 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); } /* - * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getComputeOneSkuQuotaLimit.json + * x-ms-original-file: + * specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getComputeOneSkuQuotaLimit.json */ /** * Sample code: Quotas_Get_Request_ForCompute. - * + * * @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); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaListSamples.java b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaListSamples.java index 0a646aece7ead..969e5efb85308 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaListSamples.java +++ b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaListSamples.java @@ -4,54 +4,53 @@ package com.azure.resourcemanager.quota.generated; -/** 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 + * 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); } /* - * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getComputeQuotaLimits.json + * x-ms-original-file: + * specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getComputeQuotaLimits.json */ /** * 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); } /* - * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getNetworkQuotaLimits.json + * x-ms-original-file: + * specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getNetworkQuotaLimits.json */ /** * 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); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaOperationListSamples.java b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaOperationListSamples.java index 1630ad36bf2b3..210435f977bec 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaOperationListSamples.java +++ b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaOperationListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.quota.generated; -/** 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 + * 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) { diff --git a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaRequestStatusGetSamples.java b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaRequestStatusGetSamples.java index 7fc11788ea737..df88f29d871f4 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaRequestStatusGetSamples.java +++ b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaRequestStatusGetSamples.java @@ -4,56 +4,53 @@ package com.azure.resourcemanager.quota.generated; -/** 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 + * 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); } /* - * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getQuotaRequestStatusById.json + * x-ms-original-file: + * specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getQuotaRequestStatusById.json */ /** * 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); } /* - * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getQuotaRequestStatusInProgress.json + * x-ms-original-file: + * specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getQuotaRequestStatusInProgress. + * json */ /** * 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); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaRequestStatusListSamples.java b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaRequestStatusListSamples.java index 2f261208798a6..6538b50ce3f0d 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaRequestStatusListSamples.java +++ b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaRequestStatusListSamples.java @@ -4,24 +4,22 @@ package com.azure.resourcemanager.quota.generated; -/** 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 + * 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); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaUpdateSamples.java b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaUpdateSamples.java index afe10f191cbd0..92afd1c0abbc8 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaUpdateSamples.java +++ b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaUpdateSamples.java @@ -9,58 +9,49 @@ 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 + * 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(); } /* - * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/patchNetworkOneSkuQuotaRequest.json + * x-ms-original-file: + * specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/patchNetworkOneSkuQuotaRequest. + * json */ /** * Sample code: Quotas_Request_PatchForNetwork. - * + * * @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")) + 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(); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/UsagesGetSamples.java b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/UsagesGetSamples.java index 42717c031cbba..f95882893f48a 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/UsagesGetSamples.java +++ b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/UsagesGetSamples.java @@ -4,39 +4,37 @@ package com.azure.resourcemanager.quota.generated; -/** 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 + * 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); } /* - * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getComputeOneSkuUsages.json + * x-ms-original-file: + * specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getComputeOneSkuUsages.json */ /** * Sample code: Quotas_UsagesRequest_ForCompute. - * + * * @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); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/UsagesListSamples.java b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/UsagesListSamples.java index 3ca44557cc750..837cb2e29637f 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/UsagesListSamples.java +++ b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/UsagesListSamples.java @@ -4,53 +4,53 @@ package com.azure.resourcemanager.quota.generated; -/** 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 + * 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); } /* - * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getNetworkUsages.json + * x-ms-original-file: + * specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getNetworkUsages.json */ /** * 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); } /* - * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getMachineLearningServicesUsages.json + * x-ms-original-file: + * specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/examples/getMachineLearningServicesUsages. + * json */ /** * 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/src/test/java/com/azure/resourcemanager/quota/generated/CurrentQuotaLimitBaseInnerTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/CurrentQuotaLimitBaseInnerTests.java index cc7ae7b268b40..7b87afbf4292f 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/CurrentQuotaLimitBaseInnerTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/CurrentQuotaLimitBaseInnerTests.java @@ -14,27 +14,20 @@ public final class CurrentQuotaLimitBaseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CurrentQuotaLimitBaseInner model = - BinaryData - .fromString( - "{\"properties\":{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"ithxqhabifpi\",\"name\":{\"value\":\"czbysc\",\"localizedValue\":\"q\"},\"resourceType\":\"hiv\",\"quotaPeriod\":\"n\",\"isQuotaApplicable\":false,\"properties\":\"databr\"},\"id\":\"xvd\",\"name\":\"mjgr\",\"type\":\"fwvuk\"}") - .toObject(CurrentQuotaLimitBaseInner.class); - Assertions.assertEquals("czbysc", model.properties().name().value()); - Assertions.assertEquals("hiv", model.properties().resourceType()); + CurrentQuotaLimitBaseInner model = BinaryData.fromString( + "{\"properties\":{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"mjgr\",\"name\":{\"value\":\"vukxgau\",\"localizedValue\":\"cs\"},\"resourceType\":\"s\",\"quotaPeriod\":\"nyejhkryhtnap\",\"isQuotaApplicable\":false,\"properties\":\"dataokjye\"},\"id\":\"kkvnipjox\",\"name\":\"jnchgej\",\"type\":\"podmailzydehojwy\"}") + .toObject(CurrentQuotaLimitBaseInner.class); + Assertions.assertEquals("vukxgau", model.properties().name().value()); + Assertions.assertEquals("s", model.properties().resourceType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CurrentQuotaLimitBaseInner model = - new CurrentQuotaLimitBaseInner() - .withProperties( - new QuotaProperties() - .withLimit(new LimitJsonObject()) - .withName(new ResourceName().withValue("czbysc")) - .withResourceType("hiv") - .withProperties("databr")); + CurrentQuotaLimitBaseInner model + = new CurrentQuotaLimitBaseInner().withProperties(new QuotaProperties().withLimit(new LimitJsonObject()) + .withName(new ResourceName().withValue("vukxgau")).withResourceType("s").withProperties("dataokjye")); model = BinaryData.fromObject(model).toObject(CurrentQuotaLimitBaseInner.class); - Assertions.assertEquals("czbysc", model.properties().name().value()); - Assertions.assertEquals("hiv", model.properties().resourceType()); + Assertions.assertEquals("vukxgau", model.properties().name().value()); + Assertions.assertEquals("s", model.properties().resourceType()); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/CurrentUsagesBaseInnerTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/CurrentUsagesBaseInnerTests.java index df613a1a43f62..134ea96eacc66 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/CurrentUsagesBaseInnerTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/CurrentUsagesBaseInnerTests.java @@ -15,11 +15,9 @@ public final class CurrentUsagesBaseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CurrentUsagesBaseInner model = - BinaryData - .fromString( - "{\"properties\":{\"usages\":{\"value\":304908421,\"usagesType\":\"Individual\"},\"unit\":\"gjxpybczmehmt\",\"name\":{\"value\":\"bsphrupidgsybbe\",\"localizedValue\":\"ph\"},\"resourceType\":\"cmsxaobhdxbm\",\"quotaPeriod\":\"ioq\",\"isQuotaApplicable\":false,\"properties\":\"datatbmufpo\"},\"id\":\"noi\",\"name\":\"hwlrx\",\"type\":\"bqsoqijg\"}") - .toObject(CurrentUsagesBaseInner.class); + CurrentUsagesBaseInner model = BinaryData.fromString( + "{\"properties\":{\"usages\":{\"value\":304908421,\"usagesType\":\"Individual\"},\"unit\":\"gjxpybczmehmt\",\"name\":{\"value\":\"bsphrupidgsybbe\",\"localizedValue\":\"ph\"},\"resourceType\":\"cmsxaobhdxbm\",\"quotaPeriod\":\"ioq\",\"isQuotaApplicable\":false,\"properties\":\"datatbmufpo\"},\"id\":\"noi\",\"name\":\"hwlrx\",\"type\":\"bqsoqijg\"}") + .toObject(CurrentUsagesBaseInner.class); Assertions.assertEquals(304908421, model.properties().usages().value()); Assertions.assertEquals(UsagesTypes.INDIVIDUAL, model.properties().usages().usagesType()); Assertions.assertEquals("bsphrupidgsybbe", model.properties().name().value()); @@ -28,14 +26,10 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CurrentUsagesBaseInner model = - new CurrentUsagesBaseInner() - .withProperties( - new UsagesProperties() - .withUsages(new UsagesObject().withValue(304908421).withUsagesType(UsagesTypes.INDIVIDUAL)) - .withName(new ResourceName().withValue("bsphrupidgsybbe")) - .withResourceType("cmsxaobhdxbm") - .withProperties("datatbmufpo")); + CurrentUsagesBaseInner model = new CurrentUsagesBaseInner().withProperties(new UsagesProperties() + .withUsages(new UsagesObject().withValue(304908421).withUsagesType(UsagesTypes.INDIVIDUAL)) + .withName(new ResourceName().withValue("bsphrupidgsybbe")).withResourceType("cmsxaobhdxbm") + .withProperties("datatbmufpo")); model = BinaryData.fromObject(model).toObject(CurrentUsagesBaseInner.class); Assertions.assertEquals(304908421, model.properties().usages().value()); Assertions.assertEquals(UsagesTypes.INDIVIDUAL, model.properties().usages().usagesType()); diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LimitJsonObjectTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LimitJsonObjectTests.java index 7a2e83d1c2037..ccb672b721957 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LimitJsonObjectTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LimitJsonObjectTests.java @@ -10,8 +10,8 @@ public final class LimitJsonObjectTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LimitJsonObject model = - BinaryData.fromString("{\"limitObjectType\":\"LimitJsonObject\"}").toObject(LimitJsonObject.class); + LimitJsonObject model + = BinaryData.fromString("{\"limitObjectType\":\"LimitJsonObject\"}").toObject(LimitJsonObject.class); } @org.junit.jupiter.api.Test diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LimitObjectTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LimitObjectTests.java index e20a3bbbf99f7..b2cb66e7664ac 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LimitObjectTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LimitObjectTests.java @@ -12,19 +12,18 @@ public final class LimitObjectTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LimitObject model = - BinaryData - .fromString("{\"limitObjectType\":\"LimitValue\",\"value\":284238049,\"limitType\":\"Independent\"}") + LimitObject model + = BinaryData.fromString("{\"limitObjectType\":\"LimitValue\",\"value\":658406237,\"limitType\":\"Shared\"}") .toObject(LimitObject.class); - Assertions.assertEquals(284238049, model.value()); - Assertions.assertEquals(QuotaLimitTypes.INDEPENDENT, model.limitType()); + Assertions.assertEquals(658406237, model.value()); + Assertions.assertEquals(QuotaLimitTypes.SHARED, model.limitType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LimitObject model = new LimitObject().withValue(284238049).withLimitType(QuotaLimitTypes.INDEPENDENT); + LimitObject model = new LimitObject().withValue(658406237).withLimitType(QuotaLimitTypes.SHARED); model = BinaryData.fromObject(model).toObject(LimitObject.class); - Assertions.assertEquals(284238049, model.value()); - Assertions.assertEquals(QuotaLimitTypes.INDEPENDENT, model.limitType()); + Assertions.assertEquals(658406237, model.value()); + Assertions.assertEquals(QuotaLimitTypes.SHARED, model.limitType()); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationDisplayTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationDisplayTests.java index a0c9c06cc7fac..8e7bf6b1d9230 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationDisplayTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationDisplayTests.java @@ -11,29 +11,23 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"g\",\"resource\":\"tnwu\",\"operation\":\"gazxuf\",\"description\":\"uckyf\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("g", model.provider()); - Assertions.assertEquals("tnwu", model.resource()); - Assertions.assertEquals("gazxuf", model.operation()); - Assertions.assertEquals("uckyf", model.description()); + OperationDisplay model = BinaryData.fromString( + "{\"provider\":\"zjaoyfhrtxil\",\"resource\":\"rkujy\",\"operation\":\"l\",\"description\":\"uvfqawrlyxwj\"}") + .toObject(OperationDisplay.class); + Assertions.assertEquals("zjaoyfhrtxil", model.provider()); + Assertions.assertEquals("rkujy", model.resource()); + Assertions.assertEquals("l", model.operation()); + Assertions.assertEquals("uvfqawrlyxwj", model.description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OperationDisplay model = - new OperationDisplay() - .withProvider("g") - .withResource("tnwu") - .withOperation("gazxuf") - .withDescription("uckyf"); + OperationDisplay model = new OperationDisplay().withProvider("zjaoyfhrtxil").withResource("rkujy") + .withOperation("l").withDescription("uvfqawrlyxwj"); model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("g", model.provider()); - Assertions.assertEquals("tnwu", model.resource()); - Assertions.assertEquals("gazxuf", model.operation()); - Assertions.assertEquals("uckyf", model.description()); + Assertions.assertEquals("zjaoyfhrtxil", model.provider()); + Assertions.assertEquals("rkujy", model.resource()); + Assertions.assertEquals("l", model.operation()); + Assertions.assertEquals("uvfqawrlyxwj", model.description()); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationListTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationListTests.java index 41dd17f3409ba..43802f4cb6a64 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationListTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationListTests.java @@ -14,53 +14,38 @@ public final class OperationListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationList model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"gibma\",\"display\":{\"provider\":\"keqsrxybzqqedq\",\"resource\":\"bciqfouflm\",\"operation\":\"kzsmodm\",\"description\":\"ougpbkwt\"},\"origin\":\"tduqktapspwgcuer\"},{\"name\":\"mkdo\",\"display\":{\"provider\":\"whbmd\",\"resource\":\"bjf\",\"operation\":\"gmbmbexppbh\",\"description\":\"qrolfpf\"},\"origin\":\"algbquxigjyjg\"}],\"nextLink\":\"aoyfhrtxilnerkuj\"}") - .toObject(OperationList.class); - Assertions.assertEquals("gibma", model.value().get(0).name()); - Assertions.assertEquals("keqsrxybzqqedq", model.value().get(0).display().provider()); - Assertions.assertEquals("bciqfouflm", model.value().get(0).display().resource()); - Assertions.assertEquals("kzsmodm", model.value().get(0).display().operation()); - Assertions.assertEquals("ougpbkwt", model.value().get(0).display().description()); - Assertions.assertEquals("tduqktapspwgcuer", model.value().get(0).origin()); - Assertions.assertEquals("aoyfhrtxilnerkuj", model.nextLink()); + OperationList model = BinaryData.fromString( + "{\"value\":[{\"name\":\"asy\",\"display\":{\"provider\":\"ddhsgcbacphe\",\"resource\":\"ot\",\"operation\":\"qgoulznd\",\"description\":\"kwy\"},\"origin\":\"gfgibm\"},{\"name\":\"gakeqsr\",\"display\":{\"provider\":\"zqqedq\",\"resource\":\"bciqfouflm\",\"operation\":\"kzsmodm\",\"description\":\"ougpbkwt\"},\"origin\":\"tduqktapspwgcuer\"}],\"nextLink\":\"mkdo\"}") + .toObject(OperationList.class); + Assertions.assertEquals("asy", model.value().get(0).name()); + Assertions.assertEquals("ddhsgcbacphe", model.value().get(0).display().provider()); + Assertions.assertEquals("ot", model.value().get(0).display().resource()); + Assertions.assertEquals("qgoulznd", model.value().get(0).display().operation()); + Assertions.assertEquals("kwy", model.value().get(0).display().description()); + Assertions.assertEquals("gfgibm", model.value().get(0).origin()); + Assertions.assertEquals("mkdo", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OperationList model = - new OperationList() - .withValue( - Arrays - .asList( - new OperationResponseInner() - .withName("gibma") - .withDisplay( - new OperationDisplay() - .withProvider("keqsrxybzqqedq") - .withResource("bciqfouflm") - .withOperation("kzsmodm") - .withDescription("ougpbkwt")) - .withOrigin("tduqktapspwgcuer"), - new OperationResponseInner() - .withName("mkdo") - .withDisplay( - new OperationDisplay() - .withProvider("whbmd") - .withResource("bjf") - .withOperation("gmbmbexppbh") - .withDescription("qrolfpf")) - .withOrigin("algbquxigjyjg"))) - .withNextLink("aoyfhrtxilnerkuj"); + OperationList model = new OperationList() + .withValue(Arrays.asList( + new OperationResponseInner().withName("asy") + .withDisplay(new OperationDisplay().withProvider("ddhsgcbacphe").withResource("ot") + .withOperation("qgoulznd").withDescription("kwy")) + .withOrigin("gfgibm"), + new OperationResponseInner().withName("gakeqsr") + .withDisplay(new OperationDisplay().withProvider("zqqedq").withResource("bciqfouflm") + .withOperation("kzsmodm").withDescription("ougpbkwt")) + .withOrigin("tduqktapspwgcuer"))) + .withNextLink("mkdo"); model = BinaryData.fromObject(model).toObject(OperationList.class); - Assertions.assertEquals("gibma", model.value().get(0).name()); - Assertions.assertEquals("keqsrxybzqqedq", model.value().get(0).display().provider()); - Assertions.assertEquals("bciqfouflm", model.value().get(0).display().resource()); - Assertions.assertEquals("kzsmodm", model.value().get(0).display().operation()); - Assertions.assertEquals("ougpbkwt", model.value().get(0).display().description()); - Assertions.assertEquals("tduqktapspwgcuer", model.value().get(0).origin()); - Assertions.assertEquals("aoyfhrtxilnerkuj", model.nextLink()); + Assertions.assertEquals("asy", model.value().get(0).name()); + Assertions.assertEquals("ddhsgcbacphe", model.value().get(0).display().provider()); + Assertions.assertEquals("ot", model.value().get(0).display().resource()); + Assertions.assertEquals("qgoulznd", model.value().get(0).display().operation()); + Assertions.assertEquals("kwy", model.value().get(0).display().description()); + Assertions.assertEquals("gfgibm", model.value().get(0).origin()); + Assertions.assertEquals("mkdo", model.nextLink()); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationResponseInnerTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationResponseInnerTests.java index c507f2b5e697d..6cc6c0bf6ecae 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationResponseInnerTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationResponseInnerTests.java @@ -12,37 +12,28 @@ public final class OperationResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationResponseInner model = - BinaryData - .fromString( - "{\"name\":\"vlejuvfqa\",\"display\":{\"provider\":\"yxwjkcp\",\"resource\":\"nwbxgjvtbvpyssz\",\"operation\":\"rujqg\",\"description\":\"muouqfp\"},\"origin\":\"zw\"}") - .toObject(OperationResponseInner.class); - Assertions.assertEquals("vlejuvfqa", model.name()); - Assertions.assertEquals("yxwjkcp", model.display().provider()); - Assertions.assertEquals("nwbxgjvtbvpyssz", model.display().resource()); - Assertions.assertEquals("rujqg", model.display().operation()); - Assertions.assertEquals("muouqfp", model.display().description()); - Assertions.assertEquals("zw", model.origin()); + OperationResponseInner model = BinaryData.fromString( + "{\"name\":\"qw\",\"display\":{\"provider\":\"dgbb\",\"resource\":\"ddgmb\",\"operation\":\"ex\",\"description\":\"bhtqqrolfpfpsa\"},\"origin\":\"bquxigjy\"}") + .toObject(OperationResponseInner.class); + Assertions.assertEquals("qw", model.name()); + Assertions.assertEquals("dgbb", model.display().provider()); + Assertions.assertEquals("ddgmb", model.display().resource()); + Assertions.assertEquals("ex", model.display().operation()); + Assertions.assertEquals("bhtqqrolfpfpsa", model.display().description()); + Assertions.assertEquals("bquxigjy", model.origin()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OperationResponseInner model = - new OperationResponseInner() - .withName("vlejuvfqa") - .withDisplay( - new OperationDisplay() - .withProvider("yxwjkcp") - .withResource("nwbxgjvtbvpyssz") - .withOperation("rujqg") - .withDescription("muouqfp")) - .withOrigin("zw"); + OperationResponseInner model + = new OperationResponseInner().withName("qw").withDisplay(new OperationDisplay().withProvider("dgbb") + .withResource("ddgmb").withOperation("ex").withDescription("bhtqqrolfpfpsa")).withOrigin("bquxigjy"); model = BinaryData.fromObject(model).toObject(OperationResponseInner.class); - Assertions.assertEquals("vlejuvfqa", model.name()); - Assertions.assertEquals("yxwjkcp", model.display().provider()); - Assertions.assertEquals("nwbxgjvtbvpyssz", model.display().resource()); - Assertions.assertEquals("rujqg", model.display().operation()); - Assertions.assertEquals("muouqfp", model.display().description()); - Assertions.assertEquals("zw", model.origin()); + Assertions.assertEquals("qw", model.name()); + Assertions.assertEquals("dgbb", model.display().provider()); + Assertions.assertEquals("ddgmb", model.display().resource()); + Assertions.assertEquals("ex", model.display().operation()); + Assertions.assertEquals("bhtqqrolfpfpsa", model.display().description()); + Assertions.assertEquals("bquxigjy", model.origin()); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaLimitsTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaLimitsTests.java index 43b99822172e4..22d2a5c823d4b 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaLimitsTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaLimitsTests.java @@ -6,48 +6,40 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.quota.fluent.models.CurrentQuotaLimitBaseInner; +import com.azure.resourcemanager.quota.models.LimitJsonObject; import com.azure.resourcemanager.quota.models.QuotaLimits; import com.azure.resourcemanager.quota.models.QuotaProperties; +import com.azure.resourcemanager.quota.models.ResourceName; import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class QuotaLimitsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - QuotaLimits model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"unit\":\"npmqnjaqwixjspro\",\"resourceType\":\"putegjvwmfd\",\"quotaPeriod\":\"scmdvpjhulsuu\",\"isQuotaApplicable\":true,\"properties\":\"dataozkrwfndiodjpslw\"},\"id\":\"jdpvwryo\",\"name\":\"psoacctazakljl\",\"type\":\"hbcryffdfdosyge\"},{\"properties\":{\"unit\":\"jakhmsbzjh\",\"resourceType\":\"evdphlxaol\",\"quotaPeriod\":\"qtrgqjbpfzfsinzg\",\"isQuotaApplicable\":true,\"properties\":\"datarwzoxxjtfelluwf\"},\"id\":\"it\",\"name\":\"np\",\"type\":\"qfpjk\"},{\"properties\":{\"unit\":\"fpdvhpfxxypi\",\"resourceType\":\"mayhuybbkpodepoo\",\"quotaPeriod\":\"nuvamiheogna\",\"isQuotaApplicable\":true,\"properties\":\"datatheotusiv\"},\"id\":\"evcciqihnhun\",\"name\":\"bwjzr\",\"type\":\"fygxgispemvtzfk\"}],\"nextLink\":\"ubljofxqe\"}") - .toObject(QuotaLimits.class); - Assertions.assertEquals("putegjvwmfd", model.value().get(0).properties().resourceType()); - Assertions.assertEquals("ubljofxqe", model.nextLink()); + QuotaLimits model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"jdpvwryo\",\"name\":{\"value\":\"oacctaza\",\"localizedValue\":\"j\"},\"resourceType\":\"hbcryffdfdosyge\",\"quotaPeriod\":\"aojakhmsbzjhcrz\",\"isQuotaApplicable\":true,\"properties\":\"datahlxaolthqtr\"},\"id\":\"qjbpfzfsin\",\"name\":\"gvfcj\",\"type\":\"wzo\"},{\"properties\":{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"felluwfzitonpe\",\"name\":{\"value\":\"jkjlxofpdvhpfx\",\"localizedValue\":\"pini\"},\"resourceType\":\"ayhuy\",\"quotaPeriod\":\"kpode\",\"isQuotaApplicable\":true,\"properties\":\"datainuvamiheogn\"},\"id\":\"rxzxtheo\",\"name\":\"usivye\",\"type\":\"cciqihnhungbwjz\"},{\"properties\":{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"gxg\",\"name\":{\"value\":\"emv\",\"localizedValue\":\"fkufublj\"},\"resourceType\":\"xqeofjaeqjhqjba\",\"quotaPeriod\":\"msmjqulngsntn\",\"isQuotaApplicable\":true,\"properties\":\"datazgcwrw\"},\"id\":\"lxxwrljdouskc\",\"name\":\"vkocrcjdkwtn\",\"type\":\"xbnjbiksq\"}],\"nextLink\":\"lssai\"}") + .toObject(QuotaLimits.class); + Assertions.assertEquals("oacctaza", model.value().get(0).properties().name().value()); + Assertions.assertEquals("hbcryffdfdosyge", model.value().get(0).properties().resourceType()); + Assertions.assertEquals("lssai", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - QuotaLimits model = - new QuotaLimits() - .withValue( - Arrays - .asList( - new CurrentQuotaLimitBaseInner() - .withProperties( - new QuotaProperties() - .withResourceType("putegjvwmfd") - .withProperties("dataozkrwfndiodjpslw")), - new CurrentQuotaLimitBaseInner() - .withProperties( - new QuotaProperties() - .withResourceType("evdphlxaol") - .withProperties("datarwzoxxjtfelluwf")), - new CurrentQuotaLimitBaseInner() - .withProperties( - new QuotaProperties() - .withResourceType("mayhuybbkpodepoo") - .withProperties("datatheotusiv")))) - .withNextLink("ubljofxqe"); + QuotaLimits model = new QuotaLimits().withValue(Arrays.asList( + new CurrentQuotaLimitBaseInner().withProperties(new QuotaProperties().withLimit(new LimitJsonObject()) + .withName(new ResourceName().withValue("oacctaza")).withResourceType("hbcryffdfdosyge") + .withProperties("datahlxaolthqtr")), + new CurrentQuotaLimitBaseInner().withProperties(new QuotaProperties().withLimit(new LimitJsonObject()) + .withName(new ResourceName().withValue("jkjlxofpdvhpfx")).withResourceType("ayhuy") + .withProperties("datainuvamiheogn")), + new CurrentQuotaLimitBaseInner().withProperties( + new QuotaProperties().withLimit(new LimitJsonObject()).withName(new ResourceName().withValue("emv")) + .withResourceType("xqeofjaeqjhqjba").withProperties("datazgcwrw")))) + .withNextLink("lssai"); model = BinaryData.fromObject(model).toObject(QuotaLimits.class); - Assertions.assertEquals("putegjvwmfd", model.value().get(0).properties().resourceType()); - Assertions.assertEquals("ubljofxqe", model.nextLink()); + Assertions.assertEquals("oacctaza", model.value().get(0).properties().name().value()); + Assertions.assertEquals("hbcryffdfdosyge", model.value().get(0).properties().resourceType()); + Assertions.assertEquals("lssai", model.nextLink()); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaOperationsListMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaOperationsListMockTests.java index cfd511ea0a616..87637b25d29d9 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaOperationsListMockTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaOperationsListMockTests.java @@ -31,42 +31,31 @@ public void testList() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"name\":\"gujjugwdkcglh\",\"display\":{\"provider\":\"zj\",\"resource\":\"ggd\",\"operation\":\"ixhbkuofqweykhm\",\"description\":\"evfyexfwhybcib\"},\"origin\":\"vdcsitynn\"}]}"; + String responseStr + = "{\"value\":[{\"name\":\"nqvpkvlrxnje\",\"display\":{\"provider\":\"ipheoflokeyyien\",\"resource\":\"dlwtgrhpdj\",\"operation\":\"umasxazjpq\",\"description\":\"gual\"},\"origin\":\"xxhejjzzvd\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - QuotaManager manager = - QuotaManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + QuotaManager manager = QuotaManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.quotaOperations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("gujjugwdkcglh", response.iterator().next().name()); - Assertions.assertEquals("zj", response.iterator().next().display().provider()); - Assertions.assertEquals("ggd", response.iterator().next().display().resource()); - Assertions.assertEquals("ixhbkuofqweykhm", response.iterator().next().display().operation()); - Assertions.assertEquals("evfyexfwhybcib", response.iterator().next().display().description()); - Assertions.assertEquals("vdcsitynn", response.iterator().next().origin()); + Assertions.assertEquals("nqvpkvlrxnje", response.iterator().next().name()); + Assertions.assertEquals("ipheoflokeyyien", response.iterator().next().display().provider()); + Assertions.assertEquals("dlwtgrhpdj", response.iterator().next().display().resource()); + Assertions.assertEquals("umasxazjpq", response.iterator().next().display().operation()); + Assertions.assertEquals("gual", response.iterator().next().display().description()); + Assertions.assertEquals("xxhejjzzvd", response.iterator().next().origin()); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaPropertiesTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaPropertiesTests.java index 05d2a41073a9e..a6a32e7c2dd59 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaPropertiesTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaPropertiesTests.java @@ -13,25 +13,20 @@ public final class QuotaPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - QuotaProperties model = - BinaryData - .fromString( - "{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"udccsnhsjc\",\"name\":{\"value\":\"j\",\"localizedValue\":\"ryhtnapczwlokjy\"},\"resourceType\":\"kkvnipjox\",\"quotaPeriod\":\"nchgej\",\"isQuotaApplicable\":true,\"properties\":\"datamailzydehojw\"}") - .toObject(QuotaProperties.class); - Assertions.assertEquals("j", model.name().value()); - Assertions.assertEquals("kkvnipjox", model.resourceType()); + QuotaProperties model = BinaryData.fromString( + "{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"xinpmqnjaq\",\"name\":{\"value\":\"jsprozvcpute\",\"localizedValue\":\"vwmf\"},\"resourceType\":\"t\",\"quotaPeriod\":\"mdvpjhulsu\",\"isQuotaApplicable\":true,\"properties\":\"datajozkrwfndiod\"}") + .toObject(QuotaProperties.class); + Assertions.assertEquals("jsprozvcpute", model.name().value()); + Assertions.assertEquals("t", model.resourceType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - QuotaProperties model = - new QuotaProperties() - .withLimit(new LimitJsonObject()) - .withName(new ResourceName().withValue("j")) - .withResourceType("kkvnipjox") - .withProperties("datamailzydehojw"); + QuotaProperties model = new QuotaProperties().withLimit(new LimitJsonObject()) + .withName(new ResourceName().withValue("jsprozvcpute")).withResourceType("t") + .withProperties("datajozkrwfndiod"); model = BinaryData.fromObject(model).toObject(QuotaProperties.class); - Assertions.assertEquals("j", model.name().value()); - Assertions.assertEquals("kkvnipjox", model.resourceType()); + Assertions.assertEquals("jsprozvcpute", model.name().value()); + Assertions.assertEquals("t", model.resourceType()); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaRequestDetailsListTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaRequestDetailsListTests.java deleted file mode 100644 index 215ee95082863..0000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaRequestDetailsListTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.QuotaRequestDetailsInner; -import com.azure.resourcemanager.quota.models.QuotaRequestDetailsList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class QuotaRequestDetailsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaRequestDetailsList model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"qxhocdgeablgphut\",\"name\":\"ndv\",\"type\":\"ozwyiftyhxhuro\",\"properties\":{\"provisioningState\":\"Succeeded\",\"message\":\"olniwpwcukjf\",\"requestSubmitTime\":\"2021-02-25T16:13:04Z\",\"value\":[]}},{\"id\":\"klryplwck\",\"name\":\"syyp\",\"type\":\"dhsgcba\",\"properties\":{\"provisioningState\":\"InProgress\",\"message\":\"koty\",\"requestSubmitTime\":\"2021-02-05T05:14:14Z\",\"value\":[]}}],\"nextLink\":\"zndlikwy\"}") - .toObject(QuotaRequestDetailsList.class); - Assertions.assertEquals("zndlikwy", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaRequestDetailsList model = - new QuotaRequestDetailsList() - .withValue( - Arrays - .asList( - new QuotaRequestDetailsInner().withValue(Arrays.asList()), - new QuotaRequestDetailsInner().withValue(Arrays.asList()))) - .withNextLink("zndlikwy"); - model = BinaryData.fromObject(model).toObject(QuotaRequestDetailsList.class); - Assertions.assertEquals("zndlikwy", model.nextLink()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasCreateOrUpdateMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasCreateOrUpdateMockTests.java index a3131665e617a..d9148f403df26 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasCreateOrUpdateMockTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasCreateOrUpdateMockTests.java @@ -33,49 +33,31 @@ public void testCreateOrUpdate() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"properties\":{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"gpphrcgyn\",\"name\":{\"value\":\"pec\",\"localizedValue\":\"m\"},\"resourceType\":\"oo\",\"quotaPeriod\":\"xlzevgbmqjqabcy\",\"isQuotaApplicable\":true,\"properties\":\"datakwlzuvccfwnfn\"},\"id\":\"acfi\",\"name\":\"nlebxetqgtzxd\",\"type\":\"nqbqqwxr\"}"; + String responseStr + = "{\"properties\":{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"q\",\"name\":{\"value\":\"hix\",\"localizedValue\":\"gdtopbobjogh\"},\"resourceType\":\"w\",\"quotaPeriod\":\"m\",\"isQuotaApplicable\":true,\"properties\":\"dataz\"},\"id\":\"yvvtpgvdfgio\",\"name\":\"kftutqxlngxlefg\",\"type\":\"gnxkrxdqmidtth\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - QuotaManager manager = - QuotaManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CurrentQuotaLimitBase response = - manager - .quotas() - .define("pbobjo") - .withExistingScope("hm") - .withProperties( - new QuotaProperties() - .withLimit(new LimitJsonObject()) - .withName(new ResourceName().withValue("rzayv")) - .withResourceType("otkftutqxlngx") - .withProperties("datarvqdra")) - .create(); - - Assertions.assertEquals("pec", response.properties().name().value()); - Assertions.assertEquals("oo", response.properties().resourceType()); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + QuotaManager manager = QuotaManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + CurrentQuotaLimitBase response = manager.quotas().define("s").withExistingScope("sycbkbfk") + .withProperties( + new QuotaProperties().withLimit(new LimitJsonObject()).withName(new ResourceName().withValue("x")) + .withResourceType("ocjjxhvpmouexh").withProperties("dataddntwndei")) + .create(); + + Assertions.assertEquals("hix", response.properties().name().value()); + Assertions.assertEquals("w", response.properties().resourceType()); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasGetWithResponseMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasGetWithResponseMockTests.java index cbbaa28bac3dc..243bee1208a87 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasGetWithResponseMockTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasGetWithResponseMockTests.java @@ -30,39 +30,28 @@ public void testGetWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"properties\":{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"xzlocxscp\",\"name\":{\"value\":\"rhhbcs\",\"localizedValue\":\"ummajtjaod\"},\"resourceType\":\"bnbdxkqpxokajion\",\"quotaPeriod\":\"mexgstxgcp\",\"isQuotaApplicable\":false,\"properties\":\"dataaajrm\"},\"id\":\"djwzrlov\",\"name\":\"clwhijcoejctbz\",\"type\":\"qsqsy\"}"; + String responseStr + = "{\"properties\":{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"orcjxvsnby\",\"name\":{\"value\":\"bnmo\",\"localizedValue\":\"cyshurzafbljjgp\"},\"resourceType\":\"oq\",\"quotaPeriod\":\"mkljavb\",\"isQuotaApplicable\":true,\"properties\":\"dataqajzyulpkudjkr\"},\"id\":\"khbzhfepgzg\",\"name\":\"e\",\"type\":\"zloc\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - QuotaManager manager = - QuotaManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + QuotaManager manager = QuotaManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - CurrentQuotaLimitBase response = - manager.quotas().getWithResponse("ulpkudjkrl", "hbzhfepg", com.azure.core.util.Context.NONE).getValue(); + CurrentQuotaLimitBase response + = manager.quotas().getWithResponse("soifiyipjxsqw", "gr", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("rhhbcs", response.properties().name().value()); - Assertions.assertEquals("bnbdxkqpxokajion", response.properties().resourceType()); + Assertions.assertEquals("bnmo", response.properties().name().value()); + Assertions.assertEquals("oq", response.properties().resourceType()); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasListMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasListMockTests.java index 68073d727ede3..a9838f1b3e7af 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasListMockTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasListMockTests.java @@ -31,39 +31,28 @@ public void testList() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"properties\":{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"fmxa\",\"name\":{\"value\":\"jpgd\",\"localizedValue\":\"ocjjxhvpmouexh\"},\"resourceType\":\"xibqeojnx\",\"quotaPeriod\":\"zvddntwndeicbtwn\",\"isQuotaApplicable\":false,\"properties\":\"dataqvuhrhcffcyddglm\"},\"id\":\"t\",\"name\":\"jqkwpyeicx\",\"type\":\"qciwqvhkhixuigdt\"}]}"; + String responseStr + = "{\"value\":[{\"properties\":{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"bcsglumma\",\"name\":{\"value\":\"aodxo\",\"localizedValue\":\"bdxkqpxokaj\"},\"resourceType\":\"npime\",\"quotaPeriod\":\"stxgc\",\"isQuotaApplicable\":false,\"properties\":\"datamaajrmvdjwzrlo\"},\"id\":\"mcl\",\"name\":\"hijco\",\"type\":\"jctbza\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - QuotaManager manager = - QuotaManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + QuotaManager manager = QuotaManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = - manager.quotas().list("bkbfkgukdkex", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.quotas().list("scpai", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jpgd", response.iterator().next().properties().name().value()); - Assertions.assertEquals("xibqeojnx", response.iterator().next().properties().resourceType()); + Assertions.assertEquals("aodxo", response.iterator().next().properties().name().value()); + Assertions.assertEquals("npime", response.iterator().next().properties().resourceType()); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/ResourceNameTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/ResourceNameTests.java index b6ce7311a544f..64cb0945719e8 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/ResourceNameTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/ResourceNameTests.java @@ -11,10 +11,8 @@ public final class ResourceNameTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ResourceName model = - BinaryData - .fromString("{\"value\":\"xrifkwmrvkts\",\"localizedValue\":\"nt\"}") - .toObject(ResourceName.class); + ResourceName model = BinaryData.fromString("{\"value\":\"xrifkwmrvkts\",\"localizedValue\":\"nt\"}") + .toObject(ResourceName.class); Assertions.assertEquals("xrifkwmrvkts", model.value()); } diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubRequestTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubRequestTests.java index bd1dc696d3aac..a166d7484a8f5 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubRequestTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubRequestTests.java @@ -13,24 +13,19 @@ public final class SubRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SubRequest model = - BinaryData - .fromString( - "{\"name\":{\"value\":\"jwnzlljfmp\",\"localizedValue\":\"ebvmgxsabkyqd\"},\"resourceType\":\"jitcjczdzevn\",\"unit\":\"krwpdap\",\"provisioningState\":\"InProgress\",\"message\":\"dkvwrwjfe\",\"subRequestId\":\"nhutjeltmrldhugj\",\"limit\":{\"limitObjectType\":\"LimitJsonObject\"}}") - .toObject(SubRequest.class); - Assertions.assertEquals("jwnzlljfmp", model.name().value()); - Assertions.assertEquals("krwpdap", model.unit()); + SubRequest model = BinaryData.fromString( + "{\"name\":{\"value\":\"vwrwj\",\"localizedValue\":\"usnhutje\"},\"resourceType\":\"mrldhu\",\"unit\":\"zzd\",\"provisioningState\":\"Failed\",\"message\":\"hocdgeab\",\"subRequestId\":\"phut\",\"limit\":{\"limitObjectType\":\"LimitJsonObject\"}}") + .toObject(SubRequest.class); + Assertions.assertEquals("vwrwj", model.name().value()); + Assertions.assertEquals("zzd", model.unit()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubRequest model = - new SubRequest() - .withName(new ResourceName().withValue("jwnzlljfmp")) - .withUnit("krwpdap") - .withLimit(new LimitJsonObject()); + SubRequest model = new SubRequest().withName(new ResourceName().withValue("vwrwj")).withUnit("zzd") + .withLimit(new LimitJsonObject()); model = BinaryData.fromObject(model).toObject(SubRequest.class); - Assertions.assertEquals("jwnzlljfmp", model.name().value()); - Assertions.assertEquals("krwpdap", model.unit()); + Assertions.assertEquals("vwrwj", model.name().value()); + Assertions.assertEquals("zzd", model.unit()); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesGetWithResponseMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesGetWithResponseMockTests.java index 06fbc303927f1..304fe7404641a 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesGetWithResponseMockTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesGetWithResponseMockTests.java @@ -31,41 +31,30 @@ public void testGetWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"properties\":{\"usages\":{\"value\":1651513421,\"usagesType\":\"Individual\"},\"unit\":\"kfthwxmntei\",\"name\":{\"value\":\"pvkmijcmmxdcuf\",\"localizedValue\":\"srp\"},\"resourceType\":\"zidnsezcxtbzsgfy\",\"quotaPeriod\":\"sne\",\"isQuotaApplicable\":true,\"properties\":\"dataz\"},\"id\":\"eiachboosflnr\",\"name\":\"sfqpteehz\",\"type\":\"vypyqrimzinpv\"}"; + String responseStr + = "{\"properties\":{\"usages\":{\"value\":1493631585,\"usagesType\":\"Individual\"},\"unit\":\"uqfprwzw\",\"name\":{\"value\":\"uitnwuiz\",\"localizedValue\":\"zxufiz\"},\"resourceType\":\"kyfi\",\"quotaPeriod\":\"fidfvzw\",\"isQuotaApplicable\":false,\"properties\":\"datatymw\"},\"id\":\"sdkf\",\"name\":\"hwxmnteiwa\",\"type\":\"pvkmijcmmxdcuf\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - QuotaManager manager = - QuotaManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + QuotaManager manager = QuotaManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - CurrentUsagesBase response = - manager.usages().getWithResponse("idf", "zwdzuh", com.azure.core.util.Context.NONE).getValue(); + CurrentUsagesBase response + = manager.usages().getWithResponse("bnwbxgjvtbvpyssz", "nruj", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals(1651513421, response.properties().usages().value()); + Assertions.assertEquals(1493631585, response.properties().usages().value()); Assertions.assertEquals(UsagesTypes.INDIVIDUAL, response.properties().usages().usagesType()); - Assertions.assertEquals("pvkmijcmmxdcuf", response.properties().name().value()); - Assertions.assertEquals("zidnsezcxtbzsgfy", response.properties().resourceType()); + Assertions.assertEquals("uitnwuiz", response.properties().name().value()); + Assertions.assertEquals("kyfi", response.properties().resourceType()); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesLimitsTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesLimitsTests.java index 1a6215d0ecb9d..f23f59296f205 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesLimitsTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesLimitsTests.java @@ -6,41 +6,50 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.quota.fluent.models.CurrentUsagesBaseInner; +import com.azure.resourcemanager.quota.models.ResourceName; import com.azure.resourcemanager.quota.models.UsagesLimits; +import com.azure.resourcemanager.quota.models.UsagesObject; import com.azure.resourcemanager.quota.models.UsagesProperties; +import com.azure.resourcemanager.quota.models.UsagesTypes; import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class UsagesLimitsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UsagesLimits model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"unit\":\"qucmpo\",\"resourceType\":\"kfo\",\"quotaPeriod\":\"nygj\",\"isQuotaApplicable\":true,\"properties\":\"datadeqsrdeupewn\"},\"id\":\"reitjzyflusar\",\"name\":\"mofcq\",\"type\":\"smy\"},{\"properties\":{\"unit\":\"tmlxhekuksjtx\",\"resourceType\":\"dmpa\",\"quotaPeriod\":\"ryuanzwuxzdxtay\",\"isQuotaApplicable\":true,\"properties\":\"datawhfpmrqobmtu\"},\"id\":\"knryrtihfxtij\",\"name\":\"pzvgnwzsymglzufc\",\"type\":\"zk\"}],\"nextLink\":\"dbihanufhfcbj\"}") - .toObject(UsagesLimits.class); - Assertions.assertEquals("kfo", model.value().get(0).properties().resourceType()); - Assertions.assertEquals("dbihanufhfcbj", model.nextLink()); + UsagesLimits model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"usages\":{\"value\":86980171,\"usagesType\":\"Individual\"},\"unit\":\"mpoyfd\",\"name\":{\"value\":\"gknygjofjddeqs\",\"localizedValue\":\"eupewnwreitjz\"},\"resourceType\":\"lusarh\",\"quotaPeriod\":\"fcqhsmyurkd\",\"isQuotaApplicable\":false,\"properties\":\"datahe\"},\"id\":\"uksjtxukcdmp\",\"name\":\"rcryuanzwuxzdxta\",\"type\":\"rlhm\"},{\"properties\":{\"usages\":{\"value\":1724248822,\"usagesType\":\"Individual\"},\"unit\":\"obmtukk\",\"name\":{\"value\":\"rtihfxtijbpz\",\"localizedValue\":\"nwzsymg\"},\"resourceType\":\"uf\",\"quotaPeriod\":\"zk\",\"isQuotaApplicable\":true,\"properties\":\"dataihanuf\"},\"id\":\"fcbjysagithxqha\",\"name\":\"ifpikxwczby\",\"type\":\"cnpqxuhivyqniwby\"}],\"nextLink\":\"k\"}") + .toObject(UsagesLimits.class); + Assertions.assertEquals(86980171, model.value().get(0).properties().usages().value()); + Assertions.assertEquals(UsagesTypes.INDIVIDUAL, model.value().get(0).properties().usages().usagesType()); + Assertions.assertEquals("gknygjofjddeqs", model.value().get(0).properties().name().value()); + Assertions.assertEquals("lusarh", model.value().get(0).properties().resourceType()); + Assertions.assertEquals("k", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UsagesLimits model = - new UsagesLimits() + UsagesLimits model + = new UsagesLimits() .withValue( Arrays .asList( - new CurrentUsagesBaseInner() - .withProperties( - new UsagesProperties().withResourceType("kfo").withProperties("datadeqsrdeupewn")), - new CurrentUsagesBaseInner() - .withProperties( - new UsagesProperties() - .withResourceType("dmpa") - .withProperties("datawhfpmrqobmtu")))) - .withNextLink("dbihanufhfcbj"); + new CurrentUsagesBaseInner().withProperties(new UsagesProperties() + .withUsages( + new UsagesObject().withValue(86980171).withUsagesType(UsagesTypes.INDIVIDUAL)) + .withName(new ResourceName().withValue("gknygjofjddeqs")).withResourceType("lusarh") + .withProperties("datahe")), + new CurrentUsagesBaseInner().withProperties(new UsagesProperties() + .withUsages( + new UsagesObject().withValue(1724248822).withUsagesType(UsagesTypes.INDIVIDUAL)) + .withName(new ResourceName().withValue("rtihfxtijbpz")).withResourceType("uf") + .withProperties("dataihanuf")))) + .withNextLink("k"); model = BinaryData.fromObject(model).toObject(UsagesLimits.class); - Assertions.assertEquals("kfo", model.value().get(0).properties().resourceType()); - Assertions.assertEquals("dbihanufhfcbj", model.nextLink()); + Assertions.assertEquals(86980171, model.value().get(0).properties().usages().value()); + Assertions.assertEquals(UsagesTypes.INDIVIDUAL, model.value().get(0).properties().usages().usagesType()); + Assertions.assertEquals("gknygjofjddeqs", model.value().get(0).properties().name().value()); + Assertions.assertEquals("lusarh", model.value().get(0).properties().resourceType()); + Assertions.assertEquals("k", model.nextLink()); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesListMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesListMockTests.java index 15ba1c9bba2d2..c739f5d9c9ecc 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesListMockTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesListMockTests.java @@ -32,40 +32,30 @@ public void testList() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"properties\":{\"usages\":{\"value\":158859960,\"usagesType\":\"Combined\"},\"unit\":\"xhcr\",\"name\":{\"value\":\"hjtckwhd\",\"localizedValue\":\"ifiyipjxsqwpgrj\"},\"resourceType\":\"norcjxvsnbyxqab\",\"quotaPeriod\":\"ocpcy\",\"isQuotaApplicable\":false,\"properties\":\"datazafb\"},\"id\":\"jjgpb\",\"name\":\"oq\",\"type\":\"jmkljavbqidtqajz\"}]}"; + String responseStr + = "{\"value\":[{\"properties\":{\"usages\":{\"value\":380753695,\"usagesType\":\"Combined\"},\"unit\":\"gfycc\",\"name\":{\"value\":\"wmdwzjeiachboo\",\"localizedValue\":\"lnrosfqp\"},\"resourceType\":\"ehzzvypyqrim\",\"quotaPeriod\":\"npvswjdkirso\",\"isQuotaApplicable\":false,\"properties\":\"datahc\"},\"id\":\"mnoh\",\"name\":\"t\",\"type\":\"kwh\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - QuotaManager manager = - QuotaManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + QuotaManager manager = QuotaManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.usages().list("wjdk", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.usages().list("fsrpymzidnse", com.azure.core.util.Context.NONE); - Assertions.assertEquals(158859960, response.iterator().next().properties().usages().value()); + Assertions.assertEquals(380753695, response.iterator().next().properties().usages().value()); Assertions.assertEquals(UsagesTypes.COMBINED, response.iterator().next().properties().usages().usagesType()); - Assertions.assertEquals("hjtckwhd", response.iterator().next().properties().name().value()); - Assertions.assertEquals("norcjxvsnbyxqab", response.iterator().next().properties().resourceType()); + Assertions.assertEquals("wmdwzjeiachboo", response.iterator().next().properties().name().value()); + Assertions.assertEquals("ehzzvypyqrim", response.iterator().next().properties().resourceType()); } } diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesObjectTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesObjectTests.java index 19ef6c01da243..54039fa880fc9 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesObjectTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesObjectTests.java @@ -12,8 +12,8 @@ public final class UsagesObjectTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UsagesObject model = - BinaryData.fromString("{\"value\":1667898231,\"usagesType\":\"Individual\"}").toObject(UsagesObject.class); + UsagesObject model = BinaryData.fromString("{\"value\":1667898231,\"usagesType\":\"Individual\"}") + .toObject(UsagesObject.class); Assertions.assertEquals(1667898231, model.value()); Assertions.assertEquals(UsagesTypes.INDIVIDUAL, model.usagesType()); } diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesPropertiesTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesPropertiesTests.java index 4f45b157444e1..98e8c5ab0a494 100644 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesPropertiesTests.java +++ b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesPropertiesTests.java @@ -14,11 +14,9 @@ public final class UsagesPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UsagesProperties model = - BinaryData - .fromString( - "{\"usages\":{\"value\":1715873571,\"usagesType\":\"Combined\"},\"unit\":\"zlobcufpd\",\"name\":{\"value\":\"btcqq\",\"localizedValue\":\"qglhq\"},\"resourceType\":\"ufo\",\"quotaPeriod\":\"jywif\",\"isQuotaApplicable\":false,\"properties\":\"dataaagdfmg\"}") - .toObject(UsagesProperties.class); + UsagesProperties model = BinaryData.fromString( + "{\"usages\":{\"value\":1715873571,\"usagesType\":\"Combined\"},\"unit\":\"zlobcufpd\",\"name\":{\"value\":\"btcqq\",\"localizedValue\":\"qglhq\"},\"resourceType\":\"ufo\",\"quotaPeriod\":\"jywif\",\"isQuotaApplicable\":false,\"properties\":\"dataaagdfmg\"}") + .toObject(UsagesProperties.class); Assertions.assertEquals(1715873571, model.usages().value()); Assertions.assertEquals(UsagesTypes.COMBINED, model.usages().usagesType()); Assertions.assertEquals("btcqq", model.name().value()); @@ -27,12 +25,9 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UsagesProperties model = - new UsagesProperties() - .withUsages(new UsagesObject().withValue(1715873571).withUsagesType(UsagesTypes.COMBINED)) - .withName(new ResourceName().withValue("btcqq")) - .withResourceType("ufo") - .withProperties("dataaagdfmg"); + UsagesProperties model = new UsagesProperties() + .withUsages(new UsagesObject().withValue(1715873571).withUsagesType(UsagesTypes.COMBINED)) + .withName(new ResourceName().withValue("btcqq")).withResourceType("ufo").withProperties("dataaagdfmg"); model = BinaryData.fromObject(model).toObject(UsagesProperties.class); Assertions.assertEquals(1715873571, model.usages().value()); Assertions.assertEquals(UsagesTypes.COMBINED, model.usages().usagesType());