net.bytebuddy
byte-buddy
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 1076ea2e5856..d07e121b1e92 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
@@ -24,10 +24,12 @@
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.playwrighttesting.fluent.PlaywrightTestingMgmtClient;
+import com.azure.resourcemanager.playwrighttesting.implementation.AccountQuotasImpl;
import com.azure.resourcemanager.playwrighttesting.implementation.AccountsImpl;
import com.azure.resourcemanager.playwrighttesting.implementation.OperationsImpl;
import com.azure.resourcemanager.playwrighttesting.implementation.PlaywrightTestingMgmtClientBuilder;
import com.azure.resourcemanager.playwrighttesting.implementation.QuotasImpl;
+import com.azure.resourcemanager.playwrighttesting.models.AccountQuotas;
import com.azure.resourcemanager.playwrighttesting.models.Accounts;
import com.azure.resourcemanager.playwrighttesting.models.Operations;
import com.azure.resourcemanager.playwrighttesting.models.Quotas;
@@ -38,7 +40,10 @@
import java.util.Objects;
import java.util.stream.Collectors;
-/** Entry point to PlaywrightTestingManager. Azure Playwright testing management service. */
+/**
+ * Entry point to PlaywrightTestingManager.
+ * Azure Playwright testing management service.
+ */
public final class PlaywrightTestingManager {
private Operations operations;
@@ -46,23 +51,21 @@ public final class PlaywrightTestingManager {
private Quotas quotas;
+ private AccountQuotas accountQuotas;
+
private final PlaywrightTestingMgmtClient clientObject;
private PlaywrightTestingManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
- this.clientObject =
- new PlaywrightTestingMgmtClientBuilder()
- .pipeline(httpPipeline)
- .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
- .subscriptionId(profile.getSubscriptionId())
- .defaultPollInterval(defaultPollInterval)
- .buildClient();
+ this.clientObject = new PlaywrightTestingMgmtClientBuilder().pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval).buildClient();
}
/**
* Creates an instance of Playwright Testing service API entry point.
- *
+ *
* @param credential the credential to use.
* @param profile the Azure profile for client.
* @return the Playwright Testing service API instance.
@@ -75,7 +78,7 @@ public static PlaywrightTestingManager authenticate(TokenCredential credential,
/**
* Creates an instance of Playwright Testing service API entry point.
- *
+ *
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
* @param profile the Azure profile for client.
* @return the Playwright Testing service API instance.
@@ -88,14 +91,16 @@ public static PlaywrightTestingManager authenticate(HttpPipeline httpPipeline, A
/**
* Gets a Configurable instance that can be used to create PlaywrightTestingManager with optional configuration.
- *
+ *
* @return the Configurable instance allowing configurations.
*/
public static Configurable configure() {
return new PlaywrightTestingManager.Configurable();
}
- /** The Configurable allowing configurations to be set. */
+ /**
+ * The Configurable allowing configurations to be set.
+ */
public static final class Configurable {
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
@@ -167,8 +172,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
/**
* Sets the retry options for the HTTP pipeline retry policy.
- *
- * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
*
* @param retryOptions the retry options for the HTTP pipeline retry policy.
* @return the configurable object itself.
@@ -185,8 +190,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval =
- Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
+ this.defaultPollInterval
+ = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
throw LOGGER
.logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
@@ -206,21 +211,12 @@ public PlaywrightTestingManager authenticate(TokenCredential credential, AzurePr
Objects.requireNonNull(profile, "'profile' cannot be null.");
StringBuilder userAgentBuilder = new StringBuilder();
- userAgentBuilder
- .append("azsdk-java")
- .append("-")
- .append("com.azure.resourcemanager.playwrighttesting")
- .append("/")
- .append("1.0.0-beta.1");
+ userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.playwrighttesting")
+ .append("/").append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
- userAgentBuilder
- .append(" (")
- .append(Configuration.getGlobalConfiguration().get("java.version"))
- .append("; ")
- .append(Configuration.getGlobalConfiguration().get("os.name"))
- .append("; ")
- .append(Configuration.getGlobalConfiguration().get("os.version"))
- .append("; auto-generated)");
+ userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)");
} else {
userAgentBuilder.append(" (auto-generated)");
}
@@ -239,38 +235,25 @@ public PlaywrightTestingManager authenticate(TokenCredential credential, AzurePr
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
- policies
- .addAll(
- this
- .policies
- .stream()
- .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
- .collect(Collectors.toList()));
+ policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
- policies
- .addAll(
- this
- .policies
- .stream()
- .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
- .collect(Collectors.toList()));
+ policies.addAll(this.policies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
- HttpPipeline httpPipeline =
- new HttpPipelineBuilder()
- .httpClient(httpClient)
- .policies(policies.toArray(new HttpPipelinePolicy[0]))
- .build();
+ HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0])).build();
return new PlaywrightTestingManager(httpPipeline, profile, defaultPollInterval);
}
}
/**
* Gets the resource collection API of Operations.
- *
+ *
* @return Resource collection API of Operations.
*/
public Operations operations() {
@@ -282,7 +265,7 @@ public Operations operations() {
/**
* Gets the resource collection API of Accounts. It manages Account.
- *
+ *
* @return Resource collection API of Accounts.
*/
public Accounts accounts() {
@@ -294,7 +277,7 @@ public Accounts accounts() {
/**
* Gets the resource collection API of Quotas.
- *
+ *
* @return Resource collection API of Quotas.
*/
public Quotas quotas() {
@@ -304,10 +287,22 @@ public Quotas quotas() {
return quotas;
}
+ /**
+ * Gets the resource collection API of AccountQuotas.
+ *
+ * @return Resource collection API of AccountQuotas.
+ */
+ public AccountQuotas accountQuotas() {
+ if (this.accountQuotas == null) {
+ this.accountQuotas = new AccountQuotasImpl(clientObject.getAccountQuotas(), this);
+ }
+ return accountQuotas;
+ }
+
/**
* Gets wrapped service client PlaywrightTestingMgmtClient providing direct access to the underlying auto-generated
* API implementation, based on Azure REST API.
- *
+ *
* @return Wrapped service client PlaywrightTestingMgmtClient.
*/
public PlaywrightTestingMgmtClient serviceClient() {
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
new file mode 100644
index 000000000000..cadd3ebe2d8f
--- /dev/null
+++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/AccountQuotasClient.java
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.playwrighttesting.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.playwrighttesting.fluent.models.AccountQuotaInner;
+import com.azure.resourcemanager.playwrighttesting.models.QuotaNames;
+
+/**
+ * An instance of this class provides access to all the operations defined in AccountQuotasClient.
+ */
+public interface AccountQuotasClient {
+ /**
+ * 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 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}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByAccount(String resourceGroupName, String accountName);
+
+ /**
+ * 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 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}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByAccount(String resourceGroupName, String accountName, Context 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.
+ * @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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String accountName, QuotaNames quotaName,
+ Context 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 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.
+ */
+ @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 974bb24bc8f1..9023000f7f92 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
@@ -12,13 +12,17 @@
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.playwrighttesting.fluent.models.AccountInner;
+import com.azure.resourcemanager.playwrighttesting.fluent.models.CheckNameAvailabilityResponseInner;
import com.azure.resourcemanager.playwrighttesting.models.AccountUpdate;
+import com.azure.resourcemanager.playwrighttesting.models.CheckNameAvailabilityRequest;
-/** An instance of this class provides access to all the operations defined in AccountsClient. */
+/**
+ * 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}.
@@ -28,7 +32,7 @@ public interface AccountsClient {
/**
* 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.
@@ -38,9 +42,35 @@ public interface AccountsClient {
@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.
@@ -52,7 +82,7 @@ public interface AccountsClient {
/**
* 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.
@@ -65,9 +95,9 @@ public interface AccountsClient {
/**
* Get a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @param accountName Name of account.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -75,129 +105,130 @@ public interface AccountsClient {
* @return a Account along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context);
+ Response getByResourceGroupWithResponse(String resourceGroupName, String accountName,
+ Context context);
/**
* Get a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @param accountName Name of account.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a Account.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AccountInner getByResourceGroup(String resourceGroupName, String name);
+ AccountInner getByResourceGroup(String resourceGroupName, String accountName);
/**
* Create a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @param accountName Name of account.
* @param resource Resource create parameters.
* @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 {@link SyncPoller} for polling of an account resource.
+ * @return the {@link SyncPoller} for polling of a Playwright service account resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, AccountInner> beginCreateOrUpdate(
- String resourceGroupName, String name, AccountInner resource);
+ SyncPoller, AccountInner> beginCreateOrUpdate(String resourceGroupName, String accountName,
+ AccountInner resource);
/**
* Create a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 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 {@link SyncPoller} for polling of an account resource.
+ * @return the {@link SyncPoller} for polling of a Playwright service account resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, AccountInner> beginCreateOrUpdate(
- String resourceGroupName, String name, AccountInner resource, Context context);
+ SyncPoller, AccountInner> beginCreateOrUpdate(String resourceGroupName, String accountName,
+ AccountInner resource, Context context);
/**
* Create a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @param accountName Name of account.
* @param resource Resource create parameters.
* @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 an account resource.
+ * @return a Playwright service account resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AccountInner createOrUpdate(String resourceGroupName, String name, AccountInner resource);
+ AccountInner createOrUpdate(String resourceGroupName, String accountName, AccountInner resource);
/**
* Create a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 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 an account resource.
+ * @return a Playwright service account resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AccountInner createOrUpdate(String resourceGroupName, String name, AccountInner resource, Context context);
+ AccountInner createOrUpdate(String resourceGroupName, String accountName, AccountInner resource, Context context);
/**
* Update a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 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 an account resource along with {@link Response}.
+ * @return a Playwright service account resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(
- String resourceGroupName, String name, AccountUpdate properties, Context context);
+ Response updateWithResponse(String resourceGroupName, String accountName, AccountUpdate properties,
+ Context context);
/**
* Update a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @param accountName Name of account.
* @param properties The resource properties to be updated.
* @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 an account resource.
+ * @return a Playwright service account resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AccountInner update(String resourceGroupName, String name, AccountUpdate properties);
+ AccountInner update(String resourceGroupName, String accountName, AccountUpdate properties);
/**
* Delete a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @param accountName Name of account.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginDelete(String resourceGroupName, String name);
+ SyncPoller, Void> beginDelete(String resourceGroupName, String accountName);
/**
* Delete a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @param accountName Name of account.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -205,30 +236,30 @@ Response updateWithResponse(
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginDelete(String resourceGroupName, String name, Context context);
+ SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, Context context);
/**
* Delete a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @param accountName Name of account.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String name);
+ void delete(String resourceGroupName, String accountName);
/**
* Delete a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @param accountName Name of account.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String name, Context context);
+ void delete(String resourceGroupName, String accountName, Context context);
}
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 dd9aef72b527..1b8161a72e5c 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
@@ -10,28 +10,30 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.playwrighttesting.fluent.models.OperationInner;
-/** An instance of this class provides access to all the operations defined in OperationsClient. */
+/**
+ * An instance of this class provides access to all the operations defined in OperationsClient.
+ */
public interface OperationsClient {
/**
* List the operations for the provider.
- *
+ *
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
- * PagedIterable}.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
/**
* List the operations for the provider.
- *
+ *
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
- * PagedIterable}.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
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 30b4e00f643d..b7bcc570fda9 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
@@ -7,61 +7,70 @@
import com.azure.core.http.HttpPipeline;
import java.time.Duration;
-/** The interface for PlaywrightTestingMgmtClient class. */
+/**
+ * The interface for PlaywrightTestingMgmtClient class.
+ */
public interface PlaywrightTestingMgmtClient {
/**
- * Gets The ID of the target subscription.
- *
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
* @return the subscriptionId value.
*/
String getSubscriptionId();
/**
* Gets server parameter.
- *
+ *
* @return the endpoint value.
*/
String getEndpoint();
/**
* Gets Api Version.
- *
+ *
* @return the apiVersion value.
*/
String getApiVersion();
/**
* Gets The HTTP pipeline to send requests through.
- *
+ *
* @return the httpPipeline value.
*/
HttpPipeline getHttpPipeline();
/**
* Gets The default poll interval for long-running operation.
- *
+ *
* @return the defaultPollInterval value.
*/
Duration getDefaultPollInterval();
/**
* Gets the OperationsClient object to access its operations.
- *
+ *
* @return the OperationsClient object.
*/
OperationsClient getOperations();
/**
* Gets the AccountsClient object to access its operations.
- *
+ *
* @return the AccountsClient object.
*/
AccountsClient getAccounts();
/**
* Gets the QuotasClient object to access its operations.
- *
+ *
* @return the QuotasClient object.
*/
QuotasClient getQuotas();
+
+ /**
+ * Gets the AccountQuotasClient object to access its operations.
+ *
+ * @return the AccountQuotasClient object.
+ */
+ AccountQuotasClient getAccountQuotas();
}
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 2106958352a1..16096a0d3639 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
@@ -12,11 +12,13 @@
import com.azure.resourcemanager.playwrighttesting.fluent.models.QuotaInner;
import com.azure.resourcemanager.playwrighttesting.models.QuotaNames;
-/** An instance of this class provides access to all the operations defined in QuotasClient. */
+/**
+ * An instance of this class provides access to all the operations defined in QuotasClient.
+ */
public interface QuotasClient {
/**
* List quotas for a given subscription Id.
- *
+ *
* @param location The location of quota in ARM Normalized format like eastus, southeastasia etc.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -28,7 +30,7 @@ public interface QuotasClient {
/**
* List quotas for a given subscription Id.
- *
+ *
* @param location The location of quota in ARM Normalized format like eastus, southeastasia etc.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -40,29 +42,29 @@ public interface QuotasClient {
PagedIterable listBySubscription(String location, Context context);
/**
- * Get quota by name.
- *
+ * Get subscription quota by name.
+ *
* @param location The location of quota in ARM Normalized format like eastus, southeastasia etc.
- * @param name The quota name.
+ * @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 quota by name along with {@link Response}.
+ * @return subscription quota by name along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String location, QuotaNames name, Context context);
+ Response getWithResponse(String location, QuotaNames quotaName, Context context);
/**
- * Get quota by name.
- *
+ * Get subscription quota by name.
+ *
* @param location The location of quota in ARM Normalized format like eastus, southeastasia etc.
- * @param name The quota name.
+ * @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 quota by name.
+ * @return subscription quota by name.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- QuotaInner get(String location, QuotaNames name);
+ 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 8a366fcb16b2..3f9c5f74743e 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
@@ -7,19 +7,20 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
-import com.azure.resourcemanager.playwrighttesting.models.EnablementStatus;
-import com.azure.resourcemanager.playwrighttesting.models.ProvisioningState;
+import com.azure.resourcemanager.playwrighttesting.models.AccountProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
-/** An account resource. */
+/**
+ * A Playwright service account resource.
+ */
@Fluent
public final class AccountInner extends Resource {
/*
* The resource-specific properties for this resource.
*/
@JsonProperty(value = "properties")
- private AccountProperties innerProperties;
+ private AccountProperties properties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
@@ -27,151 +28,67 @@ public final class AccountInner extends Resource {
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
- /** Creates an instance of AccountInner class. */
- public AccountInner() {
- }
-
/**
- * Get the innerProperties property: The resource-specific properties for this resource.
- *
- * @return the innerProperties value.
+ * Creates an instance of AccountInner class.
*/
- private AccountProperties innerProperties() {
- return this.innerProperties;
- }
-
- /**
- * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
- /** {@inheritDoc} */
- @Override
- public AccountInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public AccountInner withTags(Map tags) {
- super.withTags(tags);
- return this;
- }
-
- /**
- * Get the dashboardUri property: The Playwright testing dashboard URI for the account resource.
- *
- * @return the dashboardUri value.
- */
- public String dashboardUri() {
- return this.innerProperties() == null ? null : this.innerProperties().dashboardUri();
+ public AccountInner() {
}
/**
- * Get the regionalAffinity property: This property sets the connection region for Playwright client workers to
- * cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower
- * latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially
- * created.
- *
- * @return the regionalAffinity value.
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
*/
- public EnablementStatus regionalAffinity() {
- return this.innerProperties() == null ? null : this.innerProperties().regionalAffinity();
+ public AccountProperties properties() {
+ return this.properties;
}
/**
- * Set the regionalAffinity property: This property sets the connection region for Playwright client workers to
- * cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower
- * latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially
- * created.
- *
- * @param regionalAffinity the regionalAffinity value to set.
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
* @return the AccountInner object itself.
*/
- public AccountInner withRegionalAffinity(EnablementStatus regionalAffinity) {
- if (this.innerProperties() == null) {
- this.innerProperties = new AccountProperties();
- }
- this.innerProperties().withRegionalAffinity(regionalAffinity);
+ public AccountInner withProperties(AccountProperties properties) {
+ this.properties = properties;
return this;
}
/**
- * Get the scalableExecution property: When enabled, Playwright client workers can connect to cloud-hosted browsers.
- * This can increase the number of parallel workers for a test run, significantly minimizing test completion
- * durations.
- *
- * @return the scalableExecution value.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
*/
- public EnablementStatus scalableExecution() {
- return this.innerProperties() == null ? null : this.innerProperties().scalableExecution();
+ public SystemData systemData() {
+ return this.systemData;
}
/**
- * Set the scalableExecution property: When enabled, Playwright client workers can connect to cloud-hosted browsers.
- * This can increase the number of parallel workers for a test run, significantly minimizing test completion
- * durations.
- *
- * @param scalableExecution the scalableExecution value to set.
- * @return the AccountInner object itself.
+ * {@inheritDoc}
*/
- public AccountInner withScalableExecution(EnablementStatus scalableExecution) {
- if (this.innerProperties() == null) {
- this.innerProperties = new AccountProperties();
- }
- this.innerProperties().withScalableExecution(scalableExecution);
+ @Override
+ public AccountInner withLocation(String location) {
+ super.withLocation(location);
return this;
}
/**
- * Get the reporting property: When enabled, this feature allows the workspace to upload and display test results,
- * including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient
- * troubleshooting.
- *
- * @return the reporting value.
+ * {@inheritDoc}
*/
- public EnablementStatus reporting() {
- return this.innerProperties() == null ? null : this.innerProperties().reporting();
- }
-
- /**
- * Set the reporting property: When enabled, this feature allows the workspace to upload and display test results,
- * including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient
- * troubleshooting.
- *
- * @param reporting the reporting value to set.
- * @return the AccountInner object itself.
- */
- public AccountInner withReporting(EnablementStatus reporting) {
- if (this.innerProperties() == null) {
- this.innerProperties = new AccountProperties();
- }
- this.innerProperties().withReporting(reporting);
+ @Override
+ public AccountInner withTags(Map tags) {
+ super.withTags(tags);
return this;
}
- /**
- * Get the provisioningState property: The status of the last operation.
- *
- * @return the provisioningState value.
- */
- public ProvisioningState provisioningState() {
- return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
- }
-
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
+ if (properties() != null) {
+ properties().validate();
}
}
}
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
new file mode 100644
index 000000000000..994fb8a4b8b7
--- /dev/null
+++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/AccountQuotaInner.java
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.playwrighttesting.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.playwrighttesting.models.AccountQuotaProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * A quota resource for a Playwright service account.
+ */
+@Fluent
+public final class AccountQuotaInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties")
+ private AccountQuotaProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Creates an instance of AccountQuotaInner class.
+ */
+ public AccountQuotaInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ 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.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
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
new file mode 100644
index 000000000000..ff1c81f32f1b
--- /dev/null
+++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/fluent/models/CheckNameAvailabilityResponseInner.java
@@ -0,0 +1,107 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.playwrighttesting.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.playwrighttesting.models.CheckNameAvailabilityReason;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The check availability result.
+ */
+@Fluent
+public final class CheckNameAvailabilityResponseInner {
+ /*
+ * Indicates if the resource name is available.
+ */
+ @JsonProperty(value = "nameAvailable")
+ private Boolean nameAvailable;
+
+ /*
+ * The reason why the given name is not available.
+ */
+ @JsonProperty(value = "reason")
+ private CheckNameAvailabilityReason reason;
+
+ /*
+ * Detailed reason why the given name is available.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /**
+ * Creates an instance of CheckNameAvailabilityResponseInner class.
+ */
+ public CheckNameAvailabilityResponseInner() {
+ }
+
+ /**
+ * Get the nameAvailable property: Indicates if the resource name is available.
+ *
+ * @return the nameAvailable value.
+ */
+ 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.
+ *
+ * @return the reason value.
+ */
+ public CheckNameAvailabilityReason reason() {
+ return this.reason;
+ }
+
+ /**
+ * 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.
+ */
+ 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.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
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 69e5228328e0..dd534be1537d 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
@@ -12,8 +12,8 @@
/**
* REST API Operation
- *
- * Details of a REST API operation, returned from the Resource Provider Operations API.
+ *
+ * Details of a REST API operation, returned from the Resource Provider Operations API.
*/
@Fluent
public final class OperationInner {
@@ -50,14 +50,16 @@ public final class OperationInner {
@JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY)
private ActionType actionType;
- /** Creates an instance of OperationInner class. */
+ /**
+ * Creates an instance of OperationInner class.
+ */
public OperationInner() {
}
/**
* Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
* "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
- *
+ *
* @return the name value.
*/
public String name() {
@@ -67,7 +69,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 ARM/control-plane operations.
- *
+ *
* @return the isDataAction value.
*/
public Boolean isDataAction() {
@@ -76,7 +78,7 @@ public Boolean isDataAction() {
/**
* Get the display property: Localized display information for this particular operation.
- *
+ *
* @return the display value.
*/
public OperationDisplay display() {
@@ -85,7 +87,7 @@ public OperationDisplay display() {
/**
* Set the display property: Localized display information for this particular operation.
- *
+ *
* @param display the display value to set.
* @return the OperationInner object itself.
*/
@@ -97,7 +99,7 @@ public OperationInner withDisplay(OperationDisplay display) {
/**
* 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".
- *
+ *
* @return the origin value.
*/
public Origin origin() {
@@ -107,7 +109,7 @@ public Origin origin() {
/**
* Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
* only APIs.
- *
+ *
* @return the actionType value.
*/
public ActionType actionType() {
@@ -116,7 +118,7 @@ public ActionType actionType() {
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
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 aaa6da1a529e..9976a4b7216b 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
@@ -7,18 +7,19 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
-import com.azure.resourcemanager.playwrighttesting.models.FreeTrialProperties;
-import com.azure.resourcemanager.playwrighttesting.models.ProvisioningState;
+import com.azure.resourcemanager.playwrighttesting.models.QuotaProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** A quota resource. */
+/**
+ * A subscription quota resource.
+ */
@Fluent
public final class QuotaInner extends ProxyResource {
/*
* The resource-specific properties for this resource.
*/
@JsonProperty(value = "properties")
- private QuotaProperties innerProperties;
+ private QuotaProperties properties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
@@ -26,68 +27,49 @@ public final class QuotaInner extends ProxyResource {
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
- /** Creates an instance of QuotaInner class. */
- public QuotaInner() {
- }
-
/**
- * Get the innerProperties property: The resource-specific properties for this resource.
- *
- * @return the innerProperties value.
- */
- private QuotaProperties innerProperties() {
- return this.innerProperties;
- }
-
- /**
- * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
- *
- * @return the systemData value.
+ * Creates an instance of QuotaInner class.
*/
- public SystemData systemData() {
- return this.systemData;
+ public QuotaInner() {
}
/**
- * Get the freeTrial property: The free-trial quota.
- *
- * @return the freeTrial value.
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
*/
- public FreeTrialProperties freeTrial() {
- return this.innerProperties() == null ? null : this.innerProperties().freeTrial();
+ public QuotaProperties properties() {
+ return this.properties;
}
/**
- * Set the freeTrial property: The free-trial quota.
- *
- * @param freeTrial the freeTrial value to set.
+ * 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 withFreeTrial(FreeTrialProperties freeTrial) {
- if (this.innerProperties() == null) {
- this.innerProperties = new QuotaProperties();
- }
- this.innerProperties().withFreeTrial(freeTrial);
+ public QuotaInner withProperties(QuotaProperties properties) {
+ this.properties = properties;
return this;
}
/**
- * Get the provisioningState property: The status of the last operation.
- *
- * @return the provisioningState value.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
*/
- public ProvisioningState provisioningState() {
- return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ public SystemData systemData() {
+ return this.systemData;
}
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
+ if (properties() != null) {
+ properties().validate();
}
}
}
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 7c5ac5b9fcdc..90e7bd7f0901 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
@@ -3,7 +3,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
/**
- * Package containing the inner data models for PlaywrightTestingMgmtClient. Azure Playwright testing management
- * service.
+ * 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 67d0c17047be..22ece0f28fc0 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
@@ -3,6 +3,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
/**
- * Package containing the service clients for PlaywrightTestingMgmtClient. Azure Playwright testing management service.
+ * 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 561e22421c52..0dfaa17912c1 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
@@ -9,9 +9,9 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.playwrighttesting.fluent.models.AccountInner;
import com.azure.resourcemanager.playwrighttesting.models.Account;
+import com.azure.resourcemanager.playwrighttesting.models.AccountProperties;
import com.azure.resourcemanager.playwrighttesting.models.AccountUpdate;
-import com.azure.resourcemanager.playwrighttesting.models.EnablementStatus;
-import com.azure.resourcemanager.playwrighttesting.models.ProvisioningState;
+import com.azure.resourcemanager.playwrighttesting.models.AccountUpdateProperties;
import java.util.Collections;
import java.util.Map;
@@ -45,28 +45,12 @@ public Map tags() {
}
}
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
- public String dashboardUri() {
- return this.innerModel().dashboardUri();
- }
-
- public EnablementStatus regionalAffinity() {
- return this.innerModel().regionalAffinity();
- }
-
- public EnablementStatus scalableExecution() {
- return this.innerModel().scalableExecution();
+ public AccountProperties properties() {
+ return this.innerModel().properties();
}
- public EnablementStatus reporting() {
- return this.innerModel().reporting();
- }
-
- public ProvisioningState provisioningState() {
- return this.innerModel().provisioningState();
+ public SystemData systemData() {
+ return this.innerModel().systemData();
}
public Region region() {
@@ -91,7 +75,7 @@ private com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager man
private String resourceGroupName;
- private String name;
+ private String accountName;
private AccountUpdate updateProperties;
@@ -101,27 +85,21 @@ public AccountImpl withExistingResourceGroup(String resourceGroupName) {
}
public Account create() {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getAccounts()
- .createOrUpdate(resourceGroupName, name, this.innerModel(), Context.NONE);
+ this.innerObject = serviceManager.serviceClient().getAccounts().createOrUpdate(resourceGroupName, accountName,
+ this.innerModel(), Context.NONE);
return this;
}
public Account create(Context context) {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getAccounts()
- .createOrUpdate(resourceGroupName, name, this.innerModel(), context);
+ this.innerObject = serviceManager.serviceClient().getAccounts().createOrUpdate(resourceGroupName, accountName,
+ this.innerModel(), context);
return this;
}
AccountImpl(String name, com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager serviceManager) {
this.innerObject = new AccountInner();
this.serviceManager = serviceManager;
- this.name = name;
+ this.accountName = name;
}
public AccountImpl update() {
@@ -130,50 +108,34 @@ public AccountImpl update() {
}
public Account apply() {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getAccounts()
- .updateWithResponse(resourceGroupName, name, updateProperties, Context.NONE)
- .getValue();
+ this.innerObject = serviceManager.serviceClient().getAccounts()
+ .updateWithResponse(resourceGroupName, accountName, updateProperties, Context.NONE).getValue();
return this;
}
public Account apply(Context context) {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getAccounts()
- .updateWithResponse(resourceGroupName, name, updateProperties, context)
- .getValue();
+ this.innerObject = serviceManager.serviceClient().getAccounts()
+ .updateWithResponse(resourceGroupName, accountName, updateProperties, context).getValue();
return this;
}
- AccountImpl(
- AccountInner innerObject, com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager serviceManager) {
+ AccountImpl(AccountInner innerObject,
+ com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.name = Utils.getValueFromIdByName(innerObject.id(), "accounts");
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "accounts");
}
public Account refresh() {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getAccounts()
- .getByResourceGroupWithResponse(resourceGroupName, name, Context.NONE)
- .getValue();
+ this.innerObject = serviceManager.serviceClient().getAccounts()
+ .getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue();
return this;
}
public Account refresh(Context context) {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getAccounts()
- .getByResourceGroupWithResponse(resourceGroupName, name, context)
- .getValue();
+ this.innerObject = serviceManager.serviceClient().getAccounts()
+ .getByResourceGroupWithResponse(resourceGroupName, accountName, context).getValue();
return this;
}
@@ -197,34 +159,14 @@ public AccountImpl withTags(Map tags) {
}
}
- public AccountImpl withRegionalAffinity(EnablementStatus regionalAffinity) {
- if (isInCreateMode()) {
- this.innerModel().withRegionalAffinity(regionalAffinity);
- return this;
- } else {
- this.updateProperties.withRegionalAffinity(regionalAffinity);
- return this;
- }
- }
-
- public AccountImpl withScalableExecution(EnablementStatus scalableExecution) {
- if (isInCreateMode()) {
- this.innerModel().withScalableExecution(scalableExecution);
- return this;
- } else {
- this.updateProperties.withScalableExecution(scalableExecution);
- return this;
- }
+ public AccountImpl withProperties(AccountProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
}
- public AccountImpl withReporting(EnablementStatus reporting) {
- if (isInCreateMode()) {
- this.innerModel().withReporting(reporting);
- return this;
- } else {
- this.updateProperties.withReporting(reporting);
- return this;
- }
+ public AccountImpl withProperties(AccountUpdateProperties properties) {
+ this.updateProperties.withProperties(properties);
+ return this;
}
private boolean isInCreateMode() {
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
new file mode 100644
index 000000000000..fc26eb965fcd
--- /dev/null
+++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountQuotaImpl.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.playwrighttesting.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.playwrighttesting.fluent.models.AccountQuotaInner;
+import com.azure.resourcemanager.playwrighttesting.models.AccountQuota;
+import com.azure.resourcemanager.playwrighttesting.models.AccountQuotaProperties;
+
+public final class AccountQuotaImpl implements AccountQuota {
+ private AccountQuotaInner innerObject;
+
+ private final com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager serviceManager;
+
+ AccountQuotaImpl(AccountQuotaInner innerObject,
+ com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public AccountQuotaProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public AccountQuotaInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager() {
+ return this.serviceManager;
+ }
+}
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
new file mode 100644
index 000000000000..7742a50dfd7a
--- /dev/null
+++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountQuotasClientImpl.java
@@ -0,0 +1,422 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.playwrighttesting.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+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.models.AccountQuotaListResult;
+import com.azure.resourcemanager.playwrighttesting.models.QuotaNames;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in AccountQuotasClient.
+ */
+public final class AccountQuotasClientImpl implements AccountQuotasClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final AccountQuotasService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final PlaywrightTestingMgmtClientImpl client;
+
+ /**
+ * Initializes an instance of AccountQuotasClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AccountQuotasClientImpl(PlaywrightTestingMgmtClientImpl client) {
+ this.service
+ = RestProxy.create(AccountQuotasService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PlaywrightTestingMgmtClientAccountQuotas to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PlaywrightTestingMgm")
+ public interface AccountQuotasService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByAccount(@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/{accountName}/quotas/{quotaName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@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);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByAccountNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context 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 along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ 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."));
+ }
+ 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."));
+ }
+ 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.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()));
+ }
+
+ /**
+ * 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 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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ 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."));
+ }
+ 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."));
+ }
+ 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
+ .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));
+ }
+
+ /**
+ * 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 PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByAccountAsync(String resourceGroupName, String accountName) {
+ return new PagedFlux<>(() -> listByAccountSinglePageAsync(resourceGroupName, accountName),
+ nextLink -> listByAccountNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * 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 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}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByAccount(String resourceGroupName, String accountName) {
+ return new PagedIterable<>(listByAccountAsync(resourceGroupName, accountName));
+ }
+
+ /**
+ * 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 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 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> 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."));
+ }
+ 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."));
+ }
+ 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))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 quota by name for an account along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ 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."));
+ }
+ 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."));
+ }
+ 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);
+ }
+
+ /**
+ * 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 on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String accountName, QuotaNames quotaName) {
+ return getWithResponseAsync(resourceGroupName, accountName, quotaName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * 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 quota by name for an account along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String accountName,
+ QuotaNames quotaName, Context context) {
+ return getWithResponseAsync(resourceGroupName, accountName, quotaName, context).block();
+ }
+
+ /**
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AccountQuotaInner get(String resourceGroupName, String accountName, QuotaNames quotaName) {
+ return getWithResponse(resourceGroupName, accountName, quotaName, Context.NONE).getValue();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a AccountQuota list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByAccountNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByAccountNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
+ * The nextLink parameter.
+ * @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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByAccountNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listByAccountNext(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/AccountQuotasImpl.java b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountQuotasImpl.java
new file mode 100644
index 000000000000..abc45b728d42
--- /dev/null
+++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/AccountQuotasImpl.java
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.playwrighttesting.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.playwrighttesting.fluent.AccountQuotasClient;
+import com.azure.resourcemanager.playwrighttesting.fluent.models.AccountQuotaInner;
+import com.azure.resourcemanager.playwrighttesting.models.AccountQuota;
+import com.azure.resourcemanager.playwrighttesting.models.AccountQuotas;
+import com.azure.resourcemanager.playwrighttesting.models.QuotaNames;
+
+public final class AccountQuotasImpl implements AccountQuotas {
+ private static final ClientLogger LOGGER = new ClientLogger(AccountQuotasImpl.class);
+
+ private final AccountQuotasClient innerClient;
+
+ private final com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager serviceManager;
+
+ public AccountQuotasImpl(AccountQuotasClient innerClient,
+ com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager serviceManager) {
+ this.innerClient = 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
+ = this.serviceClient().getWithResponse(resourceGroupName, accountName, quotaName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new AccountQuotaImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public AccountQuota get(String resourceGroupName, String accountName, QuotaNames quotaName) {
+ AccountQuotaInner inner = this.serviceClient().get(resourceGroupName, accountName, quotaName);
+ if (inner != null) {
+ return new AccountQuotaImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private AccountQuotasClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager() {
+ return this.serviceManager;
+ }
+}
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 c24449cbc5ec..189937caade4 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
@@ -14,6 +14,7 @@
import com.azure.core.annotation.HostParam;
import com.azure.core.annotation.Patch;
import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
import com.azure.core.annotation.Put;
import com.azure.core.annotation.QueryParam;
import com.azure.core.annotation.ReturnType;
@@ -34,23 +35,31 @@
import com.azure.core.util.polling.SyncPoller;
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.models.AccountListResult;
import com.azure.resourcemanager.playwrighttesting.models.AccountUpdate;
+import com.azure.resourcemanager.playwrighttesting.models.CheckNameAvailabilityRequest;
import java.nio.ByteBuffer;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
-/** An instance of this class provides access to all the operations defined in AccountsClient. */
+/**
+ * An instance of this class provides access to all the operations defined in AccountsClient.
+ */
public final class AccountsClientImpl implements AccountsClient {
- /** The proxy service used to perform REST calls. */
+ /**
+ * The proxy service used to perform REST calls.
+ */
private final AccountsService service;
- /** The service client containing this operation class. */
+ /**
+ * The service client containing this operation class.
+ */
private final PlaywrightTestingMgmtClientImpl client;
/**
* Initializes an instance of AccountsClientImpl.
- *
+ *
* @param client the instance of the service client containing this operation class.
*/
AccountsClientImpl(PlaywrightTestingMgmtClientImpl client) {
@@ -65,214 +74,159 @@ public final class AccountsClientImpl implements AccountsClient {
@Host("{$host}")
@ServiceInterface(name = "PlaywrightTestingMgm")
public interface AccountsService {
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/accounts")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono> list(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
- @Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts")
- @ExpectedResponses({200})
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/checkNameAvailability")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByResourceGroup(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @HeaderParam("Accept") String accept,
+ Mono> checkNameAvailability(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") CheckNameAvailabilityRequest body, @HeaderParam("Accept") String accept,
Context context);
- @Headers({"Content-Type: application/json"})
- @Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name}")
- @ExpectedResponses({200})
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> getByResourceGroup(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("name") String name,
- @HeaderParam("Accept") String accept,
+ Mono> listByResourceGroup(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
Context context);
- @Headers({"Content-Type: application/json"})
- @Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name}")
- @ExpectedResponses({200, 201})
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> createOrUpdate(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("name") String name,
- @BodyParam("application/json") AccountInner resource,
- @HeaderParam("Accept") String accept,
- Context context);
+ 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"})
- @Patch(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name}")
- @ExpectedResponses({200})
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}")
+ @ExpectedResponses({ 200, 201 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> update(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("name") String name,
- @BodyParam("application/json") AccountUpdate properties,
- @HeaderParam("Accept") String accept,
+ Mono>> createOrUpdate(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @BodyParam("application/json") AccountInner resource, @HeaderParam("Accept") String accept,
Context context);
- @Headers({"Content-Type: application/json"})
- @Delete(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name}")
- @ExpectedResponses({200, 202, 204})
+ @Headers({ "Content-Type: application/json" })
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> delete(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("name") String name,
- @HeaderParam("Accept") String accept,
+ Mono> update(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @BodyParam("application/json") AccountUpdate properties, @HeaderParam("Accept") String accept,
Context context);
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}")
+ @ExpectedResponses({ 200, 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@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("{nextLink}")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listBySubscriptionNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept,
- Context context);
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByResourceGroupNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept,
- Context context);
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
}
/**
* List Account resources by subscription ID.
- *
+ *
* @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}.
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() 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.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()));
}
/**
* 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 the response of a Account list operation along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() 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,
+ .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));
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
}
/**
* List Account resources by subscription ID.
- *
+ *
* @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 listAsync() {
- return new PagedFlux<>(
- () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
}
/**
* 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.
@@ -281,13 +235,13 @@ private PagedFlux listAsync() {
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
- return new PagedFlux<>(
- () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ return new PagedFlux<>(() -> listSinglePageAsync(context),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
}
/**
* List Account resources by subscription ID.
- *
+ *
* @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}.
@@ -299,7 +253,7 @@ public 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 ManagementException thrown if the request is rejected by server.
@@ -311,29 +265,133 @@ public PagedIterable list(Context context) {
return new PagedIterable<>(listAsync(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 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}.
+ */
+ @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 accept = "application/json";
+ return FluxUtil
+ .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()));
+ }
+
+ /**
+ * 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 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}.
+ */
+ @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 accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), body, accept, 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 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()));
+ }
+
+ /**
+ * 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 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();
+ }
+
/**
* 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 along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * {@link Mono}.
*/
@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."));
+ 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."));
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
return Mono
@@ -341,53 +399,34 @@ private Mono> listByResourceGroupSinglePageAsync(Str
}
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.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()));
}
/**
* 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 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}.
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupSinglePageAsync(
- String resourceGroupName, Context context) {
+ 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."));
+ 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."));
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
return Mono
@@ -396,27 +435,15 @@ private Mono> listByResourceGroupSinglePageAsync(
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));
+ .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.
@@ -425,14 +452,13 @@ private Mono> listByResourceGroupSinglePageAsync(
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
- return new PagedFlux<>(
- () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
}
/**
* 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.
@@ -442,14 +468,13 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
- return new PagedFlux<>(
- () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, 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 ManagementException thrown if the request is rejected by server.
@@ -463,7 +488,7 @@ public 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.
@@ -478,56 +503,44 @@ public PagedIterable listByResourceGroup(String resourceGroupName,
/**
* Get a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String name) {
+ 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."));
+ 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."));
+ 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 (name == null) {
- return Mono.error(new IllegalArgumentException("Parameter name 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,
- name,
- accept,
- context))
+ .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()));
}
/**
* Get a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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.
@@ -535,61 +548,50 @@ private Mono> getByResourceGroupWithResponseAsync(String
* @return a Account along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(
- String resourceGroupName, String name, 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."));
+ 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."));
+ 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 (name == null) {
- return Mono.error(new IllegalArgumentException("Parameter name 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,
- name,
- accept,
- context);
+ return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context);
}
/**
* Get a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getByResourceGroupAsync(String resourceGroupName, String name) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, name)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, accountName)
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
* Get a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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.
@@ -597,58 +599,55 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Str
* @return a Account along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByResourceGroupWithResponse(
- String resourceGroupName, String name, Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, name, context).block();
+ public Response getByResourceGroupWithResponse(String resourceGroupName, String accountName,
+ Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, accountName, context).block();
}
/**
* Get a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public AccountInner getByResourceGroup(String resourceGroupName, String name) {
- return getByResourceGroupWithResponse(resourceGroupName, name, Context.NONE).getValue();
+ public AccountInner getByResourceGroup(String resourceGroupName, String accountName) {
+ return getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue();
}
/**
* Create a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 an account resource along with {@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>> createOrUpdateWithResponseAsync(
- String resourceGroupName, String name, AccountInner resource) {
+ 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."));
+ 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."));
+ 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 (name == null) {
- return Mono.error(new IllegalArgumentException("Parameter name 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."));
@@ -657,54 +656,41 @@ private Mono>> createOrUpdateWithResponseAsync(
}
final String accept = "application/json";
return FluxUtil
- .withContext(
- context ->
- service
- .createOrUpdate(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- name,
- resource,
- 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()));
}
/**
* Create a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 an account resource along with {@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>> createOrUpdateWithResponseAsync(
- String resourceGroupName, String name, AccountInner resource, 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."));
+ 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."));
+ 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 (name == null) {
- return Mono.error(new IllegalArgumentException("Parameter name 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."));
@@ -713,201 +699,187 @@ private Mono>> createOrUpdateWithResponseAsync(
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .createOrUpdate(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- name,
- resource,
- accept,
- context);
+ return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, resource, accept, context);
}
/**
* Create a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 an account resource.
+ * @return the {@link PollerFlux} for polling of a Playwright service account resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, AccountInner> beginCreateOrUpdateAsync(
- String resourceGroupName, String name, AccountInner resource) {
- Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, name, resource);
- return this
- .client
- .getLroResult(
- mono, this.client.getHttpPipeline(), AccountInner.class, AccountInner.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());
}
/**
* Create a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 an account resource.
+ * @return the {@link PollerFlux} for polling of a Playwright service account resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, AccountInner> beginCreateOrUpdateAsync(
- String resourceGroupName, String name, AccountInner resource, Context context) {
+ private PollerFlux, AccountInner> beginCreateOrUpdateAsync(String resourceGroupName,
+ String accountName, AccountInner resource, Context context) {
context = this.client.mergeContext(context);
- Mono>> mono =
- createOrUpdateWithResponseAsync(resourceGroupName, name, resource, context);
- return this
- .client
- .getLroResult(
- mono, this.client.getHttpPipeline(), AccountInner.class, AccountInner.class, context);
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceGroupName, accountName, resource, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ AccountInner.class, AccountInner.class, context);
}
/**
* Create a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 an account resource.
+ * @return the {@link SyncPoller} for polling of a Playwright service account resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, AccountInner> beginCreateOrUpdate(
- String resourceGroupName, String name, AccountInner resource) {
- return this.beginCreateOrUpdateAsync(resourceGroupName, name, resource).getSyncPoller();
+ public SyncPoller, AccountInner> beginCreateOrUpdate(String resourceGroupName,
+ String accountName, AccountInner resource) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, accountName, resource).getSyncPoller();
}
/**
* Create a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 an account resource.
+ * @return the {@link SyncPoller} for polling of a Playwright service account resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, AccountInner> beginCreateOrUpdate(
- String resourceGroupName, String name, AccountInner resource, Context context) {
- return this.beginCreateOrUpdateAsync(resourceGroupName, name, resource, context).getSyncPoller();
+ public SyncPoller, AccountInner> beginCreateOrUpdate(String resourceGroupName,
+ String accountName, AccountInner resource, Context context) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, accountName, resource, context).getSyncPoller();
}
/**
* Create a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 an account resource on successful completion of {@link Mono}.
+ * @return a Playwright service account resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAsync(String resourceGroupName, String name, AccountInner resource) {
- return beginCreateOrUpdateAsync(resourceGroupName, name, resource)
- .last()
+ private Mono createOrUpdateAsync(String resourceGroupName, String accountName,
+ AccountInner resource) {
+ return beginCreateOrUpdateAsync(resourceGroupName, accountName, resource).last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
* Create a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 an account resource on successful completion of {@link Mono}.
+ * @return a Playwright service account resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAsync(
- String resourceGroupName, String name, AccountInner resource, Context context) {
- return beginCreateOrUpdateAsync(resourceGroupName, name, resource, context)
- .last()
+ private Mono createOrUpdateAsync(String resourceGroupName, String accountName, AccountInner resource,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, accountName, resource, context).last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
* Create a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 an account resource.
+ * @return a Playwright service account resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public AccountInner createOrUpdate(String resourceGroupName, String name, AccountInner resource) {
- return createOrUpdateAsync(resourceGroupName, name, resource).block();
+ public AccountInner createOrUpdate(String resourceGroupName, String accountName, AccountInner resource) {
+ return createOrUpdateAsync(resourceGroupName, accountName, resource).block();
}
/**
* Create a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 an account resource.
+ * @return a Playwright service account resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public AccountInner createOrUpdate(String resourceGroupName, String name, AccountInner resource, Context context) {
- return createOrUpdateAsync(resourceGroupName, name, resource, context).block();
+ public AccountInner createOrUpdate(String resourceGroupName, String accountName, AccountInner resource,
+ Context context) {
+ return createOrUpdateAsync(resourceGroupName, accountName, resource, context).block();
}
/**
* Update a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 an account resource along with {@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> updateWithResponseAsync(
- String resourceGroupName, String name, AccountUpdate properties) {
+ 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."));
+ 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."));
+ 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 (name == null) {
- return Mono.error(new IllegalArgumentException("Parameter name 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."));
@@ -916,54 +888,41 @@ private Mono> updateWithResponseAsync(
}
final String accept = "application/json";
return FluxUtil
- .withContext(
- context ->
- service
- .update(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- name,
- properties,
- accept,
- context))
+ .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()));
}
/**
* Update a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 an account resource along with {@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> updateWithResponseAsync(
- String resourceGroupName, String name, AccountUpdate properties, 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."));
+ 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."));
+ 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 (name == null) {
- return Mono.error(new IllegalArgumentException("Parameter name 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."));
@@ -972,121 +931,100 @@ private Mono> updateWithResponseAsync(
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .update(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- name,
- properties,
- accept,
- context);
+ return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, accountName, properties, accept, context);
}
/**
* Update a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 an account resource on successful completion of {@link Mono}.
+ * @return a Playwright service account resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(String resourceGroupName, String name, AccountUpdate properties) {
- return updateWithResponseAsync(resourceGroupName, name, properties)
+ private Mono updateAsync(String resourceGroupName, String accountName, AccountUpdate properties) {
+ return updateWithResponseAsync(resourceGroupName, accountName, properties)
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
* Update a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 an account resource along with {@link Response}.
+ * @return a Playwright service account resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response updateWithResponse(
- String resourceGroupName, String name, AccountUpdate properties, Context context) {
- return updateWithResponseAsync(resourceGroupName, name, properties, context).block();
+ public Response updateWithResponse(String resourceGroupName, String accountName,
+ AccountUpdate properties, Context context) {
+ return updateWithResponseAsync(resourceGroupName, accountName, properties, context).block();
}
/**
* Update a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 an account resource.
+ * @return a Playwright service account resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public AccountInner update(String resourceGroupName, String name, AccountUpdate properties) {
- return updateWithResponse(resourceGroupName, name, properties, Context.NONE).getValue();
+ public AccountInner update(String resourceGroupName, String accountName, AccountUpdate properties) {
+ return updateWithResponse(resourceGroupName, accountName, properties, Context.NONE).getValue();
}
/**
* Delete a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(String resourceGroupName, String name) {
+ 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."));
+ 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."));
+ 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 (name == null) {
- return Mono.error(new IllegalArgumentException("Parameter name 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
- .delete(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- name,
- accept,
- context))
+ .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()));
}
/**
* Delete a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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.
@@ -1094,64 +1032,51 @@ private Mono>> deleteWithResponseAsync(String resource
* @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(
- String resourceGroupName, String name, 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."));
+ 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."));
+ 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 (name == null) {
- return Mono.error(new IllegalArgumentException("Parameter name 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
- .delete(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- name,
- accept,
- context);
+ return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, accountName, accept, context);
}
/**
* Delete a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 {@link PollerFlux} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String name) {
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, name);
- return this
- .client
- .getLroResult(
- mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ 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());
}
/**
* Delete a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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.
@@ -1159,35 +1084,34 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
* @return the {@link PollerFlux} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(
- String resourceGroupName, String name, Context context) {
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName,
+ Context context) {
context = this.client.mergeContext(context);
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, name, context);
- return this
- .client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
}
/**
* Delete a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, Void> beginDelete(String resourceGroupName, String name) {
- return this.beginDeleteAsync(resourceGroupName, name).getSyncPoller();
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName) {
+ return this.beginDeleteAsync(resourceGroupName, accountName).getSyncPoller();
}
/**
* Delete a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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.
@@ -1195,30 +1119,31 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, Void> beginDelete(String resourceGroupName, String name, Context context) {
- return this.beginDeleteAsync(resourceGroupName, name, context).getSyncPoller();
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName,
+ Context context) {
+ return this.beginDeleteAsync(resourceGroupName, accountName, context).getSyncPoller();
}
/**
* Delete a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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 {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String name) {
- return beginDeleteAsync(resourceGroupName, name).last().flatMap(this.client::getLroFinalResultOrError);
+ private Mono deleteAsync(String resourceGroupName, String accountName) {
+ return beginDeleteAsync(resourceGroupName, accountName).last().flatMap(this.client::getLroFinalResultOrError);
}
/**
* Delete a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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.
@@ -1226,49 +1151,51 @@ private Mono deleteAsync(String resourceGroupName, String name) {
* @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String name, Context context) {
- return beginDeleteAsync(resourceGroupName, name, context).last().flatMap(this.client::getLroFinalResultOrError);
+ private Mono deleteAsync(String resourceGroupName, String accountName, Context context) {
+ return beginDeleteAsync(resourceGroupName, accountName, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
* Delete a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String name) {
- deleteAsync(resourceGroupName, name).block();
+ public void delete(String resourceGroupName, String accountName) {
+ deleteAsync(resourceGroupName, accountName).block();
}
/**
* Delete a Account.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of account.
+ * @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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String name, Context context) {
- deleteAsync(resourceGroupName, name, context).block();
+ public void delete(String resourceGroupName, String accountName, Context context) {
+ deleteAsync(resourceGroupName, accountName, context).block();
}
/**
* Get the next page of items.
- *
+ *
* @param nextLink The URL to get the next list of items
- * The nextLink parameter.
+ *
+ * The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response of a Account list operation along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) {
@@ -1276,38 +1203,30 @@ private Mono> listBySubscriptionNextSinglePageAsync(
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
return FluxUtil
.withContext(
context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Get the next page of items.
- *
+ *
* @param nextLink The URL to get the next list of items
- * The nextLink parameter.
+ *
+ * The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @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}.
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) {
@@ -1315,36 +1234,27 @@ private Mono> listBySubscriptionNextSinglePageAsync(
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
+ return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
}
/**
* Get the next page of items.
- *
+ *
* @param nextLink The URL to get the next list of items
- * The nextLink parameter.
+ *
+ * The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response of a Account list operation along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
@@ -1352,38 +1262,30 @@ private Mono> listByResourceGroupNextSinglePageAsync
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
return FluxUtil
.withContext(
context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Get the next page of items.
- *
+ *
* @param nextLink The URL to get the next list of items
- * The nextLink parameter.
+ *
+ * The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @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}.
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) {
@@ -1391,23 +1293,13 @@ private Mono> listByResourceGroupNextSinglePageAsync
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
+ return service.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 52b534a5b2a2..635c3062a1b7 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
@@ -11,8 +11,11 @@
import com.azure.core.util.logging.ClientLogger;
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.models.Account;
import com.azure.resourcemanager.playwrighttesting.models.Accounts;
+import com.azure.resourcemanager.playwrighttesting.models.CheckNameAvailabilityRequest;
+import com.azure.resourcemanager.playwrighttesting.models.CheckNameAvailabilityResponse;
public final class AccountsImpl implements Accounts {
private static final ClientLogger LOGGER = new ClientLogger(AccountsImpl.class);
@@ -21,8 +24,7 @@ public final class AccountsImpl implements Accounts {
private final com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager serviceManager;
- public AccountsImpl(
- AccountsClient innerClient,
+ public AccountsImpl(AccountsClient innerClient,
com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
@@ -30,40 +32,59 @@ public AccountsImpl(
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
- return Utils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager()));
}
public PagedIterable list(Context context) {
PagedIterable inner = this.serviceClient().list(context);
- return Utils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager()));
+ }
+
+ public Response checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest body,
+ Context context) {
+ Response inner
+ = this.serviceClient().checkNameAvailabilityWithResponse(body, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new CheckNameAvailabilityResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest body) {
+ CheckNameAvailabilityResponseInner inner = this.serviceClient().checkNameAvailability(body);
+ if (inner != null) {
+ return new CheckNameAvailabilityResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
}
public PagedIterable listByResourceGroup(String resourceGroupName) {
PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
- return Utils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager()));
}
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
- return Utils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager()));
}
- public Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context) {
- Response inner =
- this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, name, context);
+ public Response getByResourceGroupWithResponse(String resourceGroupName, String accountName,
+ Context context) {
+ Response inner
+ = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, accountName, context);
if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new AccountImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
- public Account getByResourceGroup(String resourceGroupName, String name) {
- AccountInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, name);
+ public Account getByResourceGroup(String resourceGroupName, String accountName) {
+ AccountInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, accountName);
if (inner != null) {
return new AccountImpl(inner, this.manager());
} else {
@@ -71,88 +92,68 @@ public Account getByResourceGroup(String resourceGroupName, String name) {
}
}
- public void deleteByResourceGroup(String resourceGroupName, String name) {
- this.serviceClient().delete(resourceGroupName, name);
+ public void deleteByResourceGroup(String resourceGroupName, String accountName) {
+ this.serviceClient().delete(resourceGroupName, accountName);
}
- public void delete(String resourceGroupName, String name, Context context) {
- this.serviceClient().delete(resourceGroupName, name, context);
+ public void delete(String resourceGroupName, String accountName, Context context) {
+ this.serviceClient().delete(resourceGroupName, accountName, context);
}
public Account getById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException(
- String
- .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String name = Utils.getValueFromIdByName(id, "accounts");
- if (name == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts");
+ if (accountName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
}
- return this.getByResourceGroupWithResponse(resourceGroupName, name, Context.NONE).getValue();
+ return this.getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue();
}
public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException(
- String
- .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String name = Utils.getValueFromIdByName(id, "accounts");
- if (name == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts");
+ if (accountName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
}
- return this.getByResourceGroupWithResponse(resourceGroupName, name, context);
+ return this.getByResourceGroupWithResponse(resourceGroupName, accountName, context);
}
public void deleteById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException(
- String
- .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String name = Utils.getValueFromIdByName(id, "accounts");
- if (name == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts");
+ if (accountName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
}
- this.delete(resourceGroupName, name, Context.NONE);
+ this.delete(resourceGroupName, accountName, Context.NONE);
}
public void deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException(
- String
- .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String name = Utils.getValueFromIdByName(id, "accounts");
- if (name == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts");
+ if (accountName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
}
- this.delete(resourceGroupName, name, context);
+ this.delete(resourceGroupName, accountName, context);
}
private AccountsClient serviceClient() {
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
new file mode 100644
index 000000000000..4537f4c0efba
--- /dev/null
+++ b/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/src/main/java/com/azure/resourcemanager/playwrighttesting/implementation/CheckNameAvailabilityResponseImpl.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.playwrighttesting.implementation;
+
+import com.azure.resourcemanager.playwrighttesting.fluent.models.CheckNameAvailabilityResponseInner;
+import com.azure.resourcemanager.playwrighttesting.models.CheckNameAvailabilityReason;
+import com.azure.resourcemanager.playwrighttesting.models.CheckNameAvailabilityResponse;
+
+public final class CheckNameAvailabilityResponseImpl implements CheckNameAvailabilityResponse {
+ private CheckNameAvailabilityResponseInner innerObject;
+
+ private final com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager serviceManager;
+
+ CheckNameAvailabilityResponseImpl(CheckNameAvailabilityResponseInner innerObject,
+ com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public Boolean nameAvailable() {
+ return this.innerModel().nameAvailable();
+ }
+
+ public CheckNameAvailabilityReason reason() {
+ return this.innerModel().reason();
+ }
+
+ public String message() {
+ return this.innerModel().message();
+ }
+
+ public CheckNameAvailabilityResponseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager() {
+ return this.serviceManager;
+ }
+}
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 653ecfc62fc4..057480fbb231 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
@@ -15,8 +15,7 @@ public final class OperationImpl implements Operation {
private final com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager serviceManager;
- OperationImpl(
- OperationInner innerObject,
+ OperationImpl(OperationInner innerObject,
com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
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 c4e625ca971d..4d5381d45829 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
@@ -30,125 +30,106 @@
import com.azure.resourcemanager.playwrighttesting.models.OperationListResult;
import reactor.core.publisher.Mono;
-/** An instance of this class provides access to all the operations defined in OperationsClient. */
+/**
+ * An instance of this class provides access to all the operations defined in OperationsClient.
+ */
public final class OperationsClientImpl implements OperationsClient {
- /** The proxy service used to perform REST calls. */
+ /**
+ * The proxy service used to perform REST calls.
+ */
private final OperationsService service;
- /** The service client containing this operation class. */
+ /**
+ * The service client containing this operation class.
+ */
private final PlaywrightTestingMgmtClientImpl client;
/**
* Initializes an instance of OperationsClientImpl.
- *
+ *
* @param client the instance of the service client containing this operation class.
*/
OperationsClientImpl(PlaywrightTestingMgmtClientImpl client) {
- this.service =
- RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.service
+ = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PlaywrightTestingMgmtClientOperations to be used by the proxy service
- * to perform REST calls.
+ * The interface defining all the services for PlaywrightTestingMgmtClientOperations to be used by the proxy
+ * service to perform REST calls.
*/
@Host("{$host}")
@ServiceInterface(name = "PlaywrightTestingMgm")
public interface OperationsService {
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("/providers/Microsoft.AzurePlaywrightService/operations")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono> list(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
}
/**
* List the operations for the provider.
- *
+ *
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
- * successful completion of {@link Mono}.
+ * successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
return FluxUtil
.withContext(
context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* List the operations for the provider.
- *
+ *
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
- * successful completion of {@link Mono}.
+ * successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
+ return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
}
/**
* List the operations for the provider.
- *
+ *
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
- * PagedFlux}.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -157,27 +138,27 @@ private PagedFlux listAsync() {
/**
* List the operations for the provider.
- *
+ *
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
- * PagedFlux}.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
- return new PagedFlux<>(
- () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ return new PagedFlux<>(() -> listSinglePageAsync(context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
}
/**
* List the operations for the provider.
- *
+ *
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
- * PagedIterable}.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -186,13 +167,13 @@ public PagedIterable list() {
/**
* List the operations for the provider.
- *
+ *
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
- * PagedIterable}.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
@@ -201,14 +182,15 @@ public PagedIterable list(Context context) {
/**
* Get the next page of items.
- *
+ *
* @param nextLink The URL to get the next list of items
- * The nextLink parameter.
+ *
+ * The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
- * successful completion of {@link Mono}.
+ * successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -216,37 +198,28 @@ private Mono> listNextSinglePageAsync(String nextL
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Get the next page of items.
- *
+ *
* @param nextLink The URL to get the next list of items
- * The nextLink parameter.
+ *
+ * The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
- * successful completion of {@link Mono}.
+ * successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink, Context context) {
@@ -254,23 +227,13 @@ private Mono> listNextSinglePageAsync(String nextL
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .listNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
+ return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
}
}
diff --git a/sdk/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 bcc01acfc94e..942c576177df 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
@@ -19,8 +19,7 @@ public final class OperationsImpl implements Operations {
private final com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager serviceManager;
- public OperationsImpl(
- OperationsClient innerClient,
+ public OperationsImpl(OperationsClient innerClient,
com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
@@ -28,12 +27,12 @@ public OperationsImpl(
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
- return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
}
public PagedIterable list(Context context) {
PagedIterable inner = this.serviceClient().list(context);
- return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
}
private OperationsClient serviceClient() {
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 2d0f7192f0f5..d1e9878062cd 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
@@ -14,17 +14,19 @@
import com.azure.core.util.serializer.SerializerAdapter;
import java.time.Duration;
-/** A builder for creating a new instance of the PlaywrightTestingMgmtClientImpl type. */
-@ServiceClientBuilder(serviceClients = {PlaywrightTestingMgmtClientImpl.class})
+/**
+ * A builder for creating a new instance of the PlaywrightTestingMgmtClientImpl type.
+ */
+@ServiceClientBuilder(serviceClients = { PlaywrightTestingMgmtClientImpl.class })
public final class PlaywrightTestingMgmtClientBuilder {
/*
- * The ID of the target subscription.
+ * The ID of the target subscription. The value must be an UUID.
*/
private String subscriptionId;
/**
- * Sets The ID of the target subscription.
- *
+ * Sets The ID of the target subscription. The value must be an UUID.
+ *
* @param subscriptionId the subscriptionId value.
* @return the PlaywrightTestingMgmtClientBuilder.
*/
@@ -40,7 +42,7 @@ public PlaywrightTestingMgmtClientBuilder subscriptionId(String subscriptionId)
/**
* Sets server parameter.
- *
+ *
* @param endpoint the endpoint value.
* @return the PlaywrightTestingMgmtClientBuilder.
*/
@@ -56,7 +58,7 @@ public PlaywrightTestingMgmtClientBuilder endpoint(String endpoint) {
/**
* Sets The environment to connect to.
- *
+ *
* @param environment the environment value.
* @return the PlaywrightTestingMgmtClientBuilder.
*/
@@ -72,7 +74,7 @@ public PlaywrightTestingMgmtClientBuilder environment(AzureEnvironment environme
/**
* Sets The HTTP pipeline to send requests through.
- *
+ *
* @param pipeline the pipeline value.
* @return the PlaywrightTestingMgmtClientBuilder.
*/
@@ -88,7 +90,7 @@ public PlaywrightTestingMgmtClientBuilder pipeline(HttpPipeline pipeline) {
/**
* Sets The default poll interval for long-running operation.
- *
+ *
* @param defaultPollInterval the defaultPollInterval value.
* @return the PlaywrightTestingMgmtClientBuilder.
*/
@@ -104,7 +106,7 @@ public PlaywrightTestingMgmtClientBuilder defaultPollInterval(Duration defaultPo
/**
* Sets The serializer to serialize an object into a string.
- *
+ *
* @param serializerAdapter the serializerAdapter value.
* @return the PlaywrightTestingMgmtClientBuilder.
*/
@@ -115,30 +117,20 @@ public PlaywrightTestingMgmtClientBuilder serializerAdapter(SerializerAdapter se
/**
* Builds an instance of PlaywrightTestingMgmtClientImpl with the provided parameters.
- *
+ *
* @return an instance of PlaywrightTestingMgmtClientImpl.
*/
public PlaywrightTestingMgmtClientImpl buildClient() {
String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
- HttpPipeline localPipeline =
- (pipeline != null)
- ? pipeline
- : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
- Duration localDefaultPollInterval =
- (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
- SerializerAdapter localSerializerAdapter =
- (serializerAdapter != null)
- ? serializerAdapter
- : SerializerFactory.createDefaultManagementSerializerAdapter();
- PlaywrightTestingMgmtClientImpl client =
- new PlaywrightTestingMgmtClientImpl(
- localPipeline,
- localSerializerAdapter,
- localDefaultPollInterval,
- localEnvironment,
- this.subscriptionId,
- localEndpoint);
+ HttpPipeline localPipeline = (pipeline != null) ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval
+ = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
+ PlaywrightTestingMgmtClientImpl client = new PlaywrightTestingMgmtClientImpl(localPipeline,
+ 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 91eeba04d9cd..e21f86ab61e5 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
@@ -22,6 +22,7 @@
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.playwrighttesting.fluent.AccountQuotasClient;
import com.azure.resourcemanager.playwrighttesting.fluent.AccountsClient;
import com.azure.resourcemanager.playwrighttesting.fluent.OperationsClient;
import com.azure.resourcemanager.playwrighttesting.fluent.PlaywrightTestingMgmtClient;
@@ -35,148 +36,178 @@
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
-/** Initializes a new instance of the PlaywrightTestingMgmtClientImpl type. */
+/**
+ * Initializes a new instance of the PlaywrightTestingMgmtClientImpl type.
+ */
@ServiceClient(builder = PlaywrightTestingMgmtClientBuilder.class)
public final class PlaywrightTestingMgmtClientImpl implements PlaywrightTestingMgmtClient {
- /** The ID of the target subscription. */
+ /**
+ * The ID of the target subscription. The value must be an UUID.
+ */
private final String subscriptionId;
/**
- * Gets The ID of the target subscription.
- *
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
* @return the subscriptionId value.
*/
public String getSubscriptionId() {
return this.subscriptionId;
}
- /** server parameter. */
+ /**
+ * server parameter.
+ */
private final String endpoint;
/**
* Gets server parameter.
- *
+ *
* @return the endpoint value.
*/
public String getEndpoint() {
return this.endpoint;
}
- /** Api Version. */
+ /**
+ * Api Version.
+ */
private final String apiVersion;
/**
* Gets Api Version.
- *
+ *
* @return the apiVersion value.
*/
public String getApiVersion() {
return this.apiVersion;
}
- /** The HTTP pipeline to send requests through. */
+ /**
+ * The HTTP pipeline to send requests through.
+ */
private final HttpPipeline httpPipeline;
/**
* Gets The HTTP pipeline to send requests through.
- *
+ *
* @return the httpPipeline value.
*/
public HttpPipeline getHttpPipeline() {
return this.httpPipeline;
}
- /** The serializer to serialize an object into a string. */
+ /**
+ * The serializer to serialize an object into a string.
+ */
private final SerializerAdapter serializerAdapter;
/**
* Gets The serializer to serialize an object into a string.
- *
+ *
* @return the serializerAdapter value.
*/
SerializerAdapter getSerializerAdapter() {
return this.serializerAdapter;
}
- /** The default poll interval for long-running operation. */
+ /**
+ * The default poll interval for long-running operation.
+ */
private final Duration defaultPollInterval;
/**
* Gets The default poll interval for long-running operation.
- *
+ *
* @return the defaultPollInterval value.
*/
public Duration getDefaultPollInterval() {
return this.defaultPollInterval;
}
- /** The OperationsClient object to access its operations. */
+ /**
+ * The OperationsClient object to access its operations.
+ */
private final OperationsClient operations;
/**
* Gets the OperationsClient object to access its operations.
- *
+ *
* @return the OperationsClient object.
*/
public OperationsClient getOperations() {
return this.operations;
}
- /** The AccountsClient object to access its operations. */
+ /**
+ * The AccountsClient object to access its operations.
+ */
private final AccountsClient accounts;
/**
* Gets the AccountsClient object to access its operations.
- *
+ *
* @return the AccountsClient object.
*/
public AccountsClient getAccounts() {
return this.accounts;
}
- /** The QuotasClient object to access its operations. */
+ /**
+ * The QuotasClient object to access its operations.
+ */
private final QuotasClient quotas;
/**
* Gets the QuotasClient object to access its operations.
- *
+ *
* @return the QuotasClient object.
*/
public QuotasClient getQuotas() {
return this.quotas;
}
+ /**
+ * The AccountQuotasClient object to access its operations.
+ */
+ private final AccountQuotasClient accountQuotas;
+
+ /**
+ * Gets the AccountQuotasClient object to access its operations.
+ *
+ * @return the AccountQuotasClient object.
+ */
+ public AccountQuotasClient getAccountQuotas() {
+ return this.accountQuotas;
+ }
+
/**
* Initializes an instance of PlaywrightTestingMgmtClient client.
- *
+ *
* @param httpPipeline The HTTP pipeline to send requests through.
* @param serializerAdapter The serializer to serialize an object into a string.
* @param defaultPollInterval The default poll interval for long-running operation.
* @param environment The Azure environment.
- * @param subscriptionId The ID of the target subscription.
+ * @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 subscriptionId,
- String endpoint) {
+ PlaywrightTestingMgmtClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) {
this.httpPipeline = httpPipeline;
this.serializerAdapter = serializerAdapter;
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2023-10-01-preview";
+ this.apiVersion = "2024-02-01";
this.operations = new OperationsClientImpl(this);
this.accounts = new AccountsClientImpl(this);
this.quotas = new QuotasClientImpl(this);
+ this.accountQuotas = new AccountQuotasClientImpl(this);
}
/**
* Gets default client context.
- *
+ *
* @return the default client context.
*/
public Context getContext() {
@@ -185,7 +216,7 @@ public Context getContext() {
/**
* Merges default client context with provided context.
- *
+ *
* @param context the context to be merged with default client context.
* @return the merged context.
*/
@@ -195,7 +226,7 @@ public Context mergeContext(Context context) {
/**
* Gets long running operation result.
- *
+ *
* @param activationResponse the response of activation operation.
* @param httpPipeline the http pipeline.
* @param pollResultType type of poll result.
@@ -205,26 +236,15 @@ public Context mergeContext(Context context) {
* @param type of final result.
* @return poller flux for poll result and final result.
*/
- public PollerFlux, U> getLroResult(
- Mono>> activationResponse,
- HttpPipeline httpPipeline,
- Type pollResultType,
- Type finalResultType,
- Context context) {
- return PollerFactory
- .create(
- serializerAdapter,
- httpPipeline,
- pollResultType,
- finalResultType,
- defaultPollInterval,
- activationResponse,
- context);
+ public PollerFlux, U> getLroResult(Mono>> activationResponse,
+ HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) {
+ return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, activationResponse, context);
}
/**
* Gets the final result, or an error, based on last async poll response.
- *
+ *
* @param response the last async poll response.
* @param type of poll result.
* @param type of final result.
@@ -237,19 +257,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse,
HttpResponse errorResponse = null;
PollResult.Error lroError = response.getValue().getError();
if (lroError != null) {
- errorResponse =
- new HttpResponseImpl(
- lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody());
+ errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(),
+ lroError.getResponseBody());
errorMessage = response.getValue().getError().getMessage();
String errorBody = response.getValue().getError().getResponseBody();
if (errorBody != null) {
// try to deserialize error body to ManagementError
try {
- managementError =
- this
- .getSerializerAdapter()
- .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
+ managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class,
+ SerializerEncoding.JSON);
if (managementError.getCode() == null || managementError.getMessage() == null) {
managementError = null;
}
diff --git a/sdk/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 5be6cb19aa9a..2bba90979d89 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
@@ -6,17 +6,16 @@
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.playwrighttesting.fluent.models.QuotaInner;
-import com.azure.resourcemanager.playwrighttesting.models.FreeTrialProperties;
-import com.azure.resourcemanager.playwrighttesting.models.ProvisioningState;
import com.azure.resourcemanager.playwrighttesting.models.Quota;
+import com.azure.resourcemanager.playwrighttesting.models.QuotaProperties;
public final class QuotaImpl implements Quota {
private QuotaInner innerObject;
private final com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager serviceManager;
- QuotaImpl(
- QuotaInner innerObject, com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager serviceManager) {
+ QuotaImpl(QuotaInner innerObject,
+ com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -33,16 +32,12 @@ public String type() {
return this.innerModel().type();
}
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
- public FreeTrialProperties freeTrial() {
- return this.innerModel().freeTrial();
+ public QuotaProperties properties() {
+ return this.innerModel().properties();
}
- public ProvisioningState provisioningState() {
- return this.innerModel().provisioningState();
+ public SystemData systemData() {
+ return this.innerModel().systemData();
}
public QuotaInner innerModel() {
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 8c27a2ad5ddc..5d5dbba5baf2 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
@@ -31,17 +31,23 @@
import com.azure.resourcemanager.playwrighttesting.models.QuotaNames;
import reactor.core.publisher.Mono;
-/** An instance of this class provides access to all the operations defined in QuotasClient. */
+/**
+ * An instance of this class provides access to all the operations defined in QuotasClient.
+ */
public final class QuotasClientImpl implements QuotasClient {
- /** The proxy service used to perform REST calls. */
+ /**
+ * The proxy service used to perform REST calls.
+ */
private final QuotasService service;
- /** The service client containing this operation class. */
+ /**
+ * The service client containing this operation class.
+ */
private final PlaywrightTestingMgmtClientImpl client;
/**
* Initializes an instance of QuotasClientImpl.
- *
+ *
* @param client the instance of the service client containing this operation class.
*/
QuotasClientImpl(PlaywrightTestingMgmtClientImpl client) {
@@ -56,118 +62,84 @@ public final class QuotasClientImpl implements QuotasClient {
@Host("{$host}")
@ServiceInterface(name = "PlaywrightTestingMgm")
public interface QuotasService {
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listBySubscription(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("location") String location,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono> listBySubscription(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
- @Get(
- "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{name}")
- @ExpectedResponses({200})
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName}")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> get(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("location") String location,
- @PathParam("name") QuotaNames name,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono> get(@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);
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listBySubscriptionNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept,
- Context context);
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
}
/**
* List quotas for a given subscription Id.
- *
+ *
* @param location The location of quota in ARM Normalized format like eastus, southeastasia etc.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response of a Quota list operation along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
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."));
+ 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."));
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (location == null) {
return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
}
final String accept = "application/json";
return FluxUtil
- .withContext(
- context ->
- service
- .listBySubscription(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- location,
- accept,
- context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
+ .withContext(context -> service.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()));
}
/**
* List quotas for a given subscription Id.
- *
+ *
* @param location The location of quota in ARM Normalized format like eastus, southeastasia etc.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response of a Quota list operation along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
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."));
+ 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."));
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (location == null) {
return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
@@ -175,27 +147,15 @@ private Mono> listBySubscriptionSinglePageAsync(String
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .listBySubscription(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- location,
- accept,
- context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
+ .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));
}
/**
* List quotas for a given subscription Id.
- *
+ *
* @param location The location of quota in ARM Normalized format like eastus, southeastasia etc.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -204,14 +164,13 @@ private Mono> listBySubscriptionSinglePageAsync(String
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listBySubscriptionAsync(String location) {
- return new PagedFlux<>(
- () -> listBySubscriptionSinglePageAsync(location),
+ return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(location),
nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
}
/**
* List quotas for a given subscription Id.
- *
+ *
* @param location The location of quota in ARM Normalized format like eastus, southeastasia etc.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -221,14 +180,13 @@ private PagedFlux listBySubscriptionAsync(String location) {
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listBySubscriptionAsync(String location, Context context) {
- return new PagedFlux<>(
- () -> listBySubscriptionSinglePageAsync(location, context),
+ return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(location, context),
nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
}
/**
* List quotas for a given subscription Id.
- *
+ *
* @param location The location of quota in ARM Normalized format like eastus, southeastasia etc.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -242,7 +200,7 @@ public PagedIterable listBySubscription(String location) {
/**
* List quotas for a given subscription Id.
- *
+ *
* @param location The location of quota in ARM Normalized format like eastus, southeastasia etc.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -256,151 +214,128 @@ public PagedIterable