diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/CHANGELOG.md b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/CHANGELOG.md
index 7bf763e44693..d3b3d5cf179c 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-13)
+
+- 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-04-15-preview. 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..16ed1e9fd2ab 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-04-15-preview. 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..e186d27a1996 100644
--- a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/SAMPLE.md
+++ b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/SAMPLE.md
@@ -16,13 +16,19 @@
### LoadTests_CreateOrUpdate
```java
+import com.azure.resourcemanager.loadtestservice.models.EncryptionProperties;
+import com.azure.resourcemanager.loadtestservice.models.EncryptionPropertiesIdentity;
+import com.azure.resourcemanager.loadtestservice.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.loadtestservice.models.ManagedServiceIdentityType;
+import com.azure.resourcemanager.loadtestservice.models.Type;
+import com.azure.resourcemanager.loadtestservice.models.UserAssignedIdentity;
import java.util.HashMap;
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/preview/2022-04-15-preview/examples/LoadTests_CreateOrUpdate.json
*/
/**
* Sample code: LoadTests_CreateOrUpdate.
@@ -36,7 +42,22 @@ public final class LoadTestsCreateOrUpdateSamples {
.withRegion("westus")
.withExistingResourceGroup("dummyrg")
.withTags(mapOf("Team", "Dev Exp"))
+ .withIdentity(
+ new ManagedServiceIdentity()
+ .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
+ .withUserAssignedIdentities(
+ mapOf(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
+ new UserAssignedIdentity())))
.withDescription("This is new load test resource")
+ .withEncryption(
+ new EncryptionProperties()
+ .withIdentity(
+ new EncryptionPropertiesIdentity()
+ .withType(Type.USER_ASSIGNED)
+ .withResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"))
+ .withKeyUrl("https://dummy.vault.azure.net/keys/dummykey1"))
.create();
}
@@ -61,7 +82,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/preview/2022-04-15-preview/examples/LoadTests_Delete.json
*/
/**
* Sample code: LoadTests_Delete.
@@ -82,7 +103,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/preview/2022-04-15-preview/examples/LoadTests_Get.json
*/
/**
* Sample code: LoadTests_Get.
@@ -103,7 +124,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/preview/2022-04-15-preview/examples/LoadTests_ListBySubscription.json
*/
/**
* Sample code: LoadTests_ListBySubscription.
@@ -124,7 +145,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/preview/2022-04-15-preview/examples/LoadTests_ListByResourceGroup.json
*/
/**
* Sample code: LoadTests_ListByResourceGroup.
@@ -143,14 +164,21 @@ public final class LoadTestsListByResourceGroupSamples {
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.EncryptionProperties;
+import com.azure.resourcemanager.loadtestservice.models.EncryptionPropertiesIdentity;
import com.azure.resourcemanager.loadtestservice.models.LoadTestResource;
-import com.azure.resourcemanager.loadtestservice.models.LoadTestResourcePatchRequestBodyProperties;
+import com.azure.resourcemanager.loadtestservice.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.loadtestservice.models.ManagedServiceIdentityType;
+import com.azure.resourcemanager.loadtestservice.models.Type;
+import com.azure.resourcemanager.loadtestservice.models.UserAssignedIdentity;
import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
/** 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/preview/2022-04-15-preview/examples/LoadTests_Update.json
*/
/**
* Sample code: LoadTests_Update.
@@ -167,10 +195,31 @@ 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"))
+ .withIdentity(
+ new ManagedServiceIdentity()
+ .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
+ .withUserAssignedIdentities(
+ mapOf(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
+ new UserAssignedIdentity())))
+ .withDescription("This is new load test resource")
+ .withEncryption(
+ new EncryptionProperties()
+ .withIdentity(new EncryptionPropertiesIdentity().withType(Type.SYSTEM_ASSIGNED))
+ .withKeyUrl("https://dummy.vault.azure.net/keys/dummykey1"))
.apply();
}
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
}
```
@@ -182,7 +231,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/preview/2022-04-15-preview/examples/Operations_List.json
*/
/**
* Sample code: Operations_List.
diff --git a/sdk/loadtestservice/azure-resourcemanager-loadtestservice/pom.xml b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/pom.xml
index 7a5e3900ec9e..6cf5e200bda8 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-04-15-preview.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..a5d1edad3521 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;
@@ -67,6 +69,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 +93,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 +161,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 +181,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 +225,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 +264,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 +276,11 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of LoadTests. */
+ /**
+ * 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/LoadTestsClient.java b/sdk/loadtestservice/azure-resourcemanager-loadtestservice/src/main/java/com/azure/resourcemanager/loadtestservice/fluent/LoadTestsClient.java
index 616734d39e53..dba2cb6ab2b9 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
@@ -21,7 +21,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 +33,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 +45,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 +58,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);
@@ -67,7 +67,7 @@ public interface LoadTestsClient {
* Get a LoadTest resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param loadTestName Load Test name.
+ * @param loadTestName Load Test resource 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.
@@ -80,12 +80,12 @@ public interface LoadTestsClient {
* Get a LoadTest resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param loadTestName Load Test name.
+ * @param loadTestName Load Test resource 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 LoadTest resource.
+ * @return a LoadTest resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -95,7 +95,38 @@ Response getByResourceGroupWithResponse(
* Create or update LoadTest resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param loadTestName Load Test name.
+ * @param loadTestName Load Test resource 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 resource 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.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test resource 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.
@@ -110,7 +141,7 @@ LoadTestResourceInner createOrUpdate(
* Create or update LoadTest resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param loadTestName Load Test name.
+ * @param loadTestName Load Test resource name.
* @param loadTestResource LoadTest resource data.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -119,14 +150,50 @@ 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 loadTestName Load Test resource 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 resource 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.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param loadTestName Load Test resource 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.
@@ -143,7 +210,7 @@ LoadTestResourceInner update(
* Update a loadtest resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param loadTestName Load Test name.
+ * @param loadTestName Load Test resource name.
* @param loadTestResourcePatchRequestBody LoadTest resource update data.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -152,7 +219,7 @@ LoadTestResourceInner update(
* @return loadTest details.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(
+ LoadTestResourceInner update(
String resourceGroupName,
String loadTestName,
LoadTestResourcePatchRequestBody loadTestResourcePatchRequestBody,
@@ -162,11 +229,11 @@ Response updateWithResponse(
* Delete a LoadTest resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param loadTestName Load Test name.
+ * @param loadTestName Load Test resource 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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String loadTestName);
@@ -175,12 +242,12 @@ Response updateWithResponse(
* Delete a LoadTest resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param loadTestName Load Test name.
+ * @param loadTestName Load Test resource 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 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);
@@ -189,7 +256,7 @@ Response updateWithResponse(
* Delete a LoadTest resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param loadTestName Load Test name.
+ * @param loadTestName Load Test resource 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.
@@ -201,7 +268,7 @@ Response updateWithResponse(
* Delete a LoadTest resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param loadTestName Load Test name.
+ * @param loadTestName Load Test resource 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.
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/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/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..f79725657bea 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;
@@ -30,15 +31,12 @@
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;
@@ -157,7 +155,7 @@ public LoadTestsClient getLoadTests() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2021-12-01-preview";
+ this.apiVersion = "2022-04-15-preview";
this.operations = new OperationsClientImpl(this);
this.loadTests = new LoadTestsClientImpl(this);
}
@@ -178,10 +176,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry