From 31d40bbc83e3a5f38eb25edd6c39736a6f2d51ca Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 7 Jan 2025 11:06:07 +0000 Subject: [PATCH] CodeGen from PR 31855 in Azure/azure-rest-api-specs Merge dad65926bcf41c836545c8f5ac3e133291732850 into 49456eb149e3bb5d0528cbca714cfa1806415484 --- .../optional-dependency-tests/pom.xml | 6 +- .../CHANGELOG.md | 34 +- .../README.md | 12 +- .../SAMPLE.md | 113 ++- .../pom.xml | 4 +- .../PlaywrightTestingManager.java | 4 +- .../fluent/AccountQuotasClient.java | 44 +- .../fluent/AccountsClient.java | 148 +-- .../fluent/OperationsClient.java | 2 +- .../fluent/PlaywrightTestingMgmtClient.java | 20 +- .../fluent/QuotasClient.java | 42 +- .../fluent/models/AccountInner.java | 2 +- .../fluent/models/AccountQuotaInner.java | 19 +- .../CheckNameAvailabilityResponseInner.java | 45 +- .../fluent/models/OperationInner.java | 33 +- .../fluent/models/QuotaInner.java | 19 +- .../fluent/models/package-info.java | 6 +- .../fluent/package-info.java | 6 +- .../implementation/AccountImpl.java | 2 +- .../implementation/AccountQuotaImpl.java | 2 +- .../AccountQuotasClientImpl.java | 206 ++-- .../implementation/AccountQuotasImpl.java | 24 +- .../implementation/AccountsClientImpl.java | 931 +++++++++--------- .../implementation/AccountsImpl.java | 66 +- .../CheckNameAvailabilityResponseImpl.java | 2 +- .../implementation/OperationImpl.java | 2 +- .../implementation/OperationsClientImpl.java | 10 +- .../implementation/OperationsImpl.java | 2 +- .../PlaywrightTestingMgmtClientBuilder.java | 28 +- .../PlaywrightTestingMgmtClientImpl.java | 44 +- .../implementation/QuotaImpl.java | 2 +- .../implementation/QuotasClientImpl.java | 190 ++-- .../implementation/QuotasImpl.java | 22 +- .../implementation/ResourceManagerUtils.java | 2 +- .../implementation/package-info.java | 6 +- .../playwrighttesting/models/Account.java | 2 +- .../models/AccountFreeTrialProperties.java | 10 +- .../models/AccountListResult.java | 32 +- .../models/AccountProperties.java | 14 +- .../models/AccountQuota.java | 2 +- .../models/AccountQuotaListResult.java | 32 +- .../models/AccountQuotaProperties.java | 19 +- .../models/AccountQuotas.java | 36 +- .../models/AccountUpdate.java | 2 +- .../models/AccountUpdateProperties.java | 14 +- .../playwrighttesting/models/Accounts.java | 78 +- .../playwrighttesting/models/ActionType.java | 6 +- .../models/CheckNameAvailabilityReason.java | 8 +- .../models/CheckNameAvailabilityRequest.java | 2 +- .../models/CheckNameAvailabilityResponse.java | 4 +- .../models/EnablementStatus.java | 10 +- .../models/FreeTrialProperties.java | 4 +- .../models/FreeTrialState.java | 10 +- .../models/OfferingType.java | 10 +- .../playwrighttesting/models/Operation.java | 8 +- .../models/OperationDisplay.java | 6 +- .../models/OperationListResult.java | 25 +- .../playwrighttesting/models/Operations.java | 2 +- .../playwrighttesting/models/Origin.java | 8 +- .../models/ProvisioningState.java | 14 +- .../playwrighttesting/models/Quota.java | 2 +- .../models/QuotaListResult.java | 32 +- .../playwrighttesting/models/QuotaNames.java | 12 +- .../models/QuotaProperties.java | 19 +- .../playwrighttesting/models/Quotas.java | 34 +- .../models/package-info.java | 6 +- .../playwrighttesting/package-info.java | 6 +- .../src/main/java/module-info.java | 3 +- .../generated/AccountQuotasGetSamples.java | 6 +- .../AccountQuotasListByAccountSamples.java | 6 +- .../AccountsCheckNameAvailabilitySamples.java | 6 +- .../AccountsCreateOrUpdateSamples.java | 6 +- .../generated/AccountsDeleteSamples.java | 6 +- .../AccountsGetByResourceGroupSamples.java | 25 + .../AccountsListByResourceGroupSamples.java | 25 + .../generated/AccountsListSamples.java | 25 + .../generated/AccountsUpdateSamples.java | 8 +- .../generated/OperationsListSamples.java | 6 +- .../generated/QuotasGetSamples.java | 6 +- .../QuotasListBySubscriptionSamples.java | 6 +- .../AccountFreeTrialPropertiesTests.java | 17 - .../generated/AccountInnerTests.java | 57 -- .../generated/AccountListResultTests.java | 26 - .../generated/AccountPropertiesTests.java | 36 - .../generated/AccountQuotaInnerTests.java | 17 - .../AccountQuotaListResultTests.java | 19 - .../AccountQuotaPropertiesTests.java | 17 - ...AccountQuotasGetWithResponseMockTests.java | 38 - .../AccountQuotasListByAccountMockTests.java | 37 - .../AccountUpdatePropertiesTests.java | 36 - .../generated/AccountUpdateTests.java | 54 - ...NameAvailabilityWithResponseMockTests.java | 44 - .../AccountsCreateOrUpdateMockTests.java | 67 -- .../CheckNameAvailabilityRequestTests.java | 29 - ...eckNameAvailabilityResponseInnerTests.java | 22 - .../generated/FreeTrialPropertiesTests.java | 16 - .../generated/OperationDisplayTests.java | 17 - .../generated/OperationInnerTests.java | 17 - .../generated/OperationListResultTests.java | 19 - .../generated/OperationsListMockTests.java | 36 - .../generated/QuotaInnerTests.java | 17 - .../generated/QuotaListResultTests.java | 19 - .../generated/QuotaPropertiesTests.java | 17 - .../QuotasGetWithResponseMockTests.java | 38 - .../QuotasListBySubscriptionMockTests.java | 37 - 105 files changed, 1532 insertions(+), 1920 deletions(-) rename sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/{implementation => }/models/AccountListResult.java (80%) rename sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/{implementation => }/models/AccountQuotaListResult.java (80%) rename sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/{implementation => }/models/OperationListResult.java (73%) rename sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/{implementation => }/models/QuotaListResult.java (80%) create mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsGetByResourceGroupSamples.java create mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsListByResourceGroupSamples.java create mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsListSamples.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountFreeTrialPropertiesTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountInnerTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountListResultTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountPropertiesTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotaInnerTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotaListResultTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotaPropertiesTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotasGetWithResponseMockTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotasListByAccountMockTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountUpdatePropertiesTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountUpdateTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsCheckNameAvailabilityWithResponseMockTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsCreateOrUpdateMockTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/CheckNameAvailabilityRequestTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/CheckNameAvailabilityResponseInnerTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/FreeTrialPropertiesTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/OperationDisplayTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/OperationInnerTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/OperationListResultTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/OperationsListMockTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotaInnerTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotaListResultTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotaPropertiesTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotasGetWithResponseMockTests.java delete mode 100644 sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotasListBySubscriptionMockTests.java diff --git a/sdk/clientcore/optional-dependency-tests/pom.xml b/sdk/clientcore/optional-dependency-tests/pom.xml index 00acb3e5820ce..74ae7ec45e874 100644 --- a/sdk/clientcore/optional-dependency-tests/pom.xml +++ b/sdk/clientcore/optional-dependency-tests/pom.xml @@ -15,7 +15,7 @@ io.clientcore optional-dependency-tests jar - 1.0.0-beta.1 + 1.0.0-beta.2 Java Core library tests for optional dependencies and features. Tests that validate optional dependencies and features of the Core library. @@ -56,14 +56,14 @@ io.clientcore core - 1.0.0-beta.2 + 1.0.0-beta.1 io.clientcore core - 1.0.0-beta.2 + 1.0.0-beta.1 test-jar test diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/CHANGELOG.md b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/CHANGELOG.md index 6d46b7dc59442..9c113ffc64dad 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/CHANGELOG.md +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/CHANGELOG.md @@ -1,14 +1,40 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2025-01-07) -### Features Added +- Azure Resource Manager Playwright Testing client library for Java. This package contains Microsoft Azure SDK for Playwright Testing Management SDK. Azure Playwright testing management service. Package tag package-2024-12-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `implementation.models.AccountListResult` was removed + +#### `implementation.models.OperationListResult` was removed + +#### `implementation.models.AccountQuotaListResult` was removed + +#### `implementation.models.QuotaListResult` was removed + +#### `models.AccountFreeTrialProperties` was modified + +* `double percentageUsed()` -> `float percentageUsed()` + +### Features Added + +* `models.AccountListResult` was added + +* `models.AccountQuotaListResult` was added + +* `models.OperationListResult` was added + +* `models.QuotaListResult` was added + +#### `models.QuotaProperties` was modified + +* `withFreeTrial(models.FreeTrialProperties)` was added + +#### `models.AccountQuotaProperties` was modified -### Other Changes +* `withFreeTrial(models.AccountFreeTrialProperties)` was added ## 1.0.0 (2024-12-16) diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/README.md b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/README.md index f83b098d82338..f425276e1d532 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/README.md +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Playwright Testing client library for Java. -This package contains Microsoft Azure SDK for Playwright Testing Management SDK. Microsoft.AzurePlaywrightService Resource Provider Management API. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Playwright Testing Management SDK. Azure Playwright testing management service. Package tag package-2024-12-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-playwrighttesting - 1.0.0 + 1.1.0-beta.1 ``` [//]: # ({x-version-update-end}) @@ -70,6 +70,14 @@ See [API design][design] for general introduction on design and key concepts on ## Examples +```java +account = playwrightTestingManager.accounts() + .define(accountName) + .withRegion(REGION) + .withExistingResourceGroup(resourceGroupName) + .withProperties(new AccountProperties().withRegionalAffinity(EnablementStatus.ENABLED)) + .create(); +``` [Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/SAMPLE.md) diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/SAMPLE.md b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/SAMPLE.md index e35a460bfe2ef..e970cf2bc6e4c 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/SAMPLE.md +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/SAMPLE.md @@ -11,6 +11,9 @@ - [CheckNameAvailability](#accounts_checknameavailability) - [CreateOrUpdate](#accounts_createorupdate) - [Delete](#accounts_delete) +- [GetByResourceGroup](#accounts_getbyresourcegroup) +- [List](#accounts_list) +- [ListByResourceGroup](#accounts_listbyresourcegroup) - [Update](#accounts_update) ## Operations @@ -31,7 +34,9 @@ import com.azure.resourcemanager.playwrighttesting.models.QuotaNames; */ public final class AccountQuotasGetSamples { /* - * x-ms-original-file: 2024-12-01/AccountQuotas_Get.json + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * AccountQuotas_Get.json */ /** * Sample code: AccountQuotas_Get. @@ -54,7 +59,9 @@ public final class AccountQuotasGetSamples { */ public final class AccountQuotasListByAccountSamples { /* - * x-ms-original-file: 2024-12-01/AccountQuotas_ListByAccount.json + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * AccountQuotas_ListByAccount.json */ /** * Sample code: AccountQuotas_ListByAccount. @@ -78,7 +85,9 @@ import com.azure.resourcemanager.playwrighttesting.models.CheckNameAvailabilityR */ public final class AccountsCheckNameAvailabilitySamples { /* - * x-ms-original-file: 2024-12-01/Accounts_CheckNameAvailability.json + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Accounts_CheckNameAvailability.json */ /** * Sample code: Accounts_CheckNameAvailability. @@ -107,7 +116,9 @@ import java.util.Map; */ public final class AccountsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-12-01/Accounts_CreateOrUpdate.json + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Accounts_CreateOrUpdate.json */ /** * Sample code: Accounts_CreateOrUpdate. @@ -147,7 +158,9 @@ public final class AccountsCreateOrUpdateSamples { */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: 2024-12-01/Accounts_Delete.json + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Accounts_Delete.json */ /** * Sample code: Accounts_Delete. @@ -160,6 +173,78 @@ public final class AccountsDeleteSamples { } ``` +### Accounts_GetByResourceGroup + +```java +/** + * Samples for Accounts GetByResourceGroup. + */ +public final class AccountsGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Accounts_Get.json + */ + /** + * Sample code: Accounts_Get. + * + * @param manager Entry point to PlaywrightTestingManager. + */ + public static void accountsGet(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) { + manager.accounts() + .getByResourceGroupWithResponse("dummyrg", "myPlaywrightAccount", com.azure.core.util.Context.NONE); + } +} +``` + +### Accounts_List + +```java +/** + * Samples for Accounts List. + */ +public final class AccountsListSamples { + /* + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Accounts_ListBySubscription.json + */ + /** + * Sample code: Accounts_ListBySubscription. + * + * @param manager Entry point to PlaywrightTestingManager. + */ + public static void + accountsListBySubscription(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) { + manager.accounts().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Accounts_ListByResourceGroup + +```java +/** + * Samples for Accounts ListByResourceGroup. + */ +public final class AccountsListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Accounts_ListByResourceGroup.json + */ + /** + * Sample code: Accounts_ListByResourceGroup. + * + * @param manager Entry point to PlaywrightTestingManager. + */ + public static void + accountsListByResourceGroup(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) { + manager.accounts().listByResourceGroup("dummyrg", com.azure.core.util.Context.NONE); + } +} +``` + ### Accounts_Update ```java @@ -174,7 +259,9 @@ import java.util.Map; */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: 2024-12-01/Accounts_Update.json + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Accounts_Update.json */ /** * Sample code: Accounts_Update. @@ -186,7 +273,7 @@ public final class AccountsUpdateSamples { .getByResourceGroupWithResponse("dummyrg", "myPlaywrightAccount", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("Team", "Dev Exp", "Division", "LT")) + .withTags(mapOf("Division", "LT", "Team", "Dev Exp")) .withProperties(new AccountUpdateProperties().withRegionalAffinity(EnablementStatus.ENABLED)) .apply(); } @@ -213,7 +300,9 @@ public final class AccountsUpdateSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: 2024-12-01/Operations_List.json + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Operations_List.json */ /** * Sample code: Operations_List. @@ -236,7 +325,9 @@ import com.azure.resourcemanager.playwrighttesting.models.QuotaNames; */ public final class QuotasGetSamples { /* - * x-ms-original-file: 2024-12-01/Quotas_Get.json + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Quotas_Get.json */ /** * Sample code: Quotas_Get. @@ -257,7 +348,9 @@ public final class QuotasGetSamples { */ public final class QuotasListBySubscriptionSamples { /* - * x-ms-original-file: 2024-12-01/Quotas_ListBySubscription.json + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Quotas_ListBySubscription.json */ /** * Sample code: Quotas_ListBySubscription. diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/pom.xml b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/pom.xml index 0dfdb08ac08ea..a8b2b94db8d50 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/pom.xml +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/pom.xml @@ -1,7 +1,7 @@ 4.0.0 @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for Playwright Testing Management - This package contains Microsoft Azure SDK for Playwright Testing Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft.AzurePlaywrightService Resource Provider Management API. + This package contains Microsoft Azure SDK for Playwright Testing Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Playwright testing management service. Package tag package-2024-12-01. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/PlaywrightTestingManager.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/PlaywrightTestingManager.java index 36a07f5fb275e..f763b9f8f1711 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/PlaywrightTestingManager.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/PlaywrightTestingManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting; @@ -42,7 +42,7 @@ /** * Entry point to PlaywrightTestingManager. - * Microsoft.AzurePlaywrightService Resource Provider Management API. + * Azure Playwright testing management service. */ public final class PlaywrightTestingManager { private Operations operations; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/AccountQuotasClient.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/AccountQuotasClient.java index 886b23c0728ff..cadd3ebe2d8f4 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/AccountQuotasClient.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/AccountQuotasClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.fluent; @@ -17,59 +17,59 @@ */ public interface AccountQuotasClient { /** - * Get quota by name for an account. + * List quotas for a given account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. - * @param quotaName The Playwright service account quota name. - * @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 by name for an account along with {@link Response}. + * @return the response of a AccountQuota list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, QuotaNames quotaName, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByAccount(String resourceGroupName, String accountName); /** - * Get quota by name for an account. + * List quotas for a given account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. - * @param quotaName The Playwright service account quota name. + * @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 by name for an account. + * @return the response of a AccountQuota list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - AccountQuotaInner get(String resourceGroupName, String accountName, QuotaNames quotaName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByAccount(String resourceGroupName, String accountName, Context context); /** - * List quotas for a given account. + * Get quota by name for an account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. + * @param quotaName The Playwright service account quota name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AccountQuota list operation as paginated response with {@link PagedIterable}. + * @return quota by name for an account along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAccount(String resourceGroupName, String accountName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String accountName, QuotaNames quotaName, + Context context); /** - * List quotas for a given account. + * Get quota by name for an account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. - * @param context The context to associate with this operation. + * @param quotaName The Playwright service account quota name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AccountQuota list operation as paginated response with {@link PagedIterable}. + * @return quota by name for an account. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAccount(String resourceGroupName, String accountName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + AccountQuotaInner get(String resourceGroupName, String accountName, QuotaNames quotaName); } diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/AccountsClient.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/AccountsClient.java index 6cfb5cc239f6b..9023000f7f928 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/AccountsClient.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/AccountsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.fluent; @@ -20,6 +20,79 @@ * An instance of this class provides access to all the operations defined in AccountsClient. */ public interface AccountsClient { + /** + * List Account resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Account list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List Account resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Account list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Adds check global name availability operation, normally used if a resource name must be globally unique. + * + * @param body The CheckAvailability request. + * @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 check availability result along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest body, + Context context); + + /** + * Adds check global name availability operation, normally used if a resource name must be globally unique. + * + * @param body The CheckAvailability request. + * @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 check availability result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest body); + + /** + * List Account resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Account list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List Account resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Account list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + /** * Get a Account. * @@ -189,77 +262,4 @@ Response updateWithResponse(String resourceGroupName, String accou */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String accountName, Context context); - - /** - * List Account resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Account list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List Account resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Account list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List Account resources by subscription ID. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Account list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List Account resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Account list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Adds check global name availability operation, normally used if a resource name must be globally unique. - * - * @param body The CheckAvailability request. - * @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 check availability result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest body, - Context context); - - /** - * Adds check global name availability operation, normally used if a resource name must be globally unique. - * - * @param body The CheckAvailability request. - * @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 check availability result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest body); } diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/OperationsClient.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/OperationsClient.java index 971346fbe6a12..1b8161a72e5cd 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/OperationsClient.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.fluent; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/PlaywrightTestingMgmtClient.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/PlaywrightTestingMgmtClient.java index a7444e7b00474..b7bcc570fda9d 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/PlaywrightTestingMgmtClient.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/PlaywrightTestingMgmtClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.fluent; @@ -12,25 +12,25 @@ */ public interface PlaywrightTestingMgmtClient { /** - * Gets Service host. + * Gets The ID of the target subscription. The value must be an UUID. * - * @return the endpoint value. + * @return the subscriptionId value. */ - String getEndpoint(); + String getSubscriptionId(); /** - * Gets Version parameter. + * Gets server parameter. * - * @return the apiVersion value. + * @return the endpoint value. */ - String getApiVersion(); + String getEndpoint(); /** - * Gets The ID of the target subscription. The value must be an UUID. + * Gets Api Version. * - * @return the subscriptionId value. + * @return the apiVersion value. */ - String getSubscriptionId(); + String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/QuotasClient.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/QuotasClient.java index da3787c34b9c2..16096a0d36399 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/QuotasClient.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/QuotasClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.fluent; @@ -17,54 +17,54 @@ */ public interface QuotasClient { /** - * Get subscription quota by name. + * List quotas for a given subscription Id. * * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @param quotaName The quota name. - * @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 subscription quota by name along with {@link Response}. + * @return the response of a Quota list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, QuotaNames quotaName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySubscription(String location); /** - * Get subscription quota by name. + * List quotas for a given subscription Id. * * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @param quotaName The quota name. + * @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 subscription quota by name. + * @return the response of a Quota list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - QuotaInner get(String location, QuotaNames quotaName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySubscription(String location, Context context); /** - * List quotas for a given subscription Id. + * Get subscription quota by name. * * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. + * @param quotaName The quota name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Quota list operation as paginated response with {@link PagedIterable}. + * @return subscription quota by name along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySubscription(String location); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, QuotaNames quotaName, Context context); /** - * List quotas for a given subscription Id. + * Get subscription quota by name. * * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @param context The context to associate with this operation. + * @param quotaName The quota name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Quota list operation as paginated response with {@link PagedIterable}. + * @return subscription quota by name. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySubscription(String location, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + QuotaInner get(String location, QuotaNames quotaName); } diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/AccountInner.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/AccountInner.java index 5367443dbd6e7..bc7d04332010b 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/AccountInner.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/AccountInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.fluent.models; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/AccountQuotaInner.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/AccountQuotaInner.java index 6360a5281da84..8aae5bedf75b0 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/AccountQuotaInner.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/AccountQuotaInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * A quota resource for a Playwright service account. */ -@Immutable +@Fluent public final class AccountQuotaInner extends ProxyResource { /* * The resource-specific properties for this resource. @@ -46,7 +46,7 @@ public final class AccountQuotaInner extends ProxyResource { /** * Creates an instance of AccountQuotaInner class. */ - private AccountQuotaInner() { + public AccountQuotaInner() { } /** @@ -58,6 +58,17 @@ public AccountQuotaProperties properties() { return this.properties; } + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the AccountQuotaInner object itself. + */ + public AccountQuotaInner withProperties(AccountQuotaProperties properties) { + this.properties = properties; + return this; + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/CheckNameAvailabilityResponseInner.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/CheckNameAvailabilityResponseInner.java index 33daf45b2cf3c..22cd8c8c4e810 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/CheckNameAvailabilityResponseInner.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/CheckNameAvailabilityResponseInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * The check availability result. */ -@Immutable +@Fluent public final class CheckNameAvailabilityResponseInner implements JsonSerializable { /* * Indicates if the resource name is available. @@ -28,14 +28,14 @@ public final class CheckNameAvailabilityResponseInner implements JsonSerializabl private CheckNameAvailabilityReason reason; /* - * Detailed reason why the given name is not available. + * Detailed reason why the given name is available. */ private String message; /** * Creates an instance of CheckNameAvailabilityResponseInner class. */ - private CheckNameAvailabilityResponseInner() { + public CheckNameAvailabilityResponseInner() { } /** @@ -47,6 +47,17 @@ public Boolean nameAvailable() { return this.nameAvailable; } + /** + * Set the nameAvailable property: Indicates if the resource name is available. + * + * @param nameAvailable the nameAvailable value to set. + * @return the CheckNameAvailabilityResponseInner object itself. + */ + public CheckNameAvailabilityResponseInner withNameAvailable(Boolean nameAvailable) { + this.nameAvailable = nameAvailable; + return this; + } + /** * Get the reason property: The reason why the given name is not available. * @@ -57,7 +68,18 @@ public CheckNameAvailabilityReason reason() { } /** - * Get the message property: Detailed reason why the given name is not available. + * Set the reason property: The reason why the given name is not available. + * + * @param reason the reason value to set. + * @return the CheckNameAvailabilityResponseInner object itself. + */ + public CheckNameAvailabilityResponseInner withReason(CheckNameAvailabilityReason reason) { + this.reason = reason; + return this; + } + + /** + * Get the message property: Detailed reason why the given name is available. * * @return the message value. */ @@ -65,6 +87,17 @@ public String message() { return this.message; } + /** + * Set the message property: Detailed reason why the given name is available. + * + * @param message the message value to set. + * @return the CheckNameAvailabilityResponseInner object itself. + */ + public CheckNameAvailabilityResponseInner withMessage(String message) { + this.message = message; + return this; + } + /** * Validates the instance. * diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/OperationInner.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/OperationInner.java index 3746c1195b40f..51d6d1b3d019a 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/OperationInner.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/OperationInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,9 +15,11 @@ import java.io.IOException; /** + * REST API Operation + * * Details of a REST API operation, returned from the Resource Provider Operations API. */ -@Immutable +@Fluent public final class OperationInner implements JsonSerializable { /* * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: @@ -26,8 +28,8 @@ public final class OperationInner implements JsonSerializable { private String name; /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure - * Resource Manager/control-plane operations. + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for + * ARM/control-plane operations. */ private Boolean isDataAction; @@ -43,14 +45,14 @@ public final class OperationInner implements JsonSerializable { private Origin origin; /* - * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ private ActionType actionType; /** * Creates an instance of OperationInner class. */ - private OperationInner() { + public OperationInner() { } /** @@ -65,7 +67,7 @@ public String name() { /** * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for Azure Resource Manager/control-plane operations. + * operations and "false" for ARM/control-plane operations. * * @return the isDataAction value. */ @@ -82,6 +84,17 @@ public OperationDisplay display() { return this.display; } + /** + * Set the display property: Localized display information for this particular operation. + * + * @param display the display value to set. + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + /** * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". @@ -93,8 +106,8 @@ public Origin origin() { } /** - * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are - * for internal only APIs. + * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. * * @return the actionType value. */ diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/QuotaInner.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/QuotaInner.java index cd9b5e5078a2a..234e0a67131fe 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/QuotaInner.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/QuotaInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * A subscription quota resource. */ -@Immutable +@Fluent public final class QuotaInner extends ProxyResource { /* * The resource-specific properties for this resource. @@ -46,7 +46,7 @@ public final class QuotaInner extends ProxyResource { /** * Creates an instance of QuotaInner class. */ - private QuotaInner() { + public QuotaInner() { } /** @@ -58,6 +58,17 @@ public QuotaProperties properties() { return this.properties; } + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the QuotaInner object itself. + */ + public QuotaInner withProperties(QuotaProperties properties) { + this.properties = properties; + return this; + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/package-info.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/package-info.java index 9cd5cb824e655..90e7bd7f0901e 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/package-info.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the inner data models for PlaywrightTesting. - * Microsoft.AzurePlaywrightService Resource Provider Management API. + * Package containing the inner data models for PlaywrightTestingMgmtClient. + * Azure Playwright testing management service. */ package com.azure.resourcemanager.playwrighttesting.fluent.models; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/package-info.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/package-info.java index 4dd90b40458c2..22ece0f28fc06 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/package-info.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the service clients for PlaywrightTesting. - * Microsoft.AzurePlaywrightService Resource Provider Management API. + * Package containing the service clients for PlaywrightTestingMgmtClient. + * Azure Playwright testing management service. */ package com.azure.resourcemanager.playwrighttesting.fluent; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountImpl.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountImpl.java index c8892447ab5bc..a7130c098417d 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountImpl.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.implementation; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountQuotaImpl.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountQuotaImpl.java index 74af2cad44639..fc26eb965fcd6 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountQuotaImpl.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountQuotaImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.implementation; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountQuotasClientImpl.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountQuotasClientImpl.java index ab40f671a3641..537b2f0af7482 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountQuotasClientImpl.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountQuotasClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.playwrighttesting.fluent.AccountQuotasClient; import com.azure.resourcemanager.playwrighttesting.fluent.models.AccountQuotaInner; -import com.azure.resourcemanager.playwrighttesting.implementation.models.AccountQuotaListResult; +import com.azure.resourcemanager.playwrighttesting.models.AccountQuotaListResult; import com.azure.resourcemanager.playwrighttesting.models.QuotaNames; import reactor.core.publisher.Mono; @@ -60,50 +60,50 @@ public final class AccountQuotasClientImpl implements AccountQuotasClient { * The interface defining all the services for PlaywrightTestingMgmtClientAccountQuotas to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "PlaywrightTestingMgm") public interface AccountQuotasService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, + Mono> listByAccount(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("quotaName") QuotaNames quotaName, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByAccount(@HostParam("endpoint") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("quotaName") QuotaNames quotaName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByAccountNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Get quota by name for an account. + * List quotas for a given account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. - * @param quotaName The Playwright service account quota name. * @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 by name for an account along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a AccountQuota list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - QuotaNames quotaName) { + private Mono> listByAccountSinglePageAsync(String resourceGroupName, + String accountName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -119,31 +119,30 @@ private Mono> getWithResponseAsync(String resourceGr if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - if (quotaName == null) { - return Mono.error(new IllegalArgumentException("Parameter quotaName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, quotaName, accept, context)) + .withContext(context -> service.listByAccount(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, 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 quota by name for an account. + * List quotas for a given account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. - * @param quotaName The Playwright service account quota name. * @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 quota by name for an account along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a AccountQuota list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - QuotaNames quotaName, Context context) { + private Mono> listByAccountSinglePageAsync(String resourceGroupName, + String accountName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -159,64 +158,62 @@ private Mono> getWithResponseAsync(String resourceGr if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - if (quotaName == null) { - return Mono.error(new IllegalArgumentException("Parameter quotaName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, accountName, quotaName, accept, context); + return service + .listByAccount(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Get quota by name for an account. + * List quotas for a given account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. - * @param quotaName The Playwright service account quota name. * @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 by name for an account on successful completion of {@link Mono}. + * @return the response of a AccountQuota list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, QuotaNames quotaName) { - return getWithResponseAsync(resourceGroupName, accountName, quotaName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByAccountAsync(String resourceGroupName, String accountName) { + return new PagedFlux<>(() -> listByAccountSinglePageAsync(resourceGroupName, accountName), + nextLink -> listByAccountNextSinglePageAsync(nextLink)); } /** - * Get quota by name for an account. + * List quotas for a given account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. - * @param quotaName The Playwright service account quota name. * @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 quota by name for an account along with {@link Response}. + * @return the response of a AccountQuota list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, - QuotaNames quotaName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, quotaName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByAccountAsync(String resourceGroupName, String accountName, + Context context) { + return new PagedFlux<>(() -> listByAccountSinglePageAsync(resourceGroupName, accountName, context), + nextLink -> listByAccountNextSinglePageAsync(nextLink, context)); } /** - * Get quota by name for an account. + * List quotas for a given account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. - * @param quotaName The Playwright service account quota name. * @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 by name for an account. + * @return the response of a AccountQuota list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AccountQuotaInner get(String resourceGroupName, String accountName, QuotaNames quotaName) { - return getWithResponse(resourceGroupName, accountName, quotaName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByAccount(String resourceGroupName, String accountName) { + return new PagedIterable<>(listByAccountAsync(resourceGroupName, accountName)); } /** @@ -224,15 +221,32 @@ public AccountQuotaInner get(String resourceGroupName, String accountName, Quota * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. + * @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 response of a AccountQuota list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response of a AccountQuota list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByAccount(String resourceGroupName, String accountName, + Context context) { + return new PagedIterable<>(listByAccountAsync(resourceGroupName, accountName, context)); + } + + /** + * Get quota by name for an account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of account. + * @param quotaName The Playwright service account quota name. + * @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 by name for an account along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAccountSinglePageAsync(String resourceGroupName, - String accountName) { + private Mono> getWithResponseAsync(String resourceGroupName, String accountName, + QuotaNames quotaName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -248,30 +262,31 @@ private Mono> listByAccountSinglePageAsync(Stri if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } + if (quotaName == null) { + return Mono.error(new IllegalArgumentException("Parameter quotaName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByAccount(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, quotaName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List quotas for a given account. + * Get quota by name for an account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. + * @param quotaName The Playwright service account quota name. * @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 response of a AccountQuota list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return quota by name for an account along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAccountSinglePageAsync(String resourceGroupName, - String accountName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String accountName, + QuotaNames quotaName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -287,79 +302,64 @@ private Mono> listByAccountSinglePageAsync(Stri if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } + if (quotaName == null) { + return Mono.error(new IllegalArgumentException("Parameter quotaName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByAccount(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, accountName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, quotaName, accept, context); } /** - * List quotas for a given account. + * Get quota by name for an account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. + * @param quotaName The Playwright service account quota name. * @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 response of a AccountQuota list operation as paginated response with {@link PagedFlux}. + * @return quota by name for an account on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByAccountAsync(String resourceGroupName, String accountName) { - return new PagedFlux<>(() -> listByAccountSinglePageAsync(resourceGroupName, accountName), - nextLink -> listByAccountNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, QuotaNames quotaName) { + return getWithResponseAsync(resourceGroupName, accountName, quotaName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List quotas for a given account. + * Get quota by name for an account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. + * @param quotaName The Playwright service account quota name. * @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 response of a AccountQuota list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByAccountAsync(String resourceGroupName, String accountName, - Context context) { - return new PagedFlux<>(() -> listByAccountSinglePageAsync(resourceGroupName, accountName, context), - nextLink -> listByAccountNextSinglePageAsync(nextLink, context)); - } - - /** - * List quotas for a given account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. - * @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 response of a AccountQuota list operation as paginated response with {@link PagedIterable}. + * @return quota by name for an account along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAccount(String resourceGroupName, String accountName) { - return new PagedIterable<>(listByAccountAsync(resourceGroupName, accountName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String accountName, + QuotaNames quotaName, Context context) { + return getWithResponseAsync(resourceGroupName, accountName, quotaName, context).block(); } /** - * List quotas for a given account. + * Get quota by name for an account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. - * @param context The context to associate with this operation. + * @param quotaName The Playwright service account quota name. * @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 response of a AccountQuota list operation as paginated response with {@link PagedIterable}. + * @return quota by name for an account. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAccount(String resourceGroupName, String accountName, - Context context) { - return new PagedIterable<>(listByAccountAsync(resourceGroupName, accountName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public AccountQuotaInner get(String resourceGroupName, String accountName, QuotaNames quotaName) { + return getWithResponse(resourceGroupName, accountName, quotaName, Context.NONE).getValue(); } /** diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountQuotasImpl.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountQuotasImpl.java index 5e2a1f9605518..abc45b728d42b 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountQuotasImpl.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountQuotasImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.implementation; @@ -28,6 +28,17 @@ public AccountQuotasImpl(AccountQuotasClient innerClient, this.serviceManager = serviceManager; } + public PagedIterable listByAccount(String resourceGroupName, String accountName) { + PagedIterable inner = this.serviceClient().listByAccount(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountQuotaImpl(inner1, this.manager())); + } + + public PagedIterable listByAccount(String resourceGroupName, String accountName, Context context) { + PagedIterable inner + = this.serviceClient().listByAccount(resourceGroupName, accountName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountQuotaImpl(inner1, this.manager())); + } + public Response getWithResponse(String resourceGroupName, String accountName, QuotaNames quotaName, Context context) { Response inner @@ -49,17 +60,6 @@ public AccountQuota get(String resourceGroupName, String accountName, QuotaNames } } - public PagedIterable listByAccount(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().listByAccount(resourceGroupName, accountName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountQuotaImpl(inner1, this.manager())); - } - - public PagedIterable listByAccount(String resourceGroupName, String accountName, Context context) { - PagedIterable inner - = this.serviceClient().listByAccount(resourceGroupName, accountName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountQuotaImpl(inner1, this.manager())); - } - private AccountQuotasClient serviceClient() { return this.innerClient; } diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountsClientImpl.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountsClientImpl.java index 2f5c5b540b5ae..4b97aabf4cfa3 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountsClientImpl.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.implementation; @@ -36,7 +36,7 @@ import com.azure.resourcemanager.playwrighttesting.fluent.AccountsClient; import com.azure.resourcemanager.playwrighttesting.fluent.models.AccountInner; import com.azure.resourcemanager.playwrighttesting.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.playwrighttesting.implementation.models.AccountListResult; +import com.azure.resourcemanager.playwrighttesting.models.AccountListResult; import com.azure.resourcemanager.playwrighttesting.models.AccountUpdate; import com.azure.resourcemanager.playwrighttesting.models.CheckNameAvailabilityRequest; import java.nio.ByteBuffer; @@ -71,100 +71,100 @@ public final class AccountsClientImpl implements AccountsClient { * The interface defining all the services for PlaywrightTestingMgmtClientAccounts to be used by the proxy service * to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "PlaywrightTestingMgm") public interface AccountsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/accounts") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/checkNameAvailability") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + Mono> checkNameAvailability(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") AccountInner resource, Context context); + @BodyParam("application/json") CheckNameAvailabilityRequest body, @HeaderParam("Accept") String accept, + Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}") + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") AccountUpdate properties, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}") - @ExpectedResponses({ 202, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @BodyParam("application/json") AccountInner resource, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/accounts") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @BodyParam("application/json") AccountUpdate properties, @HeaderParam("Accept") String accept, + Context context); - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/checkNameAvailability") - @ExpectedResponses({ 200 }) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability(@HostParam("endpoint") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") CheckNameAvailabilityRequest body, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Get a Account. + * List Account resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. - * @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 Account along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a Account list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String accountName) { + private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -173,34 +173,27 @@ private Mono> getByResourceGroupWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 a Account. + * List Account resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. * @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 Account along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a Account list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String accountName, Context context) { + 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.")); @@ -209,82 +202,81 @@ private Mono> getByResourceGroupWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Get a Account. + * List Account resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. - * @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 Account on successful completion of {@link Mono}. + * @return the response of a Account list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, accountName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Get a Account. + * List Account resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. * @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 Account along with {@link Response}. + * @return the response of a Account list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, accountName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** - * Get a Account. + * List Account resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. + * @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 of a Account list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List Account resources by subscription ID. + * + * @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 Account. + * @return the response of a Account list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AccountInner getByResourceGroup(String resourceGroupName, String accountName) { - return getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); } /** - * Create a Account. + * Adds check global name availability operation, normally used if a resource name must be globally unique. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. - * @param resource Resource create parameters. + * @param body The CheckAvailability request. * @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 Playwright service account resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return the check availability result along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, AccountInner resource) { + private Mono> + checkNameAvailabilityWithResponseAsync(CheckNameAvailabilityRequest body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -293,43 +285,31 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); } else { - resource.validate(); + body.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, resource, - context)) + .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create a Account. + * Adds check global name availability operation, normally used if a resource name must be globally unique. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. - * @param resource Resource create parameters. + * @param body The CheckAvailability request. * @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 Playwright service account resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return the check availability result along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, AccountInner resource, Context context) { + private Mono> + checkNameAvailabilityWithResponseAsync(CheckNameAvailabilityRequest body, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -338,188 +318,202 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); } else { - resource.validate(); + body.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, resource, context); + return service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), body, accept, context); } /** - * Create a Account. + * Adds check global name availability operation, normally used if a resource name must be globally unique. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. - * @param resource Resource create parameters. + * @param body The CheckAvailability request. * @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 {@link PollerFlux} for polling of a Playwright service account resource. + * @return the check availability result on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AccountInner> beginCreateOrUpdateAsync(String resourceGroupName, - String accountName, AccountInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, accountName, resource); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - AccountInner.class, AccountInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono checkNameAvailabilityAsync(CheckNameAvailabilityRequest body) { + return checkNameAvailabilityWithResponseAsync(body).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create a Account. + * Adds check global name availability operation, normally used if a resource name must be globally unique. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. - * @param resource Resource create parameters. + * @param body The CheckAvailability request. * @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 {@link PollerFlux} for polling of a Playwright service account resource. + * @return the check availability result along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AccountInner> beginCreateOrUpdateAsync(String resourceGroupName, - String accountName, AccountInner resource, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, accountName, resource, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - AccountInner.class, AccountInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest body, Context context) { + return checkNameAvailabilityWithResponseAsync(body, context).block(); } /** - * Create a Account. + * Adds check global name availability operation, normally used if a resource name must be globally unique. + * + * @param body The CheckAvailability request. + * @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 check availability result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest body) { + return checkNameAvailabilityWithResponse(body, Context.NONE).getValue(); + } + + /** + * List Account resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. - * @param resource Resource create parameters. * @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 {@link SyncPoller} for polling of a Playwright service account resource. + * @return the response of a Account list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AccountInner> beginCreateOrUpdate(String resourceGroupName, - String accountName, AccountInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, accountName, resource).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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())); } /** - * Create a Account. + * List Account resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. - * @param resource Resource create parameters. * @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 {@link SyncPoller} for polling of a Playwright service account resource. + * @return the response of a Account list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AccountInner> beginCreateOrUpdate(String resourceGroupName, - String accountName, AccountInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, accountName, resource, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Create a Account. + * List Account resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. - * @param resource Resource create parameters. * @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 Playwright service account resource on successful completion of {@link Mono}. + * @return the response of a Account list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String accountName, - AccountInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, resource).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Create a Account. + * List Account resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. - * @param resource Resource create parameters. * @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 Playwright service account resource on successful completion of {@link Mono}. + * @return the response of a Account list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String accountName, AccountInner resource, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, resource, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** - * Create a Account. + * List Account resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. - * @param resource Resource create parameters. * @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 Playwright service account resource. + * @return the response of a Account list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AccountInner createOrUpdate(String resourceGroupName, String accountName, AccountInner resource) { - return createOrUpdateAsync(resourceGroupName, accountName, resource).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); } /** - * Create a Account. + * List Account resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. - * @param resource Resource create parameters. * @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 Playwright service account resource. + * @return the response of a Account list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AccountInner createOrUpdate(String resourceGroupName, String accountName, AccountInner resource, - Context context) { - return createOrUpdateAsync(resourceGroupName, accountName, resource, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** - * Update a Account. + * Get a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. - * @param properties The resource properties to be updated. * @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 Playwright service account resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return a Account along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String accountName, - AccountUpdate properties) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String accountName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -535,34 +529,27 @@ private Mono> updateWithResponseAsync(String resourceGrou if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, properties, context)) + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a Account. + * Get a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. - * @param properties The resource properties to be updated. * @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 Playwright service account resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return a Account along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String accountName, - AccountUpdate properties, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String accountName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -578,81 +565,75 @@ private Mono> updateWithResponseAsync(String resourceGrou if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, accountName, contentType, accept, properties, context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); } /** - * Update a Account. + * Get a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. - * @param properties The resource properties to be updated. * @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 Playwright service account resource on successful completion of {@link Mono}. + * @return a Account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, AccountUpdate properties) { - return updateWithResponseAsync(resourceGroupName, accountName, properties) + private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, accountName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Update a Account. + * Get a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. - * @param properties The resource properties to be updated. * @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 Playwright service account resource along with {@link Response}. + * @return a Account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String accountName, - AccountUpdate properties, Context context) { - return updateWithResponseAsync(resourceGroupName, accountName, properties, context).block(); + public Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, accountName, context).block(); } /** - * Update a Account. + * Get a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. - * @param properties The resource properties to be updated. * @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 Playwright service account resource. + * @return a Account. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AccountInner update(String resourceGroupName, String accountName, AccountUpdate properties) { - return updateWithResponse(resourceGroupName, accountName, properties, Context.NONE).getValue(); + public AccountInner getByResourceGroup(String resourceGroupName, String accountName) { + return getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue(); } /** - * Delete a Account. + * Create a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. + * @param resource Resource create parameters. * @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 {@link Response} on successful completion of {@link Mono}. + * @return a Playwright service account resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, AccountInner resource) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -668,27 +649,34 @@ private Mono>> deleteWithResponseAsync(String resource if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, resource, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a Account. + * Create a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. + * @param resource Resource create parameters. * @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 {@link Response} on successful completion of {@link Mono}. + * @return a Playwright service account resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, AccountInner resource, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -704,154 +692,180 @@ private Mono>> deleteWithResponseAsync(String resource if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, accountName, accept, context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, resource, accept, context); } /** - * Delete a Account. + * Create a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. + * @param resource Resource create parameters. * @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 {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of a Playwright service account resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + private PollerFlux, AccountInner> beginCreateOrUpdateAsync(String resourceGroupName, + String accountName, AccountInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AccountInner.class, AccountInner.class, this.client.getContext()); } /** - * Delete a Account. + * Create a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. + * @param resource Resource create parameters. * @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 {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of a Playwright service account resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - Context context) { + private PollerFlux, AccountInner> beginCreateOrUpdateAsync(String resourceGroupName, + String accountName, AccountInner resource, Context context) { context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AccountInner.class, AccountInner.class, context); } /** - * Delete a Account. + * Create a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. + * @param resource Resource create parameters. * @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 {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of a Playwright service account resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName) { - return this.beginDeleteAsync(resourceGroupName, accountName).getSyncPoller(); + public SyncPoller, AccountInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, AccountInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, accountName, resource).getSyncPoller(); } /** - * Delete a Account. + * Create a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. + * @param resource Resource create parameters. * @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 {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of a Playwright service account resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, accountName, context).getSyncPoller(); + public SyncPoller, AccountInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, AccountInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, accountName, resource, context).getSyncPoller(); } /** - * Delete a Account. + * Create a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. + * @param resource Resource create parameters. * @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 {@link Mono} that completes when a successful response is received. + * @return a Playwright service account resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName) { - return beginDeleteAsync(resourceGroupName, accountName).last().flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String accountName, + AccountInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a Account. + * Create a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. + * @param resource Resource create parameters. * @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 {@link Mono} that completes when a successful response is received. + * @return a Playwright service account resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, context).last() + private Mono createOrUpdateAsync(String resourceGroupName, String accountName, AccountInner resource, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, resource, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a Account. + * Create a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. + * @param resource Resource create parameters. * @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 Playwright service account resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName) { - deleteAsync(resourceGroupName, accountName).block(); + public AccountInner createOrUpdate(String resourceGroupName, String accountName, AccountInner resource) { + return createOrUpdateAsync(resourceGroupName, accountName, resource).block(); } /** - * Delete a Account. + * Create a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. + * @param resource Resource create parameters. * @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 Playwright service account resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, Context context) { - deleteAsync(resourceGroupName, accountName, context).block(); + public AccountInner createOrUpdate(String resourceGroupName, String accountName, AccountInner resource, + Context context) { + return createOrUpdateAsync(resourceGroupName, accountName, resource, context).block(); } /** - * List Account resources by resource group. + * Update a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of account. + * @param properties The resource properties to be updated. * @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 response of a Account list operation along with {@link PagedResponse} on successful completion of + * @return a Playwright service account resource along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + private Mono> updateWithResponseAsync(String resourceGroupName, String accountName, + AccountUpdate properties) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -864,29 +878,37 @@ private Mono> listByResourceGroupSinglePageAsync(Str return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, properties, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Account resources by resource group. + * Update a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of account. + * @param properties The resource properties to be updated. * @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 response of a Account list operation along with {@link PagedResponse} on successful completion of + * @return a Playwright service account resource along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String accountName, + AccountUpdate properties, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -899,85 +921,83 @@ private Mono> listByResourceGroupSinglePageAsync(Str return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List Account resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 response of a Account list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, properties, accept, context); } /** - * List Account resources by resource group. + * Update a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param accountName Name of account. + * @param properties The resource properties to be updated. * @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 response of a Account list operation as paginated response with {@link PagedFlux}. + * @return a Playwright service account resource on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, AccountUpdate properties) { + return updateWithResponseAsync(resourceGroupName, accountName, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List Account resources by resource group. + * Update a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of account. + * @param properties The resource properties to be updated. + * @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 response of a Account list operation as paginated response with {@link PagedIterable}. + * @return a Playwright service account resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String accountName, + AccountUpdate properties, Context context) { + return updateWithResponseAsync(resourceGroupName, accountName, properties, context).block(); } /** - * List Account resources by resource group. + * Update a Account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param accountName Name of account. + * @param properties The resource properties to be updated. * @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 response of a Account list operation as paginated response with {@link PagedIterable}. + * @return a Playwright service account resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public AccountInner update(String resourceGroupName, String accountName, AccountUpdate properties) { + return updateWithResponse(resourceGroupName, accountName, properties, Context.NONE).getValue(); } /** - * List Account resources by subscription ID. + * Delete a Account. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of account. + * @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 response of a Account list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -986,27 +1006,34 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Account resources by subscription ID. + * Delete a Account. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of account. * @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 response of a Account list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1015,177 +1042,147 @@ private Mono> listSinglePageAsync(Context context) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName 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(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, accept, context); } /** - * List Account resources by subscription ID. + * Delete a Account. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of account. + * @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 response of a Account list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * List Account resources by subscription ID. + * Delete a Account. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of account. * @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 response of a Account list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * List Account resources by subscription ID. + * Delete a Account. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of account. + * @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 response of a Account list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName) { + return this.beginDeleteAsync(resourceGroupName, accountName).getSyncPoller(); } /** - * List Account resources by subscription ID. + * Delete a Account. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of account. * @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 response of a Account list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, accountName, context).getSyncPoller(); } /** - * Adds check global name availability operation, normally used if a resource name must be globally unique. + * Delete a Account. * - * @param body The CheckAvailability request. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of account. * @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 check availability result along with {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - checkNameAvailabilityWithResponseAsync(CheckNameAvailabilityRequest body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), contentType, accept, body, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String accountName) { + return beginDeleteAsync(resourceGroupName, accountName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Adds check global name availability operation, normally used if a resource name must be globally unique. + * Delete a Account. * - * @param body The CheckAvailability request. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of account. * @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 check availability result along with {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - checkNameAvailabilityWithResponseAsync(CheckNameAvailabilityRequest body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), contentType, accept, body, context); + private Mono deleteAsync(String resourceGroupName, String accountName, Context context) { + return beginDeleteAsync(resourceGroupName, accountName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Adds check global name availability operation, normally used if a resource name must be globally unique. + * Delete a Account. * - * @param body The CheckAvailability request. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of account. * @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 check availability result on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkNameAvailabilityAsync(CheckNameAvailabilityRequest body) { - return checkNameAvailabilityWithResponseAsync(body).flatMap(res -> Mono.justOrEmpty(res.getValue())); + public void delete(String resourceGroupName, String accountName) { + deleteAsync(resourceGroupName, accountName).block(); } /** - * Adds check global name availability operation, normally used if a resource name must be globally unique. + * Delete a Account. * - * @param body The CheckAvailability request. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of account. * @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 check availability result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response - checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest body, Context context) { - return checkNameAvailabilityWithResponseAsync(body, context).block(); - } - - /** - * Adds check global name availability operation, normally used if a resource name must be globally unique. - * - * @param body The CheckAvailability request. - * @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 check availability result. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest body) { - return checkNameAvailabilityWithResponse(body, Context.NONE).getValue(); + public void delete(String resourceGroupName, String accountName, Context context) { + deleteAsync(resourceGroupName, accountName, context).block(); } /** @@ -1199,7 +1196,7 @@ public CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailab * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1210,7 +1207,7 @@ private Mono> listByResourceGroupNextSinglePageAsync final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(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())); @@ -1228,7 +1225,7 @@ private Mono> listByResourceGroupNextSinglePageAsync * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1238,7 +1235,7 @@ private Mono> listByResourceGroupNextSinglePageAsync } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -1254,7 +1251,7 @@ private Mono> listByResourceGroupNextSinglePageAsync * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1265,7 +1262,7 @@ private Mono> listBySubscriptionNextSinglePageAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByResourceGroupNext(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())); @@ -1283,7 +1280,7 @@ private Mono> listBySubscriptionNextSinglePageAsync( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1293,7 +1290,7 @@ private Mono> listBySubscriptionNextSinglePageAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByResourceGroupNext(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/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountsImpl.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountsImpl.java index 17fbed47b416a..635c3062a1b72 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountsImpl.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.implementation; @@ -30,35 +30,37 @@ public AccountsImpl(AccountsClient innerClient, this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager())); + } + + public Response checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest body, Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, accountName, context); + Response inner + = this.serviceClient().checkNameAvailabilityWithResponse(body, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new AccountImpl(inner.getValue(), this.manager())); + new CheckNameAvailabilityResponseImpl(inner.getValue(), this.manager())); } else { return null; } } - public Account getByResourceGroup(String resourceGroupName, String accountName) { - AccountInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, accountName); + public CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest body) { + CheckNameAvailabilityResponseInner inner = this.serviceClient().checkNameAvailability(body); if (inner != null) { - return new AccountImpl(inner, this.manager()); + return new CheckNameAvailabilityResponseImpl(inner, this.manager()); } else { return null; } } - public void deleteByResourceGroup(String resourceGroupName, String accountName) { - this.serviceClient().delete(resourceGroupName, accountName); - } - - public void delete(String resourceGroupName, String accountName, Context context) { - this.serviceClient().delete(resourceGroupName, accountName, context); - } - public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager())); @@ -69,37 +71,35 @@ public PagedIterable listByResourceGroup(String resourceGroupName, Cont return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager())); } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager())); - } - - public Response checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest body, + public Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, Context context) { - Response inner - = this.serviceClient().checkNameAvailabilityWithResponse(body, context); + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, accountName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CheckNameAvailabilityResponseImpl(inner.getValue(), this.manager())); + new AccountImpl(inner.getValue(), this.manager())); } else { return null; } } - public CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest body) { - CheckNameAvailabilityResponseInner inner = this.serviceClient().checkNameAvailability(body); + public Account getByResourceGroup(String resourceGroupName, String accountName) { + AccountInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, accountName); if (inner != null) { - return new CheckNameAvailabilityResponseImpl(inner, this.manager()); + return new AccountImpl(inner, this.manager()); } else { return null; } } + public void deleteByResourceGroup(String resourceGroupName, String accountName) { + this.serviceClient().delete(resourceGroupName, accountName); + } + + public void delete(String resourceGroupName, String accountName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, context); + } + public Account getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/CheckNameAvailabilityResponseImpl.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/CheckNameAvailabilityResponseImpl.java index eb15ea627f21a..4537f4c0efba6 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/CheckNameAvailabilityResponseImpl.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/CheckNameAvailabilityResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.implementation; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/OperationImpl.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/OperationImpl.java index c7c9806a53f62..057480fbb2315 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/OperationImpl.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/OperationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.implementation; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/OperationsClientImpl.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/OperationsClientImpl.java index 84ea998833f4d..a254550f2beb0 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/OperationsClientImpl.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.playwrighttesting.fluent.OperationsClient; import com.azure.resourcemanager.playwrighttesting.fluent.models.OperationInner; -import com.azure.resourcemanager.playwrighttesting.implementation.models.OperationListResult; +import com.azure.resourcemanager.playwrighttesting.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -59,14 +59,14 @@ public final class OperationsClientImpl implements OperationsClient { * The interface defining all the services for PlaywrightTestingMgmtClientOperations to be used by the proxy service * to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "PlaywrightTestingMgm") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.AzurePlaywrightService/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,7 +74,7 @@ Mono> list(@HostParam("endpoint") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/OperationsImpl.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/OperationsImpl.java index 7126253945517..942c576177dfd 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/OperationsImpl.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.implementation; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/PlaywrightTestingMgmtClientBuilder.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/PlaywrightTestingMgmtClientBuilder.java index 5a7cd830cb5fb..632eac64a6fc5 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/PlaywrightTestingMgmtClientBuilder.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/PlaywrightTestingMgmtClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.implementation; @@ -20,34 +20,34 @@ @ServiceClientBuilder(serviceClients = { PlaywrightTestingMgmtClientImpl.class }) public final class PlaywrightTestingMgmtClientBuilder { /* - * Service host + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets Service host. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the PlaywrightTestingMgmtClientBuilder. */ - public PlaywrightTestingMgmtClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public PlaywrightTestingMgmtClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } /* - * The ID of the target subscription. The value must be an UUID. + * server parameter */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets server parameter. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the PlaywrightTestingMgmtClientBuilder. */ - public PlaywrightTestingMgmtClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public PlaywrightTestingMgmtClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } @@ -132,7 +132,7 @@ public PlaywrightTestingMgmtClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); PlaywrightTestingMgmtClientImpl client = new PlaywrightTestingMgmtClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); + localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/PlaywrightTestingMgmtClientImpl.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/PlaywrightTestingMgmtClientImpl.java index 31c485c3fb5d8..d08f0f9c0fa9e 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/PlaywrightTestingMgmtClientImpl.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/PlaywrightTestingMgmtClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.implementation; @@ -43,45 +43,45 @@ @ServiceClient(builder = PlaywrightTestingMgmtClientBuilder.class) public final class PlaywrightTestingMgmtClientImpl implements PlaywrightTestingMgmtClient { /** - * Service host. + * The ID of the target subscription. The value must be an UUID. */ - private final String endpoint; + private final String subscriptionId; /** - * Gets Service host. + * Gets The ID of the target subscription. The value must be an UUID. * - * @return the endpoint value. + * @return the subscriptionId value. */ - public String getEndpoint() { - return this.endpoint; + public String getSubscriptionId() { + return this.subscriptionId; } /** - * Version parameter. + * server parameter. */ - private final String apiVersion; + private final String endpoint; /** - * Gets Version parameter. + * Gets server parameter. * - * @return the apiVersion value. + * @return the endpoint value. */ - public String getApiVersion() { - return this.apiVersion; + public String getEndpoint() { + return this.endpoint; } /** - * The ID of the target subscription. The value must be an UUID. + * Api Version. */ - private final String subscriptionId; + private final String apiVersion; /** - * Gets The ID of the target subscription. The value must be an UUID. + * Gets Api Version. * - * @return the subscriptionId value. + * @return the apiVersion value. */ - public String getSubscriptionId() { - return this.subscriptionId; + public String getApiVersion() { + return this.apiVersion; } /** @@ -189,16 +189,16 @@ public AccountQuotasClient getAccountQuotas() { * @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 Service host. * @param subscriptionId The ID of the target subscription. The value must be an UUID. + * @param endpoint server parameter. */ PlaywrightTestingMgmtClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.endpoint = endpoint; this.subscriptionId = subscriptionId; + this.endpoint = endpoint; this.apiVersion = "2024-12-01"; this.operations = new OperationsClientImpl(this); this.accounts = new AccountsClientImpl(this); diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/QuotaImpl.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/QuotaImpl.java index f50beb2613984..2bba90979d895 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/QuotaImpl.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/QuotaImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.implementation; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/QuotasClientImpl.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/QuotasClientImpl.java index bef09ccaf43df..a326a127ada6b 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/QuotasClientImpl.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/QuotasClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.playwrighttesting.fluent.QuotasClient; import com.azure.resourcemanager.playwrighttesting.fluent.models.QuotaInner; -import com.azure.resourcemanager.playwrighttesting.implementation.models.QuotaListResult; +import com.azure.resourcemanager.playwrighttesting.models.QuotaListResult; import com.azure.resourcemanager.playwrighttesting.models.QuotaNames; import reactor.core.publisher.Mono; @@ -59,47 +59,47 @@ public final class QuotasClientImpl implements QuotasClient { * The interface defining all the services for PlaywrightTestingMgmtClientQuotas to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "PlaywrightTestingMgm") public interface QuotasService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, + Mono> listBySubscription(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @PathParam("quotaName") QuotaNames quotaName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscription(@HostParam("endpoint") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @PathParam("location") String location, @PathParam("quotaName") QuotaNames quotaName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Get subscription quota by name. + * List quotas for a given subscription Id. * * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @param quotaName The quota name. * @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 subscription quota by name along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a Quota list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, QuotaNames quotaName) { + private Mono> listBySubscriptionSinglePageAsync(String location) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -111,29 +111,28 @@ private Mono> getWithResponseAsync(String location, QuotaNa if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - if (quotaName == null) { - return Mono.error(new IllegalArgumentException("Parameter quotaName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, quotaName, accept, context)) + .withContext(context -> service.listBySubscription(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, 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 subscription quota by name. + * List quotas for a given subscription Id. * * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @param quotaName The quota name. * @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 subscription quota by name along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a Quota list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, QuotaNames quotaName, Context context) { + private Mono> listBySubscriptionSinglePageAsync(String location, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -145,73 +144,87 @@ private Mono> getWithResponseAsync(String location, QuotaNa if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - if (quotaName == null) { - return Mono.error(new IllegalArgumentException("Parameter quotaName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, quotaName, accept, context); + return service + .listBySubscription(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Get subscription quota by name. + * List quotas for a given subscription Id. * * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @param quotaName The quota name. * @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 subscription quota by name on successful completion of {@link Mono}. + * @return the response of a Quota list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location, QuotaNames quotaName) { - return getWithResponseAsync(location, quotaName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySubscriptionAsync(String location) { + return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(location), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Get subscription quota by name. + * List quotas for a given subscription Id. * * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @param quotaName The quota name. * @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 subscription quota by name along with {@link Response}. + * @return the response of a Quota list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String location, QuotaNames quotaName, Context context) { - return getWithResponseAsync(location, quotaName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySubscriptionAsync(String location, Context context) { + return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(location, context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** - * Get subscription quota by name. + * List quotas for a given subscription Id. * * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @param quotaName The quota name. * @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 subscription quota by name. + * @return the response of a Quota list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public QuotaInner get(String location, QuotaNames quotaName) { - return getWithResponse(location, quotaName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySubscription(String location) { + return new PagedIterable<>(listBySubscriptionAsync(location)); } /** * List quotas for a given subscription Id. * * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. + * @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 response of a Quota list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a Quota list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySubscription(String location, Context context) { + return new PagedIterable<>(listBySubscriptionAsync(location, context)); + } + + /** + * Get subscription quota by name. + * + * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. + * @param quotaName The quota name. + * @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 subscription quota by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionSinglePageAsync(String location) { + private Mono> getWithResponseAsync(String location, QuotaNames quotaName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -223,28 +236,29 @@ private Mono> listBySubscriptionSinglePageAsync(String if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } + if (quotaName == null) { + return Mono.error(new IllegalArgumentException("Parameter quotaName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listBySubscription(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, quotaName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List quotas for a given subscription Id. + * Get subscription quota by name. * * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. + * @param quotaName The quota name. * @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 response of a Quota list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return subscription quota by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionSinglePageAsync(String location, Context context) { + private Mono> getWithResponseAsync(String location, QuotaNames quotaName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -256,73 +270,59 @@ private Mono> listBySubscriptionSinglePageAsync(String if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } + if (quotaName == null) { + return Mono.error(new IllegalArgumentException("Parameter quotaName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscription(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, quotaName, accept, context); } /** - * List quotas for a given subscription Id. + * Get subscription quota by name. * * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. + * @param quotaName The quota name. * @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 response of a Quota list operation as paginated response with {@link PagedFlux}. + * @return subscription quota by name on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listBySubscriptionAsync(String location) { - return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(location), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, QuotaNames quotaName) { + return getWithResponseAsync(location, quotaName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List quotas for a given subscription Id. + * Get subscription quota by name. * * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. + * @param quotaName The quota name. * @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 response of a Quota list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listBySubscriptionAsync(String location, Context context) { - return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(location, context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * List quotas for a given subscription Id. - * - * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @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 response of a Quota list operation as paginated response with {@link PagedIterable}. + * @return subscription quota by name along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySubscription(String location) { - return new PagedIterable<>(listBySubscriptionAsync(location)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, QuotaNames quotaName, Context context) { + return getWithResponseAsync(location, quotaName, context).block(); } /** - * List quotas for a given subscription Id. + * Get subscription quota by name. * * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @param context The context to associate with this operation. + * @param quotaName The quota name. * @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 response of a Quota list operation as paginated response with {@link PagedIterable}. + * @return subscription quota by name. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySubscription(String location, Context context) { - return new PagedIterable<>(listBySubscriptionAsync(location, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public QuotaInner get(String location, QuotaNames quotaName) { + return getWithResponse(location, quotaName, Context.NONE).getValue(); } /** diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/QuotasImpl.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/QuotasImpl.java index a0f9ee218878b..d58c49b9a2287 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/QuotasImpl.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/QuotasImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.implementation; @@ -28,6 +28,16 @@ public QuotasImpl(QuotasClient innerClient, this.serviceManager = serviceManager; } + public PagedIterable listBySubscription(String location) { + PagedIterable inner = this.serviceClient().listBySubscription(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new QuotaImpl(inner1, this.manager())); + } + + public PagedIterable listBySubscription(String location, Context context) { + PagedIterable inner = this.serviceClient().listBySubscription(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new QuotaImpl(inner1, this.manager())); + } + public Response getWithResponse(String location, QuotaNames quotaName, Context context) { Response inner = this.serviceClient().getWithResponse(location, quotaName, context); if (inner != null) { @@ -47,16 +57,6 @@ public Quota get(String location, QuotaNames quotaName) { } } - public PagedIterable listBySubscription(String location) { - PagedIterable inner = this.serviceClient().listBySubscription(location); - return ResourceManagerUtils.mapPage(inner, inner1 -> new QuotaImpl(inner1, this.manager())); - } - - public PagedIterable listBySubscription(String location, Context context) { - PagedIterable inner = this.serviceClient().listBySubscription(location, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new QuotaImpl(inner1, this.manager())); - } - private QuotasClient serviceClient() { return this.innerClient; } diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/ResourceManagerUtils.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/ResourceManagerUtils.java index e8720b308662e..7973016373a9b 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/ResourceManagerUtils.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.implementation; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/package-info.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/package-info.java index a449c1b4604f1..e7c99958cd932 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/package-info.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the implementations for PlaywrightTesting. - * Microsoft.AzurePlaywrightService Resource Provider Management API. + * Package containing the implementations for PlaywrightTestingMgmtClient. + * Azure Playwright testing management service. */ package com.azure.resourcemanager.playwrighttesting.implementation; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Account.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Account.java index c06479e5c509e..0840ea168eeaf 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Account.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Account.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountFreeTrialProperties.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountFreeTrialProperties.java index 280eb8cf59ea7..8ab1cc4fc91a0 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountFreeTrialProperties.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountFreeTrialProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; @@ -41,12 +41,12 @@ public final class AccountFreeTrialProperties implements JsonSerializable { /* * The Account items on this page @@ -32,7 +32,7 @@ public final class AccountListResult implements JsonSerializable value() { return this.value; } + /** + * Set the value property: The Account items on this page. + * + * @param value the value value to set. + * @return the AccountListResult object itself. + */ + public AccountListResult withValue(List value) { + this.value = value; + return this; + } + /** * Get the nextLink property: The link to the next page of items. * @@ -53,6 +64,17 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the AccountListResult object itself. + */ + public AccountListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + /** * Validates the instance. * diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountProperties.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountProperties.java index c65eb9ffc5439..9b2edb4e9b22d 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountProperties.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; @@ -41,8 +41,8 @@ public final class AccountProperties implements JsonSerializable { /* * The AccountQuota items on this page @@ -32,7 +32,7 @@ public final class AccountQuotaListResult implements JsonSerializable value() { return this.value; } + /** + * Set the value property: The AccountQuota items on this page. + * + * @param value the value value to set. + * @return the AccountQuotaListResult object itself. + */ + public AccountQuotaListResult withValue(List value) { + this.value = value; + return this; + } + /** * Get the nextLink property: The link to the next page of items. * @@ -53,6 +64,17 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the AccountQuotaListResult object itself. + */ + public AccountQuotaListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + /** * Validates the instance. * diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountQuotaProperties.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountQuotaProperties.java index 485e6539eaf90..b79df45a157a8 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountQuotaProperties.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountQuotaProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The Playwright service account quota resource properties. */ -@Immutable +@Fluent public final class AccountQuotaProperties implements JsonSerializable { /* * The Playwright service account quota resource free-trial properties. @@ -29,7 +29,7 @@ public final class AccountQuotaProperties implements JsonSerializable getWithResponse(String resourceGroupName, String accountName, QuotaNames quotaName, - Context context); + PagedIterable listByAccount(String resourceGroupName, String accountName); /** - * Get quota by name for an account. + * List quotas for a given account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. - * @param quotaName The Playwright service account quota name. + * @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 by name for an account. + * @return the response of a AccountQuota list operation as paginated response with {@link PagedIterable}. */ - AccountQuota get(String resourceGroupName, String accountName, QuotaNames quotaName); + PagedIterable listByAccount(String resourceGroupName, String accountName, Context context); /** - * List quotas for a given account. + * Get quota by name for an account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. + * @param quotaName The Playwright service account quota name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AccountQuota list operation as paginated response with {@link PagedIterable}. + * @return quota by name for an account along with {@link Response}. */ - PagedIterable listByAccount(String resourceGroupName, String accountName); + Response getWithResponse(String resourceGroupName, String accountName, QuotaNames quotaName, + Context context); /** - * List quotas for a given account. + * Get quota by name for an account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Name of account. - * @param context The context to associate with this operation. + * @param quotaName The Playwright service account quota name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AccountQuota list operation as paginated response with {@link PagedIterable}. + * @return quota by name for an account. */ - PagedIterable listByAccount(String resourceGroupName, String accountName, Context context); + AccountQuota get(String resourceGroupName, String accountName, QuotaNames quotaName); } diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountUpdate.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountUpdate.java index 8a974fb81db33..6a8da5dac5bc3 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountUpdate.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountUpdateProperties.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountUpdateProperties.java index eb58d0ab5c01d..44f98c77a7f0d 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountUpdateProperties.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/AccountUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; @@ -36,8 +36,8 @@ public final class AccountUpdateProperties implements JsonSerializable getByResourceGroupWithResponse(String resourceGroupName, String accountName, Context context); + PagedIterable list(); /** - * Get a Account. + * List Account resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. + * @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 Account. + * @return the response of a Account list operation as paginated response with {@link PagedIterable}. */ - Account getByResourceGroup(String resourceGroupName, String accountName); + PagedIterable list(Context context); /** - * Delete a Account. + * Adds check global name availability operation, normally used if a resource name must be globally unique. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. + * @param body The CheckAvailability request. + * @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 check availability result along with {@link Response}. */ - void deleteByResourceGroup(String resourceGroupName, String accountName); + Response checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest body, + Context context); /** - * Delete a Account. + * Adds check global name availability operation, normally used if a resource name must be globally unique. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Name of account. - * @param context The context to associate with this operation. + * @param body The CheckAvailability request. * @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 check availability result. */ - void delete(String resourceGroupName, String accountName, Context context); + CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest body); /** * List Account resources by resource group. @@ -84,48 +80,52 @@ public interface Accounts { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List Account resources by subscription ID. + * Get a Account. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of account. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Account list operation as paginated response with {@link PagedIterable}. + * @return a Account along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, Context context); /** - * List Account resources by subscription ID. + * Get a Account. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of account. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Account list operation as paginated response with {@link PagedIterable}. + * @return a Account. */ - PagedIterable list(Context context); + Account getByResourceGroup(String resourceGroupName, String accountName); /** - * Adds check global name availability operation, normally used if a resource name must be globally unique. + * Delete a Account. * - * @param body The CheckAvailability request. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of account. * @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 check availability result along with {@link Response}. */ - Response checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest body, - Context context); + void deleteByResourceGroup(String resourceGroupName, String accountName); /** - * Adds check global name availability operation, normally used if a resource name must be globally unique. + * Delete a Account. * - * @param body The CheckAvailability request. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Name of account. + * @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 check availability result. */ - CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest body); + void delete(String resourceGroupName, String accountName, Context context); /** * Get a Account. diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/ActionType.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/ActionType.java index d58945362393e..30dcefee1539d 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/ActionType.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/ActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; @@ -8,11 +8,11 @@ import java.util.Collection; /** - * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ public final class ActionType extends ExpandableStringEnum { /** - * Actions are for internal-only APIs. + * Static value Internal for ActionType. */ public static final ActionType INTERNAL = fromString("Internal"); diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/CheckNameAvailabilityReason.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/CheckNameAvailabilityReason.java index 2dce825ce844e..0cd1b49aa9b44 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/CheckNameAvailabilityReason.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/CheckNameAvailabilityReason.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; @@ -8,16 +8,16 @@ import java.util.Collection; /** - * Possible reasons for a name not being available. + * The reason why the given name is not available. */ public final class CheckNameAvailabilityReason extends ExpandableStringEnum { /** - * Name is invalid. + * Static value Invalid for CheckNameAvailabilityReason. */ public static final CheckNameAvailabilityReason INVALID = fromString("Invalid"); /** - * Name already exists. + * Static value AlreadyExists for CheckNameAvailabilityReason. */ public static final CheckNameAvailabilityReason ALREADY_EXISTS = fromString("AlreadyExists"); diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/CheckNameAvailabilityRequest.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/CheckNameAvailabilityRequest.java index 51665ff2e0afe..f1abfb1ee406f 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/CheckNameAvailabilityRequest.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/CheckNameAvailabilityRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/CheckNameAvailabilityResponse.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/CheckNameAvailabilityResponse.java index 0a62f831fb468..c157383870c93 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/CheckNameAvailabilityResponse.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/CheckNameAvailabilityResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; @@ -25,7 +25,7 @@ public interface CheckNameAvailabilityResponse { CheckNameAvailabilityReason reason(); /** - * Gets the message property: Detailed reason why the given name is not available. + * Gets the message property: Detailed reason why the given name is available. * * @return the message value. */ diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/EnablementStatus.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/EnablementStatus.java index f02ec17d8f059..c0b7ac568f226 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/EnablementStatus.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/EnablementStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; @@ -8,16 +8,18 @@ import java.util.Collection; /** - * The enablement status of a feature. + * This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers + * connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in + * the Azure region in which the workspace was initially created. */ public final class EnablementStatus extends ExpandableStringEnum { /** - * The feature is Enabled. + * Static value Enabled for EnablementStatus. */ public static final EnablementStatus ENABLED = fromString("Enabled"); /** - * The feature is Disabled. + * Static value Disabled for EnablementStatus. */ public static final EnablementStatus DISABLED = fromString("Disabled"); diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/FreeTrialProperties.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/FreeTrialProperties.java index 3233a057d938f..d54fafbb88e09 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/FreeTrialProperties.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/FreeTrialProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; @@ -29,7 +29,7 @@ public final class FreeTrialProperties implements JsonSerializable { /** - * The free-trial is Active. + * Static value Active for FreeTrialState. */ public static final FreeTrialState ACTIVE = fromString("Active"); /** - * The free-trial is Expired. + * Static value Expired for FreeTrialState. */ public static final FreeTrialState EXPIRED = fromString("Expired"); /** - * The free-trial is Not Eligible. + * Static value NotEligible for FreeTrialState. */ public static final FreeTrialState NOT_ELIGIBLE = fromString("NotEligible"); /** - * The free-trial is Not Registered. + * Static value NotRegistered for FreeTrialState. */ public static final FreeTrialState NOT_REGISTERED = fromString("NotRegistered"); diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/OfferingType.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/OfferingType.java index 478b064031cbd..b3fb6e6c68f11 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/OfferingType.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/OfferingType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; @@ -12,22 +12,22 @@ */ public final class OfferingType extends ExpandableStringEnum { /** - * The offeringType is NotApplicable. + * Static value NotApplicable for OfferingType. */ public static final OfferingType NOT_APPLICABLE = fromString("NotApplicable"); /** - * The offeringType is PrivatePreview. + * Static value PrivatePreview for OfferingType. */ public static final OfferingType PRIVATE_PREVIEW = fromString("PrivatePreview"); /** - * The offeringType is PublicPreview. + * Static value PublicPreview for OfferingType. */ public static final OfferingType PUBLIC_PREVIEW = fromString("PublicPreview"); /** - * The offeringType is GeneralAvailability. + * Static value GeneralAvailability for OfferingType. */ public static final OfferingType GENERAL_AVAILABILITY = fromString("GeneralAvailability"); diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Operation.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Operation.java index 2db10a9ab1121..7b958d42840df 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Operation.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Operation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; @@ -20,7 +20,7 @@ public interface Operation { /** * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for Azure Resource Manager/control-plane operations. + * operations and "false" for ARM/control-plane operations. * * @return the isDataAction value. */ @@ -42,8 +42,8 @@ public interface Operation { Origin origin(); /** - * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are - * for internal only APIs. + * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. * * @return the actionType value. */ diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/OperationDisplay.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/OperationDisplay.java index 27d06fe793271..d19ead2f49d64 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/OperationDisplay.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/OperationDisplay.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Localized display information for and operation. + * Localized display information for this particular operation. */ @Immutable public final class OperationDisplay implements JsonSerializable { @@ -42,7 +42,7 @@ public final class OperationDisplay implements JsonSerializable { /* - * The Operation items on this page + * List of operations supported by the resource provider */ private List value; /* - * The link to the next page of items + * URL to get the next set of operation list results (if there are any). */ private String nextLink; /** * Creates an instance of OperationListResult class. */ - private OperationListResult() { + public OperationListResult() { } /** - * Get the value property: The Operation items on this page. + * Get the value property: List of operations supported by the resource provider. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: URL to get the next set of operation list results (if there are any). * * @return the nextLink value. */ @@ -60,24 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model OperationListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(OperationListResult.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -87,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the OperationListResult. */ public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Operations.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Operations.java index a4bc7d62efc61..f775dcdebb882 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Operations.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Operations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Origin.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Origin.java index b1a1b00d1edb8..d3016c7461af9 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Origin.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Origin.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; @@ -13,17 +13,17 @@ */ public final class Origin extends ExpandableStringEnum { /** - * Indicates the operation is initiated by a user. + * Static value user for Origin. */ public static final Origin USER = fromString("user"); /** - * Indicates the operation is initiated by a system. + * Static value system for Origin. */ public static final Origin SYSTEM = fromString("system"); /** - * Indicates the operation is initiated by a user or system. + * Static value user,system for Origin. */ public static final Origin USER_SYSTEM = fromString("user,system"); diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/ProvisioningState.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/ProvisioningState.java index fa6813c2417ce..34a3c0ba603d0 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/ProvisioningState.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/ProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; @@ -12,32 +12,32 @@ */ public final class ProvisioningState extends ExpandableStringEnum { /** - * Resource has been created. + * Static value Succeeded for ProvisioningState. */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Resource creation failed. + * Static value Failed for ProvisioningState. */ public static final ProvisioningState FAILED = fromString("Failed"); /** - * Resource creation was canceled. + * Static value Canceled for ProvisioningState. */ public static final ProvisioningState CANCELED = fromString("Canceled"); /** - * Creation in progress.. + * Static value Creating for ProvisioningState. */ public static final ProvisioningState CREATING = fromString("Creating"); /** - * Deletion in progress.. + * Static value Deleting for ProvisioningState. */ public static final ProvisioningState DELETING = fromString("Deleting"); /** - * Change accepted for processing.. + * Static value Accepted for ProvisioningState. */ public static final ProvisioningState ACCEPTED = fromString("Accepted"); diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Quota.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Quota.java index a7a51faa6bc03..93925d0392a08 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Quota.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Quota.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/models/QuotaListResult.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/QuotaListResult.java similarity index 80% rename from sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/models/QuotaListResult.java rename to sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/QuotaListResult.java index f4c41b76d99cc..04530fb367194 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/models/QuotaListResult.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/QuotaListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.playwrighttesting.implementation.models; +package com.azure.resourcemanager.playwrighttesting.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * The response of a Quota list operation. */ -@Immutable +@Fluent public final class QuotaListResult implements JsonSerializable { /* * The Quota items on this page @@ -32,7 +32,7 @@ public final class QuotaListResult implements JsonSerializable /** * Creates an instance of QuotaListResult class. */ - private QuotaListResult() { + public QuotaListResult() { } /** @@ -44,6 +44,17 @@ public List value() { return this.value; } + /** + * Set the value property: The Quota items on this page. + * + * @param value the value value to set. + * @return the QuotaListResult object itself. + */ + public QuotaListResult withValue(List value) { + this.value = value; + return this; + } + /** * Get the nextLink property: The link to the next page of items. * @@ -53,6 +64,17 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the QuotaListResult object itself. + */ + public QuotaListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + /** * Validates the instance. * diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/QuotaNames.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/QuotaNames.java index abff76c3aa653..9726daaff1497 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/QuotaNames.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/QuotaNames.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; @@ -8,20 +8,16 @@ import java.util.Collection; /** - * The enum for quota name. + * Defines values for QuotaNames. */ public final class QuotaNames extends ExpandableStringEnum { /** - * The quota details for scalable execution feature. When enabled, Playwright client workers can connect to - * cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing - * test completion durations. + * Static value ScalableExecution for QuotaNames. */ public static final QuotaNames SCALABLE_EXECUTION = fromString("ScalableExecution"); /** - * The quota details for reporting feature. When enabled, Playwright client will be able to upload and display test - * results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more - * efficient troubleshooting. + * Static value Reporting for QuotaNames. */ public static final QuotaNames REPORTING = fromString("Reporting"); diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/QuotaProperties.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/QuotaProperties.java index f201a41254962..aac47c2930427 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/QuotaProperties.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/QuotaProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The subscription quota resource properties. */ -@Immutable +@Fluent public final class QuotaProperties implements JsonSerializable { /* * The subscription quota resource free-trial properties. @@ -34,7 +34,7 @@ public final class QuotaProperties implements JsonSerializable /** * Creates an instance of QuotaProperties class. */ - private QuotaProperties() { + public QuotaProperties() { } /** @@ -46,6 +46,17 @@ public FreeTrialProperties freeTrial() { return this.freeTrial; } + /** + * Set the freeTrial property: The subscription quota resource free-trial properties. + * + * @param freeTrial the freeTrial value to set. + * @return the QuotaProperties object itself. + */ + public QuotaProperties withFreeTrial(FreeTrialProperties freeTrial) { + this.freeTrial = freeTrial; + return this; + } + /** * Get the offeringType property: Indicates the offering type for the subscription. * diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Quotas.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Quotas.java index 256e19e561344..e63189de4da51 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Quotas.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/Quotas.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.models; @@ -13,50 +13,50 @@ */ public interface Quotas { /** - * Get subscription quota by name. + * List quotas for a given subscription Id. * * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @param quotaName The quota name. - * @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 subscription quota by name along with {@link Response}. + * @return the response of a Quota list operation as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String location, QuotaNames quotaName, Context context); + PagedIterable listBySubscription(String location); /** - * Get subscription quota by name. + * List quotas for a given subscription Id. * * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @param quotaName The quota name. + * @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 subscription quota by name. + * @return the response of a Quota list operation as paginated response with {@link PagedIterable}. */ - Quota get(String location, QuotaNames quotaName); + PagedIterable listBySubscription(String location, Context context); /** - * List quotas for a given subscription Id. + * Get subscription quota by name. * * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. + * @param quotaName The quota name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Quota list operation as paginated response with {@link PagedIterable}. + * @return subscription quota by name along with {@link Response}. */ - PagedIterable listBySubscription(String location); + Response getWithResponse(String location, QuotaNames quotaName, Context context); /** - * List quotas for a given subscription Id. + * Get subscription quota by name. * * @param location The location of quota in ARM Normalized format like eastus, southeastasia etc. - * @param context The context to associate with this operation. + * @param quotaName The quota name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Quota list operation as paginated response with {@link PagedIterable}. + * @return subscription quota by name. */ - PagedIterable listBySubscription(String location, Context context); + Quota get(String location, QuotaNames quotaName); } diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/package-info.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/package-info.java index 99c59b3b9c347..a243aff14111b 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/package-info.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for PlaywrightTesting. - * Microsoft.AzurePlaywrightService Resource Provider Management API. + * Package containing the data models for PlaywrightTestingMgmtClient. + * Azure Playwright testing management service. */ package com.azure.resourcemanager.playwrighttesting.models; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/package-info.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/package-info.java index a1298578b143e..097ddc0623a11 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/package-info.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the classes for PlaywrightTesting. - * Microsoft.AzurePlaywrightService Resource Provider Management API. + * Package containing the classes for PlaywrightTestingMgmtClient. + * Azure Playwright testing management service. */ package com.azure.resourcemanager.playwrighttesting; diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/module-info.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/module-info.java index 51e84dc1129c7..671b12392df59 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/module-info.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. module com.azure.resourcemanager.playwrighttesting { requires transitive com.azure.core.management; @@ -12,5 +12,4 @@ opens com.azure.resourcemanager.playwrighttesting.fluent.models to com.azure.core; opens com.azure.resourcemanager.playwrighttesting.models to com.azure.core; - opens com.azure.resourcemanager.playwrighttesting.implementation.models to com.azure.core; } diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotasGetSamples.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotasGetSamples.java index 6e1c16c5e9bda..a77bc198f35d5 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotasGetSamples.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotasGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.generated; @@ -11,7 +11,9 @@ */ public final class AccountQuotasGetSamples { /* - * x-ms-original-file: 2024-12-01/AccountQuotas_Get.json + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * AccountQuotas_Get.json */ /** * Sample code: AccountQuotas_Get. diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotasListByAccountSamples.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotasListByAccountSamples.java index d6e5f14826288..2c4064c6d5374 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotasListByAccountSamples.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotasListByAccountSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.generated; @@ -9,7 +9,9 @@ */ public final class AccountQuotasListByAccountSamples { /* - * x-ms-original-file: 2024-12-01/AccountQuotas_ListByAccount.json + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * AccountQuotas_ListByAccount.json */ /** * Sample code: AccountQuotas_ListByAccount. diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsCheckNameAvailabilitySamples.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsCheckNameAvailabilitySamples.java index cdf3adc77bc6d..23501312ed109 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsCheckNameAvailabilitySamples.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsCheckNameAvailabilitySamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.generated; @@ -11,7 +11,9 @@ */ public final class AccountsCheckNameAvailabilitySamples { /* - * x-ms-original-file: 2024-12-01/Accounts_CheckNameAvailability.json + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Accounts_CheckNameAvailability.json */ /** * Sample code: Accounts_CheckNameAvailability. diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsCreateOrUpdateSamples.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsCreateOrUpdateSamples.java index ad53be75684b1..f052341d57390 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsCreateOrUpdateSamples.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.generated; @@ -14,7 +14,9 @@ */ public final class AccountsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-12-01/Accounts_CreateOrUpdate.json + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Accounts_CreateOrUpdate.json */ /** * Sample code: Accounts_CreateOrUpdate. diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsDeleteSamples.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsDeleteSamples.java index 00bf8ddc65373..4bcadefc160e6 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsDeleteSamples.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.generated; @@ -9,7 +9,9 @@ */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: 2024-12-01/Accounts_Delete.json + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Accounts_Delete.json */ /** * Sample code: Accounts_Delete. diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsGetByResourceGroupSamples.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..4863aa407e20e --- /dev/null +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsGetByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.playwrighttesting.generated; + +/** + * Samples for Accounts GetByResourceGroup. + */ +public final class AccountsGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Accounts_Get.json + */ + /** + * Sample code: Accounts_Get. + * + * @param manager Entry point to PlaywrightTestingManager. + */ + public static void accountsGet(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) { + manager.accounts() + .getByResourceGroupWithResponse("dummyrg", "myPlaywrightAccount", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsListByResourceGroupSamples.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsListByResourceGroupSamples.java new file mode 100644 index 0000000000000..6c339c8062576 --- /dev/null +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsListByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.playwrighttesting.generated; + +/** + * Samples for Accounts ListByResourceGroup. + */ +public final class AccountsListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Accounts_ListByResourceGroup.json + */ + /** + * Sample code: Accounts_ListByResourceGroup. + * + * @param manager Entry point to PlaywrightTestingManager. + */ + public static void + accountsListByResourceGroup(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) { + manager.accounts().listByResourceGroup("dummyrg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsListSamples.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsListSamples.java new file mode 100644 index 0000000000000..e567bbd57e6eb --- /dev/null +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.playwrighttesting.generated; + +/** + * Samples for Accounts List. + */ +public final class AccountsListSamples { + /* + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Accounts_ListBySubscription.json + */ + /** + * Sample code: Accounts_ListBySubscription. + * + * @param manager Entry point to PlaywrightTestingManager. + */ + public static void + accountsListBySubscription(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) { + manager.accounts().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsUpdateSamples.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsUpdateSamples.java index 5493926d29cc0..10f8058f88024 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsUpdateSamples.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.generated; @@ -15,7 +15,9 @@ */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: 2024-12-01/Accounts_Update.json + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Accounts_Update.json */ /** * Sample code: Accounts_Update. @@ -27,7 +29,7 @@ public static void accountsUpdate(com.azure.resourcemanager.playwrighttesting.Pl .getByResourceGroupWithResponse("dummyrg", "myPlaywrightAccount", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("Team", "Dev Exp", "Division", "LT")) + .withTags(mapOf("Division", "LT", "Team", "Dev Exp")) .withProperties(new AccountUpdateProperties().withRegionalAffinity(EnablementStatus.ENABLED)) .apply(); } diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/OperationsListSamples.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/OperationsListSamples.java index 5172b04a554a4..c858bcfb0f82e 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/OperationsListSamples.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/OperationsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.generated; @@ -9,7 +9,9 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2024-12-01/Operations_List.json + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Operations_List.json */ /** * Sample code: Operations_List. diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/QuotasGetSamples.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/QuotasGetSamples.java index 8748793daa3e5..7fefa21beea03 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/QuotasGetSamples.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/QuotasGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.generated; @@ -11,7 +11,9 @@ */ public final class QuotasGetSamples { /* - * x-ms-original-file: 2024-12-01/Quotas_Get.json + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Quotas_Get.json */ /** * Sample code: Quotas_Get. diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/QuotasListBySubscriptionSamples.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/QuotasListBySubscriptionSamples.java index 5a3709265fa93..bf5e100e69eb8 100644 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/QuotasListBySubscriptionSamples.java +++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/samples/java/com/azure/resourcemanager/playwrighttesting/generated/QuotasListBySubscriptionSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.playwrighttesting.generated; @@ -9,7 +9,9 @@ */ public final class QuotasListBySubscriptionSamples { /* - * x-ms-original-file: 2024-12-01/Quotas_ListBySubscription.json + * x-ms-original-file: + * specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-12-01/examples/ + * Quotas_ListBySubscription.json */ /** * Sample code: Quotas_ListBySubscription. diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountFreeTrialPropertiesTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountFreeTrialPropertiesTests.java deleted file mode 100644 index 8f7dd8a62c51b..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountFreeTrialPropertiesTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.playwrighttesting.models.AccountFreeTrialProperties; - -public final class AccountFreeTrialPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccountFreeTrialProperties model = BinaryData.fromString( - "{\"createdAt\":\"2021-01-09T05:37:53Z\",\"expiryAt\":\"2021-08-10T09:24:30Z\",\"allocatedValue\":1518589486,\"usedValue\":764612558,\"percentageUsed\":49.09829785437019}") - .toObject(AccountFreeTrialProperties.class); - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountInnerTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountInnerTests.java deleted file mode 100644 index cd992f2269501..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountInnerTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.playwrighttesting.fluent.models.AccountInner; -import com.azure.resourcemanager.playwrighttesting.models.AccountProperties; -import com.azure.resourcemanager.playwrighttesting.models.EnablementStatus; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AccountInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccountInner model = BinaryData.fromString( - "{\"properties\":{\"dashboardUri\":\"jbpzvgnwzsymg\",\"regionalAffinity\":\"Enabled\",\"scalableExecution\":\"Disabled\",\"reporting\":\"Enabled\",\"localAuth\":\"Disabled\",\"provisioningState\":\"Creating\"},\"location\":\"ihanuf\",\"tags\":{\"s\":\"bj\"},\"id\":\"git\",\"name\":\"xqhabi\",\"type\":\"pikxwczbyscnpqxu\"}") - .toObject(AccountInner.class); - Assertions.assertEquals("ihanuf", model.location()); - Assertions.assertEquals("bj", model.tags().get("s")); - Assertions.assertEquals(EnablementStatus.ENABLED, model.properties().regionalAffinity()); - Assertions.assertEquals(EnablementStatus.DISABLED, model.properties().scalableExecution()); - Assertions.assertEquals(EnablementStatus.ENABLED, model.properties().reporting()); - Assertions.assertEquals(EnablementStatus.DISABLED, model.properties().localAuth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccountInner model = new AccountInner().withLocation("ihanuf") - .withTags(mapOf("s", "bj")) - .withProperties(new AccountProperties().withRegionalAffinity(EnablementStatus.ENABLED) - .withScalableExecution(EnablementStatus.DISABLED) - .withReporting(EnablementStatus.ENABLED) - .withLocalAuth(EnablementStatus.DISABLED)); - model = BinaryData.fromObject(model).toObject(AccountInner.class); - Assertions.assertEquals("ihanuf", model.location()); - Assertions.assertEquals("bj", model.tags().get("s")); - Assertions.assertEquals(EnablementStatus.ENABLED, model.properties().regionalAffinity()); - Assertions.assertEquals(EnablementStatus.DISABLED, model.properties().scalableExecution()); - Assertions.assertEquals(EnablementStatus.ENABLED, model.properties().reporting()); - Assertions.assertEquals(EnablementStatus.DISABLED, model.properties().localAuth()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountListResultTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountListResultTests.java deleted file mode 100644 index 997ff5780ec13..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountListResultTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.playwrighttesting.implementation.models.AccountListResult; -import com.azure.resourcemanager.playwrighttesting.models.EnablementStatus; -import org.junit.jupiter.api.Assertions; - -public final class AccountListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccountListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"dashboardUri\":\"wlokjyem\",\"regionalAffinity\":\"Enabled\",\"scalableExecution\":\"Disabled\",\"reporting\":\"Disabled\",\"localAuth\":\"Disabled\",\"provisioningState\":\"Accepted\"},\"location\":\"chgejspodm\",\"tags\":{\"o\":\"zyde\",\"wixjsprozvcp\":\"wyahuxinpmqnja\",\"atscmd\":\"tegjvwmf\",\"zkrwfn\":\"pjhulsuuvmkj\"},\"id\":\"iodjp\",\"name\":\"lwejdpv\",\"type\":\"ryo\"},{\"properties\":{\"dashboardUri\":\"oacctaza\",\"regionalAffinity\":\"Enabled\",\"scalableExecution\":\"Enabled\",\"reporting\":\"Disabled\",\"localAuth\":\"Disabled\",\"provisioningState\":\"Succeeded\"},\"location\":\"dfdosygexp\",\"tags\":{\"vdphlxaolthqtr\":\"akhmsbzjhcrz\",\"gvfcj\":\"qjbpfzfsin\",\"xjtfelluwfzit\":\"wzo\"},\"id\":\"np\",\"name\":\"qfpjk\",\"type\":\"lxofpdvhpfxxypin\"}],\"nextLink\":\"mayhuybbkpodepoo\"}") - .toObject(AccountListResult.class); - Assertions.assertEquals("chgejspodm", model.value().get(0).location()); - Assertions.assertEquals("zyde", model.value().get(0).tags().get("o")); - Assertions.assertEquals(EnablementStatus.ENABLED, model.value().get(0).properties().regionalAffinity()); - Assertions.assertEquals(EnablementStatus.DISABLED, model.value().get(0).properties().scalableExecution()); - Assertions.assertEquals(EnablementStatus.DISABLED, model.value().get(0).properties().reporting()); - Assertions.assertEquals(EnablementStatus.DISABLED, model.value().get(0).properties().localAuth()); - Assertions.assertEquals("mayhuybbkpodepoo", model.nextLink()); - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountPropertiesTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountPropertiesTests.java deleted file mode 100644 index 4392ecb920961..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountPropertiesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.playwrighttesting.models.AccountProperties; -import com.azure.resourcemanager.playwrighttesting.models.EnablementStatus; -import org.junit.jupiter.api.Assertions; - -public final class AccountPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccountProperties model = BinaryData.fromString( - "{\"dashboardUri\":\"vyq\",\"regionalAffinity\":\"Enabled\",\"scalableExecution\":\"Enabled\",\"reporting\":\"Enabled\",\"localAuth\":\"Enabled\",\"provisioningState\":\"Failed\"}") - .toObject(AccountProperties.class); - Assertions.assertEquals(EnablementStatus.ENABLED, model.regionalAffinity()); - Assertions.assertEquals(EnablementStatus.ENABLED, model.scalableExecution()); - Assertions.assertEquals(EnablementStatus.ENABLED, model.reporting()); - Assertions.assertEquals(EnablementStatus.ENABLED, model.localAuth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccountProperties model = new AccountProperties().withRegionalAffinity(EnablementStatus.ENABLED) - .withScalableExecution(EnablementStatus.ENABLED) - .withReporting(EnablementStatus.ENABLED) - .withLocalAuth(EnablementStatus.ENABLED); - model = BinaryData.fromObject(model).toObject(AccountProperties.class); - Assertions.assertEquals(EnablementStatus.ENABLED, model.regionalAffinity()); - Assertions.assertEquals(EnablementStatus.ENABLED, model.scalableExecution()); - Assertions.assertEquals(EnablementStatus.ENABLED, model.reporting()); - Assertions.assertEquals(EnablementStatus.ENABLED, model.localAuth()); - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotaInnerTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotaInnerTests.java deleted file mode 100644 index a5cac71865303..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotaInnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.playwrighttesting.fluent.models.AccountQuotaInner; - -public final class AccountQuotaInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccountQuotaInner model = BinaryData.fromString( - "{\"properties\":{\"freeTrial\":{\"createdAt\":\"2021-04-11T10:07:02Z\",\"expiryAt\":\"2021-06-24T22:10:09Z\",\"allocatedValue\":1962929741,\"usedValue\":732372528,\"percentageUsed\":39.266155576376995},\"provisioningState\":\"Succeeded\"},\"id\":\"zwyiftyhxhur\",\"name\":\"k\",\"type\":\"tyxolniwpwc\"}") - .toObject(AccountQuotaInner.class); - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotaListResultTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotaListResultTests.java deleted file mode 100644 index c1a67c8ab8c42..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotaListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.playwrighttesting.implementation.models.AccountQuotaListResult; -import org.junit.jupiter.api.Assertions; - -public final class AccountQuotaListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccountQuotaListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"freeTrial\":{\"createdAt\":\"2021-04-08T09:44:42Z\",\"expiryAt\":\"2021-01-09T07:49:41Z\",\"allocatedValue\":967174365,\"usedValue\":2090739989,\"percentageUsed\":58.07430140067971},\"provisioningState\":\"Failed\"},\"id\":\"hsgcbacphejkot\",\"name\":\"nqgoulzndli\",\"type\":\"wyqkgfgibm\"},{\"properties\":{\"freeTrial\":{\"createdAt\":\"2021-11-21T23:43:22Z\",\"expiryAt\":\"2021-09-02T02:02:12Z\",\"allocatedValue\":1720928556,\"usedValue\":712813176,\"percentageUsed\":4.345593235762458},\"provisioningState\":\"Accepted\"},\"id\":\"zqqedq\",\"name\":\"tbciqfouflmm\",\"type\":\"kzsmodm\"},{\"properties\":{\"freeTrial\":{\"createdAt\":\"2021-03-14T00:51:30Z\",\"expiryAt\":\"2021-11-19T14:59:32Z\",\"allocatedValue\":1767486045,\"usedValue\":173170794,\"percentageUsed\":99.06802394152818},\"provisioningState\":\"Failed\"},\"id\":\"tduqktapspwgcuer\",\"name\":\"umkdosvqwhbmd\",\"type\":\"bbjfddgmbmbexp\"}],\"nextLink\":\"htqqrolfp\"}") - .toObject(AccountQuotaListResult.class); - Assertions.assertEquals("htqqrolfp", model.nextLink()); - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotaPropertiesTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotaPropertiesTests.java deleted file mode 100644 index 7e0d64c5a6c9a..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotaPropertiesTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.playwrighttesting.models.AccountQuotaProperties; - -public final class AccountQuotaPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccountQuotaProperties model = BinaryData.fromString( - "{\"freeTrial\":{\"createdAt\":\"2021-01-26T04:33:28Z\",\"expiryAt\":\"2021-08-22T05:01:57Z\",\"allocatedValue\":1720882214,\"usedValue\":1260528380,\"percentageUsed\":45.29645347714083},\"provisioningState\":\"Deleting\"}") - .toObject(AccountQuotaProperties.class); - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotasGetWithResponseMockTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotasGetWithResponseMockTests.java deleted file mode 100644 index 9fd7ffe7b4d46..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotasGetWithResponseMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager; -import com.azure.resourcemanager.playwrighttesting.models.AccountQuota; -import com.azure.resourcemanager.playwrighttesting.models.QuotaNames; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AccountQuotasGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"freeTrial\":{\"createdAt\":\"2021-07-23T03:15:47Z\",\"expiryAt\":\"2021-03-19T19:19:25Z\",\"allocatedValue\":526357261,\"usedValue\":1943379246,\"percentageUsed\":30.405001034874335},\"provisioningState\":\"Accepted\"},\"id\":\"ovmclwhijcoejct\",\"name\":\"zaqsqsycbkbfk\",\"type\":\"ukdkexxppofmxa\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PlaywrightTestingManager manager = PlaywrightTestingManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AccountQuota response = manager.accountQuotas() - .getWithResponse("mexgstxgcp", "dg", QuotaNames.SCALABLE_EXECUTION, com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotasListByAccountMockTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotasListByAccountMockTests.java deleted file mode 100644 index 9ea14a66f58e9..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountQuotasListByAccountMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager; -import com.azure.resourcemanager.playwrighttesting.models.AccountQuota; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AccountQuotasListByAccountMockTests { - @Test - public void testListByAccount() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"freeTrial\":{\"createdAt\":\"2021-04-02T09:21:38Z\",\"expiryAt\":\"2021-05-05T12:18:06Z\",\"allocatedValue\":217282590,\"usedValue\":1962147583,\"percentageUsed\":39.135892396501724},\"provisioningState\":\"Creating\"},\"id\":\"uexhdzx\",\"name\":\"bqe\",\"type\":\"jnxqbzvddntwn\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PlaywrightTestingManager manager = PlaywrightTestingManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.accountQuotas().listByAccount("c", "jpgd", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountUpdatePropertiesTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountUpdatePropertiesTests.java deleted file mode 100644 index afe2f84a099c5..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountUpdatePropertiesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.playwrighttesting.models.AccountUpdateProperties; -import com.azure.resourcemanager.playwrighttesting.models.EnablementStatus; -import org.junit.jupiter.api.Assertions; - -public final class AccountUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccountUpdateProperties model = BinaryData.fromString( - "{\"regionalAffinity\":\"Disabled\",\"scalableExecution\":\"Disabled\",\"reporting\":\"Disabled\",\"localAuth\":\"Enabled\"}") - .toObject(AccountUpdateProperties.class); - Assertions.assertEquals(EnablementStatus.DISABLED, model.regionalAffinity()); - Assertions.assertEquals(EnablementStatus.DISABLED, model.scalableExecution()); - Assertions.assertEquals(EnablementStatus.DISABLED, model.reporting()); - Assertions.assertEquals(EnablementStatus.ENABLED, model.localAuth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccountUpdateProperties model = new AccountUpdateProperties().withRegionalAffinity(EnablementStatus.DISABLED) - .withScalableExecution(EnablementStatus.DISABLED) - .withReporting(EnablementStatus.DISABLED) - .withLocalAuth(EnablementStatus.ENABLED); - model = BinaryData.fromObject(model).toObject(AccountUpdateProperties.class); - Assertions.assertEquals(EnablementStatus.DISABLED, model.regionalAffinity()); - Assertions.assertEquals(EnablementStatus.DISABLED, model.scalableExecution()); - Assertions.assertEquals(EnablementStatus.DISABLED, model.reporting()); - Assertions.assertEquals(EnablementStatus.ENABLED, model.localAuth()); - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountUpdateTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountUpdateTests.java deleted file mode 100644 index 73f88bad05944..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountUpdateTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.playwrighttesting.models.AccountUpdate; -import com.azure.resourcemanager.playwrighttesting.models.AccountUpdateProperties; -import com.azure.resourcemanager.playwrighttesting.models.EnablementStatus; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AccountUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccountUpdate model = BinaryData.fromString( - "{\"tags\":{\"dcc\":\"jgrtfwvukxga\"},\"properties\":{\"regionalAffinity\":\"Enabled\",\"scalableExecution\":\"Disabled\",\"reporting\":\"Enabled\",\"localAuth\":\"Enabled\"}}") - .toObject(AccountUpdate.class); - Assertions.assertEquals("jgrtfwvukxga", model.tags().get("dcc")); - Assertions.assertEquals(EnablementStatus.ENABLED, model.properties().regionalAffinity()); - Assertions.assertEquals(EnablementStatus.DISABLED, model.properties().scalableExecution()); - Assertions.assertEquals(EnablementStatus.ENABLED, model.properties().reporting()); - Assertions.assertEquals(EnablementStatus.ENABLED, model.properties().localAuth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccountUpdate model = new AccountUpdate().withTags(mapOf("dcc", "jgrtfwvukxga")) - .withProperties(new AccountUpdateProperties().withRegionalAffinity(EnablementStatus.ENABLED) - .withScalableExecution(EnablementStatus.DISABLED) - .withReporting(EnablementStatus.ENABLED) - .withLocalAuth(EnablementStatus.ENABLED)); - model = BinaryData.fromObject(model).toObject(AccountUpdate.class); - Assertions.assertEquals("jgrtfwvukxga", model.tags().get("dcc")); - Assertions.assertEquals(EnablementStatus.ENABLED, model.properties().regionalAffinity()); - Assertions.assertEquals(EnablementStatus.DISABLED, model.properties().scalableExecution()); - Assertions.assertEquals(EnablementStatus.ENABLED, model.properties().reporting()); - Assertions.assertEquals(EnablementStatus.ENABLED, model.properties().localAuth()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsCheckNameAvailabilityWithResponseMockTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 035b22b3664a3..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager; -import com.azure.resourcemanager.playwrighttesting.models.CheckNameAvailabilityReason; -import com.azure.resourcemanager.playwrighttesting.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.playwrighttesting.models.CheckNameAvailabilityResponse; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AccountsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"nameAvailable\":false,\"reason\":\"Invalid\",\"message\":\"guhmuouqfpr\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PlaywrightTestingManager manager = PlaywrightTestingManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameAvailabilityResponse response = manager.accounts() - .checkNameAvailabilityWithResponse( - new CheckNameAvailabilityRequest().withName("wjkcp").withType("nwbxgjvtbvpyssz"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, response.reason()); - Assertions.assertEquals("guhmuouqfpr", response.message()); - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsCreateOrUpdateMockTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsCreateOrUpdateMockTests.java deleted file mode 100644 index 0fc4652e3a322..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/AccountsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager; -import com.azure.resourcemanager.playwrighttesting.models.Account; -import com.azure.resourcemanager.playwrighttesting.models.AccountProperties; -import com.azure.resourcemanager.playwrighttesting.models.EnablementStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AccountsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"dashboardUri\":\"nrosfqpte\",\"regionalAffinity\":\"Disabled\",\"scalableExecution\":\"Disabled\",\"reporting\":\"Enabled\",\"localAuth\":\"Disabled\",\"provisioningState\":\"Succeeded\"},\"location\":\"z\",\"tags\":{\"rsoodqxhcrmnoh\":\"vswjdk\",\"kwh\":\"t\",\"gr\":\"soifiyipjxsqw\"},\"id\":\"bznorcjxvsnby\",\"name\":\"qabnmoc\",\"type\":\"cyshurzafbljjgp\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PlaywrightTestingManager manager = PlaywrightTestingManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Account response = manager.accounts() - .define("nguitnwuizgazxu") - .withRegion("uht") - .withExistingResourceGroup("zw") - .withTags(mapOf("opvkmijcm", "isdkfthwxmnteiw", "uf", "xdcu")) - .withProperties(new AccountProperties().withRegionalAffinity(EnablementStatus.DISABLED) - .withScalableExecution(EnablementStatus.ENABLED) - .withReporting(EnablementStatus.DISABLED) - .withLocalAuth(EnablementStatus.ENABLED)) - .create(); - - Assertions.assertEquals("z", response.location()); - Assertions.assertEquals("vswjdk", response.tags().get("rsoodqxhcrmnoh")); - Assertions.assertEquals(EnablementStatus.DISABLED, response.properties().regionalAffinity()); - Assertions.assertEquals(EnablementStatus.DISABLED, response.properties().scalableExecution()); - Assertions.assertEquals(EnablementStatus.ENABLED, response.properties().reporting()); - Assertions.assertEquals(EnablementStatus.DISABLED, response.properties().localAuth()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/CheckNameAvailabilityRequestTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/CheckNameAvailabilityRequestTests.java deleted file mode 100644 index b57c2aeaf0940..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/CheckNameAvailabilityRequestTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.playwrighttesting.models.CheckNameAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityRequest model - = BinaryData.fromString("{\"name\":\"nuvamiheogna\",\"type\":\"zxtheotusivyevcc\"}") - .toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("nuvamiheogna", model.name()); - Assertions.assertEquals("zxtheotusivyevcc", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityRequest model - = new CheckNameAvailabilityRequest().withName("nuvamiheogna").withType("zxtheotusivyevcc"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("nuvamiheogna", model.name()); - Assertions.assertEquals("zxtheotusivyevcc", model.type()); - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/CheckNameAvailabilityResponseInnerTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/CheckNameAvailabilityResponseInnerTests.java deleted file mode 100644 index 1523dab7cb4b7..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/CheckNameAvailabilityResponseInnerTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.playwrighttesting.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.playwrighttesting.models.CheckNameAvailabilityReason; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityResponseInner model - = BinaryData.fromString("{\"nameAvailable\":false,\"reason\":\"Invalid\",\"message\":\"un\"}") - .toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); - Assertions.assertEquals("un", model.message()); - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/FreeTrialPropertiesTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/FreeTrialPropertiesTests.java deleted file mode 100644 index 19cd985eb86f2..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/FreeTrialPropertiesTests.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.playwrighttesting.models.FreeTrialProperties; - -public final class FreeTrialPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FreeTrialProperties model = BinaryData.fromString("{\"accountId\":\"jqul\",\"state\":\"NotRegistered\"}") - .toObject(FreeTrialProperties.class); - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/OperationDisplayTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/OperationDisplayTests.java deleted file mode 100644 index 1028c0ad3c345..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/OperationDisplayTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.playwrighttesting.models.OperationDisplay; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"cdm\",\"resource\":\"rcryuanzwuxzdxta\",\"operation\":\"lhmwhfpmrqobm\",\"description\":\"kknryrtihf\"}") - .toObject(OperationDisplay.class); - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/OperationInnerTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/OperationInnerTests.java deleted file mode 100644 index e781c58e14536..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/OperationInnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.playwrighttesting.fluent.models.OperationInner; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = BinaryData.fromString( - "{\"name\":\"nygj\",\"isDataAction\":true,\"display\":{\"provider\":\"eqsrdeupewnwreit\",\"resource\":\"yflusarhmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/OperationListResultTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/OperationListResultTests.java deleted file mode 100644 index b1a19dc83e9ae..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/OperationListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.playwrighttesting.implementation.models.OperationListResult; -import org.junit.jupiter.api.Assertions; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"hq\",\"isDataAction\":true,\"display\":{\"provider\":\"pybczmehmtzopb\",\"resource\":\"h\",\"operation\":\"pidgsybbejhphoyc\",\"description\":\"xaobhdxbmtqioqjz\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"fpownoizhwlr\",\"isDataAction\":false,\"display\":{\"provider\":\"oqijgkdmbpaz\",\"resource\":\"bc\",\"operation\":\"pdznrbtcqqjnqgl\",\"description\":\"gnufoooj\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"esaagdfm\",\"isDataAction\":true,\"display\":{\"provider\":\"j\",\"resource\":\"ifkwmrvktsizntoc\",\"operation\":\"a\",\"description\":\"ajpsquc\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"kfo\"}") - .toObject(OperationListResult.class); - Assertions.assertEquals("kfo", model.nextLink()); - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/OperationsListMockTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/OperationsListMockTests.java deleted file mode 100644 index 174c77893fd26..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/OperationsListMockTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager; -import com.azure.resourcemanager.playwrighttesting.models.Operation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"s\",\"isDataAction\":false,\"display\":{\"provider\":\"uxig\",\"resource\":\"jgzjaoyfhrtx\",\"operation\":\"n\",\"description\":\"kujysvlejuvfq\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PlaywrightTestingManager manager = PlaywrightTestingManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotaInnerTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotaInnerTests.java deleted file mode 100644 index 5d2213acb1ed2..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotaInnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.playwrighttesting.fluent.models.QuotaInner; - -public final class QuotaInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaInner model = BinaryData.fromString( - "{\"properties\":{\"freeTrial\":{\"accountId\":\"jzrnf\",\"state\":\"Active\"},\"offeringType\":\"GeneralAvailability\",\"provisioningState\":\"Succeeded\"},\"id\":\"emv\",\"name\":\"zfkufubljofx\",\"type\":\"eofjaeqjh\"}") - .toObject(QuotaInner.class); - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotaListResultTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotaListResultTests.java deleted file mode 100644 index a1dd802ffb41b..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotaListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.playwrighttesting.implementation.models.QuotaListResult; -import org.junit.jupiter.api.Assertions; - -public final class QuotaListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"freeTrial\":{\"accountId\":\"nbybkzgcwrwcl\",\"state\":\"NotRegistered\"},\"offeringType\":\"PublicPreview\",\"provisioningState\":\"Creating\"},\"id\":\"ouskcqvkocrc\",\"name\":\"dkwt\",\"type\":\"hxbnjbiksqrg\"},{\"properties\":{\"freeTrial\":{\"accountId\":\"ainqpjwnzlljfm\",\"state\":\"Active\"},\"offeringType\":\"GeneralAvailability\",\"provisioningState\":\"Failed\"},\"id\":\"gxsabkyq\",\"name\":\"uujitcjc\",\"type\":\"dzevndhkrw\"},{\"properties\":{\"freeTrial\":{\"accountId\":\"ppdsbdkvwrwj\",\"state\":\"Expired\"},\"offeringType\":\"NotApplicable\",\"provisioningState\":\"Accepted\"},\"id\":\"tjelt\",\"name\":\"rl\",\"type\":\"hugjzzdatqxhoc\"}],\"nextLink\":\"eablg\"}") - .toObject(QuotaListResult.class); - Assertions.assertEquals("eablg", model.nextLink()); - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotaPropertiesTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotaPropertiesTests.java deleted file mode 100644 index e57d52bb06a2b..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotaPropertiesTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.playwrighttesting.models.QuotaProperties; - -public final class QuotaPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaProperties model = BinaryData.fromString( - "{\"freeTrial\":{\"accountId\":\"b\",\"state\":\"Active\"},\"offeringType\":\"GeneralAvailability\",\"provisioningState\":\"Succeeded\"}") - .toObject(QuotaProperties.class); - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotasGetWithResponseMockTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotasGetWithResponseMockTests.java deleted file mode 100644 index 66c5c871cceac..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotasGetWithResponseMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager; -import com.azure.resourcemanager.playwrighttesting.models.Quota; -import com.azure.resourcemanager.playwrighttesting.models.QuotaNames; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class QuotasGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"freeTrial\":{\"accountId\":\"dtqajzyulpkudj\",\"state\":\"NotRegistered\"},\"offeringType\":\"PublicPreview\",\"provisioningState\":\"Accepted\"},\"id\":\"hfepgzgqex\",\"name\":\"locx\",\"type\":\"c\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PlaywrightTestingManager manager = PlaywrightTestingManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Quota response = manager.quotas() - .getWithResponse("toqcjmklja", QuotaNames.SCALABLE_EXECUTION, com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotasListBySubscriptionMockTests.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotasListBySubscriptionMockTests.java deleted file mode 100644 index d4cf481370da6..0000000000000 --- a/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/test/java/com/azure/resourcemanager/playwrighttesting/generated/QuotasListBySubscriptionMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.playwrighttesting.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager; -import com.azure.resourcemanager.playwrighttesting.models.Quota; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class QuotasListBySubscriptionMockTests { - @Test - public void testListBySubscription() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"freeTrial\":{\"accountId\":\"l\",\"state\":\"NotEligible\"},\"offeringType\":\"NotApplicable\",\"provisioningState\":\"Creating\"},\"id\":\"aodxo\",\"name\":\"nbdxk\",\"type\":\"pxokajionp\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PlaywrightTestingManager manager = PlaywrightTestingManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.quotas().listBySubscription("aierhhb", com.azure.core.util.Context.NONE); - - } -}