scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
+ private Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Sets the retry policy to the HTTP pipeline.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * 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.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the default poll interval, used when service does not provide "Retry-After" header.
+ *
+ * @param defaultPollInterval the default poll interval.
+ * @return the configurable object itself.
+ */
+ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval
+ = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of LoadTest service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the LoadTest service API instance.
+ */
+ public LoadTestManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder.append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting")
+ .append("/")
+ .append(clientVersion);
+ 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)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
+ if (retryPolicy == null) {
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ }
+ List policies = new ArrayList<>();
+ 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()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ 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();
+ return new LoadTestManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * Gets the resource collection API of LoadTests. It manages LoadTestResource.
+ *
+ * @return Resource collection API of LoadTests.
+ */
+ public LoadTests loadTests() {
+ if (this.loadTests == null) {
+ this.loadTests = new LoadTestsImpl(clientObject.getLoadTests(), this);
+ }
+ return loadTests;
+ }
+
+ /**
+ * Gets the resource collection API of Quotas.
+ *
+ * @return Resource collection API of Quotas.
+ */
+ public Quotas quotas() {
+ if (this.quotas == null) {
+ this.quotas = new QuotasImpl(clientObject.getQuotas(), this);
+ }
+ return quotas;
+ }
+
+ /**
+ * Gets wrapped service client LoadTestClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client LoadTestClient.
+ */
+ public LoadTestClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/LoadTestClient.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/LoadTestClient.java
new file mode 100644
index 000000000000..0e1065c60f96
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/LoadTestClient.java
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for LoadTestClient class.
+ */
+public interface LoadTestClient {
+ /**
+ * 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 LoadTestsClient object to access its operations.
+ *
+ * @return the LoadTestsClient object.
+ */
+ LoadTestsClient getLoadTests();
+
+ /**
+ * Gets the QuotasClient object to access its operations.
+ *
+ * @return the QuotasClient object.
+ */
+ QuotasClient getQuotas();
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/LoadTestsClient.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/LoadTestsClient.java
new file mode 100644
index 000000000000..b7064fc62b19
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/LoadTestsClient.java
@@ -0,0 +1,300 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.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.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.LoadTestResourceInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.OutboundEnvironmentEndpointInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.LoadTestResourcePatchRequestBody;
+
+/**
+ * An instance of this class provides access to all the operations defined in LoadTestsClient.
+ */
+public interface LoadTestsClient {
+ /**
+ * List LoadTestResource 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 LoadTestResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List LoadTestResource resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a LoadTestResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * List LoadTestResource resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a LoadTestResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List LoadTestResource resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a LoadTestResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Get a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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 a LoadTestResource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String loadTestName,
+ Context context);
+
+ /**
+ * Get a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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 a LoadTestResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ LoadTestResourceInner getByResourceGroup(String resourceGroupName, String loadTestName);
+
+ /**
+ * Create a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, LoadTestResourceInner> beginCreateOrUpdate(String resourceGroupName,
+ String loadTestName, LoadTestResourceInner resource);
+
+ /**
+ * Create a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, LoadTestResourceInner> beginCreateOrUpdate(String resourceGroupName,
+ String loadTestName, LoadTestResourceInner resource, Context context);
+
+ /**
+ * Create a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ LoadTestResourceInner createOrUpdate(String resourceGroupName, String loadTestName, LoadTestResourceInner resource);
+
+ /**
+ * Create a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ LoadTestResourceInner createOrUpdate(String resourceGroupName, String loadTestName, LoadTestResourceInner resource,
+ Context context);
+
+ /**
+ * Update a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 the {@link SyncPoller} for polling of loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, LoadTestResourceInner> beginUpdate(String resourceGroupName,
+ String loadTestName, LoadTestResourcePatchRequestBody properties);
+
+ /**
+ * Update a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 the {@link SyncPoller} for polling of loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, LoadTestResourceInner> beginUpdate(String resourceGroupName,
+ String loadTestName, LoadTestResourcePatchRequestBody properties, Context context);
+
+ /**
+ * Update a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ LoadTestResourceInner update(String resourceGroupName, String loadTestName,
+ LoadTestResourcePatchRequestBody properties);
+
+ /**
+ * Update a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ LoadTestResourceInner update(String resourceGroupName, String loadTestName,
+ LoadTestResourcePatchRequestBody properties, Context context);
+
+ /**
+ * Delete a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String loadTestName);
+
+ /**
+ * Delete a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String loadTestName, Context context);
+
+ /**
+ * Delete a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String loadTestName);
+
+ /**
+ * Delete a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String loadTestName, Context context);
+
+ /**
+ * Lists the endpoints that agents may call as part of load testing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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 values returned by the List operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName,
+ String loadTestName);
+
+ /**
+ * Lists the endpoints that agents may call as part of load testing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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 values returned by the List operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName,
+ String loadTestName, Context context);
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/OperationsClient.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/OperationsClient.java
new file mode 100644
index 000000000000..4d81321f9de0
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/OperationsClient.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.OperationInner;
+
+/**
+ * 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}.
+ */
+ @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}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/QuotasClient.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/QuotasClient.java
new file mode 100644
index 000000000000..bafb5f708457
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/QuotasClient.java
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.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.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.CheckQuotaAvailabilityResponseInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.QuotaResourceInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.QuotaBucketRequest;
+
+/**
+ * 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 name of the Azure region.
+ * @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 QuotaResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String location);
+
+ /**
+ * List quotas for a given subscription Id.
+ *
+ * @param location The name of the Azure region.
+ * @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 QuotaResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String location, Context context);
+
+ /**
+ * Get the available quota for a quota bucket per region per subscription.
+ *
+ * @param location The name of the Azure region.
+ * @param quotaBucketName The quota name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the available quota for a quota bucket per region per subscription along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String location, String quotaBucketName, Context context);
+
+ /**
+ * Get the available quota for a quota bucket per region per subscription.
+ *
+ * @param location The name of the Azure region.
+ * @param quotaBucketName The quota name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the available quota for a quota bucket per region per subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ QuotaResourceInner get(String location, String quotaBucketName);
+
+ /**
+ * Check Quota Availability on quota bucket per region per subscription.
+ *
+ * @param location The name of the Azure region.
+ * @param quotaBucketName The quota name.
+ * @param body The content of the action 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 check quota availability response object along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response checkAvailabilityWithResponse(String location, String quotaBucketName,
+ QuotaBucketRequest body, Context context);
+
+ /**
+ * Check Quota Availability on quota bucket per region per subscription.
+ *
+ * @param location The name of the Azure region.
+ * @param quotaBucketName The quota name.
+ * @param body The content of the action 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 check quota availability response object.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CheckQuotaAvailabilityResponseInner checkAvailability(String location, String quotaBucketName,
+ QuotaBucketRequest body);
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/CheckQuotaAvailabilityResponseInner.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/CheckQuotaAvailabilityResponseInner.java
new file mode 100644
index 000000000000..983967c55b32
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/CheckQuotaAvailabilityResponseInner.java
@@ -0,0 +1,204 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Check quota availability response object.
+ */
+@Fluent
+public final class CheckQuotaAvailabilityResponseInner
+ implements JsonSerializable {
+ /*
+ * Fully qualified resource ID for the resource. Ex -
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{
+ * resourceType}/{resourceName}
+ */
+ private String id;
+
+ /*
+ * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ */
+ private String type;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Check quota availability response properties.
+ */
+ private CheckQuotaAvailabilityResponseProperties innerProperties;
+
+ /**
+ * Creates an instance of CheckQuotaAvailabilityResponseInner class.
+ */
+ public CheckQuotaAvailabilityResponseInner() {
+ }
+
+ /**
+ * Get the id property: Fully qualified resource ID for the resource. Ex -
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the type property: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ * "Microsoft.Storage/storageAccounts".
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the innerProperties property: Check quota availability response properties.
+ *
+ * @return the innerProperties value.
+ */
+ private CheckQuotaAvailabilityResponseProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the isAvailable property: True/False indicating whether the quota request be granted based on availability.
+ *
+ * @return the isAvailable value.
+ */
+ public Boolean isAvailable() {
+ return this.innerProperties() == null ? null : this.innerProperties().isAvailable();
+ }
+
+ /**
+ * Set the isAvailable property: True/False indicating whether the quota request be granted based on availability.
+ *
+ * @param isAvailable the isAvailable value to set.
+ * @return the CheckQuotaAvailabilityResponseInner object itself.
+ */
+ public CheckQuotaAvailabilityResponseInner withIsAvailable(Boolean isAvailable) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CheckQuotaAvailabilityResponseProperties();
+ }
+ this.innerProperties().withIsAvailable(isAvailable);
+ return this;
+ }
+
+ /**
+ * Get the availabilityStatus property: Message indicating additional details to add to quota support request.
+ *
+ * @return the availabilityStatus value.
+ */
+ public String availabilityStatus() {
+ return this.innerProperties() == null ? null : this.innerProperties().availabilityStatus();
+ }
+
+ /**
+ * Set the availabilityStatus property: Message indicating additional details to add to quota support request.
+ *
+ * @param availabilityStatus the availabilityStatus value to set.
+ * @return the CheckQuotaAvailabilityResponseInner object itself.
+ */
+ public CheckQuotaAvailabilityResponseInner withAvailabilityStatus(String availabilityStatus) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CheckQuotaAvailabilityResponseProperties();
+ }
+ this.innerProperties().withAvailabilityStatus(availabilityStatus);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CheckQuotaAvailabilityResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CheckQuotaAvailabilityResponseInner if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the CheckQuotaAvailabilityResponseInner.
+ */
+ public static CheckQuotaAvailabilityResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CheckQuotaAvailabilityResponseInner deserializedCheckQuotaAvailabilityResponseInner
+ = new CheckQuotaAvailabilityResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedCheckQuotaAvailabilityResponseInner.id = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedCheckQuotaAvailabilityResponseInner.type = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedCheckQuotaAvailabilityResponseInner.systemData = SystemData.fromJson(reader);
+ } else if ("name".equals(fieldName)) {
+ deserializedCheckQuotaAvailabilityResponseInner.name = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedCheckQuotaAvailabilityResponseInner.innerProperties
+ = CheckQuotaAvailabilityResponseProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCheckQuotaAvailabilityResponseInner;
+ });
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/CheckQuotaAvailabilityResponseProperties.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/CheckQuotaAvailabilityResponseProperties.java
new file mode 100644
index 000000000000..75549afbd92d
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/CheckQuotaAvailabilityResponseProperties.java
@@ -0,0 +1,124 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Check quota availability response properties.
+ */
+@Fluent
+public final class CheckQuotaAvailabilityResponseProperties
+ implements JsonSerializable {
+ /*
+ * True/False indicating whether the quota request be granted based on availability.
+ */
+ private Boolean isAvailable;
+
+ /*
+ * Message indicating additional details to add to quota support request.
+ */
+ private String availabilityStatus;
+
+ /**
+ * Creates an instance of CheckQuotaAvailabilityResponseProperties class.
+ */
+ public CheckQuotaAvailabilityResponseProperties() {
+ }
+
+ /**
+ * Get the isAvailable property: True/False indicating whether the quota request be granted based on availability.
+ *
+ * @return the isAvailable value.
+ */
+ public Boolean isAvailable() {
+ return this.isAvailable;
+ }
+
+ /**
+ * Set the isAvailable property: True/False indicating whether the quota request be granted based on availability.
+ *
+ * @param isAvailable the isAvailable value to set.
+ * @return the CheckQuotaAvailabilityResponseProperties object itself.
+ */
+ public CheckQuotaAvailabilityResponseProperties withIsAvailable(Boolean isAvailable) {
+ this.isAvailable = isAvailable;
+ return this;
+ }
+
+ /**
+ * Get the availabilityStatus property: Message indicating additional details to add to quota support request.
+ *
+ * @return the availabilityStatus value.
+ */
+ public String availabilityStatus() {
+ return this.availabilityStatus;
+ }
+
+ /**
+ * Set the availabilityStatus property: Message indicating additional details to add to quota support request.
+ *
+ * @param availabilityStatus the availabilityStatus value to set.
+ * @return the CheckQuotaAvailabilityResponseProperties object itself.
+ */
+ public CheckQuotaAvailabilityResponseProperties withAvailabilityStatus(String availabilityStatus) {
+ this.availabilityStatus = availabilityStatus;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("isAvailable", this.isAvailable);
+ jsonWriter.writeStringField("availabilityStatus", this.availabilityStatus);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CheckQuotaAvailabilityResponseProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CheckQuotaAvailabilityResponseProperties if the JsonReader was pointing to an instance of
+ * it, or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CheckQuotaAvailabilityResponseProperties.
+ */
+ public static CheckQuotaAvailabilityResponseProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CheckQuotaAvailabilityResponseProperties deserializedCheckQuotaAvailabilityResponseProperties
+ = new CheckQuotaAvailabilityResponseProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("isAvailable".equals(fieldName)) {
+ deserializedCheckQuotaAvailabilityResponseProperties.isAvailable
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("availabilityStatus".equals(fieldName)) {
+ deserializedCheckQuotaAvailabilityResponseProperties.availabilityStatus = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCheckQuotaAvailabilityResponseProperties;
+ });
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/LoadTestProperties.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/LoadTestProperties.java
new file mode 100644
index 000000000000..c1a1ddf3ad27
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/LoadTestProperties.java
@@ -0,0 +1,158 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.EncryptionProperties;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.ResourceState;
+import java.io.IOException;
+
+/**
+ * LoadTest resource properties.
+ */
+@Fluent
+public final class LoadTestProperties implements JsonSerializable {
+ /*
+ * Description of the resource.
+ */
+ private String description;
+
+ /*
+ * Resource provisioning state.
+ */
+ private ResourceState provisioningState;
+
+ /*
+ * Resource data plane URI.
+ */
+ private String dataPlaneUri;
+
+ /*
+ * CMK Encryption property.
+ */
+ private EncryptionProperties encryption;
+
+ /**
+ * Creates an instance of LoadTestProperties class.
+ */
+ public LoadTestProperties() {
+ }
+
+ /**
+ * Get the description property: Description of the resource.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Description of the resource.
+ *
+ * @param description the description value to set.
+ * @return the LoadTestProperties object itself.
+ */
+ public LoadTestProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Resource provisioning state.
+ *
+ * @return the provisioningState value.
+ */
+ public ResourceState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the dataPlaneUri property: Resource data plane URI.
+ *
+ * @return the dataPlaneUri value.
+ */
+ public String dataPlaneUri() {
+ return this.dataPlaneUri;
+ }
+
+ /**
+ * Get the encryption property: CMK Encryption property.
+ *
+ * @return the encryption value.
+ */
+ public EncryptionProperties encryption() {
+ return this.encryption;
+ }
+
+ /**
+ * Set the encryption property: CMK Encryption property.
+ *
+ * @param encryption the encryption value to set.
+ * @return the LoadTestProperties object itself.
+ */
+ public LoadTestProperties withEncryption(EncryptionProperties encryption) {
+ this.encryption = encryption;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (encryption() != null) {
+ encryption().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("description", this.description);
+ jsonWriter.writeJsonField("encryption", this.encryption);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LoadTestProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LoadTestProperties if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the LoadTestProperties.
+ */
+ public static LoadTestProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LoadTestProperties deserializedLoadTestProperties = new LoadTestProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("description".equals(fieldName)) {
+ deserializedLoadTestProperties.description = reader.getString();
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedLoadTestProperties.provisioningState = ResourceState.fromString(reader.getString());
+ } else if ("dataPlaneURI".equals(fieldName)) {
+ deserializedLoadTestProperties.dataPlaneUri = reader.getString();
+ } else if ("encryption".equals(fieldName)) {
+ deserializedLoadTestProperties.encryption = EncryptionProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLoadTestProperties;
+ });
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/LoadTestResourceInner.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/LoadTestResourceInner.java
new file mode 100644
index 000000000000..64958f8eb777
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/LoadTestResourceInner.java
@@ -0,0 +1,278 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.EncryptionProperties;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.ResourceState;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * LoadTest details.
+ */
+@Fluent
+public final class LoadTestResourceInner extends Resource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private LoadTestProperties innerProperties;
+
+ /*
+ * The managed service identities assigned to this resource.
+ */
+ private ManagedServiceIdentity identity;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of LoadTestResourceInner class.
+ */
+ public LoadTestResourceInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private LoadTestProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the identity property: The managed service identities assigned to this resource.
+ *
+ * @return the identity value.
+ */
+ public ManagedServiceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The managed service identities assigned to this resource.
+ *
+ * @param identity the identity value to set.
+ * @return the LoadTestResourceInner object itself.
+ */
+ public LoadTestResourceInner withIdentity(ManagedServiceIdentity identity) {
+ this.identity = identity;
+ 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;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public LoadTestResourceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public LoadTestResourceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the description property: Description of the resource.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * Set the description property: Description of the resource.
+ *
+ * @param description the description value to set.
+ * @return the LoadTestResourceInner object itself.
+ */
+ public LoadTestResourceInner withDescription(String description) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new LoadTestProperties();
+ }
+ this.innerProperties().withDescription(description);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Resource provisioning state.
+ *
+ * @return the provisioningState value.
+ */
+ public ResourceState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the dataPlaneUri property: Resource data plane URI.
+ *
+ * @return the dataPlaneUri value.
+ */
+ public String dataPlaneUri() {
+ return this.innerProperties() == null ? null : this.innerProperties().dataPlaneUri();
+ }
+
+ /**
+ * Get the encryption property: CMK Encryption property.
+ *
+ * @return the encryption value.
+ */
+ public EncryptionProperties encryption() {
+ return this.innerProperties() == null ? null : this.innerProperties().encryption();
+ }
+
+ /**
+ * Set the encryption property: CMK Encryption property.
+ *
+ * @param encryption the encryption value to set.
+ * @return the LoadTestResourceInner object itself.
+ */
+ public LoadTestResourceInner withEncryption(EncryptionProperties encryption) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new LoadTestProperties();
+ }
+ this.innerProperties().withEncryption(encryption);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ if (identity() != null) {
+ identity().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ jsonWriter.writeJsonField("identity", this.identity);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LoadTestResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LoadTestResourceInner if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the LoadTestResourceInner.
+ */
+ public static LoadTestResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LoadTestResourceInner deserializedLoadTestResourceInner = new LoadTestResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedLoadTestResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedLoadTestResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedLoadTestResourceInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedLoadTestResourceInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedLoadTestResourceInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedLoadTestResourceInner.innerProperties = LoadTestProperties.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedLoadTestResourceInner.identity = ManagedServiceIdentity.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedLoadTestResourceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLoadTestResourceInner;
+ });
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/LoadTestResourceUpdateProperties.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/LoadTestResourceUpdateProperties.java
new file mode 100644
index 000000000000..eced9febd568
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/LoadTestResourceUpdateProperties.java
@@ -0,0 +1,126 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.EncryptionProperties;
+import java.io.IOException;
+
+/**
+ * The updatable properties of the LoadTestResource.
+ */
+@Fluent
+public final class LoadTestResourceUpdateProperties implements JsonSerializable {
+ /*
+ * Description of the resource.
+ */
+ private String description;
+
+ /*
+ * CMK Encryption property.
+ */
+ private EncryptionProperties encryption;
+
+ /**
+ * Creates an instance of LoadTestResourceUpdateProperties class.
+ */
+ public LoadTestResourceUpdateProperties() {
+ }
+
+ /**
+ * Get the description property: Description of the resource.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Description of the resource.
+ *
+ * @param description the description value to set.
+ * @return the LoadTestResourceUpdateProperties object itself.
+ */
+ public LoadTestResourceUpdateProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the encryption property: CMK Encryption property.
+ *
+ * @return the encryption value.
+ */
+ public EncryptionProperties encryption() {
+ return this.encryption;
+ }
+
+ /**
+ * Set the encryption property: CMK Encryption property.
+ *
+ * @param encryption the encryption value to set.
+ * @return the LoadTestResourceUpdateProperties object itself.
+ */
+ public LoadTestResourceUpdateProperties withEncryption(EncryptionProperties encryption) {
+ this.encryption = encryption;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (encryption() != null) {
+ encryption().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("description", this.description);
+ jsonWriter.writeJsonField("encryption", this.encryption);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LoadTestResourceUpdateProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LoadTestResourceUpdateProperties if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the LoadTestResourceUpdateProperties.
+ */
+ public static LoadTestResourceUpdateProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LoadTestResourceUpdateProperties deserializedLoadTestResourceUpdateProperties
+ = new LoadTestResourceUpdateProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("description".equals(fieldName)) {
+ deserializedLoadTestResourceUpdateProperties.description = reader.getString();
+ } else if ("encryption".equals(fieldName)) {
+ deserializedLoadTestResourceUpdateProperties.encryption = EncryptionProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLoadTestResourceUpdateProperties;
+ });
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/OperationInner.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..ac736f88e7c5
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/OperationInner.java
@@ -0,0 +1,172 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.ActionType;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.OperationDisplay;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.Origin;
+import java.io.IOException;
+
+/**
+ * REST API Operation
+ *
+ * Details of a REST API operation, returned from the Resource Provider Operations API.
+ */
+@Fluent
+public final class OperationInner implements JsonSerializable {
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
+ * ARM/control-plane operations.
+ */
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
+ * value is "user,system"
+ */
+ private Origin origin;
+
+ /*
+ * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+ private ActionType actionType;
+
+ /**
+ * 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() {
+ return this.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() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Localized display information for this particular operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.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() {
+ return this.actionType;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("display", this.display);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationInner.
+ */
+ public static OperationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationInner deserializedOperationInner = new OperationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedOperationInner.name = reader.getString();
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
+ } else if ("display".equals(fieldName)) {
+ deserializedOperationInner.display = OperationDisplay.fromJson(reader);
+ } else if ("origin".equals(fieldName)) {
+ deserializedOperationInner.origin = Origin.fromString(reader.getString());
+ } else if ("actionType".equals(fieldName)) {
+ deserializedOperationInner.actionType = ActionType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationInner;
+ });
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/OutboundEnvironmentEndpointInner.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/OutboundEnvironmentEndpointInner.java
new file mode 100644
index 000000000000..31fe2909ee9a
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/OutboundEnvironmentEndpointInner.java
@@ -0,0 +1,105 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.EndpointDependency;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * A collection of related endpoints from the same service for which the Batch service requires outbound access.
+ */
+@Immutable
+public final class OutboundEnvironmentEndpointInner implements JsonSerializable {
+ /*
+ * The type of service that Azure Load Testing connects to.
+ */
+ private String category;
+
+ /*
+ * The endpoints for this service to which the Batch service makes outbound calls.
+ */
+ private List endpoints;
+
+ /**
+ * Creates an instance of OutboundEnvironmentEndpointInner class.
+ */
+ public OutboundEnvironmentEndpointInner() {
+ }
+
+ /**
+ * Get the category property: The type of service that Azure Load Testing connects to.
+ *
+ * @return the category value.
+ */
+ public String category() {
+ return this.category;
+ }
+
+ /**
+ * Get the endpoints property: The endpoints for this service to which the Batch service makes outbound calls.
+ *
+ * @return the endpoints value.
+ */
+ public List endpoints() {
+ return this.endpoints;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (endpoints() != null) {
+ endpoints().forEach(e -> e.validate());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OutboundEnvironmentEndpointInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OutboundEnvironmentEndpointInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OutboundEnvironmentEndpointInner.
+ */
+ public static OutboundEnvironmentEndpointInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OutboundEnvironmentEndpointInner deserializedOutboundEnvironmentEndpointInner
+ = new OutboundEnvironmentEndpointInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("category".equals(fieldName)) {
+ deserializedOutboundEnvironmentEndpointInner.category = reader.getString();
+ } else if ("endpoints".equals(fieldName)) {
+ List endpoints
+ = reader.readArray(reader1 -> EndpointDependency.fromJson(reader1));
+ deserializedOutboundEnvironmentEndpointInner.endpoints = endpoints;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOutboundEnvironmentEndpointInner;
+ });
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/QuotaBucketRequestProperties.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/QuotaBucketRequestProperties.java
new file mode 100644
index 000000000000..f8ffb575f4db
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/QuotaBucketRequestProperties.java
@@ -0,0 +1,182 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.QuotaBucketRequestPropertiesDimensions;
+import java.io.IOException;
+
+/**
+ * New quota request request properties.
+ */
+@Fluent
+public final class QuotaBucketRequestProperties implements JsonSerializable {
+ /*
+ * Current quota usage of the quota bucket.
+ */
+ private Integer currentUsage;
+
+ /*
+ * Current quota limit of the quota bucket.
+ */
+ private Integer currentQuota;
+
+ /*
+ * New quota limit of the quota bucket.
+ */
+ private Integer newQuota;
+
+ /*
+ * Dimensions for new quota request.
+ */
+ private QuotaBucketRequestPropertiesDimensions dimensions;
+
+ /**
+ * Creates an instance of QuotaBucketRequestProperties class.
+ */
+ public QuotaBucketRequestProperties() {
+ }
+
+ /**
+ * Get the currentUsage property: Current quota usage of the quota bucket.
+ *
+ * @return the currentUsage value.
+ */
+ public Integer currentUsage() {
+ return this.currentUsage;
+ }
+
+ /**
+ * Set the currentUsage property: Current quota usage of the quota bucket.
+ *
+ * @param currentUsage the currentUsage value to set.
+ * @return the QuotaBucketRequestProperties object itself.
+ */
+ public QuotaBucketRequestProperties withCurrentUsage(Integer currentUsage) {
+ this.currentUsage = currentUsage;
+ return this;
+ }
+
+ /**
+ * Get the currentQuota property: Current quota limit of the quota bucket.
+ *
+ * @return the currentQuota value.
+ */
+ public Integer currentQuota() {
+ return this.currentQuota;
+ }
+
+ /**
+ * Set the currentQuota property: Current quota limit of the quota bucket.
+ *
+ * @param currentQuota the currentQuota value to set.
+ * @return the QuotaBucketRequestProperties object itself.
+ */
+ public QuotaBucketRequestProperties withCurrentQuota(Integer currentQuota) {
+ this.currentQuota = currentQuota;
+ return this;
+ }
+
+ /**
+ * Get the newQuota property: New quota limit of the quota bucket.
+ *
+ * @return the newQuota value.
+ */
+ public Integer newQuota() {
+ return this.newQuota;
+ }
+
+ /**
+ * Set the newQuota property: New quota limit of the quota bucket.
+ *
+ * @param newQuota the newQuota value to set.
+ * @return the QuotaBucketRequestProperties object itself.
+ */
+ public QuotaBucketRequestProperties withNewQuota(Integer newQuota) {
+ this.newQuota = newQuota;
+ return this;
+ }
+
+ /**
+ * Get the dimensions property: Dimensions for new quota request.
+ *
+ * @return the dimensions value.
+ */
+ public QuotaBucketRequestPropertiesDimensions dimensions() {
+ return this.dimensions;
+ }
+
+ /**
+ * Set the dimensions property: Dimensions for new quota request.
+ *
+ * @param dimensions the dimensions value to set.
+ * @return the QuotaBucketRequestProperties object itself.
+ */
+ public QuotaBucketRequestProperties withDimensions(QuotaBucketRequestPropertiesDimensions dimensions) {
+ this.dimensions = dimensions;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (dimensions() != null) {
+ dimensions().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeNumberField("currentUsage", this.currentUsage);
+ jsonWriter.writeNumberField("currentQuota", this.currentQuota);
+ jsonWriter.writeNumberField("newQuota", this.newQuota);
+ jsonWriter.writeJsonField("dimensions", this.dimensions);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of QuotaBucketRequestProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of QuotaBucketRequestProperties if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the QuotaBucketRequestProperties.
+ */
+ public static QuotaBucketRequestProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ QuotaBucketRequestProperties deserializedQuotaBucketRequestProperties = new QuotaBucketRequestProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("currentUsage".equals(fieldName)) {
+ deserializedQuotaBucketRequestProperties.currentUsage = reader.getNullable(JsonReader::getInt);
+ } else if ("currentQuota".equals(fieldName)) {
+ deserializedQuotaBucketRequestProperties.currentQuota = reader.getNullable(JsonReader::getInt);
+ } else if ("newQuota".equals(fieldName)) {
+ deserializedQuotaBucketRequestProperties.newQuota = reader.getNullable(JsonReader::getInt);
+ } else if ("dimensions".equals(fieldName)) {
+ deserializedQuotaBucketRequestProperties.dimensions
+ = QuotaBucketRequestPropertiesDimensions.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedQuotaBucketRequestProperties;
+ });
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/QuotaResourceInner.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/QuotaResourceInner.java
new file mode 100644
index 000000000000..5cd568910b6a
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/QuotaResourceInner.java
@@ -0,0 +1,210 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.ResourceState;
+import java.io.IOException;
+
+/**
+ * Quota bucket details object.
+ */
+@Fluent
+public final class QuotaResourceInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private QuotaResourceProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of QuotaResourceInner class.
+ */
+ public QuotaResourceInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private QuotaResourceProperties 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;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the limit property: Current quota limit of the quota bucket.
+ *
+ * @return the limit value.
+ */
+ public Integer limit() {
+ return this.innerProperties() == null ? null : this.innerProperties().limit();
+ }
+
+ /**
+ * Set the limit property: Current quota limit of the quota bucket.
+ *
+ * @param limit the limit value to set.
+ * @return the QuotaResourceInner object itself.
+ */
+ public QuotaResourceInner withLimit(Integer limit) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new QuotaResourceProperties();
+ }
+ this.innerProperties().withLimit(limit);
+ return this;
+ }
+
+ /**
+ * Get the usage property: Current quota usage of the quota bucket.
+ *
+ * @return the usage value.
+ */
+ public Integer usage() {
+ return this.innerProperties() == null ? null : this.innerProperties().usage();
+ }
+
+ /**
+ * Set the usage property: Current quota usage of the quota bucket.
+ *
+ * @param usage the usage value to set.
+ * @return the QuotaResourceInner object itself.
+ */
+ public QuotaResourceInner withUsage(Integer usage) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new QuotaResourceProperties();
+ }
+ this.innerProperties().withUsage(usage);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Resource provisioning state.
+ *
+ * @return the provisioningState value.
+ */
+ public ResourceState 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();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of QuotaResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of QuotaResourceInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the QuotaResourceInner.
+ */
+ public static QuotaResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ QuotaResourceInner deserializedQuotaResourceInner = new QuotaResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedQuotaResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedQuotaResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedQuotaResourceInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedQuotaResourceInner.innerProperties = QuotaResourceProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedQuotaResourceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedQuotaResourceInner;
+ });
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/QuotaResourceProperties.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/QuotaResourceProperties.java
new file mode 100644
index 000000000000..fb2e68c761f7
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/QuotaResourceProperties.java
@@ -0,0 +1,139 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.ResourceState;
+import java.io.IOException;
+
+/**
+ * Quota bucket resource properties.
+ */
+@Fluent
+public final class QuotaResourceProperties implements JsonSerializable {
+ /*
+ * Current quota limit of the quota bucket.
+ */
+ private Integer limit;
+
+ /*
+ * Current quota usage of the quota bucket.
+ */
+ private Integer usage;
+
+ /*
+ * Resource provisioning state.
+ */
+ private ResourceState provisioningState;
+
+ /**
+ * Creates an instance of QuotaResourceProperties class.
+ */
+ public QuotaResourceProperties() {
+ }
+
+ /**
+ * Get the limit property: Current quota limit of the quota bucket.
+ *
+ * @return the limit value.
+ */
+ public Integer limit() {
+ return this.limit;
+ }
+
+ /**
+ * Set the limit property: Current quota limit of the quota bucket.
+ *
+ * @param limit the limit value to set.
+ * @return the QuotaResourceProperties object itself.
+ */
+ public QuotaResourceProperties withLimit(Integer limit) {
+ this.limit = limit;
+ return this;
+ }
+
+ /**
+ * Get the usage property: Current quota usage of the quota bucket.
+ *
+ * @return the usage value.
+ */
+ public Integer usage() {
+ return this.usage;
+ }
+
+ /**
+ * Set the usage property: Current quota usage of the quota bucket.
+ *
+ * @param usage the usage value to set.
+ * @return the QuotaResourceProperties object itself.
+ */
+ public QuotaResourceProperties withUsage(Integer usage) {
+ this.usage = usage;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Resource provisioning state.
+ *
+ * @return the provisioningState value.
+ */
+ public ResourceState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeNumberField("limit", this.limit);
+ jsonWriter.writeNumberField("usage", this.usage);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of QuotaResourceProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of QuotaResourceProperties if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the QuotaResourceProperties.
+ */
+ public static QuotaResourceProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ QuotaResourceProperties deserializedQuotaResourceProperties = new QuotaResourceProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("limit".equals(fieldName)) {
+ deserializedQuotaResourceProperties.limit = reader.getNullable(JsonReader::getInt);
+ } else if ("usage".equals(fieldName)) {
+ deserializedQuotaResourceProperties.usage = reader.getNullable(JsonReader::getInt);
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedQuotaResourceProperties.provisioningState
+ = ResourceState.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedQuotaResourceProperties;
+ });
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/package-info.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/package-info.java
new file mode 100644
index 000000000000..67366e441ad7
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for LoadTestClient.
+ * LoadTest client provides access to LoadTest Resource and it's status operations.
+ */
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models;
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/package-info.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/package-info.java
new file mode 100644
index 000000000000..f4b5b0e49121
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/fluent/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the service clients for LoadTestClient.
+ * LoadTest client provides access to LoadTest Resource and it's status operations.
+ */
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent;
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/CheckQuotaAvailabilityResponseImpl.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/CheckQuotaAvailabilityResponseImpl.java
new file mode 100644
index 000000000000..bead30c8dcea
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/CheckQuotaAvailabilityResponseImpl.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.CheckQuotaAvailabilityResponseInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.CheckQuotaAvailabilityResponse;
+
+public final class CheckQuotaAvailabilityResponseImpl implements CheckQuotaAvailabilityResponse {
+ private CheckQuotaAvailabilityResponseInner innerObject;
+
+ private final com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager serviceManager;
+
+ CheckQuotaAvailabilityResponseImpl(CheckQuotaAvailabilityResponseInner innerObject,
+ com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public Boolean isAvailable() {
+ return this.innerModel().isAvailable();
+ }
+
+ public String availabilityStatus() {
+ return this.innerModel().availabilityStatus();
+ }
+
+ public CheckQuotaAvailabilityResponseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/LoadTestClientBuilder.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/LoadTestClientBuilder.java
new file mode 100644
index 000000000000..26fcb6a6f718
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/LoadTestClientBuilder.java
@@ -0,0 +1,138 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.implementation;
+
+import com.azure.core.annotation.ServiceClientBuilder;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerAdapter;
+import java.time.Duration;
+
+/**
+ * A builder for creating a new instance of the LoadTestClientImpl type.
+ */
+@ServiceClientBuilder(serviceClients = { LoadTestClientImpl.class })
+public final class LoadTestClientBuilder {
+ /*
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The ID of the target subscription. The value must be an UUID.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the LoadTestClientBuilder.
+ */
+ public LoadTestClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the LoadTestClientBuilder.
+ */
+ public LoadTestClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the LoadTestClientBuilder.
+ */
+ public LoadTestClientBuilder environment(AzureEnvironment environment) {
+ this.environment = environment;
+ return this;
+ }
+
+ /*
+ * The HTTP pipeline to send requests through
+ */
+ private HttpPipeline pipeline;
+
+ /**
+ * Sets The HTTP pipeline to send requests through.
+ *
+ * @param pipeline the pipeline value.
+ * @return the LoadTestClientBuilder.
+ */
+ public LoadTestClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The default poll interval for long-running operation
+ */
+ private Duration defaultPollInterval;
+
+ /**
+ * Sets The default poll interval for long-running operation.
+ *
+ * @param defaultPollInterval the defaultPollInterval value.
+ * @return the LoadTestClientBuilder.
+ */
+ public LoadTestClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
+ return this;
+ }
+
+ /*
+ * The serializer to serialize an object into a string
+ */
+ private SerializerAdapter serializerAdapter;
+
+ /**
+ * Sets The serializer to serialize an object into a string.
+ *
+ * @param serializerAdapter the serializerAdapter value.
+ * @return the LoadTestClientBuilder.
+ */
+ public LoadTestClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of LoadTestClientImpl with the provided parameters.
+ *
+ * @return an instance of LoadTestClientImpl.
+ */
+ public LoadTestClientImpl 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();
+ LoadTestClientImpl client = new LoadTestClientImpl(localPipeline, localSerializerAdapter,
+ localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
+ return client;
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/LoadTestClientImpl.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/LoadTestClientImpl.java
new file mode 100644
index 000000000000..0880cb75524c
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/LoadTestClientImpl.java
@@ -0,0 +1,320 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.implementation;
+
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaderName;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.AsyncPollResponse;
+import com.azure.core.util.polling.LongRunningOperationStatus;
+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.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.LoadTestClient;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.LoadTestsClient;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.OperationsClient;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.QuotasClient;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * Initializes a new instance of the LoadTestClientImpl type.
+ */
+@ServiceClient(builder = LoadTestClientBuilder.class)
+public final class LoadTestClientImpl implements LoadTestClient {
+ /**
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private final String subscriptionId;
+
+ /**
+ * 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.
+ */
+ private final String endpoint;
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /**
+ * 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.
+ */
+ 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.
+ */
+ 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.
+ */
+ 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.
+ */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /**
+ * The LoadTestsClient object to access its operations.
+ */
+ private final LoadTestsClient loadTests;
+
+ /**
+ * Gets the LoadTestsClient object to access its operations.
+ *
+ * @return the LoadTestsClient object.
+ */
+ public LoadTestsClient getLoadTests() {
+ return this.loadTests;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Initializes an instance of LoadTestClient 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. The value must be an UUID.
+ * @param endpoint server parameter.
+ */
+ LoadTestClientImpl(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 = "2022-12-01";
+ this.operations = new OperationsClientImpl(this);
+ this.loadTests = new LoadTestsClientImpl(this);
+ this.quotas = new QuotasClientImpl(this);
+ }
+
+ /**
+ * Gets default client context.
+ *
+ * @return the default client context.
+ */
+ public Context getContext() {
+ return Context.NONE;
+ }
+
+ /**
+ * Merges default client context with provided context.
+ *
+ * @param context the context to be merged with default client context.
+ * @return the merged context.
+ */
+ public Context mergeContext(Context context) {
+ return CoreUtils.mergeContexts(this.getContext(), context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param httpPipeline the http pipeline.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @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);
+ }
+
+ /**
+ * 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.
+ * @return the final result, or an error.
+ */
+ public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) {
+ if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
+ String errorMessage;
+ ManagementError managementError = null;
+ HttpResponse errorResponse = null;
+ PollResult.Error lroError = response.getValue().getError();
+ if (lroError != null) {
+ 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);
+ if (managementError.getCode() == null || managementError.getMessage() == null) {
+ managementError = null;
+ }
+ } catch (IOException | RuntimeException ioe) {
+ LOGGER.logThrowableAsWarning(ioe);
+ }
+ }
+ } else {
+ // fallback to default error message
+ errorMessage = "Long running operation failed.";
+ }
+ if (managementError == null) {
+ // fallback to default ManagementError
+ managementError = new ManagementError(response.getStatus().toString(), errorMessage);
+ }
+ return Mono.error(new ManagementException(errorMessage, errorResponse, managementError));
+ } else {
+ return response.getFinalResult();
+ }
+ }
+
+ private static final class HttpResponseImpl extends HttpResponse {
+ private final int statusCode;
+
+ private final byte[] responseBody;
+
+ private final HttpHeaders httpHeaders;
+
+ HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) {
+ super(null);
+ this.statusCode = statusCode;
+ this.httpHeaders = httpHeaders;
+ this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
+ }
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public String getHeaderValue(String s) {
+ return httpHeaders.getValue(HttpHeaderName.fromString(s));
+ }
+
+ public HttpHeaders getHeaders() {
+ return httpHeaders;
+ }
+
+ public Flux getBody() {
+ return Flux.just(ByteBuffer.wrap(responseBody));
+ }
+
+ public Mono getBodyAsByteArray() {
+ return Mono.just(responseBody);
+ }
+
+ public Mono getBodyAsString() {
+ return Mono.just(new String(responseBody, StandardCharsets.UTF_8));
+ }
+
+ public Mono getBodyAsString(Charset charset) {
+ return Mono.just(new String(responseBody, charset));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(LoadTestClientImpl.class);
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/LoadTestResourceImpl.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/LoadTestResourceImpl.java
new file mode 100644
index 000000000000..d9b2884378e8
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/LoadTestResourceImpl.java
@@ -0,0 +1,222 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.LoadTestResourceInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.EncryptionProperties;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.LoadTestResource;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.LoadTestResourcePatchRequestBody;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.ResourceState;
+import java.util.Collections;
+import java.util.Map;
+
+public final class LoadTestResourceImpl
+ implements LoadTestResource, LoadTestResource.Definition, LoadTestResource.Update {
+ private LoadTestResourceInner innerObject;
+
+ private final com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public ManagedServiceIdentity identity() {
+ return this.innerModel().identity();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String description() {
+ return this.innerModel().description();
+ }
+
+ public ResourceState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public String dataPlaneUri() {
+ return this.innerModel().dataPlaneUri();
+ }
+
+ public EncryptionProperties encryption() {
+ return this.innerModel().encryption();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public LoadTestResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String loadTestName;
+
+ private LoadTestResourcePatchRequestBody updateProperties;
+
+ public LoadTestResourceImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public LoadTestResource create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getLoadTests()
+ .createOrUpdate(resourceGroupName, loadTestName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public LoadTestResource create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getLoadTests()
+ .createOrUpdate(resourceGroupName, loadTestName, this.innerModel(), context);
+ return this;
+ }
+
+ LoadTestResourceImpl(String name,
+ com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager serviceManager) {
+ this.innerObject = new LoadTestResourceInner();
+ this.serviceManager = serviceManager;
+ this.loadTestName = name;
+ }
+
+ public LoadTestResourceImpl update() {
+ this.updateProperties = new LoadTestResourcePatchRequestBody();
+ return this;
+ }
+
+ public LoadTestResource apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getLoadTests()
+ .update(resourceGroupName, loadTestName, updateProperties, Context.NONE);
+ return this;
+ }
+
+ public LoadTestResource apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getLoadTests()
+ .update(resourceGroupName, loadTestName, updateProperties, context);
+ return this;
+ }
+
+ LoadTestResourceImpl(LoadTestResourceInner innerObject,
+ com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.loadTestName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "loadTests");
+ }
+
+ public LoadTestResource refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getLoadTests()
+ .getByResourceGroupWithResponse(resourceGroupName, loadTestName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public LoadTestResource refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getLoadTests()
+ .getByResourceGroupWithResponse(resourceGroupName, loadTestName, context)
+ .getValue();
+ return this;
+ }
+
+ public LoadTestResourceImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public LoadTestResourceImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public LoadTestResourceImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateProperties.withTags(tags);
+ return this;
+ }
+ }
+
+ public LoadTestResourceImpl withIdentity(ManagedServiceIdentity identity) {
+ if (isInCreateMode()) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ } else {
+ this.updateProperties.withIdentity(identity);
+ return this;
+ }
+ }
+
+ public LoadTestResourceImpl withDescription(String description) {
+ if (isInCreateMode()) {
+ this.innerModel().withDescription(description);
+ return this;
+ } else {
+ this.updateProperties.withDescription(description);
+ return this;
+ }
+ }
+
+ public LoadTestResourceImpl withEncryption(EncryptionProperties encryption) {
+ if (isInCreateMode()) {
+ this.innerModel().withEncryption(encryption);
+ return this;
+ } else {
+ this.updateProperties.withEncryption(encryption);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/LoadTestsClientImpl.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/LoadTestsClientImpl.java
new file mode 100644
index 000000000000..c763302a8c9d
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/LoadTestsClientImpl.java
@@ -0,0 +1,1504 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+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.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+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.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.LoadTestsClient;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.LoadTestResourceInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.OutboundEnvironmentEndpointInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.LoadTestResourceListResult;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.LoadTestResourcePatchRequestBody;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.PagedOutboundEnvironmentEndpoint;
+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 LoadTestsClient.
+ */
+public final class LoadTestsClientImpl implements LoadTestsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final LoadTestsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final LoadTestClientImpl client;
+
+ /**
+ * Initializes an instance of LoadTestsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ LoadTestsClientImpl(LoadTestClientImpl client) {
+ this.service
+ = RestProxy.create(LoadTestsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for LoadTestClientLoadTests to be used by the proxy service to perform
+ * REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "LoadTestClientLoadTe")
+ public interface LoadTestsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.LoadTestService/loadTests")
+ @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);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LoadTestService/loadTests")
+ @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,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LoadTestService/loadTests/{loadTestName}")
+ @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("loadTestName") String loadTestName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LoadTestService/loadTests/{loadTestName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("loadTestName") String loadTestName,
+ @BodyParam("application/json") LoadTestResourceInner resource, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LoadTestService/loadTests/{loadTestName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("loadTestName") String loadTestName,
+ @BodyParam("application/json") LoadTestResourcePatchRequestBody properties,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LoadTestService/loadTests/{loadTestName}")
+ @ExpectedResponses({ 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("loadTestName") String loadTestName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LoadTestService/loadTests/{loadTestName}/outboundNetworkDependenciesEndpoints")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listOutboundNetworkDependenciesEndpoints(
+ @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("loadTestName") String loadTestName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listOutboundNetworkDependenciesEndpointsNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * List LoadTestResource 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 LoadTestResource list operation along with {@link PagedResponse} on 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."));
+ }
+ if (this.client.getSubscriptionId() == 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))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List LoadTestResource 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 LoadTestResource list operation along with {@link PagedResponse} on 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."));
+ }
+ if (this.client.getSubscriptionId() == 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,
+ context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List LoadTestResource 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 LoadTestResource list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List LoadTestResource 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 LoadTestResource list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(context),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List LoadTestResource 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 LoadTestResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List LoadTestResource 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 LoadTestResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * List LoadTestResource 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 LoadTestResource list operation along with {@link PagedResponse} on successful
+ * completion of {@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."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List LoadTestResource 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 LoadTestResource list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List LoadTestResource 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 LoadTestResource list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List LoadTestResource 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 LoadTestResource list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List LoadTestResource 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 LoadTestResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * List LoadTestResource 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 LoadTestResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Get a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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 a LoadTestResource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String loadTestName) {
+ 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 (loadTestName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter loadTestName 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, loadTestName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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 a LoadTestResource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String loadTestName, 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 (loadTestName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter loadTestName 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, loadTestName, accept, context);
+ }
+
+ /**
+ * Get a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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 a LoadTestResource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String loadTestName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, loadTestName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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 a LoadTestResource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(String resourceGroupName, String loadTestName,
+ Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, loadTestName, context).block();
+ }
+
+ /**
+ * Get a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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 a LoadTestResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LoadTestResourceInner getByResourceGroup(String resourceGroupName, String loadTestName) {
+ return getByResourceGroupWithResponse(resourceGroupName, loadTestName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String loadTestName, LoadTestResourceInner resource) {
+ 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 (loadTestName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter loadTestName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, loadTestName, resource, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String loadTestName, LoadTestResourceInner resource, 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 (loadTestName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter loadTestName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, loadTestName, resource, accept, context);
+ }
+
+ /**
+ * Create a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, LoadTestResourceInner>
+ beginCreateOrUpdateAsync(String resourceGroupName, String loadTestName, LoadTestResourceInner resource) {
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceGroupName, loadTestName, resource);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), LoadTestResourceInner.class, LoadTestResourceInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, LoadTestResourceInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String loadTestName, LoadTestResourceInner resource, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceGroupName, loadTestName, resource, context);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), LoadTestResourceInner.class, LoadTestResourceInner.class, context);
+ }
+
+ /**
+ * Create a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, LoadTestResourceInner>
+ beginCreateOrUpdate(String resourceGroupName, String loadTestName, LoadTestResourceInner resource) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, loadTestName, resource).getSyncPoller();
+ }
+
+ /**
+ * Create a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, LoadTestResourceInner> beginCreateOrUpdate(
+ String resourceGroupName, String loadTestName, LoadTestResourceInner resource, Context context) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, loadTestName, resource, context).getSyncPoller();
+ }
+
+ /**
+ * Create a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String loadTestName,
+ LoadTestResourceInner resource) {
+ return beginCreateOrUpdateAsync(resourceGroupName, loadTestName, resource).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String loadTestName,
+ LoadTestResourceInner resource, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, loadTestName, resource, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LoadTestResourceInner createOrUpdate(String resourceGroupName, String loadTestName,
+ LoadTestResourceInner resource) {
+ return createOrUpdateAsync(resourceGroupName, loadTestName, resource).block();
+ }
+
+ /**
+ * Create a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LoadTestResourceInner createOrUpdate(String resourceGroupName, String loadTestName,
+ LoadTestResourceInner resource, Context context) {
+ return createOrUpdateAsync(resourceGroupName, loadTestName, resource, context).block();
+ }
+
+ /**
+ * Update a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String loadTestName,
+ LoadTestResourcePatchRequestBody properties) {
+ 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 (loadTestName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter loadTestName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, loadTestName, properties, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String loadTestName,
+ LoadTestResourcePatchRequestBody properties, 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 (loadTestName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter loadTestName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, loadTestName, properties, accept, context);
+ }
+
+ /**
+ * Update a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, LoadTestResourceInner>
+ beginUpdateAsync(String resourceGroupName, String loadTestName, LoadTestResourcePatchRequestBody properties) {
+ Mono>> mono = updateWithResponseAsync(resourceGroupName, loadTestName, properties);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), LoadTestResourceInner.class, LoadTestResourceInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Update a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, LoadTestResourceInner> beginUpdateAsync(
+ String resourceGroupName, String loadTestName, LoadTestResourcePatchRequestBody properties, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, loadTestName, properties, context);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), LoadTestResourceInner.class, LoadTestResourceInner.class, context);
+ }
+
+ /**
+ * Update a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, LoadTestResourceInner> beginUpdate(String resourceGroupName,
+ String loadTestName, LoadTestResourcePatchRequestBody properties) {
+ return this.beginUpdateAsync(resourceGroupName, loadTestName, properties).getSyncPoller();
+ }
+
+ /**
+ * Update a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, LoadTestResourceInner> beginUpdate(String resourceGroupName,
+ String loadTestName, LoadTestResourcePatchRequestBody properties, Context context) {
+ return this.beginUpdateAsync(resourceGroupName, loadTestName, properties, context).getSyncPoller();
+ }
+
+ /**
+ * Update a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String loadTestName,
+ LoadTestResourcePatchRequestBody properties) {
+ return beginUpdateAsync(resourceGroupName, loadTestName, properties).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String loadTestName,
+ LoadTestResourcePatchRequestBody properties, Context context) {
+ return beginUpdateAsync(resourceGroupName, loadTestName, properties, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LoadTestResourceInner update(String resourceGroupName, String loadTestName,
+ LoadTestResourcePatchRequestBody properties) {
+ return updateAsync(resourceGroupName, loadTestName, properties).block();
+ }
+
+ /**
+ * Update a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @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 loadTest details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LoadTestResourceInner update(String resourceGroupName, String loadTestName,
+ LoadTestResourcePatchRequestBody properties, Context context) {
+ return updateAsync(resourceGroupName, loadTestName, properties, context).block();
+ }
+
+ /**
+ * Delete a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String loadTestName) {
+ 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 (loadTestName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter loadTestName 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, loadTestName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String loadTestName,
+ 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 (loadTestName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter loadTestName 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, loadTestName, accept, context);
+ }
+
+ /**
+ * Delete a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String loadTestName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, loadTestName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Delete a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String loadTestName,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, loadTestName, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
+ }
+
+ /**
+ * Delete a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String loadTestName) {
+ return this.beginDeleteAsync(resourceGroupName, loadTestName).getSyncPoller();
+ }
+
+ /**
+ * Delete a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String loadTestName,
+ Context context) {
+ return this.beginDeleteAsync(resourceGroupName, loadTestName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String loadTestName) {
+ return beginDeleteAsync(resourceGroupName, loadTestName).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String loadTestName, Context context) {
+ return beginDeleteAsync(resourceGroupName, loadTestName, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String loadTestName) {
+ deleteAsync(resourceGroupName, loadTestName).block();
+ }
+
+ /**
+ * Delete a LoadTestResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String loadTestName, Context context) {
+ deleteAsync(resourceGroupName, loadTestName, context).block();
+ }
+
+ /**
+ * Lists the endpoints that agents may call as part of load testing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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 values returned by the List operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listOutboundNetworkDependenciesEndpointsSinglePageAsync(String resourceGroupName, String loadTestName) {
+ 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 (loadTestName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter loadTestName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, loadTestName, 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()));
+ }
+
+ /**
+ * Lists the endpoints that agents may call as part of load testing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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 values returned by the List operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listOutboundNetworkDependenciesEndpointsSinglePageAsync(String resourceGroupName, String loadTestName,
+ 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 (loadTestName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter loadTestName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, loadTestName, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Lists the endpoints that agents may call as part of load testing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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 values returned by the List operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux
+ listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, String loadTestName) {
+ return new PagedFlux<>(
+ () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, loadTestName),
+ nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the endpoints that agents may call as part of load testing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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 values returned by the List operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux
+ listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, String loadTestName, Context context) {
+ return new PagedFlux<>(
+ () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, loadTestName, context),
+ nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists the endpoints that agents may call as part of load testing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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 values returned by the List operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable
+ listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String loadTestName) {
+ return new PagedIterable<>(listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, loadTestName));
+ }
+
+ /**
+ * Lists the endpoints that agents may call as part of load testing.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test 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 values returned by the List operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable
+ listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String loadTestName, Context context) {
+ return new PagedIterable<>(
+ listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, loadTestName, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 LoadTestResource list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(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.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 LoadTestResource list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(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.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.
+ * @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 LoadTestResource list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 LoadTestResource list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(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.
+ * @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 values returned by the List operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(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.listOutboundNetworkDependenciesEndpointsNext(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.
+ * @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 values returned by the List operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(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
+ .listOutboundNetworkDependenciesEndpointsNext(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/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/LoadTestsImpl.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/LoadTestsImpl.java
new file mode 100644
index 000000000000..b9320f73811a
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/LoadTestsImpl.java
@@ -0,0 +1,165 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.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.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.LoadTestsClient;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.LoadTestResourceInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.OutboundEnvironmentEndpointInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.LoadTestResource;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.LoadTests;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.OutboundEnvironmentEndpoint;
+
+public final class LoadTestsImpl implements LoadTests {
+ private static final ClientLogger LOGGER = new ClientLogger(LoadTestsImpl.class);
+
+ private final LoadTestsClient innerClient;
+
+ private final com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager serviceManager;
+
+ public LoadTestsImpl(LoadTestsClient innerClient,
+ com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new LoadTestResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new LoadTestResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new LoadTestResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new LoadTestResourceImpl(inner1, this.manager()));
+ }
+
+ public Response getByResourceGroupWithResponse(String resourceGroupName, String loadTestName,
+ Context context) {
+ Response inner
+ = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, loadTestName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new LoadTestResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public LoadTestResource getByResourceGroup(String resourceGroupName, String loadTestName) {
+ LoadTestResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, loadTestName);
+ if (inner != null) {
+ return new LoadTestResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String loadTestName) {
+ this.serviceClient().delete(resourceGroupName, loadTestName);
+ }
+
+ public void delete(String resourceGroupName, String loadTestName, Context context) {
+ this.serviceClient().delete(resourceGroupName, loadTestName, context);
+ }
+
+ public PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName,
+ String loadTestName) {
+ PagedIterable inner
+ = this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, loadTestName);
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName,
+ String loadTestName, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, loadTestName, context);
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager()));
+ }
+
+ public LoadTestResource getById(String id) {
+ 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)));
+ }
+ String loadTestName = ResourceManagerUtils.getValueFromIdByName(id, "loadTests");
+ if (loadTestName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'loadTests'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, loadTestName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ 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)));
+ }
+ String loadTestName = ResourceManagerUtils.getValueFromIdByName(id, "loadTests");
+ if (loadTestName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'loadTests'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, loadTestName, context);
+ }
+
+ public void deleteById(String id) {
+ 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)));
+ }
+ String loadTestName = ResourceManagerUtils.getValueFromIdByName(id, "loadTests");
+ if (loadTestName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'loadTests'.", id)));
+ }
+ this.delete(resourceGroupName, loadTestName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ 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)));
+ }
+ String loadTestName = ResourceManagerUtils.getValueFromIdByName(id, "loadTests");
+ if (loadTestName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'loadTests'.", id)));
+ }
+ this.delete(resourceGroupName, loadTestName, context);
+ }
+
+ private LoadTestsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager manager() {
+ return this.serviceManager;
+ }
+
+ public LoadTestResourceImpl define(String name) {
+ return new LoadTestResourceImpl(name, this.manager());
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/OperationImpl.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/OperationImpl.java
new file mode 100644
index 000000000000..c187ad1e95f4
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/OperationImpl.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.implementation;
+
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.OperationInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.ActionType;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.Operation;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.OperationDisplay;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.Origin;
+
+public final class OperationImpl implements Operation {
+ private OperationInner innerObject;
+
+ private final com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager serviceManager;
+
+ OperationImpl(OperationInner innerObject,
+ com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public Boolean isDataAction() {
+ return this.innerModel().isDataAction();
+ }
+
+ public OperationDisplay display() {
+ return this.innerModel().display();
+ }
+
+ public Origin origin() {
+ return this.innerModel().origin();
+ }
+
+ public ActionType actionType() {
+ return this.innerModel().actionType();
+ }
+
+ public OperationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/OperationsClientImpl.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/OperationsClientImpl.java
new file mode 100644
index 000000000000..cb7072f3b33c
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/OperationsClientImpl.java
@@ -0,0 +1,235 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.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.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.OperationsClient;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.OperationInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.OperationListResult;
+import reactor.core.publisher.Mono;
+
+/**
+ * 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.
+ */
+ private final OperationsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final LoadTestClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(LoadTestClientImpl client) {
+ this.service
+ = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for LoadTestClientOperations to be used by the proxy service to perform
+ * REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "LoadTestClientOperat")
+ public interface OperationsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.LoadTestService/operations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ 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}.
+ */
+ @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."));
+ }
+ 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))
+ .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}.
+ */
+ @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."));
+ }
+ 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));
+ }
+
+ /**
+ * 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}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * 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}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context 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}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(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 PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(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.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.
+ * @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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(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.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/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/OperationsImpl.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/OperationsImpl.java
new file mode 100644
index 000000000000..30720e704a2b
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/OperationsImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.OperationsClient;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.OperationInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.Operation;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.Operations;
+
+public final class OperationsImpl implements Operations {
+ private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class);
+
+ private final OperationsClient innerClient;
+
+ private final com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager serviceManager;
+
+ public OperationsImpl(OperationsClient innerClient,
+ com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ private OperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/OutboundEnvironmentEndpointImpl.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/OutboundEnvironmentEndpointImpl.java
new file mode 100644
index 000000000000..512e648d90f5
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/OutboundEnvironmentEndpointImpl.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.implementation;
+
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.OutboundEnvironmentEndpointInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.EndpointDependency;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.OutboundEnvironmentEndpoint;
+import java.util.Collections;
+import java.util.List;
+
+public final class OutboundEnvironmentEndpointImpl implements OutboundEnvironmentEndpoint {
+ private OutboundEnvironmentEndpointInner innerObject;
+
+ private final com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager serviceManager;
+
+ OutboundEnvironmentEndpointImpl(OutboundEnvironmentEndpointInner innerObject,
+ com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String category() {
+ return this.innerModel().category();
+ }
+
+ public List endpoints() {
+ List inner = this.innerModel().endpoints();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public OutboundEnvironmentEndpointInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/QuotaResourceImpl.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/QuotaResourceImpl.java
new file mode 100644
index 000000000000..b1e2d95b274f
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/QuotaResourceImpl.java
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.QuotaResourceInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.QuotaResource;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.ResourceState;
+
+public final class QuotaResourceImpl implements QuotaResource {
+ private QuotaResourceInner innerObject;
+
+ private final com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager serviceManager;
+
+ QuotaResourceImpl(QuotaResourceInner innerObject,
+ com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager 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 SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public Integer limit() {
+ return this.innerModel().limit();
+ }
+
+ public Integer usage() {
+ return this.innerModel().usage();
+ }
+
+ public ResourceState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public QuotaResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/QuotasClientImpl.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/QuotasClientImpl.java
new file mode 100644
index 000000000000..bff23ed951a0
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/QuotasClientImpl.java
@@ -0,0 +1,534 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.implementation;
+
+import com.azure.core.annotation.BodyParam;
+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.Post;
+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.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.QuotasClient;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.CheckQuotaAvailabilityResponseInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.QuotaResourceInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.QuotaBucketRequest;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.QuotaResourceListResult;
+import reactor.core.publisher.Mono;
+
+/**
+ * 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.
+ */
+ private final QuotasService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final LoadTestClientImpl client;
+
+ /**
+ * Initializes an instance of QuotasClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ QuotasClientImpl(LoadTestClientImpl client) {
+ this.service = RestProxy.create(QuotasService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for LoadTestClientQuotas to be used by the proxy service to perform REST
+ * calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "LoadTestClientQuotas")
+ public interface QuotasService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.LoadTestService/locations/{location}/quotas")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@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.LoadTestService/locations/{location}/quotas/{quotaBucketName}")
+ @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("quotaBucketName") String quotaBucketName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.LoadTestService/locations/{location}/quotas/{quotaBucketName}/checkAvailability")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> checkAvailability(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("location") String location, @PathParam("quotaBucketName") String quotaBucketName,
+ @BodyParam("application/json") QuotaBucketRequest body, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(@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 name of the Azure region.
+ * @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 QuotaResource list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String location) {
+ 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 (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.list(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 name of the Azure region.
+ * @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 QuotaResource list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String location, 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 (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location 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(), 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 name of the Azure region.
+ * @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 QuotaResource list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String location) {
+ return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List quotas for a given subscription Id.
+ *
+ * @param location The name of the Azure region.
+ * @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 QuotaResource list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String location, Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(location, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List quotas for a given subscription Id.
+ *
+ * @param location The name of the Azure region.
+ * @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 QuotaResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String location) {
+ return new PagedIterable<>(listAsync(location));
+ }
+
+ /**
+ * List quotas for a given subscription Id.
+ *
+ * @param location The name of the Azure region.
+ * @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 QuotaResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String location, Context context) {
+ return new PagedIterable<>(listAsync(location, context));
+ }
+
+ /**
+ * Get the available quota for a quota bucket per region per subscription.
+ *
+ * @param location The name of the Azure region.
+ * @param quotaBucketName The quota name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the available quota for a quota bucket per region per subscription along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String location, String quotaBucketName) {
+ 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 (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (quotaBucketName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter quotaBucketName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), location, quotaBucketName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the available quota for a quota bucket per region per subscription.
+ *
+ * @param location The name of the Azure region.
+ * @param quotaBucketName The quota name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the available quota for a quota bucket per region per subscription along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String location, String quotaBucketName,
+ 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 (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (quotaBucketName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter quotaBucketName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ location, quotaBucketName, accept, context);
+ }
+
+ /**
+ * Get the available quota for a quota bucket per region per subscription.
+ *
+ * @param location The name of the Azure region.
+ * @param quotaBucketName The quota name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the available quota for a quota bucket per region per subscription on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String location, String quotaBucketName) {
+ return getWithResponseAsync(location, quotaBucketName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get the available quota for a quota bucket per region per subscription.
+ *
+ * @param location The name of the Azure region.
+ * @param quotaBucketName The quota name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the available quota for a quota bucket per region per subscription along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String location, String quotaBucketName, Context context) {
+ return getWithResponseAsync(location, quotaBucketName, context).block();
+ }
+
+ /**
+ * Get the available quota for a quota bucket per region per subscription.
+ *
+ * @param location The name of the Azure region.
+ * @param quotaBucketName The quota name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the available quota for a quota bucket per region per subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public QuotaResourceInner get(String location, String quotaBucketName) {
+ return getWithResponse(location, quotaBucketName, Context.NONE).getValue();
+ }
+
+ /**
+ * Check Quota Availability on quota bucket per region per subscription.
+ *
+ * @param location The name of the Azure region.
+ * @param quotaBucketName The quota name.
+ * @param body The content of the action 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 check quota availability response object along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> checkAvailabilityWithResponseAsync(String location,
+ String quotaBucketName, QuotaBucketRequest 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 (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (quotaBucketName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter quotaBucketName 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.checkAvailability(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), location, quotaBucketName, body, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Check Quota Availability on quota bucket per region per subscription.
+ *
+ * @param location The name of the Azure region.
+ * @param quotaBucketName The quota name.
+ * @param body The content of the action 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 check quota availability response object along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> checkAvailabilityWithResponseAsync(String location,
+ String quotaBucketName, QuotaBucketRequest 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 (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (quotaBucketName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter quotaBucketName 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.checkAvailability(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), location, quotaBucketName, body, accept, context);
+ }
+
+ /**
+ * Check Quota Availability on quota bucket per region per subscription.
+ *
+ * @param location The name of the Azure region.
+ * @param quotaBucketName The quota name.
+ * @param body The content of the action 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 check quota availability response object on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono checkAvailabilityAsync(String location, String quotaBucketName,
+ QuotaBucketRequest body) {
+ return checkAvailabilityWithResponseAsync(location, quotaBucketName, body)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Check Quota Availability on quota bucket per region per subscription.
+ *
+ * @param location The name of the Azure region.
+ * @param quotaBucketName The quota name.
+ * @param body The content of the action 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 check quota availability response object along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response checkAvailabilityWithResponse(String location,
+ String quotaBucketName, QuotaBucketRequest body, Context context) {
+ return checkAvailabilityWithResponseAsync(location, quotaBucketName, body, context).block();
+ }
+
+ /**
+ * Check Quota Availability on quota bucket per region per subscription.
+ *
+ * @param location The name of the Azure region.
+ * @param quotaBucketName The quota name.
+ * @param body The content of the action 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 check quota availability response object.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CheckQuotaAvailabilityResponseInner checkAvailability(String location, String quotaBucketName,
+ QuotaBucketRequest body) {
+ return checkAvailabilityWithResponse(location, quotaBucketName, body, Context.NONE).getValue();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 QuotaResource list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(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.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.
+ * @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 QuotaResource list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(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.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/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/QuotasImpl.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/QuotasImpl.java
new file mode 100644
index 000000000000..08a88669bd6d
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/QuotasImpl.java
@@ -0,0 +1,92 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.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.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.QuotasClient;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.CheckQuotaAvailabilityResponseInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.QuotaResourceInner;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.CheckQuotaAvailabilityResponse;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.QuotaBucketRequest;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.QuotaResource;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models.Quotas;
+
+public final class QuotasImpl implements Quotas {
+ private static final ClientLogger LOGGER = new ClientLogger(QuotasImpl.class);
+
+ private final QuotasClient innerClient;
+
+ private final com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager serviceManager;
+
+ public QuotasImpl(QuotasClient innerClient,
+ com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String location) {
+ PagedIterable inner = this.serviceClient().list(location);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new QuotaResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String location, Context context) {
+ PagedIterable inner = this.serviceClient().list(location, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new QuotaResourceImpl(inner1, this.manager()));
+ }
+
+ public Response getWithResponse(String location, String quotaBucketName, Context context) {
+ Response inner = this.serviceClient().getWithResponse(location, quotaBucketName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new QuotaResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public QuotaResource get(String location, String quotaBucketName) {
+ QuotaResourceInner inner = this.serviceClient().get(location, quotaBucketName);
+ if (inner != null) {
+ return new QuotaResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response checkAvailabilityWithResponse(String location,
+ String quotaBucketName, QuotaBucketRequest body, Context context) {
+ Response inner
+ = this.serviceClient().checkAvailabilityWithResponse(location, quotaBucketName, body, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new CheckQuotaAvailabilityResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public CheckQuotaAvailabilityResponse checkAvailability(String location, String quotaBucketName,
+ QuotaBucketRequest body) {
+ CheckQuotaAvailabilityResponseInner inner
+ = this.serviceClient().checkAvailability(location, quotaBucketName, body);
+ if (inner != null) {
+ return new CheckQuotaAvailabilityResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private QuotasClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.LoadTestManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/ResourceManagerUtils.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/ResourceManagerUtils.java
new file mode 100644
index 000000000000..8d51cba4f3a8
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/ResourceManagerUtils.java
@@ -0,0 +1,195 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.implementation;
+
+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.util.CoreUtils;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import reactor.core.publisher.Flux;
+
+final class ResourceManagerUtils {
+ private ResourceManagerUtils() {
+ }
+
+ static String getValueFromIdByName(String id, String name) {
+ if (id == null) {
+ return null;
+ }
+ Iterator itr = Arrays.stream(id.split("/")).iterator();
+ while (itr.hasNext()) {
+ String part = itr.next();
+ if (part != null && !part.trim().isEmpty()) {
+ if (part.equalsIgnoreCase(name)) {
+ if (itr.hasNext()) {
+ return itr.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) {
+ if (id == null || pathTemplate == null) {
+ return null;
+ }
+ String parameterNameParentheses = "{" + parameterName + "}";
+ List idSegmentsReverted = Arrays.asList(id.split("/"));
+ List pathSegments = Arrays.asList(pathTemplate.split("/"));
+ Collections.reverse(idSegmentsReverted);
+ Iterator idItrReverted = idSegmentsReverted.iterator();
+ int pathIndex = pathSegments.size();
+ while (idItrReverted.hasNext() && pathIndex > 0) {
+ String idSegment = idItrReverted.next();
+ String pathSegment = pathSegments.get(--pathIndex);
+ if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) {
+ if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) {
+ if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) {
+ List segments = new ArrayList<>();
+ segments.add(idSegment);
+ idItrReverted.forEachRemaining(segments::add);
+ Collections.reverse(segments);
+ if (!segments.isEmpty() && segments.get(0).isEmpty()) {
+ segments.remove(0);
+ }
+ return String.join("/", segments);
+ } else {
+ return idSegment;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) {
+ return new PagedIterableImpl<>(pageIterable, mapper);
+ }
+
+ private static final class PagedIterableImpl extends PagedIterable {
+
+ private final PagedIterable pagedIterable;
+ private final Function mapper;
+ private final Function, PagedResponse> pageMapper;
+
+ private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) {
+ super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux
+ .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper)))));
+ this.pagedIterable = pagedIterable;
+ this.mapper = mapper;
+ this.pageMapper = getPageMapper(mapper);
+ }
+
+ private static Function, PagedResponse> getPageMapper(Function mapper) {
+ return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(),
+ page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(),
+ null);
+ }
+
+ @Override
+ public Stream stream() {
+ return pagedIterable.stream().map(mapper);
+ }
+
+ @Override
+ public Stream> streamByPage() {
+ return pagedIterable.streamByPage().map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken) {
+ return pagedIterable.streamByPage(continuationToken).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(int preferredPageSize) {
+ return pagedIterable.streamByPage(preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken, int preferredPageSize) {
+ return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl<>(pagedIterable.iterator(), mapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage() {
+ return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken) {
+ return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(int preferredPageSize) {
+ return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken, int preferredPageSize) {
+ return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper);
+ }
+ }
+
+ private static final class IteratorImpl implements Iterator {
+
+ private final Iterator iterator;
+ private final Function mapper;
+
+ private IteratorImpl(Iterator iterator, Function mapper) {
+ this.iterator = iterator;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return iterator.hasNext();
+ }
+
+ @Override
+ public S next() {
+ return mapper.apply(iterator.next());
+ }
+
+ @Override
+ public void remove() {
+ iterator.remove();
+ }
+ }
+
+ private static final class IterableImpl implements Iterable {
+
+ private final Iterable iterable;
+ private final Function mapper;
+
+ private IterableImpl(Iterable iterable, Function mapper) {
+ this.iterable = iterable;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl<>(iterable.iterator(), mapper);
+ }
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/package-info.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/package-info.java
new file mode 100644
index 000000000000..80b06803ec97
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/implementation/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the implementations for LoadTestClient.
+ * LoadTest client provides access to LoadTest Resource and it's status operations.
+ */
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.implementation;
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/ActionType.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/ActionType.java
new file mode 100644
index 000000000000..e93b66046079
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/ActionType.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+public final class ActionType extends ExpandableStringEnum {
+ /**
+ * Static value Internal for ActionType.
+ */
+ public static final ActionType INTERNAL = fromString("Internal");
+
+ /**
+ * Creates a new instance of ActionType value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ActionType() {
+ }
+
+ /**
+ * Creates or finds a ActionType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ActionType.
+ */
+ public static ActionType fromString(String name) {
+ return fromString(name, ActionType.class);
+ }
+
+ /**
+ * Gets known ActionType values.
+ *
+ * @return known ActionType values.
+ */
+ public static Collection values() {
+ return values(ActionType.class);
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/CheckQuotaAvailabilityResponse.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/CheckQuotaAvailabilityResponse.java
new file mode 100644
index 000000000000..292ed5919d57
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/CheckQuotaAvailabilityResponse.java
@@ -0,0 +1,66 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.CheckQuotaAvailabilityResponseInner;
+
+/**
+ * An immutable client-side representation of CheckQuotaAvailabilityResponse.
+ */
+public interface CheckQuotaAvailabilityResponse {
+ /**
+ * Gets the id property: Fully qualified resource ID for the resource. Ex -
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the type property: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ * "Microsoft.Storage/storageAccounts".
+ *
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
+ /**
+ * Gets the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the isAvailable property: True/False indicating whether the quota request be granted based on availability.
+ *
+ * @return the isAvailable value.
+ */
+ Boolean isAvailable();
+
+ /**
+ * Gets the availabilityStatus property: Message indicating additional details to add to quota support request.
+ *
+ * @return the availabilityStatus value.
+ */
+ String availabilityStatus();
+
+ /**
+ * Gets the inner
+ * com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.CheckQuotaAvailabilityResponseInner
+ * object.
+ *
+ * @return the inner object.
+ */
+ CheckQuotaAvailabilityResponseInner innerModel();
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/EncryptionProperties.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/EncryptionProperties.java
new file mode 100644
index 000000000000..dd5200534a22
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/EncryptionProperties.java
@@ -0,0 +1,133 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Key and identity details for Customer Managed Key encryption of load test resource.
+ */
+@Fluent
+public final class EncryptionProperties implements JsonSerializable {
+ /*
+ * All identity configuration for Customer-managed key settings defining which identity should be used to auth to
+ * Key Vault.
+ */
+ private EncryptionPropertiesIdentity identity;
+
+ /*
+ * key encryption key Url, versioned. Ex:
+ * https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or
+ * https://contosovault.vault.azure.net/keys/contosokek.
+ */
+ private String keyUrl;
+
+ /**
+ * Creates an instance of EncryptionProperties class.
+ */
+ public EncryptionProperties() {
+ }
+
+ /**
+ * Get the identity property: All identity configuration for Customer-managed key settings defining which identity
+ * should be used to auth to Key Vault.
+ *
+ * @return the identity value.
+ */
+ public EncryptionPropertiesIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: All identity configuration for Customer-managed key settings defining which identity
+ * should be used to auth to Key Vault.
+ *
+ * @param identity the identity value to set.
+ * @return the EncryptionProperties object itself.
+ */
+ public EncryptionProperties withIdentity(EncryptionPropertiesIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the keyUrl property: key encryption key Url, versioned. Ex:
+ * https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or
+ * https://contosovault.vault.azure.net/keys/contosokek.
+ *
+ * @return the keyUrl value.
+ */
+ public String keyUrl() {
+ return this.keyUrl;
+ }
+
+ /**
+ * Set the keyUrl property: key encryption key Url, versioned. Ex:
+ * https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or
+ * https://contosovault.vault.azure.net/keys/contosokek.
+ *
+ * @param keyUrl the keyUrl value to set.
+ * @return the EncryptionProperties object itself.
+ */
+ public EncryptionProperties withKeyUrl(String keyUrl) {
+ this.keyUrl = keyUrl;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (identity() != null) {
+ identity().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("identity", this.identity);
+ jsonWriter.writeStringField("keyUrl", this.keyUrl);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of EncryptionProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of EncryptionProperties if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the EncryptionProperties.
+ */
+ public static EncryptionProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ EncryptionProperties deserializedEncryptionProperties = new EncryptionProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("identity".equals(fieldName)) {
+ deserializedEncryptionProperties.identity = EncryptionPropertiesIdentity.fromJson(reader);
+ } else if ("keyUrl".equals(fieldName)) {
+ deserializedEncryptionProperties.keyUrl = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedEncryptionProperties;
+ });
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/EncryptionPropertiesIdentity.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/EncryptionPropertiesIdentity.java
new file mode 100644
index 000000000000..acb17af5a193
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/EncryptionPropertiesIdentity.java
@@ -0,0 +1,128 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key
+ * Vault.
+ */
+@Fluent
+public final class EncryptionPropertiesIdentity implements JsonSerializable {
+ /*
+ * Managed identity type to use for accessing encryption key Url.
+ */
+ private Type type;
+
+ /*
+ * User assigned identity to use for accessing key encryption key Url. Ex:
+ * /subscriptions/a0a0a0a0-bbbb-cccd-dddd-e1e1e1e1e1e1/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId.
+ */
+ private String resourceId;
+
+ /**
+ * Creates an instance of EncryptionPropertiesIdentity class.
+ */
+ public EncryptionPropertiesIdentity() {
+ }
+
+ /**
+ * Get the type property: Managed identity type to use for accessing encryption key Url.
+ *
+ * @return the type value.
+ */
+ public Type type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: Managed identity type to use for accessing encryption key Url.
+ *
+ * @param type the type value to set.
+ * @return the EncryptionPropertiesIdentity object itself.
+ */
+ public EncryptionPropertiesIdentity withType(Type type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the resourceId property: User assigned identity to use for accessing key encryption key Url. Ex:
+ * /subscriptions/a0a0a0a0-bbbb-cccd-dddd-e1e1e1e1e1e1/resourceGroups/<resource
+ * group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId.
+ *
+ * @return the resourceId value.
+ */
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Set the resourceId property: User assigned identity to use for accessing key encryption key Url. Ex:
+ * /subscriptions/a0a0a0a0-bbbb-cccd-dddd-e1e1e1e1e1e1/resourceGroups/<resource
+ * group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId.
+ *
+ * @param resourceId the resourceId value to set.
+ * @return the EncryptionPropertiesIdentity object itself.
+ */
+ public EncryptionPropertiesIdentity withResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString());
+ jsonWriter.writeStringField("resourceId", this.resourceId);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of EncryptionPropertiesIdentity from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of EncryptionPropertiesIdentity if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the EncryptionPropertiesIdentity.
+ */
+ public static EncryptionPropertiesIdentity fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ EncryptionPropertiesIdentity deserializedEncryptionPropertiesIdentity = new EncryptionPropertiesIdentity();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("type".equals(fieldName)) {
+ deserializedEncryptionPropertiesIdentity.type = Type.fromString(reader.getString());
+ } else if ("resourceId".equals(fieldName)) {
+ deserializedEncryptionPropertiesIdentity.resourceId = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedEncryptionPropertiesIdentity;
+ });
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/EndpointDependency.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/EndpointDependency.java
new file mode 100644
index 000000000000..b4a324943183
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/EndpointDependency.java
@@ -0,0 +1,122 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * A domain name and connection details used to access a dependency.
+ */
+@Immutable
+public final class EndpointDependency implements JsonSerializable {
+ /*
+ * The domain name of the dependency. Domain names may be fully qualified or may contain a * wildcard.
+ */
+ private String domainName;
+
+ /*
+ * Human-readable supplemental information about the dependency and when it is applicable.
+ */
+ private String description;
+
+ /*
+ * The list of connection details for this endpoint.
+ */
+ private List endpointDetails;
+
+ /**
+ * Creates an instance of EndpointDependency class.
+ */
+ public EndpointDependency() {
+ }
+
+ /**
+ * Get the domainName property: The domain name of the dependency. Domain names may be fully qualified or may
+ * contain a * wildcard.
+ *
+ * @return the domainName value.
+ */
+ public String domainName() {
+ return this.domainName;
+ }
+
+ /**
+ * Get the description property: Human-readable supplemental information about the dependency and when it is
+ * applicable.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Get the endpointDetails property: The list of connection details for this endpoint.
+ *
+ * @return the endpointDetails value.
+ */
+ public List endpointDetails() {
+ return this.endpointDetails;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (endpointDetails() != null) {
+ endpointDetails().forEach(e -> e.validate());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of EndpointDependency from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of EndpointDependency if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the EndpointDependency.
+ */
+ public static EndpointDependency fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ EndpointDependency deserializedEndpointDependency = new EndpointDependency();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("domainName".equals(fieldName)) {
+ deserializedEndpointDependency.domainName = reader.getString();
+ } else if ("description".equals(fieldName)) {
+ deserializedEndpointDependency.description = reader.getString();
+ } else if ("endpointDetails".equals(fieldName)) {
+ List endpointDetails
+ = reader.readArray(reader1 -> EndpointDetail.fromJson(reader1));
+ deserializedEndpointDependency.endpointDetails = endpointDetails;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedEndpointDependency;
+ });
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/EndpointDetail.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/EndpointDetail.java
new file mode 100644
index 000000000000..16c905dea88f
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/EndpointDetail.java
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Details about the connection between the Batch service and the endpoint.
+ */
+@Immutable
+public final class EndpointDetail implements JsonSerializable {
+ /*
+ * The port an endpoint is connected to.
+ */
+ private Integer port;
+
+ /**
+ * Creates an instance of EndpointDetail class.
+ */
+ public EndpointDetail() {
+ }
+
+ /**
+ * Get the port property: The port an endpoint is connected to.
+ *
+ * @return the port value.
+ */
+ public Integer port() {
+ return this.port;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of EndpointDetail from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of EndpointDetail if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the EndpointDetail.
+ */
+ public static EndpointDetail fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ EndpointDetail deserializedEndpointDetail = new EndpointDetail();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("port".equals(fieldName)) {
+ deserializedEndpointDetail.port = reader.getNullable(JsonReader::getInt);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedEndpointDetail;
+ });
+ }
+}
diff --git a/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/LoadTestResource.java b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/LoadTestResource.java
new file mode 100644
index 000000000000..7a2c3826e224
--- /dev/null
+++ b/sdk/loadtestservicemicrosoftloadtestserviceloadtesting/azure-resourcemanager-loadtestservicemicrosoftloadtestserviceloadtesting/src/main/java/com/azure/resourcemanager/loadtestservicemicrosoftloadtestserviceloadtesting/models/LoadTestResource.java
@@ -0,0 +1,349 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.models;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.loadtestservicemicrosoftloadtestserviceloadtesting.fluent.models.LoadTestResourceInner;
+import java.util.Map;
+
+/**
+ * An immutable client-side representation of LoadTestResource.
+ */
+public interface LoadTestResource {
+ /**
+ * Gets the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * Gets the location property: The geo-location where the resource lives.
+ *
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * Gets the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ Map