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