diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/CHANGELOG.md b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/CHANGELOG.md
index 7bf763e44693..ce533c38e462 100644
--- a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/CHANGELOG.md
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2022-09-23)
+
+- Azure Resource Manager LoadTest client library for Java. This package contains Microsoft Azure SDK for LoadTest Management SDK. LoadTest client provides access to LoadTest Resource and it's status operations. Package tag package-2022-12-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/README.md b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/README.md
index 4874e925ba73..194a80377a07 100644
--- a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/README.md
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager LoadTest client library for Java.
-This package contains Microsoft Azure SDK for LoadTest Management SDK. LoadTest client provides access to LoadTest Resource and it's status operations. Package tag package-2021-12-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for LoadTest Management SDK. LoadTest client provides access to LoadTest Resource and it's status operations. Package tag package-2022-12-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanagerazure-resourcemanager-loadtestservice
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/SAMPLE.md b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/SAMPLE.md
index 4d584fc7d749..85bf92e0171e 100644
--- a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/SAMPLE.md
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/SAMPLE.md
@@ -8,11 +8,18 @@
- [GetByResourceGroup](#loadtests_getbyresourcegroup)
- [List](#loadtests_list)
- [ListByResourceGroup](#loadtests_listbyresourcegroup)
+- [ListOutboundNetworkDependenciesEndpoints](#loadtests_listoutboundnetworkdependenciesendpoints)
- [Update](#loadtests_update)
## Operations
- [List](#operations_list)
+
+## Quotas
+
+- [CheckAvailability](#quotas_checkavailability)
+- [Get](#quotas_get)
+- [List](#quotas_list)
### LoadTests_CreateOrUpdate
```java
@@ -22,7 +29,7 @@ import java.util.Map;
/** Samples for LoadTests CreateOrUpdate. */
public final class LoadTestsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2021-12-01-preview/examples/LoadTests_CreateOrUpdate.json
+ * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_CreateOrUpdate.json
*/
/**
* Sample code: LoadTests_CreateOrUpdate.
@@ -61,7 +68,7 @@ import com.azure.core.util.Context;
/** Samples for LoadTests Delete. */
public final class LoadTestsDeleteSamples {
/*
- * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2021-12-01-preview/examples/LoadTests_Delete.json
+ * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_Delete.json
*/
/**
* Sample code: LoadTests_Delete.
@@ -82,7 +89,7 @@ import com.azure.core.util.Context;
/** Samples for LoadTests GetByResourceGroup. */
public final class LoadTestsGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2021-12-01-preview/examples/LoadTests_Get.json
+ * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_Get.json
*/
/**
* Sample code: LoadTests_Get.
@@ -103,7 +110,7 @@ import com.azure.core.util.Context;
/** Samples for LoadTests List. */
public final class LoadTestsListSamples {
/*
- * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2021-12-01-preview/examples/LoadTests_ListBySubscription.json
+ * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_ListBySubscription.json
*/
/**
* Sample code: LoadTests_ListBySubscription.
@@ -124,7 +131,7 @@ import com.azure.core.util.Context;
/** Samples for LoadTests ListByResourceGroup. */
public final class LoadTestsListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2021-12-01-preview/examples/LoadTests_ListByResourceGroup.json
+ * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_ListByResourceGroup.json
*/
/**
* Sample code: LoadTests_ListByResourceGroup.
@@ -137,6 +144,31 @@ public final class LoadTestsListByResourceGroupSamples {
}
```
+### LoadTests_ListOutboundNetworkDependenciesEndpoints
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LoadTests ListOutboundNetworkDependenciesEndpoints. */
+public final class LoadTestsListOutboundNetworkDependenciesEndpointsSamples {
+ /*
+ * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_ListOutboundNetworkDependenciesEndpoints.json
+ */
+ /**
+ * Sample code: ListOutboundNetworkDependencies.
+ *
+ * @param manager Entry point to LoadTestManager.
+ */
+ public static void listOutboundNetworkDependencies(
+ com.azure.resourcemanager.loadtestservice.LoadTestManager manager) {
+ manager
+ .loadTests()
+ .listOutboundNetworkDependenciesEndpoints(
+ "default-azureloadtest-japaneast", "sampleloadtest", Context.NONE);
+ }
+}
+```
+
### LoadTests_Update
```java
@@ -144,13 +176,12 @@ import com.azure.core.management.serializer.SerializerFactory;
import com.azure.core.util.Context;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.loadtestservice.models.LoadTestResource;
-import com.azure.resourcemanager.loadtestservice.models.LoadTestResourcePatchRequestBodyProperties;
import java.io.IOException;
/** Samples for LoadTests Update. */
public final class LoadTestsUpdateSamples {
/*
- * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2021-12-01-preview/examples/LoadTests_Update.json
+ * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_Update.json
*/
/**
* Sample code: LoadTests_Update.
@@ -167,8 +198,7 @@ public final class LoadTestsUpdateSamples {
SerializerFactory
.createDefaultManagementSerializerAdapter()
.deserialize("{\"Division\":\"LT\",\"Team\":\"Dev Exp\"}", Object.class, SerializerEncoding.JSON))
- .withProperties(
- new LoadTestResourcePatchRequestBodyProperties().withDescription("This is new load test resource"))
+ .withDescription("This is new load test resource")
.apply();
}
}
@@ -182,7 +212,7 @@ import com.azure.core.util.Context;
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2021-12-01-preview/examples/Operations_List.json
+ * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/Operations_List.json
*/
/**
* Sample code: Operations_List.
@@ -195,3 +225,81 @@ public final class OperationsListSamples {
}
```
+### Quotas_CheckAvailability
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.loadtestservice.models.QuotaBucketRequest;
+import com.azure.resourcemanager.loadtestservice.models.QuotaBucketRequestPropertiesDimensions;
+
+/** Samples for Quotas CheckAvailability. */
+public final class QuotasCheckAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/Quotas_CheckAvailability.json
+ */
+ /**
+ * Sample code: Quotas_CheckAvailability.
+ *
+ * @param manager Entry point to LoadTestManager.
+ */
+ public static void quotasCheckAvailability(com.azure.resourcemanager.loadtestservice.LoadTestManager manager) {
+ manager
+ .quotas()
+ .checkAvailabilityWithResponse(
+ "westus",
+ "testQuotaBucket",
+ new QuotaBucketRequest()
+ .withCurrentUsage(20)
+ .withCurrentQuota(40)
+ .withNewQuota(50)
+ .withDimensions(
+ new QuotaBucketRequestPropertiesDimensions()
+ .withSubscriptionId("testsubscriptionId")
+ .withLocation("westus")),
+ Context.NONE);
+ }
+}
+```
+
+### Quotas_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Quotas Get. */
+public final class QuotasGetSamples {
+ /*
+ * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/Quotas_Get.json
+ */
+ /**
+ * Sample code: Quotas_Get.
+ *
+ * @param manager Entry point to LoadTestManager.
+ */
+ public static void quotasGet(com.azure.resourcemanager.loadtestservice.LoadTestManager manager) {
+ manager.quotas().getWithResponse("westus", "testQuotaBucket", Context.NONE);
+ }
+}
+```
+
+### Quotas_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Quotas List. */
+public final class QuotasListSamples {
+ /*
+ * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/Quotas_List.json
+ */
+ /**
+ * Sample code: Quotas_List.
+ *
+ * @param manager Entry point to LoadTestManager.
+ */
+ public static void quotasList(com.azure.resourcemanager.loadtestservice.LoadTestManager manager) {
+ manager.quotas().list("westus", Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/pom.xml b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/pom.xml
index 7a5e3900ec9e..2ab3f383ce73 100644
--- a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/pom.xml
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/pom.xml
@@ -13,7 +13,7 @@
jarMicrosoft Azure SDK for LoadTest Management
- This package contains Microsoft Azure SDK for LoadTest Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. LoadTest client provides access to LoadTest Resource and it's status operations. Package tag package-2021-12-01-preview.
+ This package contains Microsoft Azure SDK for LoadTest Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. LoadTest client provides access to LoadTest Resource and it's status operations. Package tag package-2022-12-01.https://github.com/Azure/azure-sdk-for-java
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/LoadTestManager.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/LoadTestManager.java
index c1038688ceb4..bcaa1622cf36 100644
--- a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/LoadTestManager.java
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/LoadTestManager.java
@@ -10,11 +10,13 @@
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
@@ -25,8 +27,10 @@
import com.azure.resourcemanager.loadtestservice.implementation.LoadTestClientBuilder;
import com.azure.resourcemanager.loadtestservice.implementation.LoadTestsImpl;
import com.azure.resourcemanager.loadtestservice.implementation.OperationsImpl;
+import com.azure.resourcemanager.loadtestservice.implementation.QuotasImpl;
import com.azure.resourcemanager.loadtestservice.models.LoadTests;
import com.azure.resourcemanager.loadtestservice.models.Operations;
+import com.azure.resourcemanager.loadtestservice.models.Quotas;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
@@ -38,6 +42,8 @@
public final class LoadTestManager {
private Operations operations;
+ private Quotas quotas;
+
private LoadTests loadTests;
private final LoadTestClient clientObject;
@@ -67,6 +73,19 @@ public static LoadTestManager authenticate(TokenCredential credential, AzureProf
return configure().authenticate(credential, profile);
}
+ /**
+ * Creates an instance of LoadTest service API entry point.
+ *
+ * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
+ * @param profile the Azure profile for client.
+ * @return the LoadTest service API instance.
+ */
+ public static LoadTestManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return new LoadTestManager(httpPipeline, profile, null);
+ }
+
/**
* Gets a Configurable instance that can be used to create LoadTestManager with optional configuration.
*
@@ -78,13 +97,14 @@ public static Configurable configure() {
/** The Configurable allowing configurations to be set. */
public static final class Configurable {
- private final ClientLogger logger = new ClientLogger(Configurable.class);
+ private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -145,6 +165,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
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.
*
@@ -152,9 +185,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -194,10 +229,15 @@ public LoadTestManager authenticate(TokenCredential credential, AzureProfile pro
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ 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(
@@ -228,7 +268,11 @@ public LoadTestManager authenticate(TokenCredential credential, AzureProfile pro
}
}
- /** @return Resource collection API of Operations. */
+ /**
+ * 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);
@@ -236,7 +280,23 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of 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 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);
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/LoadTestClient.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/LoadTestClient.java
index 3dafb2d2e280..5036f44de545 100644
--- a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/LoadTestClient.java
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/LoadTestClient.java
@@ -51,6 +51,13 @@ public interface LoadTestClient {
*/
OperationsClient getOperations();
+ /**
+ * Gets the QuotasClient object to access its operations.
+ *
+ * @return the QuotasClient object.
+ */
+ QuotasClient getQuotas();
+
/**
* Gets the LoadTestsClient object to access its operations.
*
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/LoadTestsClient.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/LoadTestsClient.java
index 616734d39e53..5f68e66ae320 100644
--- a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/LoadTestsClient.java
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/LoadTestsClient.java
@@ -12,6 +12,7 @@
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.loadtestservice.fluent.models.LoadTestResourceInner;
+import com.azure.resourcemanager.loadtestservice.fluent.models.OutboundEnvironmentEndpointInner;
import com.azure.resourcemanager.loadtestservice.models.LoadTestResourcePatchRequestBody;
/** An instance of this class provides access to all the operations defined in LoadTestsClient. */
@@ -21,7 +22,7 @@ public interface LoadTestsClient {
*
* @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 list of resources page result.
+ * @return list of resources page result as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -33,7 +34,7 @@ public interface LoadTestsClient {
* @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 list of resources page result.
+ * @return list of resources page result as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -45,7 +46,7 @@ public interface LoadTestsClient {
* @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 list of resources page result.
+ * @return list of resources page result as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -58,7 +59,7 @@ public interface LoadTestsClient {
* @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 list of resources page result.
+ * @return list of resources page result as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -85,12 +86,43 @@ public interface LoadTestsClient {
* @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 LoadTest resource.
+ * @return a LoadTest resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
String resourceGroupName, String loadTestName, Context context);
+ /**
+ * Create or update LoadTest resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @param loadTestResource LoadTest resource data.
+ * @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 loadTestResource);
+
+ /**
+ * Create or update LoadTest resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @param loadTestResource LoadTest resource data.
+ * @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 loadTestResource, Context context);
+
/**
* Create or update LoadTest resource.
*
@@ -119,9 +151,45 @@ LoadTestResourceInner createOrUpdate(
* @return loadTest details.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateWithResponse(
+ LoadTestResourceInner createOrUpdate(
String resourceGroupName, String loadTestName, LoadTestResourceInner loadTestResource, Context context);
+ /**
+ * Update a loadtest resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @param loadTestResourcePatchRequestBody LoadTest resource update data.
+ * @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 loadTestResourcePatchRequestBody);
+
+ /**
+ * Update a loadtest resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test name.
+ * @param loadTestResourcePatchRequestBody LoadTest resource update data.
+ * @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 loadTestResourcePatchRequestBody,
+ Context context);
+
/**
* Update a loadtest resource.
*
@@ -152,7 +220,7 @@ LoadTestResourceInner update(
* @return loadTest details.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(
+ LoadTestResourceInner update(
String resourceGroupName,
String loadTestName,
LoadTestResourcePatchRequestBody loadTestResourcePatchRequestBody,
@@ -166,7 +234,7 @@ Response updateWithResponse(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String loadTestName);
@@ -180,7 +248,7 @@ Response updateWithResponse(
* @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 completion.
+ * @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);
@@ -209,4 +277,33 @@ Response updateWithResponse(
*/
@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/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/OperationsClient.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/OperationsClient.java
index ce89a27e2cc8..788a9447ffce 100644
--- a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/OperationsClient.java
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/OperationsClient.java
@@ -17,7 +17,8 @@ public interface OperationsClient {
*
* @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.
+ * @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();
@@ -29,7 +30,8 @@ public interface OperationsClient {
* @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.
+ * @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/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/QuotasClient.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/QuotasClient.java
new file mode 100644
index 000000000000..23158bdcd4fd
--- /dev/null
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/QuotasClient.java
@@ -0,0 +1,100 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservice.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.loadtestservice.fluent.models.CheckQuotaAvailabilityResponseInner;
+import com.azure.resourcemanager.loadtestservice.fluent.models.QuotaResourceInner;
+import com.azure.resourcemanager.loadtestservice.models.QuotaBucketRequest;
+
+/** An instance of this class provides access to all the operations defined in QuotasClient. */
+public interface QuotasClient {
+ /**
+ * Lists all the available quota per region per subscription.
+ *
+ * @param location The name of 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 a list of Quota Bucket details as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String location);
+
+ /**
+ * Lists all the available quota per region per subscription.
+ *
+ * @param location The name of 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 a list of Quota Bucket details 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 Azure region.
+ * @param quotaBucketName Quota Bucket 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);
+
+ /**
+ * Get the available quota for a quota bucket per region per subscription.
+ *
+ * @param location The name of Azure region.
+ * @param quotaBucketName Quota Bucket 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);
+
+ /**
+ * Check Quota Availability on quota bucket per region per subscription.
+ *
+ * @param location The name of Azure region.
+ * @param quotaBucketName Quota Bucket name.
+ * @param quotaBucketRequest Quota Bucket Request data.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CheckQuotaAvailabilityResponseInner checkAvailability(
+ String location, String quotaBucketName, QuotaBucketRequest quotaBucketRequest);
+
+ /**
+ * Check Quota Availability on quota bucket per region per subscription.
+ *
+ * @param location The name of Azure region.
+ * @param quotaBucketName Quota Bucket name.
+ * @param quotaBucketRequest Quota Bucket Request data.
+ * @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 along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response checkAvailabilityWithResponse(
+ String location, String quotaBucketName, QuotaBucketRequest quotaBucketRequest, Context context);
+}
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/CheckQuotaAvailabilityResponseInner.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/CheckQuotaAvailabilityResponseInner.java
new file mode 100644
index 000000000000..b1bfa6e4ecf1
--- /dev/null
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/CheckQuotaAvailabilityResponseInner.java
@@ -0,0 +1,101 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservice.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Check Quota Availability Response. */
+@Fluent
+public final class CheckQuotaAvailabilityResponseInner extends ProxyResource {
+ /*
+ * Check Quota Availability Response properties
+ */
+ @JsonProperty(value = "properties")
+ private CheckQuotaAvailabilityResponseProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the innerProperties property: Check Quota Availability Response properties.
+ *
+ * @return the innerProperties value.
+ */
+ private CheckQuotaAvailabilityResponseProperties 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 isAvailable property: true if Quota is Available, else false.
+ *
+ * @return the isAvailable value.
+ */
+ public Boolean isAvailable() {
+ return this.innerProperties() == null ? null : this.innerProperties().isAvailable();
+ }
+
+ /**
+ * Set the isAvailable property: true if Quota is Available, else false.
+ *
+ * @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: availability Status of the quota bucket.
+ *
+ * @return the availabilityStatus value.
+ */
+ public String availabilityStatus() {
+ return this.innerProperties() == null ? null : this.innerProperties().availabilityStatus();
+ }
+
+ /**
+ * Set the availabilityStatus property: availability Status of the quota bucket.
+ *
+ * @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();
+ }
+ }
+}
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/CheckQuotaAvailabilityResponseProperties.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/CheckQuotaAvailabilityResponseProperties.java
new file mode 100644
index 000000000000..3948aa0001ad
--- /dev/null
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/CheckQuotaAvailabilityResponseProperties.java
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservice.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Check Quota Availability Response properties. */
+@Fluent
+public final class CheckQuotaAvailabilityResponseProperties {
+ /*
+ * true if Quota is Available, else false.
+ */
+ @JsonProperty(value = "isAvailable")
+ private Boolean isAvailable;
+
+ /*
+ * availability Status of the quota bucket.
+ */
+ @JsonProperty(value = "availabilityStatus")
+ private String availabilityStatus;
+
+ /**
+ * Get the isAvailable property: true if Quota is Available, else false.
+ *
+ * @return the isAvailable value.
+ */
+ public Boolean isAvailable() {
+ return this.isAvailable;
+ }
+
+ /**
+ * Set the isAvailable property: true if Quota is Available, else false.
+ *
+ * @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: availability Status of the quota bucket.
+ *
+ * @return the availabilityStatus value.
+ */
+ public String availabilityStatus() {
+ return this.availabilityStatus;
+ }
+
+ /**
+ * Set the availabilityStatus property: availability Status of the quota bucket.
+ *
+ * @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() {
+ }
+}
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/LoadTestProperties.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/LoadTestProperties.java
index c52ca876ba4d..a555345f2677 100644
--- a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/LoadTestProperties.java
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/LoadTestProperties.java
@@ -5,16 +5,13 @@
package com.azure.resourcemanager.loadtestservice.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loadtestservice.models.EncryptionProperties;
import com.azure.resourcemanager.loadtestservice.models.ResourceState;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** LoadTest resource properties. */
@Fluent
public final class LoadTestProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(LoadTestProperties.class);
-
/*
* Description of the resource.
*/
@@ -33,6 +30,12 @@ public final class LoadTestProperties {
@JsonProperty(value = "dataPlaneURI", access = JsonProperty.Access.WRITE_ONLY)
private String dataPlaneUri;
+ /*
+ * CMK Encryption property.
+ */
+ @JsonProperty(value = "encryption")
+ private EncryptionProperties encryption;
+
/**
* Get the description property: Description of the resource.
*
@@ -71,11 +74,34 @@ 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();
+ }
}
}
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/LoadTestResourceInner.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/LoadTestResourceInner.java
index 2e5bbe43e01b..547af469df50 100644
--- a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/LoadTestResourceInner.java
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/LoadTestResourceInner.java
@@ -6,18 +6,15 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
-import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loadtestservice.models.EncryptionProperties;
+import com.azure.resourcemanager.loadtestservice.models.ManagedServiceIdentity;
import com.azure.resourcemanager.loadtestservice.models.ResourceState;
-import com.azure.resourcemanager.loadtestservice.models.SystemAssignedServiceIdentity;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** LoadTest details. */
@Fluent
public final class LoadTestResourceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(LoadTestResourceInner.class);
-
/*
* Load Test resource properties
*/
@@ -28,7 +25,7 @@ public final class LoadTestResourceInner extends Resource {
* The type of identity used for the resource.
*/
@JsonProperty(value = "identity")
- private SystemAssignedServiceIdentity identity;
+ private ManagedServiceIdentity identity;
/**
* Get the innerProperties property: Load Test resource properties.
@@ -44,7 +41,7 @@ private LoadTestProperties innerProperties() {
*
* @return the identity value.
*/
- public SystemAssignedServiceIdentity identity() {
+ public ManagedServiceIdentity identity() {
return this.identity;
}
@@ -54,7 +51,7 @@ public SystemAssignedServiceIdentity identity() {
* @param identity the identity value to set.
* @return the LoadTestResourceInner object itself.
*/
- public LoadTestResourceInner withIdentity(SystemAssignedServiceIdentity identity) {
+ public LoadTestResourceInner withIdentity(ManagedServiceIdentity identity) {
this.identity = identity;
return this;
}
@@ -114,6 +111,29 @@ 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.
*
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/models/LoadTestResourcePatchRequestBodyProperties.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/LoadTestResourcePatchRequestBodyProperties.java
similarity index 56%
rename from sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/models/LoadTestResourcePatchRequestBodyProperties.java
rename to sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/LoadTestResourcePatchRequestBodyProperties.java
index 235e4b752c2e..9621b817f4da 100644
--- a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/models/LoadTestResourcePatchRequestBodyProperties.java
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/LoadTestResourcePatchRequestBodyProperties.java
@@ -2,24 +2,27 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.loadtestservice.models;
+package com.azure.resourcemanager.loadtestservice.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.resourcemanager.loadtestservice.models.EncryptionProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Load Test resource properties. */
@Fluent
public final class LoadTestResourcePatchRequestBodyProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(LoadTestResourcePatchRequestBodyProperties.class);
-
/*
* Description of the resource.
*/
@JsonProperty(value = "description")
private String description;
+ /*
+ * CMK Encryption property.
+ */
+ @JsonProperty(value = "encryption")
+ private EncryptionProperties encryption;
+
/**
* Get the description property: Description of the resource.
*
@@ -40,11 +43,34 @@ public LoadTestResourcePatchRequestBodyProperties withDescription(String descrip
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 LoadTestResourcePatchRequestBodyProperties object itself.
+ */
+ public LoadTestResourcePatchRequestBodyProperties 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();
+ }
}
}
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/OperationInner.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/OperationInner.java
index 8a2fd72fd6d3..cf332f4a1527 100644
--- a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/OperationInner.java
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/OperationInner.java
@@ -5,29 +5,28 @@
package com.azure.resourcemanager.loadtestservice.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.loadtestservice.models.ActionType;
import com.azure.resourcemanager.loadtestservice.models.OperationDisplay;
import com.azure.resourcemanager.loadtestservice.models.Origin;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** REST API Operation Details of a REST API operation, returned from the Resource Provider Operations API. */
+/**
+ * REST API Operation
+ *
+ *
Details of a REST API operation, returned from the Resource Provider Operations API.
+ */
@Fluent
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
- * The name of the operation, as per Resource-Based Access Control (RBAC).
- * Examples: "Microsoft.Compute/virtualMachines/write",
- * "Microsoft.Compute/virtualMachines/capture/action"
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
*/
@JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;
/*
- * Whether the operation applies to data-plane. This is "true" for
- * data-plane operations and "false" for ARM/control-plane operations.
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
+ * ARM/control-plane operations.
*/
@JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
private Boolean isDataAction;
@@ -39,15 +38,14 @@ public final class OperationInner {
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"
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
+ * value is "user,system"
*/
@JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY)
private Origin origin;
/*
- * Enum. Indicates the action type. "Internal" refers to actions that are
- * for internal only APIs.
+ * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
*/
@JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY)
private ActionType actionType;
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/OutboundEnvironmentEndpointInner.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/OutboundEnvironmentEndpointInner.java
new file mode 100644
index 000000000000..a3dd0510fc24
--- /dev/null
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/OutboundEnvironmentEndpointInner.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservice.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.loadtestservice.models.EndpointDependency;
+import com.fasterxml.jackson.annotation.JsonProperty;
+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 {
+ /*
+ * The type of service that Azure Load Testing connects to.
+ */
+ @JsonProperty(value = "category", access = JsonProperty.Access.WRITE_ONLY)
+ private String category;
+
+ /*
+ * The endpoints for this service to which the Batch service makes outbound calls.
+ */
+ @JsonProperty(value = "endpoints", access = JsonProperty.Access.WRITE_ONLY)
+ private List endpoints;
+
+ /**
+ * 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());
+ }
+ }
+}
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/QuotaBucketRequestProperties.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/QuotaBucketRequestProperties.java
new file mode 100644
index 000000000000..7f27760e9d1a
--- /dev/null
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/QuotaBucketRequestProperties.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.loadtestservice.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.loadtestservice.models.QuotaBucketRequestPropertiesDimensions;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Quota Bucket Request properties. */
+@Fluent
+public final class QuotaBucketRequestProperties {
+ /*
+ * Current Usage of the quota bucket.
+ */
+ @JsonProperty(value = "currentUsage")
+ private Integer currentUsage;
+
+ /*
+ * Current Quota of the quota bucket.
+ */
+ @JsonProperty(value = "currentQuota")
+ private Integer currentQuota;
+
+ /*
+ * New Requested Quota of the quota bucket.
+ */
+ @JsonProperty(value = "newQuota")
+ private Integer newQuota;
+
+ /*
+ * Dimensions for new quota request of the quota bucket.
+ */
+ @JsonProperty(value = "dimensions")
+ private QuotaBucketRequestPropertiesDimensions dimensions;
+
+ /**
+ * Get the currentUsage property: Current Usage of the quota bucket.
+ *
+ * @return the currentUsage value.
+ */
+ public Integer currentUsage() {
+ return this.currentUsage;
+ }
+
+ /**
+ * Set the currentUsage property: Current 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 of the quota bucket.
+ *
+ * @return the currentQuota value.
+ */
+ public Integer currentQuota() {
+ return this.currentQuota;
+ }
+
+ /**
+ * Set the currentQuota property: Current Quota 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 Requested Quota of the quota bucket.
+ *
+ * @return the newQuota value.
+ */
+ public Integer newQuota() {
+ return this.newQuota;
+ }
+
+ /**
+ * Set the newQuota property: New Requested Quota 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 of the quota bucket.
+ *
+ * @return the dimensions value.
+ */
+ public QuotaBucketRequestPropertiesDimensions dimensions() {
+ return this.dimensions;
+ }
+
+ /**
+ * Set the dimensions property: Dimensions for new quota request of the quota bucket.
+ *
+ * @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();
+ }
+ }
+}
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/QuotaResourceInner.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/QuotaResourceInner.java
new file mode 100644
index 000000000000..59559cbb2fb0
--- /dev/null
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/QuotaResourceInner.java
@@ -0,0 +1,111 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservice.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.loadtestservice.models.ResourceState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Quota Bucket details. */
+@Fluent
+public final class QuotaResourceInner extends ProxyResource {
+ /*
+ * Quota resource properties
+ */
+ @JsonProperty(value = "properties")
+ private QuotaResourceProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the innerProperties property: Quota resource properties.
+ *
+ * @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 limit property: 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: 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 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 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();
+ }
+ }
+}
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/QuotaResourceProperties.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/QuotaResourceProperties.java
new file mode 100644
index 000000000000..32b961e66f4b
--- /dev/null
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/models/QuotaResourceProperties.java
@@ -0,0 +1,88 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservice.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.loadtestservice.models.ResourceState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Quota resource properties. */
+@Fluent
+public final class QuotaResourceProperties {
+ /*
+ * Quota Limit of the quota bucket.
+ */
+ @JsonProperty(value = "limit")
+ private Integer limit;
+
+ /*
+ * Current Usage of the quota bucket.
+ */
+ @JsonProperty(value = "usage")
+ private Integer usage;
+
+ /*
+ * Resource provisioning state.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ResourceState provisioningState;
+
+ /**
+ * Get the limit property: Quota Limit of the quota bucket.
+ *
+ * @return the limit value.
+ */
+ public Integer limit() {
+ return this.limit;
+ }
+
+ /**
+ * Set the limit property: 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 Usage of the quota bucket.
+ *
+ * @return the usage value.
+ */
+ public Integer usage() {
+ return this.usage;
+ }
+
+ /**
+ * Set the usage property: Current 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() {
+ }
+}
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/implementation/CheckQuotaAvailabilityResponseImpl.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/implementation/CheckQuotaAvailabilityResponseImpl.java
new file mode 100644
index 000000000000..0c2bed6f2d88
--- /dev/null
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/implementation/CheckQuotaAvailabilityResponseImpl.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loadtestservice.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.loadtestservice.fluent.models.CheckQuotaAvailabilityResponseInner;
+import com.azure.resourcemanager.loadtestservice.models.CheckQuotaAvailabilityResponse;
+
+public final class CheckQuotaAvailabilityResponseImpl implements CheckQuotaAvailabilityResponse {
+ private CheckQuotaAvailabilityResponseInner innerObject;
+
+ private final com.azure.resourcemanager.loadtestservice.LoadTestManager serviceManager;
+
+ CheckQuotaAvailabilityResponseImpl(
+ CheckQuotaAvailabilityResponseInner innerObject,
+ com.azure.resourcemanager.loadtestservice.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 Boolean isAvailable() {
+ return this.innerModel().isAvailable();
+ }
+
+ public String availabilityStatus() {
+ return this.innerModel().availabilityStatus();
+ }
+
+ public CheckQuotaAvailabilityResponseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.loadtestservice.LoadTestManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/implementation/LoadTestClientBuilder.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/implementation/LoadTestClientBuilder.java
index 94246872a282..138f2d73e587 100644
--- a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/implementation/LoadTestClientBuilder.java
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/implementation/LoadTestClientBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -67,34 +66,34 @@ public LoadTestClientBuilder environment(AzureEnvironment environment) {
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the LoadTestClientBuilder.
*/
- public LoadTestClientBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public LoadTestClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the LoadTestClientBuilder.
*/
- public LoadTestClientBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public LoadTestClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -120,27 +119,26 @@ public LoadTestClientBuilder serializerAdapter(SerializerAdapter serializerAdapt
* @return an instance of LoadTestClientImpl.
*/
public LoadTestClientImpl buildClient() {
- if (endpoint == null) {
- this.endpoint = "https://management.azure.com";
- }
- if (environment == null) {
- this.environment = AzureEnvironment.AZURE;
- }
- if (defaultPollInterval == null) {
- this.defaultPollInterval = Duration.ofSeconds(30);
- }
- if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
- if (serializerAdapter == null) {
- this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
- }
+ 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(
- pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ localPipeline,
+ localSerializerAdapter,
+ localDefaultPollInterval,
+ localEnvironment,
+ subscriptionId,
+ localEndpoint);
return client;
}
}
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/implementation/LoadTestClientImpl.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/implementation/LoadTestClientImpl.java
index 6bc14681d67e..44e6e4cf5fdd 100644
--- a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/implementation/LoadTestClientImpl.java
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/implementation/LoadTestClientImpl.java
@@ -15,6 +15,7 @@
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;
@@ -24,21 +25,19 @@
import com.azure.resourcemanager.loadtestservice.fluent.LoadTestClient;
import com.azure.resourcemanager.loadtestservice.fluent.LoadTestsClient;
import com.azure.resourcemanager.loadtestservice.fluent.OperationsClient;
+import com.azure.resourcemanager.loadtestservice.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 java.util.Map;
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 {
- private final ClientLogger logger = new ClientLogger(LoadTestClientImpl.class);
-
/** The ID of the target subscription. */
private final String subscriptionId;
@@ -123,6 +122,18 @@ public OperationsClient getOperations() {
return this.operations;
}
+ /** The QuotasClient object to access its operations. */
+ private final QuotasClient quotas;
+
+ /**
+ * Gets the QuotasClient object to access its operations.
+ *
+ * @return the QuotasClient object.
+ */
+ public QuotasClient getQuotas() {
+ return this.quotas;
+ }
+
/** The LoadTestsClient object to access its operations. */
private final LoadTestsClient loadTests;
@@ -157,8 +168,9 @@ public LoadTestsClient getLoadTests() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2021-12-01-preview";
+ this.apiVersion = "2022-12-01";
this.operations = new OperationsClientImpl(this);
+ this.quotas = new QuotasClientImpl(this);
this.loadTests = new LoadTestsClientImpl(this);
}
@@ -178,10 +190,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry