selectors) {
}
/**
- * Get the startOnCreation property: A boolean value that indicates if experiment should be started on creation or
- * not.
+ * Get the customerDataStorage property: Optional customer-managed Storage account where Experiment schema will be
+ * stored.
*
- * @return the startOnCreation value.
+ * @return the customerDataStorage value.
*/
- public Boolean startOnCreation() {
- return this.startOnCreation;
+ public CustomerDataStorageProperties customerDataStorage() {
+ return this.customerDataStorage;
}
/**
- * Set the startOnCreation property: A boolean value that indicates if experiment should be started on creation or
- * not.
+ * Set the customerDataStorage property: Optional customer-managed Storage account where Experiment schema will be
+ * stored.
*
- * @param startOnCreation the startOnCreation value to set.
+ * @param customerDataStorage the customerDataStorage value to set.
* @return the ExperimentProperties object itself.
*/
- public ExperimentProperties withStartOnCreation(Boolean startOnCreation) {
- this.startOnCreation = startOnCreation;
+ public ExperimentProperties withCustomerDataStorage(CustomerDataStorageProperties customerDataStorage) {
+ this.customerDataStorage = customerDataStorage;
return this;
}
@@ -118,6 +119,9 @@ public void validate() {
} else {
selectors().forEach(e -> e.validate());
}
+ if (customerDataStorage() != null) {
+ customerDataStorage().validate();
+ }
}
private static final ClientLogger LOGGER = new ClientLogger(ExperimentProperties.class);
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentStartOperationResultInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentStartOperationResultInner.java
deleted file mode 100644
index 03dc806d31cd..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentStartOperationResultInner.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.fluent.models;
-
-import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** Model that represents the result of a start Experiment operation. */
-@Immutable
-public final class ExperimentStartOperationResultInner {
- /*
- * String of the Experiment name.
- */
- @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
- private String name;
-
- /*
- * URL to retrieve the Experiment status.
- */
- @JsonProperty(value = "statusUrl", access = JsonProperty.Access.WRITE_ONLY)
- private String statusUrl;
-
- /** Creates an instance of ExperimentStartOperationResultInner class. */
- public ExperimentStartOperationResultInner() {
- }
-
- /**
- * Get the name property: String of the Experiment name.
- *
- * @return the name value.
- */
- public String name() {
- return this.name;
- }
-
- /**
- * Get the statusUrl property: URL to retrieve the Experiment status.
- *
- * @return the statusUrl value.
- */
- public String statusUrl() {
- return this.statusUrl;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationStatusInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationStatusInner.java
new file mode 100644
index 000000000000..3468d9ffca75
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationStatusInner.java
@@ -0,0 +1,187 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.exception.ManagementError;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The status of operation. */
+@Fluent
+public final class OperationStatusInner {
+ /*
+ * The operation Id.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * The operation name.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * The start time of the operation.
+ */
+ @JsonProperty(value = "startTime")
+ private String startTime;
+
+ /*
+ * The end time of the operation.
+ */
+ @JsonProperty(value = "endTime")
+ private String endTime;
+
+ /*
+ * The status of the operation.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /*
+ * Error response
+ *
+ * The error detail of the operation if any.
+ */
+ @JsonProperty(value = "error")
+ private ManagementError error;
+
+ /** Creates an instance of OperationStatusInner class. */
+ public OperationStatusInner() {
+ }
+
+ /**
+ * Get the id property: The operation Id.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: The operation Id.
+ *
+ * @param id the id value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: The operation name.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: The operation name.
+ *
+ * @param name the name value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the startTime property: The start time of the operation.
+ *
+ * @return the startTime value.
+ */
+ public String startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Set the startTime property: The start time of the operation.
+ *
+ * @param startTime the startTime value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withStartTime(String startTime) {
+ this.startTime = startTime;
+ return this;
+ }
+
+ /**
+ * Get the endTime property: The end time of the operation.
+ *
+ * @return the endTime value.
+ */
+ public String endTime() {
+ return this.endTime;
+ }
+
+ /**
+ * Set the endTime property: The end time of the operation.
+ *
+ * @param endTime the endTime value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withEndTime(String endTime) {
+ this.endTime = endTime;
+ return this;
+ }
+
+ /**
+ * Get the status property: The status of the operation.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: The status of the operation.
+ *
+ * @param status the status value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the error property: Error response
+ *
+ * The error detail of the operation if any.
+ *
+ * @return the error value.
+ */
+ public ManagementError error() {
+ return this.error;
+ }
+
+ /**
+ * Set the error property: Error response
+ *
+ *
The error detail of the operation if any.
+ *
+ * @param error the error value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withError(ManagementError error) {
+ this.error = error;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java
index ed74ff20611a..866e2f6186ac 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java
@@ -137,7 +137,7 @@ public ChaosManagementClientImpl buildClient() {
localSerializerAdapter,
localDefaultPollInterval,
localEnvironment,
- subscriptionId,
+ this.subscriptionId,
localEndpoint);
return client;
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java
index c07707c92a9d..f41b1ae866dc 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java
@@ -26,6 +26,7 @@
import com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient;
import com.azure.resourcemanager.chaos.fluent.ChaosManagementClient;
import com.azure.resourcemanager.chaos.fluent.ExperimentsClient;
+import com.azure.resourcemanager.chaos.fluent.OperationStatusesClient;
import com.azure.resourcemanager.chaos.fluent.OperationsClient;
import com.azure.resourcemanager.chaos.fluent.TargetTypesClient;
import com.azure.resourcemanager.chaos.fluent.TargetsClient;
@@ -149,6 +150,18 @@ public ExperimentsClient getExperiments() {
return this.experiments;
}
+ /** The OperationStatusesClient object to access its operations. */
+ private final OperationStatusesClient operationStatuses;
+
+ /**
+ * Gets the OperationStatusesClient object to access its operations.
+ *
+ * @return the OperationStatusesClient object.
+ */
+ public OperationStatusesClient getOperationStatuses() {
+ return this.operationStatuses;
+ }
+
/** The OperationsClient object to access its operations. */
private final OperationsClient operations;
@@ -207,10 +220,11 @@ public TargetsClient getTargets() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2023-04-15-preview";
+ this.apiVersion = "2023-10-27-preview";
this.capabilities = new CapabilitiesClientImpl(this);
this.capabilityTypes = new CapabilityTypesClientImpl(this);
this.experiments = new ExperimentsClientImpl(this);
+ this.operationStatuses = new OperationStatusesClientImpl(this);
this.operations = new OperationsClientImpl(this);
this.targetTypes = new TargetTypesClientImpl(this);
this.targets = new TargetsClientImpl(this);
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentCancelOperationResultImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentCancelOperationResultImpl.java
deleted file mode 100644
index ab9f6c580516..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentCancelOperationResultImpl.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.implementation;
-
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentCancelOperationResultInner;
-import com.azure.resourcemanager.chaos.models.ExperimentCancelOperationResult;
-
-public final class ExperimentCancelOperationResultImpl implements ExperimentCancelOperationResult {
- private ExperimentCancelOperationResultInner innerObject;
-
- private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
-
- ExperimentCancelOperationResultImpl(
- ExperimentCancelOperationResultInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- }
-
- public String name() {
- return this.innerModel().name();
- }
-
- public String statusUrl() {
- return this.innerModel().statusUrl();
- }
-
- public ExperimentCancelOperationResultInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.chaos.ChaosManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java
index d48f0bfa66a5..4295c0647484 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java
@@ -4,15 +4,14 @@
package com.azure.resourcemanager.chaos.implementation;
-import com.azure.core.http.rest.Response;
import com.azure.core.management.Region;
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.chaos.fluent.models.ExperimentInner;
+import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties;
import com.azure.resourcemanager.chaos.models.Experiment;
-import com.azure.resourcemanager.chaos.models.ExperimentCancelOperationResult;
-import com.azure.resourcemanager.chaos.models.ExperimentStartOperationResult;
import com.azure.resourcemanager.chaos.models.ExperimentUpdate;
+import com.azure.resourcemanager.chaos.models.ProvisioningState;
import com.azure.resourcemanager.chaos.models.ResourceIdentity;
import com.azure.resourcemanager.chaos.models.Selector;
import com.azure.resourcemanager.chaos.models.Step;
@@ -58,6 +57,10 @@ public ResourceIdentity identity() {
return this.innerModel().identity();
}
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
public List steps() {
List inner = this.innerModel().steps();
if (inner != null) {
@@ -76,8 +79,8 @@ public List selectors() {
}
}
- public Boolean startOnCreation() {
- return this.innerModel().startOnCreation();
+ public CustomerDataStorageProperties customerDataStorage() {
+ return this.innerModel().customerDataStorage();
}
public Region region() {
@@ -116,8 +119,7 @@ public Experiment create() {
serviceManager
.serviceClient()
.getExperiments()
- .createOrUpdateWithResponse(resourceGroupName, experimentName, this.innerModel(), Context.NONE)
- .getValue();
+ .createOrUpdate(resourceGroupName, experimentName, this.innerModel(), Context.NONE);
return this;
}
@@ -126,8 +128,7 @@ public Experiment create(Context context) {
serviceManager
.serviceClient()
.getExperiments()
- .createOrUpdateWithResponse(resourceGroupName, experimentName, this.innerModel(), context)
- .getValue();
+ .createOrUpdate(resourceGroupName, experimentName, this.innerModel(), context);
return this;
}
@@ -147,8 +148,7 @@ public Experiment apply() {
serviceManager
.serviceClient()
.getExperiments()
- .updateWithResponse(resourceGroupName, experimentName, updateExperiment, Context.NONE)
- .getValue();
+ .update(resourceGroupName, experimentName, updateExperiment, Context.NONE);
return this;
}
@@ -157,8 +157,7 @@ public Experiment apply(Context context) {
serviceManager
.serviceClient()
.getExperiments()
- .updateWithResponse(resourceGroupName, experimentName, updateExperiment, context)
- .getValue();
+ .update(resourceGroupName, experimentName, updateExperiment, context);
return this;
}
@@ -189,20 +188,20 @@ public Experiment refresh(Context context) {
return this;
}
- public Response cancelWithResponse(Context context) {
- return serviceManager.experiments().cancelWithResponse(resourceGroupName, experimentName, context);
+ public void cancel() {
+ serviceManager.experiments().cancel(resourceGroupName, experimentName);
}
- public ExperimentCancelOperationResult cancel() {
- return serviceManager.experiments().cancel(resourceGroupName, experimentName);
+ public void cancel(Context context) {
+ serviceManager.experiments().cancel(resourceGroupName, experimentName, context);
}
- public Response startWithResponse(Context context) {
- return serviceManager.experiments().startWithResponse(resourceGroupName, experimentName, context);
+ public void start() {
+ serviceManager.experiments().start(resourceGroupName, experimentName);
}
- public ExperimentStartOperationResult start() {
- return serviceManager.experiments().start(resourceGroupName, experimentName);
+ public void start(Context context) {
+ serviceManager.experiments().start(resourceGroupName, experimentName, context);
}
public ExperimentImpl withRegion(Region location) {
@@ -240,8 +239,8 @@ public ExperimentImpl withIdentity(ResourceIdentity identity) {
}
}
- public ExperimentImpl withStartOnCreation(Boolean startOnCreation) {
- this.innerModel().withStartOnCreation(startOnCreation);
+ public ExperimentImpl withCustomerDataStorage(CustomerDataStorageProperties customerDataStorage) {
+ this.innerModel().withCustomerDataStorage(customerDataStorage);
return this;
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentStartOperationResultImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentStartOperationResultImpl.java
deleted file mode 100644
index 8fa3ca1fcc2c..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentStartOperationResultImpl.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.implementation;
-
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentStartOperationResultInner;
-import com.azure.resourcemanager.chaos.models.ExperimentStartOperationResult;
-
-public final class ExperimentStartOperationResultImpl implements ExperimentStartOperationResult {
- private ExperimentStartOperationResultInner innerObject;
-
- private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
-
- ExperimentStartOperationResultImpl(
- ExperimentStartOperationResultInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- }
-
- public String name() {
- return this.innerModel().name();
- }
-
- public String statusUrl() {
- return this.innerModel().statusUrl();
- }
-
- public ExperimentStartOperationResultInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.chaos.ChaosManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java
index dcf3d6a39bc9..8fd267f90d45 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java
@@ -28,18 +28,21 @@
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.RestProxy;
import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.chaos.fluent.ExperimentsClient;
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentCancelOperationResultInner;
import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsInner;
import com.azure.resourcemanager.chaos.fluent.models.ExperimentInner;
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentStartOperationResultInner;
import com.azure.resourcemanager.chaos.fluent.models.ExperimentStatusInner;
import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsListResult;
import com.azure.resourcemanager.chaos.models.ExperimentListResult;
import com.azure.resourcemanager.chaos.models.ExperimentStatusListResult;
import com.azure.resourcemanager.chaos.models.ExperimentUpdate;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in ExperimentsClient. */
@@ -98,9 +101,9 @@ Mono> listByResourceGroup(
@Headers({"Content-Type: application/json"})
@Delete(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}")
- @ExpectedResponses({200, 204})
+ @ExpectedResponses({202})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> delete(
+ Mono>> delete(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@@ -126,9 +129,9 @@ Mono> getByResourceGroup(
@Headers({"Content-Type: application/json"})
@Put(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}")
- @ExpectedResponses({200})
+ @ExpectedResponses({201})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> createOrUpdate(
+ Mono>> createOrUpdate(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@@ -141,9 +144,9 @@ Mono> createOrUpdate(
@Headers({"Content-Type: application/json"})
@Patch(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}")
- @ExpectedResponses({200})
+ @ExpectedResponses({202})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> update(
+ Mono>> update(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@@ -158,7 +161,7 @@ Mono> update(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/cancel")
@ExpectedResponses({202})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> cancel(
+ Mono>> cancel(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@@ -172,7 +175,7 @@ Mono> cancel(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/start")
@ExpectedResponses({202})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> start(
+ Mono>> start(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@@ -682,7 +685,7 @@ public PagedIterable listByResourceGroup(
* @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> deleteWithResponseAsync(String resourceGroupName, String experimentName) {
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String experimentName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -730,7 +733,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S
* @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> deleteWithResponseAsync(
+ private Mono>> deleteWithResponseAsync(
String resourceGroupName, String experimentName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -764,6 +767,78 @@ private Mono> deleteWithResponseAsync(
context);
}
+ /**
+ * Delete a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String experimentName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, experimentName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Delete a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, experimentName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String experimentName) {
+ return this.beginDeleteAsync(resourceGroupName, experimentName).getSyncPoller();
+ }
+
+ /**
+ * Delete a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String experimentName, Context context) {
+ return this.beginDeleteAsync(resourceGroupName, experimentName, context).getSyncPoller();
+ }
+
/**
* Delete a Experiment resource.
*
@@ -776,7 +851,9 @@ private Mono> deleteWithResponseAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String experimentName) {
- return deleteWithResponseAsync(resourceGroupName, experimentName).flatMap(ignored -> Mono.empty());
+ return beginDeleteAsync(resourceGroupName, experimentName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -788,11 +865,13 @@ private Mono deleteAsync(String resourceGroupName, String experimentName)
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response}.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteWithResponse(String resourceGroupName, String experimentName, Context context) {
- return deleteWithResponseAsync(resourceGroupName, experimentName, context).block();
+ private Mono deleteAsync(String resourceGroupName, String experimentName, Context context) {
+ return beginDeleteAsync(resourceGroupName, experimentName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -806,7 +885,22 @@ public Response deleteWithResponse(String resourceGroupName, String experi
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(String resourceGroupName, String experimentName) {
- deleteWithResponse(resourceGroupName, experimentName, Context.NONE);
+ deleteAsync(resourceGroupName, experimentName).block();
+ }
+
+ /**
+ * Delete a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String experimentName, Context context) {
+ deleteAsync(resourceGroupName, experimentName, context).block();
}
/**
@@ -964,7 +1058,7 @@ public ExperimentInner getByResourceGroup(String resourceGroupName, String exper
* {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createOrUpdateWithResponseAsync(
+ private Mono>> createOrUpdateWithResponseAsync(
String resourceGroupName, String experimentName, ExperimentInner experiment) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -1021,7 +1115,7 @@ private Mono> createOrUpdateWithResponseAsync(
* {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createOrUpdateWithResponseAsync(
+ private Mono>> createOrUpdateWithResponseAsync(
String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -1061,6 +1155,91 @@ private Mono> createOrUpdateWithResponseAsync(
context);
}
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ExperimentInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String experimentName, ExperimentInner experiment) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, experimentName, experiment);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ExperimentInner.class,
+ ExperimentInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ExperimentInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, experimentName, experiment, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ExperimentInner.class, ExperimentInner.class, context);
+ }
+
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ExperimentInner> beginCreateOrUpdate(
+ String resourceGroupName, String experimentName, ExperimentInner experiment) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, experimentName, experiment).getSyncPoller();
+ }
+
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ExperimentInner> beginCreateOrUpdate(
+ String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, experimentName, experiment, context).getSyncPoller();
+ }
+
/**
* Create or update a Experiment resource.
*
@@ -1075,8 +1254,9 @@ private Mono> createOrUpdateWithResponseAsync(
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
String resourceGroupName, String experimentName, ExperimentInner experiment) {
- return createOrUpdateWithResponseAsync(resourceGroupName, experimentName, experiment)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ return beginCreateOrUpdateAsync(resourceGroupName, experimentName, experiment)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1089,12 +1269,14 @@ private Mono createOrUpdateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents a Experiment resource along with {@link Response}.
+ * @return model that represents a Experiment resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response createOrUpdateWithResponse(
+ private Mono createOrUpdateAsync(
String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) {
- return createOrUpdateWithResponseAsync(resourceGroupName, experimentName, experiment, context).block();
+ return beginCreateOrUpdateAsync(resourceGroupName, experimentName, experiment, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1110,7 +1292,25 @@ public Response createOrUpdateWithResponse(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ExperimentInner createOrUpdate(String resourceGroupName, String experimentName, ExperimentInner experiment) {
- return createOrUpdateWithResponse(resourceGroupName, experimentName, experiment, Context.NONE).getValue();
+ return createOrUpdateAsync(resourceGroupName, experimentName, experiment).block();
+ }
+
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExperimentInner createOrUpdate(
+ String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) {
+ return createOrUpdateAsync(resourceGroupName, experimentName, experiment, context).block();
}
/**
@@ -1126,7 +1326,7 @@ public ExperimentInner createOrUpdate(String resourceGroupName, String experimen
* {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(
+ private Mono>> updateWithResponseAsync(
String resourceGroupName, String experimentName, ExperimentUpdate experiment) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -1183,7 +1383,7 @@ private Mono> updateWithResponseAsync(
* {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(
+ private Mono>> updateWithResponseAsync(
String resourceGroupName, String experimentName, ExperimentUpdate experiment, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -1223,6 +1423,90 @@ private Mono> updateWithResponseAsync(
context);
}
+ /**
+ * The operation to update an experiment.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Parameters supplied to the Update experiment operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ExperimentInner> beginUpdateAsync(
+ String resourceGroupName, String experimentName, ExperimentUpdate experiment) {
+ Mono>> mono = updateWithResponseAsync(resourceGroupName, experimentName, experiment);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ExperimentInner.class,
+ ExperimentInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * The operation to update an experiment.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Parameters supplied to the Update experiment operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ExperimentInner> beginUpdateAsync(
+ String resourceGroupName, String experimentName, ExperimentUpdate experiment, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, experimentName, experiment, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ExperimentInner.class, ExperimentInner.class, context);
+ }
+
+ /**
+ * The operation to update an experiment.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Parameters supplied to the Update experiment operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ExperimentInner> beginUpdate(
+ String resourceGroupName, String experimentName, ExperimentUpdate experiment) {
+ return this.beginUpdateAsync(resourceGroupName, experimentName, experiment).getSyncPoller();
+ }
+
+ /**
+ * The operation to update an experiment.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Parameters supplied to the Update experiment operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ExperimentInner> beginUpdate(
+ String resourceGroupName, String experimentName, ExperimentUpdate experiment, Context context) {
+ return this.beginUpdateAsync(resourceGroupName, experimentName, experiment, context).getSyncPoller();
+ }
+
/**
* The operation to update an experiment.
*
@@ -1237,8 +1521,9 @@ private Mono> updateWithResponseAsync(
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
String resourceGroupName, String experimentName, ExperimentUpdate experiment) {
- return updateWithResponseAsync(resourceGroupName, experimentName, experiment)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ return beginUpdateAsync(resourceGroupName, experimentName, experiment)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1251,12 +1536,14 @@ private Mono updateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents a Experiment resource along with {@link Response}.
+ * @return model that represents a Experiment resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response updateWithResponse(
+ private Mono updateAsync(
String resourceGroupName, String experimentName, ExperimentUpdate experiment, Context context) {
- return updateWithResponseAsync(resourceGroupName, experimentName, experiment, context).block();
+ return beginUpdateAsync(resourceGroupName, experimentName, experiment, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1272,7 +1559,25 @@ public Response updateWithResponse(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ExperimentInner update(String resourceGroupName, String experimentName, ExperimentUpdate experiment) {
- return updateWithResponse(resourceGroupName, experimentName, experiment, Context.NONE).getValue();
+ return updateAsync(resourceGroupName, experimentName, experiment).block();
+ }
+
+ /**
+ * The operation to update an experiment.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Parameters supplied to the Update experiment operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExperimentInner update(
+ String resourceGroupName, String experimentName, ExperimentUpdate experiment, Context context) {
+ return updateAsync(resourceGroupName, experimentName, experiment, context).block();
}
/**
@@ -1283,12 +1588,10 @@ public ExperimentInner update(String resourceGroupName, String experimentName, E
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the result of a cancel Experiment operation along with {@link Response} on
- * successful completion of {@link Mono}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> cancelWithResponseAsync(
- String resourceGroupName, String experimentName) {
+ private Mono>> cancelWithResponseAsync(String resourceGroupName, String experimentName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1333,11 +1636,10 @@ private Mono> cancelWithResponseA
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the result of a cancel Experiment operation along with {@link Response} on
- * successful completion of {@link Mono}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> cancelWithResponseAsync(
+ private Mono>> cancelWithResponseAsync(
String resourceGroupName, String experimentName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -1379,13 +1681,85 @@ private Mono> cancelWithResponseA
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the result of a cancel Experiment operation on successful completion of {@link
- * Mono}.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginCancelAsync(String resourceGroupName, String experimentName) {
+ Mono>> mono = cancelWithResponseAsync(resourceGroupName, experimentName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginCancelAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = cancelWithResponseAsync(resourceGroupName, experimentName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginCancel(String resourceGroupName, String experimentName) {
+ return this.beginCancelAsync(resourceGroupName, experimentName).getSyncPoller();
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginCancel(
+ String resourceGroupName, String experimentName, Context context) {
+ return this.beginCancelAsync(resourceGroupName, experimentName, context).getSyncPoller();
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono cancelAsync(String resourceGroupName, String experimentName) {
- return cancelWithResponseAsync(resourceGroupName, experimentName)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ private Mono cancelAsync(String resourceGroupName, String experimentName) {
+ return beginCancelAsync(resourceGroupName, experimentName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1397,12 +1771,27 @@ private Mono cancelAsync(String resourceGr
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the result of a cancel Experiment operation along with {@link Response}.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response cancelWithResponse(
- String resourceGroupName, String experimentName, Context context) {
- return cancelWithResponseAsync(resourceGroupName, experimentName, context).block();
+ private Mono cancelAsync(String resourceGroupName, String experimentName, Context context) {
+ return beginCancelAsync(resourceGroupName, experimentName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void cancel(String resourceGroupName, String experimentName) {
+ cancelAsync(resourceGroupName, experimentName).block();
}
/**
@@ -1410,14 +1799,14 @@ public Response cancelWithResponse(
*
* @param resourceGroupName String that represents an Azure resource group.
* @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the result of a cancel Experiment operation.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ExperimentCancelOperationResultInner cancel(String resourceGroupName, String experimentName) {
- return cancelWithResponse(resourceGroupName, experimentName, Context.NONE).getValue();
+ public void cancel(String resourceGroupName, String experimentName, Context context) {
+ cancelAsync(resourceGroupName, experimentName, context).block();
}
/**
@@ -1428,12 +1817,10 @@ public ExperimentCancelOperationResultInner cancel(String resourceGroupName, Str
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the result of a start Experiment operation along with {@link Response} on
- * successful completion of {@link Mono}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> startWithResponseAsync(
- String resourceGroupName, String experimentName) {
+ private Mono>> startWithResponseAsync(String resourceGroupName, String experimentName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1478,11 +1865,10 @@ private Mono> startWithResponseAsy
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the result of a start Experiment operation along with {@link Response} on
- * successful completion of {@link Mono}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> startWithResponseAsync(
+ private Mono>> startWithResponseAsync(
String resourceGroupName, String experimentName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -1524,13 +1910,83 @@ private Mono> startWithResponseAsy
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the result of a start Experiment operation on successful completion of {@link
- * Mono}.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginStartAsync(String resourceGroupName, String experimentName) {
+ Mono>> mono = startWithResponseAsync(resourceGroupName, experimentName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginStartAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = startWithResponseAsync(resourceGroupName, experimentName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginStart(String resourceGroupName, String experimentName) {
+ return this.beginStartAsync(resourceGroupName, experimentName).getSyncPoller();
+ }
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginStart(
+ String resourceGroupName, String experimentName, Context context) {
+ return this.beginStartAsync(resourceGroupName, experimentName, context).getSyncPoller();
+ }
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono startAsync(String resourceGroupName, String experimentName) {
- return startWithResponseAsync(resourceGroupName, experimentName)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ private Mono startAsync(String resourceGroupName, String experimentName) {
+ return beginStartAsync(resourceGroupName, experimentName).last().flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1542,12 +1998,27 @@ private Mono startAsync(String resourceGrou
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the result of a start Experiment operation along with {@link Response}.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response startWithResponse(
- String resourceGroupName, String experimentName, Context context) {
- return startWithResponseAsync(resourceGroupName, experimentName, context).block();
+ private Mono startAsync(String resourceGroupName, String experimentName, Context context) {
+ return beginStartAsync(resourceGroupName, experimentName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void start(String resourceGroupName, String experimentName) {
+ startAsync(resourceGroupName, experimentName).block();
}
/**
@@ -1555,14 +2026,14 @@ public Response startWithResponse(
*
* @param resourceGroupName String that represents an Azure resource group.
* @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the result of a start Experiment operation.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ExperimentStartOperationResultInner start(String resourceGroupName, String experimentName) {
- return startWithResponse(resourceGroupName, experimentName, Context.NONE).getValue();
+ public void start(String resourceGroupName, String experimentName, Context context) {
+ startAsync(resourceGroupName, experimentName, context).block();
}
/**
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java
index 66d80202a470..b81ad91e4bbe 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java
@@ -10,15 +10,11 @@
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.chaos.fluent.ExperimentsClient;
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentCancelOperationResultInner;
import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsInner;
import com.azure.resourcemanager.chaos.fluent.models.ExperimentInner;
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentStartOperationResultInner;
import com.azure.resourcemanager.chaos.fluent.models.ExperimentStatusInner;
import com.azure.resourcemanager.chaos.models.Experiment;
-import com.azure.resourcemanager.chaos.models.ExperimentCancelOperationResult;
import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetails;
-import com.azure.resourcemanager.chaos.models.ExperimentStartOperationResult;
import com.azure.resourcemanager.chaos.models.ExperimentStatus;
import com.azure.resourcemanager.chaos.models.Experiments;
@@ -56,15 +52,14 @@ public PagedIterable listByResourceGroup(
return Utils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager()));
}
- public Response deleteByResourceGroupWithResponse(
- String resourceGroupName, String experimentName, Context context) {
- return this.serviceClient().deleteWithResponse(resourceGroupName, experimentName, context);
- }
-
public void deleteByResourceGroup(String resourceGroupName, String experimentName) {
this.serviceClient().delete(resourceGroupName, experimentName);
}
+ public void delete(String resourceGroupName, String experimentName, Context context) {
+ this.serviceClient().delete(resourceGroupName, experimentName, context);
+ }
+
public Response getByResourceGroupWithResponse(
String resourceGroupName, String experimentName, Context context) {
Response inner =
@@ -89,52 +84,20 @@ public Experiment getByResourceGroup(String resourceGroupName, String experiment
}
}
- public Response cancelWithResponse(
- String resourceGroupName, String experimentName, Context context) {
- Response inner =
- this.serviceClient().cancelWithResponse(resourceGroupName, experimentName, context);
- if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
- new ExperimentCancelOperationResultImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
+ public void cancel(String resourceGroupName, String experimentName) {
+ this.serviceClient().cancel(resourceGroupName, experimentName);
}
- public ExperimentCancelOperationResult cancel(String resourceGroupName, String experimentName) {
- ExperimentCancelOperationResultInner inner = this.serviceClient().cancel(resourceGroupName, experimentName);
- if (inner != null) {
- return new ExperimentCancelOperationResultImpl(inner, this.manager());
- } else {
- return null;
- }
+ public void cancel(String resourceGroupName, String experimentName, Context context) {
+ this.serviceClient().cancel(resourceGroupName, experimentName, context);
}
- public Response startWithResponse(
- String resourceGroupName, String experimentName, Context context) {
- Response inner =
- this.serviceClient().startWithResponse(resourceGroupName, experimentName, context);
- if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
- new ExperimentStartOperationResultImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
+ public void start(String resourceGroupName, String experimentName) {
+ this.serviceClient().start(resourceGroupName, experimentName);
}
- public ExperimentStartOperationResult start(String resourceGroupName, String experimentName) {
- ExperimentStartOperationResultInner inner = this.serviceClient().start(resourceGroupName, experimentName);
- if (inner != null) {
- return new ExperimentStartOperationResultImpl(inner, this.manager());
- } else {
- return null;
- }
+ public void start(String resourceGroupName, String experimentName, Context context) {
+ this.serviceClient().start(resourceGroupName, experimentName, context);
}
public PagedIterable listAllStatuses(String resourceGroupName, String experimentName) {
@@ -270,10 +233,10 @@ public void deleteById(String id) {
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'experiments'.", id)));
}
- this.deleteByResourceGroupWithResponse(resourceGroupName, experimentName, Context.NONE);
+ this.delete(resourceGroupName, experimentName, Context.NONE);
}
- public Response deleteByIdWithResponse(String id, Context context) {
+ public void deleteByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER
@@ -289,7 +252,7 @@ public Response deleteByIdWithResponse(String id, Context context) {
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'experiments'.", id)));
}
- return this.deleteByResourceGroupWithResponse(resourceGroupName, experimentName, context);
+ this.delete(resourceGroupName, experimentName, context);
}
private ExperimentsClient serviceClient() {
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusImpl.java
new file mode 100644
index 000000000000..09adcaaa1102
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusImpl.java
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.implementation;
+
+import com.azure.core.management.exception.ManagementError;
+import com.azure.resourcemanager.chaos.fluent.models.OperationStatusInner;
+import com.azure.resourcemanager.chaos.models.OperationStatus;
+
+public final class OperationStatusImpl implements OperationStatus {
+ private OperationStatusInner innerObject;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ OperationStatusImpl(OperationStatusInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String startTime() {
+ return this.innerModel().startTime();
+ }
+
+ public String endTime() {
+ return this.innerModel().endTime();
+ }
+
+ public String status() {
+ return this.innerModel().status();
+ }
+
+ public ManagementError error() {
+ return this.innerModel().error();
+ }
+
+ public OperationStatusInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.chaos.ChaosManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesClientImpl.java
new file mode 100644
index 000000000000..9fd0d252fbaa
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesClientImpl.java
@@ -0,0 +1,209 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.chaos.fluent.OperationStatusesClient;
+import com.azure.resourcemanager.chaos.fluent.models.OperationStatusInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in OperationStatusesClient. */
+public final class OperationStatusesClientImpl implements OperationStatusesClient {
+ /** The proxy service used to perform REST calls. */
+ private final OperationStatusesService service;
+
+ /** The service client containing this operation class. */
+ private final ChaosManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OperationStatusesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationStatusesClientImpl(ChaosManagementClientImpl client) {
+ this.service =
+ RestProxy.create(OperationStatusesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ChaosManagementClientOperationStatuses to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ChaosManagementClien")
+ public interface OperationStatusesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/operationsStatuses/{asyncOperationId}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("location") String location,
+ @PathParam("asyncOperationId") String asyncOperationId,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get the status of a long running azure asynchronous operation.
+ *
+ * @param location The region name of operation.
+ * @param asyncOperationId The operation Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of a long running azure asynchronous operation along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String location, String asyncOperationId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (asyncOperationId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter asyncOperationId is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ location,
+ asyncOperationId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the status of a long running azure asynchronous operation.
+ *
+ * @param location The region name of operation.
+ * @param asyncOperationId The operation Id.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of a long running azure asynchronous operation along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String location, String asyncOperationId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (asyncOperationId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter asyncOperationId is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ location,
+ asyncOperationId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Get the status of a long running azure asynchronous operation.
+ *
+ * @param location The region name of operation.
+ * @param asyncOperationId The operation Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of a long running azure asynchronous operation on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String location, String asyncOperationId) {
+ return getWithResponseAsync(location, asyncOperationId).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get the status of a long running azure asynchronous operation.
+ *
+ * @param location The region name of operation.
+ * @param asyncOperationId The operation Id.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of a long running azure asynchronous operation along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String location, String asyncOperationId, Context context) {
+ return getWithResponseAsync(location, asyncOperationId, context).block();
+ }
+
+ /**
+ * Get the status of a long running azure asynchronous operation.
+ *
+ * @param location The region name of operation.
+ * @param asyncOperationId The operation Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of a long running azure asynchronous operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner get(String location, String asyncOperationId) {
+ return getWithResponse(location, asyncOperationId, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesImpl.java
new file mode 100644
index 000000000000..8ae63088b7b0
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesImpl.java
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.chaos.fluent.OperationStatusesClient;
+import com.azure.resourcemanager.chaos.fluent.models.OperationStatusInner;
+import com.azure.resourcemanager.chaos.models.OperationStatus;
+import com.azure.resourcemanager.chaos.models.OperationStatuses;
+
+public final class OperationStatusesImpl implements OperationStatuses {
+ private static final ClientLogger LOGGER = new ClientLogger(OperationStatusesImpl.class);
+
+ private final OperationStatusesClient innerClient;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ public OperationStatusesImpl(
+ OperationStatusesClient innerClient, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String location, String asyncOperationId, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(location, asyncOperationId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new OperationStatusImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus get(String location, String asyncOperationId) {
+ OperationStatusInner inner = this.serviceClient().get(location, asyncOperationId);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private OperationStatusesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.chaos.ChaosManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CustomerDataStorageProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CustomerDataStorageProperties.java
new file mode 100644
index 000000000000..24b2ee7620ab
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CustomerDataStorageProperties.java
@@ -0,0 +1,78 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Model that represents the Customer Managed Storage for an Experiment. */
+@Fluent
+public final class CustomerDataStorageProperties {
+ /*
+ * ARM Resource ID of the Storage account to use for Customer Data storage.
+ */
+ @JsonProperty(value = "storageAccountResourceId")
+ private String storageAccountResourceId;
+
+ /*
+ * Name of the Azure Blob Storage container to use or create.
+ */
+ @JsonProperty(value = "blobContainerName")
+ private String blobContainerName;
+
+ /** Creates an instance of CustomerDataStorageProperties class. */
+ public CustomerDataStorageProperties() {
+ }
+
+ /**
+ * Get the storageAccountResourceId property: ARM Resource ID of the Storage account to use for Customer Data
+ * storage.
+ *
+ * @return the storageAccountResourceId value.
+ */
+ public String storageAccountResourceId() {
+ return this.storageAccountResourceId;
+ }
+
+ /**
+ * Set the storageAccountResourceId property: ARM Resource ID of the Storage account to use for Customer Data
+ * storage.
+ *
+ * @param storageAccountResourceId the storageAccountResourceId value to set.
+ * @return the CustomerDataStorageProperties object itself.
+ */
+ public CustomerDataStorageProperties withStorageAccountResourceId(String storageAccountResourceId) {
+ this.storageAccountResourceId = storageAccountResourceId;
+ return this;
+ }
+
+ /**
+ * Get the blobContainerName property: Name of the Azure Blob Storage container to use or create.
+ *
+ * @return the blobContainerName value.
+ */
+ public String blobContainerName() {
+ return this.blobContainerName;
+ }
+
+ /**
+ * Set the blobContainerName property: Name of the Azure Blob Storage container to use or create.
+ *
+ * @param blobContainerName the blobContainerName value to set.
+ * @return the CustomerDataStorageProperties object itself.
+ */
+ public CustomerDataStorageProperties withBlobContainerName(String blobContainerName) {
+ this.blobContainerName = blobContainerName;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Experiment.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Experiment.java
index 6802361fc65b..000936dd4c9f 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Experiment.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Experiment.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.chaos.models;
-import com.azure.core.http.rest.Response;
import com.azure.core.management.Region;
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
@@ -63,6 +62,13 @@ public interface Experiment {
*/
ResourceIdentity identity();
+ /**
+ * Gets the provisioningState property: Most recent provisioning state for the given experiment resource.
+ *
+ * @return the provisioningState value.
+ */
+ ProvisioningState provisioningState();
+
/**
* Gets the steps property: List of steps.
*
@@ -78,12 +84,12 @@ public interface Experiment {
List selectors();
/**
- * Gets the startOnCreation property: A boolean value that indicates if experiment should be started on creation or
- * not.
+ * Gets the customerDataStorage property: Optional customer-managed Storage account where Experiment schema will be
+ * stored.
*
- * @return the startOnCreation value.
+ * @return the customerDataStorage value.
*/
- Boolean startOnCreation();
+ CustomerDataStorageProperties customerDataStorage();
/**
* Gets the region of the resource.
@@ -186,7 +192,7 @@ interface WithSelectors {
* be created, but also allows for any other optional properties to be specified.
*/
interface WithCreate
- extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithStartOnCreation {
+ extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithCustomerDataStorage {
/**
* Executes the create request.
*
@@ -225,16 +231,17 @@ interface WithIdentity {
WithCreate withIdentity(ResourceIdentity identity);
}
- /** The stage of the Experiment definition allowing to specify startOnCreation. */
- interface WithStartOnCreation {
+ /** The stage of the Experiment definition allowing to specify customerDataStorage. */
+ interface WithCustomerDataStorage {
/**
- * Specifies the startOnCreation property: A boolean value that indicates if experiment should be started on
- * creation or not..
+ * Specifies the customerDataStorage property: Optional customer-managed Storage account where Experiment
+ * schema will be stored..
*
- * @param startOnCreation A boolean value that indicates if experiment should be started on creation or not.
+ * @param customerDataStorage Optional customer-managed Storage account where Experiment schema will be
+ * stored.
* @return the next definition stage.
*/
- WithCreate withStartOnCreation(Boolean startOnCreation);
+ WithCreate withCustomerDataStorage(CustomerDataStorageProperties customerDataStorage);
}
}
@@ -295,40 +302,36 @@ interface WithIdentity {
/**
* Cancel a running Experiment resource.
*
- * @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 model that represents the result of a cancel Experiment operation along with {@link Response}.
*/
- Response cancelWithResponse(Context context);
+ void cancel();
/**
* Cancel a running Experiment resource.
*
+ * @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 model that represents the result of a cancel Experiment operation.
*/
- ExperimentCancelOperationResult cancel();
+ void cancel(Context context);
/**
* Start a Experiment resource.
*
- * @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 model that represents the result of a start Experiment operation along with {@link Response}.
*/
- Response startWithResponse(Context context);
+ void start();
/**
* Start a Experiment resource.
*
+ * @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 model that represents the result of a start Experiment operation.
*/
- ExperimentStartOperationResult start();
+ void start(Context context);
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentCancelOperationResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentCancelOperationResult.java
deleted file mode 100644
index 863656108f97..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentCancelOperationResult.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.models;
-
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentCancelOperationResultInner;
-
-/** An immutable client-side representation of ExperimentCancelOperationResult. */
-public interface ExperimentCancelOperationResult {
- /**
- * Gets the name property: String of the Experiment name.
- *
- * @return the name value.
- */
- String name();
-
- /**
- * Gets the statusUrl property: URL to retrieve the Experiment status.
- *
- * @return the statusUrl value.
- */
- String statusUrl();
-
- /**
- * Gets the inner com.azure.resourcemanager.chaos.fluent.models.ExperimentCancelOperationResultInner object.
- *
- * @return the inner object.
- */
- ExperimentCancelOperationResultInner innerModel();
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentStartOperationResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentStartOperationResult.java
deleted file mode 100644
index 0db3964c30d3..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentStartOperationResult.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.models;
-
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentStartOperationResultInner;
-
-/** An immutable client-side representation of ExperimentStartOperationResult. */
-public interface ExperimentStartOperationResult {
- /**
- * Gets the name property: String of the Experiment name.
- *
- * @return the name value.
- */
- String name();
-
- /**
- * Gets the statusUrl property: URL to retrieve the Experiment status.
- *
- * @return the statusUrl value.
- */
- String statusUrl();
-
- /**
- * Gets the inner com.azure.resourcemanager.chaos.fluent.models.ExperimentStartOperationResultInner object.
- *
- * @return the inner object.
- */
- ExperimentStartOperationResultInner innerModel();
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Experiments.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Experiments.java
index e5449ba5a57d..f619dca00454 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Experiments.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Experiments.java
@@ -65,24 +65,23 @@ PagedIterable listByResourceGroup(
*
* @param resourceGroupName String that represents an Azure resource group.
* @param experimentName String that represents a Experiment 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 {@link Response}.
*/
- Response deleteByResourceGroupWithResponse(String resourceGroupName, String experimentName, Context context);
+ void deleteByResourceGroup(String resourceGroupName, String experimentName);
/**
* Delete a Experiment resource.
*
* @param resourceGroupName String that represents an Azure resource group.
* @param experimentName String that represents a Experiment 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.
*/
- void deleteByResourceGroup(String resourceGroupName, String experimentName);
+ void delete(String resourceGroupName, String experimentName, Context context);
/**
* Get a Experiment resource.
@@ -115,52 +114,46 @@ Response getByResourceGroupWithResponse(
*
* @param resourceGroupName String that represents an Azure resource group.
* @param experimentName String that represents a Experiment 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 model that represents the result of a cancel Experiment operation along with {@link Response}.
*/
- Response cancelWithResponse(
- String resourceGroupName, String experimentName, Context context);
+ void cancel(String resourceGroupName, String experimentName);
/**
* Cancel a running Experiment resource.
*
* @param resourceGroupName String that represents an Azure resource group.
* @param experimentName String that represents a Experiment 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 model that represents the result of a cancel Experiment operation.
*/
- ExperimentCancelOperationResult cancel(String resourceGroupName, String experimentName);
+ void cancel(String resourceGroupName, String experimentName, Context context);
/**
* Start a Experiment resource.
*
* @param resourceGroupName String that represents an Azure resource group.
* @param experimentName String that represents a Experiment 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 model that represents the result of a start Experiment operation along with {@link Response}.
*/
- Response startWithResponse(
- String resourceGroupName, String experimentName, Context context);
+ void start(String resourceGroupName, String experimentName);
/**
* Start a Experiment resource.
*
* @param resourceGroupName String that represents an Azure resource group.
* @param experimentName String that represents a Experiment 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 model that represents the result of a start Experiment operation.
*/
- ExperimentStartOperationResult start(String resourceGroupName, String experimentName);
+ void start(String resourceGroupName, String experimentName, Context context);
/**
* Get a list of statuses of a Experiment resource.
@@ -311,9 +304,8 @@ ExperimentExecutionDetails getExecutionDetails(
* @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 Response}.
*/
- Response deleteByIdWithResponse(String id, Context context);
+ void deleteByIdWithResponse(String id, Context context);
/**
* Begins definition for a new Experiment resource.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationStatus.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationStatus.java
new file mode 100644
index 000000000000..cac9c6a2375d
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationStatus.java
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.models;
+
+import com.azure.core.management.exception.ManagementError;
+import com.azure.resourcemanager.chaos.fluent.models.OperationStatusInner;
+
+/** An immutable client-side representation of OperationStatus. */
+public interface OperationStatus {
+ /**
+ * Gets the id property: The operation Id.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the name property: The operation name.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the startTime property: The start time of the operation.
+ *
+ * @return the startTime value.
+ */
+ String startTime();
+
+ /**
+ * Gets the endTime property: The end time of the operation.
+ *
+ * @return the endTime value.
+ */
+ String endTime();
+
+ /**
+ * Gets the status property: The status of the operation.
+ *
+ * @return the status value.
+ */
+ String status();
+
+ /**
+ * Gets the error property: Error response
+ *
+ * The error detail of the operation if any.
+ *
+ * @return the error value.
+ */
+ ManagementError error();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.chaos.fluent.models.OperationStatusInner object.
+ *
+ * @return the inner object.
+ */
+ OperationStatusInner innerModel();
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationStatuses.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationStatuses.java
new file mode 100644
index 000000000000..3858ebd24b3c
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationStatuses.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.models;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/** Resource collection API of OperationStatuses. */
+public interface OperationStatuses {
+ /**
+ * Get the status of a long running azure asynchronous operation.
+ *
+ * @param location The region name of operation.
+ * @param asyncOperationId The operation Id.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of a long running azure asynchronous operation along with {@link Response}.
+ */
+ Response getWithResponse(String location, String asyncOperationId, Context context);
+
+ /**
+ * Get the status of a long running azure asynchronous operation.
+ *
+ * @param location The region name of operation.
+ * @param asyncOperationId The operation Id.
+ * @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 status of a long running azure asynchronous operation.
+ */
+ OperationStatus get(String location, String asyncOperationId);
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ProvisioningState.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ProvisioningState.java
new file mode 100644
index 000000000000..845d724d149a
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ProvisioningState.java
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Current provisioning state for a given Azure Chaos resource. */
+public final class ProvisioningState extends ExpandableStringEnum {
+ /** Static value Succeeded for ProvisioningState. */
+ public static final ProvisioningState SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Failed for ProvisioningState. */
+ public static final ProvisioningState FAILED = fromString("Failed");
+
+ /** Static value Canceled for ProvisioningState. */
+ public static final ProvisioningState CANCELED = fromString("Canceled");
+
+ /** Static value Creating for ProvisioningState. */
+ public static final ProvisioningState CREATING = fromString("Creating");
+
+ /** Static value Updating for ProvisioningState. */
+ public static final ProvisioningState UPDATING = fromString("Updating");
+
+ /** Static value Deleting for ProvisioningState. */
+ public static final ProvisioningState DELETING = fromString("Deleting");
+
+ /**
+ * Creates a new instance of ProvisioningState value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ProvisioningState() {
+ }
+
+ /**
+ * Creates or finds a ProvisioningState from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ProvisioningState.
+ */
+ @JsonCreator
+ public static ProvisioningState fromString(String name) {
+ return fromString(name, ProvisioningState.class);
+ }
+
+ /**
+ * Gets known ProvisioningState values.
+ *
+ * @return known ProvisioningState values.
+ */
+ public static Collection values() {
+ return values(ProvisioningState.class);
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesCreateOrUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesCreateOrUpdateSamples.java
index f3a68b003d0d..ab6c2df5f549 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesCreateOrUpdateSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesCreateOrUpdateSamples.java
@@ -9,7 +9,7 @@
/** Samples for Capabilities CreateOrUpdate. */
public final class CapabilitiesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/CreateOrUpdateACapability.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/CreateUpdateCapability.json
*/
/**
* Sample code: Create/update a Capability that extends a virtual machine Target resource.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesDeleteSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesDeleteSamples.java
index 75587cbcdcb0..c01620a615e2 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesDeleteSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for Capabilities Delete. */
public final class CapabilitiesDeleteSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/DeleteACapability.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/DeleteCapability.json
*/
/**
* Sample code: Delete a Capability that extends a virtual machine Target resource.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesGetSamples.java
index 42f149af0d17..2f95f5a68f28 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesGetSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for Capabilities Get. */
public final class CapabilitiesGetSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/GetACapability.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/GetCapability.json
*/
/**
* Sample code: Get a Capability that extends a virtual machine Target resource.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesListSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesListSamples.java
index 87bc7d69df5d..aabe1bc8bde1 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesListSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesListSamples.java
@@ -7,7 +7,7 @@
/** Samples for Capabilities List. */
public final class CapabilitiesListSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/ListCapabilities.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/ListCapabilities.json
*/
/**
* Sample code: List all Capabilities that extend a virtual machine Target resource.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesGetSamples.java
index bdc3f6a3b1dd..c50c9799ad32 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesGetSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for CapabilityTypes Get. */
public final class CapabilityTypesGetSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/GetACapabilityType.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/GetCapabilityType.json
*/
/**
* Sample code: Get a Capability Type for a virtual machine Target resource on westus2 location.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesListSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesListSamples.java
index 8683c4461229..5db53d40d933 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesListSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesListSamples.java
@@ -7,7 +7,7 @@
/** Samples for CapabilityTypes List. */
public final class CapabilityTypesListSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/ListCapabilityTypes.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/ListCapabilityTypes.json
*/
/**
* Sample code: List all Capability Types for a virtual machine Target resource on westus2 location.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsCancelSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsCancelSamples.java
index 657bc092a19c..9c8ab63376bf 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsCancelSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsCancelSamples.java
@@ -7,7 +7,7 @@
/** Samples for Experiments Cancel. */
public final class ExperimentsCancelSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/CancelAExperiment.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/CancelExperiment.json
*/
/**
* Sample code: Cancel a running Experiment.
@@ -15,6 +15,6 @@ public final class ExperimentsCancelSamples {
* @param manager Entry point to ChaosManager.
*/
public static void cancelARunningExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.experiments().cancelWithResponse("exampleRG", "exampleExperiment", com.azure.core.util.Context.NONE);
+ manager.experiments().cancel("exampleRG", "exampleExperiment", com.azure.core.util.Context.NONE);
}
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsCreateOrUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsCreateOrUpdateSamples.java
index cf11afb85804..f4e1836cee61 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsCreateOrUpdateSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsCreateOrUpdateSamples.java
@@ -6,6 +6,7 @@
import com.azure.resourcemanager.chaos.models.Branch;
import com.azure.resourcemanager.chaos.models.ContinuousAction;
+import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties;
import com.azure.resourcemanager.chaos.models.KeyValuePair;
import com.azure.resourcemanager.chaos.models.ListSelector;
import com.azure.resourcemanager.chaos.models.ResourceIdentity;
@@ -19,7 +20,7 @@
/** Samples for Experiments CreateOrUpdate. */
public final class ExperimentsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/CreateOrUpdateAExperiment.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/CreateUpdateExperiment.json
*/
/**
* Sample code: Create/update a Experiment in a resource group.
@@ -68,6 +69,11 @@ public static void createUpdateAExperimentInAResourceGroup(com.azure.resourceman
.withId(
"/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine")))))
.withIdentity(new ResourceIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
+ .withCustomerDataStorage(
+ new CustomerDataStorageProperties()
+ .withStorageAccountResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.Storage/storageAccounts/exampleStorage")
+ .withBlobContainerName("azurechaosstudioexperiments"))
.create();
}
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsDeleteSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsDeleteSamples.java
index 4779dffa4115..fefa32adb087 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsDeleteSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for Experiments Delete. */
public final class ExperimentsDeleteSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/DeleteAExperiment.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/DeleteExperiment.json
*/
/**
* Sample code: Delete a Experiment in a resource group.
@@ -15,8 +15,6 @@ public final class ExperimentsDeleteSamples {
* @param manager Entry point to ChaosManager.
*/
public static void deleteAExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager
- .experiments()
- .deleteByResourceGroupWithResponse("exampleRG", "exampleExperiment", com.azure.core.util.Context.NONE);
+ manager.experiments().delete("exampleRG", "exampleExperiment", com.azure.core.util.Context.NONE);
}
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetByResourceGroupSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetByResourceGroupSamples.java
index 4f90f3fe33e0..0424dd3c34f5 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetByResourceGroupSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for Experiments GetByResourceGroup. */
public final class ExperimentsGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/GetAExperiment.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/GetExperiment.json
*/
/**
* Sample code: Get a Experiment in a resource group.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetExecutionDetailsSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetExecutionDetailsSamples.java
index 2918e65b9f66..f26636edbbd7 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetExecutionDetailsSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetExecutionDetailsSamples.java
@@ -7,7 +7,7 @@
/** Samples for Experiments GetExecutionDetails. */
public final class ExperimentsGetExecutionDetailsSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/GetAExperimentExecutionDetails.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/GetExperimentExecutionDetails.json
*/
/**
* Sample code: Get experiment execution details.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetStatusSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetStatusSamples.java
index 5750f91f6658..b20509e1732f 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetStatusSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetStatusSamples.java
@@ -7,7 +7,7 @@
/** Samples for Experiments GetStatus. */
public final class ExperimentsGetStatusSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/GetAExperimentStatus.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/GetExperimentStatus.json
*/
/**
* Sample code: Get the status of a Experiment.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListAllStatusesSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListAllStatusesSamples.java
index 84bef54c007c..a1af35ef52b9 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListAllStatusesSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListAllStatusesSamples.java
@@ -7,7 +7,7 @@
/** Samples for Experiments ListAllStatuses. */
public final class ExperimentsListAllStatusesSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/ListExperimentStatuses.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/ListExperimentStatuses.json
*/
/**
* Sample code: List all statuses of a Experiment.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListByResourceGroupSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListByResourceGroupSamples.java
index 87ea28d68f7a..02dbc15b535c 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListByResourceGroupSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for Experiments ListByResourceGroup. */
public final class ExperimentsListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/ListExperimentsInAResourceGroup.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/ListExperimentsInAResourceGroup.json
*/
/**
* Sample code: List all Experiments in a resource group.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListExecutionDetailsSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListExecutionDetailsSamples.java
index 854508c20af0..f9504aa83b7a 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListExecutionDetailsSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListExecutionDetailsSamples.java
@@ -7,7 +7,7 @@
/** Samples for Experiments ListExecutionDetails. */
public final class ExperimentsListExecutionDetailsSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/ListExperimentExecutionsDetails.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/ListExperimentExecutionsDetails.json
*/
/**
* Sample code: List experiment executions details.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListSamples.java
index 7f374c5e47c1..b14490489086 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for Experiments List. */
public final class ExperimentsListSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/ListExperimentsInASubscription.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/ListExperimentsInASubscription.json
*/
/**
* Sample code: List all Experiments in a subscription.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsStartSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsStartSamples.java
index 15a6f369df75..49c1235916c4 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsStartSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsStartSamples.java
@@ -7,7 +7,7 @@
/** Samples for Experiments Start. */
public final class ExperimentsStartSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/StartAExperiment.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/StartExperiment.json
*/
/**
* Sample code: Start a Experiment.
@@ -15,6 +15,6 @@ public final class ExperimentsStartSamples {
* @param manager Entry point to ChaosManager.
*/
public static void startAExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.experiments().startWithResponse("exampleRG", "exampleExperiment", com.azure.core.util.Context.NONE);
+ manager.experiments().start("exampleRG", "exampleExperiment", com.azure.core.util.Context.NONE);
}
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsUpdateSamples.java
index b3162a23ef9c..42fcb11b62e6 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsUpdateSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsUpdateSamples.java
@@ -14,14 +14,14 @@
/** Samples for Experiments Update. */
public final class ExperimentsUpdateSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/PatchExperiment.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/UpdateExperiment.json
*/
/**
- * Sample code: Patch an Experiment in a resource group.
+ * Sample code: Update an Experiment in a resource group.
*
* @param manager Entry point to ChaosManager.
*/
- public static void patchAnExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ public static void updateAnExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) {
Experiment resource =
manager
.experiments()
@@ -39,6 +39,7 @@ public static void patchAnExperimentInAResourceGroup(com.azure.resourcemanager.c
.apply();
}
+ // Use "Map.of" if available
@SuppressWarnings("unchecked")
private static Map mapOf(Object... inputs) {
Map map = new HashMap<>();
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/OperationStatusesGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/OperationStatusesGetSamples.java
new file mode 100644
index 000000000000..60eca85c93c1
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/OperationStatusesGetSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.generated;
+
+/** Samples for OperationStatuses Get. */
+public final class OperationStatusesGetSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/GetOperationStatus.json
+ */
+ /**
+ * Sample code: Get specific operation status.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void getSpecificOperationStatus(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager
+ .operationStatuses()
+ .getWithResponse("West US", "713192d7-503f-477a-9cfe-4efc3ee2bd11", com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetTypesGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetTypesGetSamples.java
index 817789237b79..5b4b8ea148f0 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetTypesGetSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetTypesGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for TargetTypes Get. */
public final class TargetTypesGetSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/GetATargetType.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/GetTargetType.json
*/
/**
* Sample code: Get a Target Type for westus2 location.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetTypesListSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetTypesListSamples.java
index b69d5234b52d..8e91bffdb49d 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetTypesListSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetTypesListSamples.java
@@ -7,7 +7,7 @@
/** Samples for TargetTypes List. */
public final class TargetTypesListSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/ListTargetTypes.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/ListTargetTypes.json
*/
/**
* Sample code: List all Target Types for westus2 location.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsCreateOrUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsCreateOrUpdateSamples.java
index eae54a3598b1..d0f4c7f1c9a4 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsCreateOrUpdateSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsCreateOrUpdateSamples.java
@@ -14,7 +14,7 @@
/** Samples for Targets CreateOrUpdate. */
public final class TargetsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/CreateOrUpdateATarget.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/CreateUpdateTarget.json
*/
/**
* Sample code: Create/update a Target that extends a virtual machine resource.
@@ -44,6 +44,7 @@ public static void createUpdateATargetThatExtendsAVirtualMachineResource(
com.azure.core.util.Context.NONE);
}
+ // Use "Map.of" if available
@SuppressWarnings("unchecked")
private static Map mapOf(Object... inputs) {
Map map = new HashMap<>();
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsDeleteSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsDeleteSamples.java
index 6297b0552cdb..3eab1078043e 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsDeleteSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for Targets Delete. */
public final class TargetsDeleteSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/DeleteATarget.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/DeleteTarget.json
*/
/**
* Sample code: Delete a Target that extends a virtual machine resource.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsGetSamples.java
index 6c4cdd6b39db..88aab1797fca 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsGetSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for Targets Get. */
public final class TargetsGetSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/GetATarget.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/GetTarget.json
*/
/**
* Sample code: Get a Target that extends a virtual machine resource.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsListSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsListSamples.java
index d0f8820df417..6aefa0284d07 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsListSamples.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for Targets List. */
public final class TargetsListSamples {
/*
- * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-04-15-preview/examples/ListTargets.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2023-10-27-preview/examples/ListTargets.json
*/
/**
* Sample code: List all Targets that extend a virtual machine resource.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionTests.java
deleted file mode 100644
index ce0c80c9c7b2..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.Action;
-import org.junit.jupiter.api.Assertions;
-
-public final class ActionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Action model = BinaryData.fromString("{\"type\":\"Action\",\"name\":\"ucww\"}").toObject(Action.class);
- Assertions.assertEquals("ucww", model.name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Action model = new Action().withName("ucww");
- model = BinaryData.fromObject(model).toObject(Action.class);
- Assertions.assertEquals("ucww", model.name());
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/BranchTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/BranchTests.java
deleted file mode 100644
index 0d5821eff7f6..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/BranchTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.Action;
-import com.azure.resourcemanager.chaos.models.Branch;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class BranchTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Branch model =
- BinaryData
- .fromString(
- "{\"name\":\"uhashsfwx\",\"actions\":[{\"type\":\"Action\",\"name\":\"owzxcu\"},{\"type\":\"Action\",\"name\":\"i\"},{\"type\":\"Action\",\"name\":\"jooxdjebw\"}]}")
- .toObject(Branch.class);
- Assertions.assertEquals("uhashsfwx", model.name());
- Assertions.assertEquals("owzxcu", model.actions().get(0).name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Branch model =
- new Branch()
- .withName("uhashsfwx")
- .withActions(
- Arrays
- .asList(
- new Action().withName("owzxcu"),
- new Action().withName("i"),
- new Action().withName("jooxdjebw")));
- model = BinaryData.fromObject(model).toObject(Branch.class);
- Assertions.assertEquals("uhashsfwx", model.name());
- Assertions.assertEquals("owzxcu", model.actions().get(0).name());
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesCreateOrUpdateWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesCreateOrUpdateWithResponseMockTests.java
deleted file mode 100644
index 243890d92386..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesCreateOrUpdateWithResponseMockTests.java
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner;
-import com.azure.resourcemanager.chaos.models.Capability;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CapabilitiesCreateOrUpdateWithResponseMockTests {
- @Test
- public void testCreateOrUpdateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"publisher\":\"mhairsbrgzdwmsw\",\"targetType\":\"pqwd\",\"description\":\"gicccnxqhuex\",\"parametersSchema\":\"ttlstvlzywemhz\",\"urn\":\"csdtclusiypbs\"},\"id\":\"gytguslfead\",\"name\":\"ygqukyhejh\",\"type\":\"isxgfp\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- Capability response =
- manager
- .capabilities()
- .createOrUpdateWithResponse(
- "wpusdsttwvogv",
- "bejdcn",
- "qqmoaku",
- "gm",
- "zr",
- "rdgrtw",
- new CapabilityInner(),
- com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesDeleteWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesDeleteWithResponseMockTests.java
deleted file mode 100644
index 363326342f5b..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesDeleteWithResponseMockTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CapabilitiesDeleteWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .capabilities()
- .deleteWithResponse(
- "owtlmnguxawqald",
- "yuuximerqfobwyzn",
- "bykutw",
- "fhpagmhrskdsnf",
- "sd",
- "akgtdlmkkzevdlh",
- com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesGetWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesGetWithResponseMockTests.java
deleted file mode 100644
index 46fbb0c731e0..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesGetWithResponseMockTests.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.models.Capability;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CapabilitiesGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"publisher\":\"oqouicybxarzgszu\",\"targetType\":\"x\",\"description\":\"q\",\"parametersSchema\":\"idoamciodhkha\",\"urn\":\"khnzbonlw\"},\"id\":\"toego\",\"name\":\"dwbwhkszzcmrvexz\",\"type\":\"vbtqgsfraoyzk\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- Capability response =
- manager
- .capabilities()
- .getWithResponse(
- "oefki",
- "rvtp",
- "qujmqlgkf",
- "tndoaongbjc",
- "tujitcjedft",
- "waezkojvd",
- com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesListMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesListMockTests.java
deleted file mode 100644
index 36c4d3f31399..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesListMockTests.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.models.Capability;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CapabilitiesListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"publisher\":\"kgjubgdknnqvsazn\",\"targetType\":\"tor\",\"description\":\"sgsahmkycgr\",\"parametersSchema\":\"wjue\",\"urn\":\"eburu\"},\"id\":\"dmovsm\",\"name\":\"l\",\"type\":\"wabm\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager
- .capabilities()
- .list("vglsbjjca", "vxb", "t", "udutnco", "mr", "xqtvcofu", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityInnerTests.java
deleted file mode 100644
index 46b73882dea5..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityInnerTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner;
-
-public final class CapabilityInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CapabilityInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"publisher\":\"mparcryuanzw\",\"targetType\":\"zdxtayrlhmwhf\",\"description\":\"rqobmtuk\",\"parametersSchema\":\"ryrtihfxtijbpzv\",\"urn\":\"wzsymglzufcy\"},\"id\":\"kohdbiha\",\"name\":\"ufhfcbjysa\",\"type\":\"ithxqhabifpi\"}")
- .toObject(CapabilityInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CapabilityInner model = new CapabilityInner();
- model = BinaryData.fromObject(model).toObject(CapabilityInner.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityListResultTests.java
deleted file mode 100644
index c81a42399e57..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityListResultTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.CapabilityListResult;
-
-public final class CapabilityListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CapabilityListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"publisher\":\"vgjxpybczm\",\"targetType\":\"mtz\",\"description\":\"bsphrupidgsybbe\",\"parametersSchema\":\"ph\",\"urn\":\"cmsxaobhdxbm\"},\"id\":\"qioqjzehtbmu\",\"name\":\"p\",\"type\":\"wnoi\"},{\"properties\":{\"publisher\":\"rxybqsoq\",\"targetType\":\"gkdmb\",\"description\":\"zlobcufpd\",\"parametersSchema\":\"rbt\",\"urn\":\"qjnqglhqgnufoooj\"},\"id\":\"wifsq\",\"name\":\"saagdf\",\"type\":\"glzlhjxrifkwmrv\"},{\"properties\":{\"publisher\":\"zntocipaouajps\",\"targetType\":\"cmpoyfdkfogkny\",\"description\":\"ofjdde\",\"parametersSchema\":\"rd\",\"urn\":\"pewnw\"},\"id\":\"eitjz\",\"name\":\"flusarhmof\",\"type\":\"qhsmyurkdtml\"}],\"nextLink\":\"ekuksjtx\"}")
- .toObject(CapabilityListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CapabilityListResult model = new CapabilityListResult();
- model = BinaryData.fromObject(model).toObject(CapabilityListResult.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityPropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityPropertiesTests.java
deleted file mode 100644
index a40c0f86e689..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityPropertiesTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.fluent.models.CapabilityProperties;
-
-public final class CapabilityPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CapabilityProperties model =
- BinaryData
- .fromString(
- "{\"publisher\":\"wczbys\",\"targetType\":\"pqxu\",\"description\":\"vyq\",\"parametersSchema\":\"wby\",\"urn\":\"k\"}")
- .toObject(CapabilityProperties.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CapabilityProperties model = new CapabilityProperties();
- model = BinaryData.fromObject(model).toObject(CapabilityProperties.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypeInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypeInnerTests.java
deleted file mode 100644
index 35b9529de72b..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypeInnerTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeInner;
-import org.junit.jupiter.api.Assertions;
-
-public final class CapabilityTypeInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CapabilityTypeInner model =
- BinaryData
- .fromString(
- "{\"location\":\"huticndvkao\",\"properties\":{\"publisher\":\"i\",\"targetType\":\"yhxhu\",\"displayName\":\"k\",\"description\":\"yxolniwp\",\"parametersSchema\":\"ukjfkgiawxklr\",\"urn\":\"lwckbasyypnddhs\",\"kind\":\"bacphejko\",\"azureRbacActions\":[\"qgoulznd\",\"i\",\"wyqkgfgibm\"],\"azureRbacDataActions\":[\"akeqs\",\"xybz\"],\"runtimeProperties\":{\"kind\":\"dqytbciqfouflmm\"}},\"id\":\"kzsmodm\",\"name\":\"lougpbkw\",\"type\":\"mutduqktaps\"}")
- .toObject(CapabilityTypeInner.class);
- Assertions.assertEquals("huticndvkao", model.location());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CapabilityTypeInner model = new CapabilityTypeInner().withLocation("huticndvkao");
- model = BinaryData.fromObject(model).toObject(CapabilityTypeInner.class);
- Assertions.assertEquals("huticndvkao", model.location());
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypeListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypeListResultTests.java
deleted file mode 100644
index e5e3f3b7faf8..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypeListResultTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.CapabilityTypeListResult;
-
-public final class CapabilityTypeListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CapabilityTypeListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"location\":\"jgrtfwvukxga\",\"properties\":{\"publisher\":\"cs\",\"targetType\":\"s\",\"displayName\":\"nyejhkryhtnap\",\"description\":\"wlokjyem\",\"parametersSchema\":\"vnipjox\",\"urn\":\"nchgej\",\"kind\":\"odmailzyd\",\"azureRbacActions\":[\"jwyahuxinpmqnja\"],\"azureRbacDataActions\":[\"xj\",\"prozvcputegjvwmf\",\"atscmd\",\"pjhulsuuvmkj\"],\"runtimeProperties\":{\"kind\":\"rwfndiod\"}},\"id\":\"pslwejdpvw\",\"name\":\"yoqpsoaccta\",\"type\":\"akl\"},{\"location\":\"hbcryffdfdosyge\",\"properties\":{\"publisher\":\"ojakhmsbzjhcrze\",\"targetType\":\"phlxa\",\"displayName\":\"thqt\",\"description\":\"qjbpfzfsin\",\"parametersSchema\":\"v\",\"urn\":\"jrwzox\",\"kind\":\"tfell\",\"azureRbacActions\":[\"zitonpeqfpjkjl\",\"ofpdvh\"],\"azureRbacDataActions\":[\"xypininmayhuybbk\",\"odepoogin\",\"vamih\"],\"runtimeProperties\":{\"kind\":\"narxzxtheotus\"}},\"id\":\"vyevcciqi\",\"name\":\"nhungbw\",\"type\":\"zrnf\"},{\"location\":\"gispemvtzfkufubl\",\"properties\":{\"publisher\":\"xqeofjaeqjhqjba\",\"targetType\":\"msmjqulngsntn\",\"displayName\":\"bkzgcwrwclx\",\"description\":\"rljdouskcqv\",\"parametersSchema\":\"cr\",\"urn\":\"dkwt\",\"kind\":\"xbnjbiksq\",\"azureRbacActions\":[\"ssainqpjwnzll\",\"fmppe\"],\"azureRbacDataActions\":[\"mgxsab\",\"yqduujit\"],\"runtimeProperties\":{\"kind\":\"zdzevndh\"}},\"id\":\"rwpdappdsbdkvwrw\",\"name\":\"feusnhut\",\"type\":\"eltmrldhugjzzdat\"}],\"nextLink\":\"hocdgeab\"}")
- .toObject(CapabilityTypeListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CapabilityTypeListResult model = new CapabilityTypeListResult();
- model = BinaryData.fromObject(model).toObject(CapabilityTypeListResult.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypePropertiesRuntimePropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypePropertiesRuntimePropertiesTests.java
deleted file mode 100644
index eea6de579339..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypePropertiesRuntimePropertiesTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.CapabilityTypePropertiesRuntimeProperties;
-
-public final class CapabilityTypePropertiesRuntimePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CapabilityTypePropertiesRuntimeProperties model =
- BinaryData
- .fromString("{\"kind\":\"uhmuouqfprwzwbn\"}")
- .toObject(CapabilityTypePropertiesRuntimeProperties.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CapabilityTypePropertiesRuntimeProperties model = new CapabilityTypePropertiesRuntimeProperties();
- model = BinaryData.fromObject(model).toObject(CapabilityTypePropertiesRuntimeProperties.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypePropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypePropertiesTests.java
deleted file mode 100644
index b71a9ea9af7f..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypePropertiesTests.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeProperties;
-import com.azure.resourcemanager.chaos.models.CapabilityTypePropertiesRuntimeProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class CapabilityTypePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CapabilityTypeProperties model =
- BinaryData
- .fromString(
- "{\"publisher\":\"gcue\",\"targetType\":\"umkdosvqwhbmd\",\"displayName\":\"bjf\",\"description\":\"gmbmbexppbh\",\"parametersSchema\":\"qrolfpf\",\"urn\":\"algbquxigjyjg\",\"kind\":\"aoyfhrtxilnerkuj\",\"azureRbacActions\":[\"l\",\"juvf\",\"awrlyx\"],\"azureRbacDataActions\":[\"cpr\",\"nwbxgjvtbvpyssz\"],\"runtimeProperties\":{\"kind\":\"uj\"}}")
- .toObject(CapabilityTypeProperties.class);
- Assertions.assertEquals("l", model.azureRbacActions().get(0));
- Assertions.assertEquals("cpr", model.azureRbacDataActions().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CapabilityTypeProperties model =
- new CapabilityTypeProperties()
- .withAzureRbacActions(Arrays.asList("l", "juvf", "awrlyx"))
- .withAzureRbacDataActions(Arrays.asList("cpr", "nwbxgjvtbvpyssz"))
- .withRuntimeProperties(new CapabilityTypePropertiesRuntimeProperties());
- model = BinaryData.fromObject(model).toObject(CapabilityTypeProperties.class);
- Assertions.assertEquals("l", model.azureRbacActions().get(0));
- Assertions.assertEquals("cpr", model.azureRbacDataActions().get(0));
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesGetWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesGetWithResponseMockTests.java
deleted file mode 100644
index 7c2792d51d76..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesGetWithResponseMockTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.models.CapabilityType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CapabilityTypesGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"location\":\"budurgkakmo\",\"properties\":{\"publisher\":\"jjklff\",\"targetType\":\"ouw\",\"displayName\":\"gzrf\",\"description\":\"eyebizikayuhql\",\"parametersSchema\":\"bs\",\"urn\":\"bqwrvtldgm\",\"kind\":\"gvmpipaslthaqfx\",\"azureRbacActions\":[\"wutwbdsre\",\"pdrhne\",\"yowqkdwytisibir\"],\"azureRbacDataActions\":[\"ikpzimejza\",\"lfzxiavrmbzonoki\"],\"runtimeProperties\":{\"kind\":\"q\"}},\"id\":\"irgzp\",\"name\":\"rlazszrnw\",\"type\":\"iin\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- CapabilityType response =
- manager
- .capabilityTypes()
- .getWithResponse("jivfxzsjabib", "ystawfsdjpvkvp", "jxbkzbzkdvn", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("budurgkakmo", response.location());
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesListMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesListMockTests.java
deleted file mode 100644
index 923eb083647d..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesListMockTests.java
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.models.CapabilityType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CapabilityTypesListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"location\":\"ujzra\",\"properties\":{\"publisher\":\"w\",\"targetType\":\"r\",\"displayName\":\"swibyr\",\"description\":\"l\",\"parametersSchema\":\"shfwpracstwity\",\"urn\":\"evxccedcp\",\"kind\":\"dyodnwzxltj\",\"azureRbacActions\":[\"hlt\",\"ugcxnavvwxq\",\"byqunyow\"],\"azureRbacDataActions\":[\"mdjrkvfgbvfvp\",\"bodacizsjq\",\"hkr\",\"ibdeibq\"],\"runtimeProperties\":{\"kind\":\"kghv\"}},\"id\":\"ndzwmkrefa\",\"name\":\"pjorwkqnyhg\",\"type\":\"ij\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.capabilityTypes().list("lolp", "vk", "r", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("ujzra", response.iterator().next().location());
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DelayActionTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DelayActionTests.java
deleted file mode 100644
index 0f89985b10bb..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DelayActionTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.DelayAction;
-import java.time.Duration;
-import org.junit.jupiter.api.Assertions;
-
-public final class DelayActionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DelayAction model =
- BinaryData
- .fromString("{\"type\":\"delay\",\"duration\":\"PT114H40M51S\",\"name\":\"qoaxoruzfgs\"}")
- .toObject(DelayAction.class);
- Assertions.assertEquals("qoaxoruzfgs", model.name());
- Assertions.assertEquals(Duration.parse("PT114H40M51S"), model.duration());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DelayAction model = new DelayAction().withName("qoaxoruzfgs").withDuration(Duration.parse("PT114H40M51S"));
- model = BinaryData.fromObject(model).toObject(DelayAction.class);
- Assertions.assertEquals("qoaxoruzfgs", model.name());
- Assertions.assertEquals(Duration.parse("PT114H40M51S"), model.duration());
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentCancelOperationResultInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentCancelOperationResultInnerTests.java
deleted file mode 100644
index 3293201e1cd1..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentCancelOperationResultInnerTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentCancelOperationResultInner;
-
-public final class ExperimentCancelOperationResultInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExperimentCancelOperationResultInner model =
- BinaryData
- .fromString("{\"name\":\"kpycgklwndnhjd\",\"statusUrl\":\"whvylw\"}")
- .toObject(ExperimentCancelOperationResultInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExperimentCancelOperationResultInner model = new ExperimentCancelOperationResultInner();
- model = BinaryData.fromObject(model).toObject(ExperimentCancelOperationResultInner.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsInnerTests.java
deleted file mode 100644
index f06010ff8196..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsInnerTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsInner;
-
-public final class ExperimentExecutionDetailsInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExperimentExecutionDetailsInner model =
- BinaryData
- .fromString(
- "{\"type\":\"bkdmo\",\"id\":\"postmgrcfbunrm\",\"name\":\"jhhkxbp\",\"properties\":{\"experimentId\":\"mjh\",\"status\":\"j\",\"failureReason\":\"gudivkrtswbxqz\",\"createdDateTime\":\"2021-10-26T13:42:02Z\",\"lastActionDateTime\":\"2021-01-16T06:43:01Z\",\"startDateTime\":\"2021-04-01T03:47:56Z\",\"stopDateTime\":\"2021-07-06T14:56:49Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"ivetvtcq\",\"stepId\":\"tdo\",\"status\":\"cbxvwvxyslqbh\",\"branches\":[{},{},{}]},{\"stepName\":\"blytk\",\"stepId\":\"mpew\",\"status\":\"fbkrvrnsvs\",\"branches\":[{},{}]}]}}}")
- .toObject(ExperimentExecutionDetailsInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExperimentExecutionDetailsInner model = new ExperimentExecutionDetailsInner();
- model = BinaryData.fromObject(model).toObject(ExperimentExecutionDetailsInner.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsListResultTests.java
deleted file mode 100644
index 112d5bd3a787..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsListResultTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsListResult;
-
-public final class ExperimentExecutionDetailsListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExperimentExecutionDetailsListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"type\":\"wroyqbexrmcq\",\"id\":\"ycnojvknmefqsg\",\"name\":\"ah\",\"properties\":{\"experimentId\":\"y\",\"status\":\"pvgqzcjrvxdjzlm\",\"failureReason\":\"xkvugfhzov\",\"createdDateTime\":\"2021-04-06T17:45:34Z\",\"lastActionDateTime\":\"2021-08-30T15:15:07Z\",\"startDateTime\":\"2021-08-29T21:49:24Z\",\"stopDateTime\":\"2021-02-16T01:55:44Z\",\"runInformation\":{\"steps\":[{}]}}},{\"type\":\"rnxipei\",\"id\":\"jzuaejxdultskzbb\",\"name\":\"zumveekgpwo\",\"properties\":{\"experimentId\":\"kfpbs\",\"status\":\"ofd\",\"failureReason\":\"uusdttouwa\",\"createdDateTime\":\"2021-08-12T22:43:04Z\",\"lastActionDateTime\":\"2021-11-05T01:57:54Z\",\"startDateTime\":\"2021-09-30T23:19:15Z\",\"stopDateTime\":\"2021-03-07T10:01:38Z\",\"runInformation\":{\"steps\":[{}]}}},{\"type\":\"bxwyjsflhhcaa\",\"id\":\"jixisxyawjoyaqcs\",\"name\":\"jpkiidzyexznelix\",\"properties\":{\"experimentId\":\"ztfolhbnxk\",\"status\":\"laulppg\",\"failureReason\":\"tpnapnyiropuhpig\",\"createdDateTime\":\"2021-05-18T16:57:02Z\",\"lastActionDateTime\":\"2021-06-13T20:05:29Z\",\"startDateTime\":\"2021-09-08T14:57:52Z\",\"stopDateTime\":\"2021-09-24T06:30:02Z\",\"runInformation\":{\"steps\":[{},{},{}]}}},{\"type\":\"jvc\",\"id\":\"ynqwwncwzzhxgk\",\"name\":\"mgucna\",\"properties\":{\"experimentId\":\"eoellwptfdygp\",\"status\":\"b\",\"failureReason\":\"ceopzfqrhhuaopp\",\"createdDateTime\":\"2021-12-04T10:32:02Z\",\"lastActionDateTime\":\"2021-11-26T20:29:16Z\",\"startDateTime\":\"2021-08-22T01:14:41Z\",\"stopDateTime\":\"2021-02-19T08:33:13Z\",\"runInformation\":{\"steps\":[{},{}]}}}],\"nextLink\":\"xcto\"}")
- .toObject(ExperimentExecutionDetailsListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExperimentExecutionDetailsListResult model = new ExperimentExecutionDetailsListResult();
- model = BinaryData.fromObject(model).toObject(ExperimentExecutionDetailsListResult.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsPropertiesRunInformationTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsPropertiesRunInformationTests.java
deleted file mode 100644
index b9a1d40035e4..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsPropertiesRunInformationTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation;
-
-public final class ExperimentExecutionDetailsPropertiesRunInformationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExperimentExecutionDetailsPropertiesRunInformation model =
- BinaryData
- .fromString(
- "{\"steps\":[{\"stepName\":\"thuma\",\"stepId\":\"lbg\",\"status\":\"duiertgcc\",\"branches\":[{\"branchName\":\"olpsslqlf\",\"branchId\":\"dnbbglzps\",\"status\":\"ydmcwyhzdxssa\",\"actions\":[{},{},{},{}]},{\"branchName\":\"nvdfznuda\",\"branchId\":\"vxzbncb\",\"status\":\"lpstdbhhxsrzdz\",\"actions\":[{},{},{}]},{\"branchName\":\"scdntnevf\",\"branchId\":\"jmygtdsslswtmwer\",\"status\":\"fzp\",\"actions\":[{},{},{}]}]},{\"stepName\":\"mwabnetshhszhedp\",\"stepId\":\"wiwubm\",\"status\":\"besldnkwwtppjflc\",\"branches\":[{\"branchName\":\"okonzmnsikvmkqz\",\"branchId\":\"qkdltfz\",\"status\":\"hhvh\",\"actions\":[{}]},{\"branchName\":\"odkwobd\",\"branchId\":\"xtibqdxbxwakbog\",\"status\":\"ndlkzgxhurip\",\"actions\":[{},{}]},{\"branchName\":\"dxunkbebxmubyyn\",\"branchId\":\"lrb\",\"status\":\"koievseo\",\"actions\":[{}]},{\"branchName\":\"l\",\"branchId\":\"muwlauwzizxbm\",\"status\":\"cjefuzmu\",\"actions\":[{},{},{}]}]}]}")
- .toObject(ExperimentExecutionDetailsPropertiesRunInformation.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExperimentExecutionDetailsPropertiesRunInformation model =
- new ExperimentExecutionDetailsPropertiesRunInformation();
- model = BinaryData.fromObject(model).toObject(ExperimentExecutionDetailsPropertiesRunInformation.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsPropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsPropertiesTests.java
deleted file mode 100644
index 2c0484cfdefc..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsPropertiesTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsProperties;
-
-public final class ExperimentExecutionDetailsPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExperimentExecutionDetailsProperties model =
- BinaryData
- .fromString(
- "{\"experimentId\":\"hxcr\",\"status\":\"fovasr\",\"failureReason\":\"v\",\"createdDateTime\":\"2021-07-10T06:08:41Z\",\"lastActionDateTime\":\"2021-03-07T17:24:46Z\",\"startDateTime\":\"2021-11-17T10:32:18Z\",\"stopDateTime\":\"2021-05-02T16:44:33Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"rxbpyb\",\"stepId\":\"fbjfdtwssotftpvj\",\"status\":\"exilzznfqqnvwpmq\",\"branches\":[{\"branchName\":\"oujmkcjhwqytj\",\"branchId\":\"bnw\",\"status\":\"wgdrjervnaenqp\",\"actions\":[{},{},{},{}]},{\"branchName\":\"doy\",\"branchId\":\"ifthnz\",\"status\":\"dslgnayqigynduh\",\"actions\":[{},{},{}]}]}]}}")
- .toObject(ExperimentExecutionDetailsProperties.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExperimentExecutionDetailsProperties model = new ExperimentExecutionDetailsProperties();
- model = BinaryData.fromObject(model).toObject(ExperimentExecutionDetailsProperties.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentInnerTests.java
deleted file mode 100644
index 1784f51e727f..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentInnerTests.java
+++ /dev/null
@@ -1,190 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentInner;
-import com.azure.resourcemanager.chaos.models.Action;
-import com.azure.resourcemanager.chaos.models.Branch;
-import com.azure.resourcemanager.chaos.models.Filter;
-import com.azure.resourcemanager.chaos.models.ResourceIdentity;
-import com.azure.resourcemanager.chaos.models.ResourceIdentityType;
-import com.azure.resourcemanager.chaos.models.Selector;
-import com.azure.resourcemanager.chaos.models.Step;
-import com.azure.resourcemanager.chaos.models.UserAssignedIdentity;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ExperimentInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExperimentInner model =
- BinaryData
- .fromString(
- "{\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"udwtiukbl\":{\"principalId\":\"a61f533d-4cb4-48c5-b497-037970f7a5e4\",\"clientId\":\"a2b0ed87-2549-4a89-a548-e0201ea73b97\"},\"kpoc\":{\"principalId\":\"42cfbeff-7124-4ed5-9328-09adb1b652ac\",\"clientId\":\"dfd5c108-4321-42c2-a063-44f4503fa5fa\"},\"z\":{\"principalId\":\"a42405b6-1569-4569-ad74-4ffedceb4851\",\"clientId\":\"206e8550-f951-4176-b6b6-464869be91a1\"}},\"principalId\":\"o\",\"tenantId\":\"ukgjnpiucgygevq\"},\"properties\":{\"steps\":[{\"name\":\"typmrbpizcdrqjsd\",\"branches\":[{\"name\":\"dnfyhxdeoejzicwi\",\"actions\":[{\"type\":\"Action\",\"name\":\"jttgzf\"},{\"type\":\"Action\",\"name\":\"ishc\"},{\"type\":\"Action\",\"name\":\"khaj\"}]},{\"name\":\"eyeam\",\"actions\":[{\"type\":\"Action\",\"name\":\"hagalpbuxwgipwh\"}]},{\"name\":\"nowkgshw\",\"actions\":[{\"type\":\"Action\",\"name\":\"kix\"},{\"type\":\"Action\",\"name\":\"bin\"},{\"type\":\"Action\",\"name\":\"eputtmrywnuzoqf\"}]},{\"name\":\"iyqzrnk\",\"actions\":[{\"type\":\"Action\",\"name\":\"vyxlwhzlsicohoqq\"},{\"type\":\"Action\",\"name\":\"wvl\"},{\"type\":\"Action\",\"name\":\"yav\"},{\"type\":\"Action\",\"name\":\"hheunmmqhgyx\"}]}]},{\"name\":\"konocu\",\"branches\":[{\"name\":\"klyaxuconu\",\"actions\":[{\"type\":\"Action\",\"name\":\"zf\"},{\"type\":\"Action\",\"name\":\"beypewrmjmw\"}]},{\"name\":\"vjektcxsenh\",\"actions\":[{\"type\":\"Action\",\"name\":\"rsffrzpwvlqdqgbi\"}]},{\"name\":\"ylihkaetckt\",\"actions\":[{\"type\":\"Action\",\"name\":\"civfsnkymuctq\"},{\"type\":\"Action\",\"name\":\"jf\"},{\"type\":\"Action\",\"name\":\"ebrjcxe\"}]}]},{\"name\":\"fuwutttxf\",\"branches\":[{\"name\":\"rbirphxe\",\"actions\":[{\"type\":\"Action\",\"name\":\"yva\"}]},{\"name\":\"fnljky\",\"actions\":[{\"type\":\"Action\",\"name\":\"j\"},{\"type\":\"Action\",\"name\":\"uujqgidokgjljyo\"},{\"type\":\"Action\",\"name\":\"gvcl\"},{\"type\":\"Action\",\"name\":\"bgsncghkjeszzhb\"}]},{\"name\":\"jhtxfvgxbfsmxne\",\"actions\":[{\"type\":\"Action\",\"name\":\"pvecxgodeb\"},{\"type\":\"Action\",\"name\":\"qkkrb\"},{\"type\":\"Action\",\"name\":\"pukgriwflzlfb\"},{\"type\":\"Action\",\"name\":\"zpuzycisp\"}]},{\"name\":\"qzahmgkbrp\",\"actions\":[{\"type\":\"Action\",\"name\":\"dhibnuq\"}]}]},{\"name\":\"kpikadrgvt\",\"branches\":[{\"name\":\"gnbuy\",\"actions\":[{\"type\":\"Action\",\"name\":\"ijggmebfsiar\"},{\"type\":\"Action\",\"name\":\"utrc\"}]}]}],\"selectors\":[{\"type\":\"Selector\",\"id\":\"na\",\"filter\":{\"type\":\"Filter\"},\"\":{\"bh\":\"datajrunmpxtt\"}},{\"type\":\"Selector\",\"id\":\"bnlankxmyskpb\",\"filter\":{\"type\":\"Filter\"},\"\":{\"lqidyby\":\"datatkcxywnytnrsy\",\"haaxdbabphl\":\"dataczfc\",\"yazttbtwwrqpue\":\"datarqlfktsthsucocmn\",\"xibxujwbhqwalm\":\"datackzywbiexzfeyue\"}}],\"startOnCreation\":false},\"location\":\"oxaepd\",\"tags\":{\"bavxbniwdjswzt\":\"ancuxrhd\",\"xbzpfzab\":\"dbpgnxytxhp\"},\"id\":\"lcuhxwtctyqiklb\",\"name\":\"ovplw\",\"type\":\"bhvgy\"}")
- .toObject(ExperimentInner.class);
- Assertions.assertEquals("oxaepd", model.location());
- Assertions.assertEquals("ancuxrhd", model.tags().get("bavxbniwdjswzt"));
- Assertions.assertEquals(ResourceIdentityType.NONE, model.identity().type());
- Assertions.assertEquals("typmrbpizcdrqjsd", model.steps().get(0).name());
- Assertions.assertEquals("dnfyhxdeoejzicwi", model.steps().get(0).branches().get(0).name());
- Assertions.assertEquals("jttgzf", model.steps().get(0).branches().get(0).actions().get(0).name());
- Assertions.assertEquals("na", model.selectors().get(0).id());
- Assertions.assertEquals(false, model.startOnCreation());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExperimentInner model =
- new ExperimentInner()
- .withLocation("oxaepd")
- .withTags(mapOf("bavxbniwdjswzt", "ancuxrhd", "xbzpfzab", "dbpgnxytxhp"))
- .withIdentity(
- new ResourceIdentity()
- .withType(ResourceIdentityType.NONE)
- .withUserAssignedIdentities(
- mapOf(
- "udwtiukbl",
- new UserAssignedIdentity(),
- "kpoc",
- new UserAssignedIdentity(),
- "z",
- new UserAssignedIdentity())))
- .withSteps(
- Arrays
- .asList(
- new Step()
- .withName("typmrbpizcdrqjsd")
- .withBranches(
- Arrays
- .asList(
- new Branch()
- .withName("dnfyhxdeoejzicwi")
- .withActions(
- Arrays
- .asList(
- new Action().withName("jttgzf"),
- new Action().withName("ishc"),
- new Action().withName("khaj"))),
- new Branch()
- .withName("eyeam")
- .withActions(Arrays.asList(new Action().withName("hagalpbuxwgipwh"))),
- new Branch()
- .withName("nowkgshw")
- .withActions(
- Arrays
- .asList(
- new Action().withName("kix"),
- new Action().withName("bin"),
- new Action().withName("eputtmrywnuzoqf"))),
- new Branch()
- .withName("iyqzrnk")
- .withActions(
- Arrays
- .asList(
- new Action().withName("vyxlwhzlsicohoqq"),
- new Action().withName("wvl"),
- new Action().withName("yav"),
- new Action().withName("hheunmmqhgyx"))))),
- new Step()
- .withName("konocu")
- .withBranches(
- Arrays
- .asList(
- new Branch()
- .withName("klyaxuconu")
- .withActions(
- Arrays
- .asList(
- new Action().withName("zf"),
- new Action().withName("beypewrmjmw"))),
- new Branch()
- .withName("vjektcxsenh")
- .withActions(Arrays.asList(new Action().withName("rsffrzpwvlqdqgbi"))),
- new Branch()
- .withName("ylihkaetckt")
- .withActions(
- Arrays
- .asList(
- new Action().withName("civfsnkymuctq"),
- new Action().withName("jf"),
- new Action().withName("ebrjcxe"))))),
- new Step()
- .withName("fuwutttxf")
- .withBranches(
- Arrays
- .asList(
- new Branch()
- .withName("rbirphxe")
- .withActions(Arrays.asList(new Action().withName("yva"))),
- new Branch()
- .withName("fnljky")
- .withActions(
- Arrays
- .asList(
- new Action().withName("j"),
- new Action().withName("uujqgidokgjljyo"),
- new Action().withName("gvcl"),
- new Action().withName("bgsncghkjeszzhb"))),
- new Branch()
- .withName("jhtxfvgxbfsmxne")
- .withActions(
- Arrays
- .asList(
- new Action().withName("pvecxgodeb"),
- new Action().withName("qkkrb"),
- new Action().withName("pukgriwflzlfb"),
- new Action().withName("zpuzycisp"))),
- new Branch()
- .withName("qzahmgkbrp")
- .withActions(Arrays.asList(new Action().withName("dhibnuq"))))),
- new Step()
- .withName("kpikadrgvt")
- .withBranches(
- Arrays
- .asList(
- new Branch()
- .withName("gnbuy")
- .withActions(
- Arrays
- .asList(
- new Action().withName("ijggmebfsiar"),
- new Action().withName("utrc")))))))
- .withSelectors(
- Arrays
- .asList(
- new Selector()
- .withId("na")
- .withFilter(new Filter())
- .withAdditionalProperties(mapOf("type", "Selector")),
- new Selector()
- .withId("bnlankxmyskpb")
- .withFilter(new Filter())
- .withAdditionalProperties(mapOf("type", "Selector"))))
- .withStartOnCreation(false);
- model = BinaryData.fromObject(model).toObject(ExperimentInner.class);
- Assertions.assertEquals("oxaepd", model.location());
- Assertions.assertEquals("ancuxrhd", model.tags().get("bavxbniwdjswzt"));
- Assertions.assertEquals(ResourceIdentityType.NONE, model.identity().type());
- Assertions.assertEquals("typmrbpizcdrqjsd", model.steps().get(0).name());
- Assertions.assertEquals("dnfyhxdeoejzicwi", model.steps().get(0).branches().get(0).name());
- Assertions.assertEquals("jttgzf", model.steps().get(0).branches().get(0).actions().get(0).name());
- Assertions.assertEquals("na", model.selectors().get(0).id());
- Assertions.assertEquals(false, model.startOnCreation());
- }
-
- @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;
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentListResultTests.java
deleted file mode 100644
index 6dd342d32aa7..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentListResultTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.ExperimentListResult;
-
-public final class ExperimentListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExperimentListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"a\":{\"principalId\":\"d694953e-da23-4a8d-b5a3-ef1669e288a2\",\"clientId\":\"cbb943cc-5830-4289-9a2f-da96d0b3054a\"},\"fizuckyf\":{\"principalId\":\"ee5be475-8484-4b37-b4a1-0ffbb9314704\",\"clientId\":\"c0be5ec7-b9cc-47cd-8c95-8efb8ab6bef1\"}},\"principalId\":\"rfidfvzwdz\",\"tenantId\":\"tymw\"},\"properties\":{\"steps\":[{\"name\":\"dkfthwxmnt\",\"branches\":[{\"name\":\"waopvkmijcmmxd\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"Selector\",\"id\":\"fufsrpymzi\",\"filter\":{\"type\":\"Filter\"},\"\":{\"wmdwzjeiachboo\":\"datazcxtbzsgfyccsn\",\"ypyqrimzinp\":\"dataflnrosfqpteehzz\",\"dqxhcrmnohjtckwh\":\"dataswjdkirso\",\"gr\":\"datasoifiyipjxsqw\"}},{\"type\":\"Selector\",\"id\":\"bznorcjxvsnby\",\"filter\":{\"type\":\"Filter\"},\"\":{\"cyshurzafbljjgp\":\"datanmoc\"}}],\"startOnCreation\":false},\"location\":\"qcjm\",\"tags\":{\"bqidtqaj\":\"a\",\"khbzhfepgzg\":\"yulpkudjkr\",\"zloc\":\"e\"},\"id\":\"scpai\",\"name\":\"rhhbcs\",\"type\":\"l\"},{\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"odxobnbdxkqpxok\":{\"principalId\":\"1f099396-1006-4d2d-9f92-72e1a6060dff\",\"clientId\":\"bcc6c36d-0eb9-4fcb-8fb9-0fb41a5b5d27\"},\"onpimexgstxg\":{\"principalId\":\"05ee082d-e1d1-4fc6-81d0-95dbe012f24c\",\"clientId\":\"db5b4bf4-f0b0-4027-b4f8-feda2cc97fd9\"},\"dg\":{\"principalId\":\"494cc7dc-ef6d-47c6-badb-66d55deb9331\",\"clientId\":\"3e73a6d8-5ec7-4c9e-a09b-66416fbf57a4\"}},\"principalId\":\"ajrmvdjwzrlovmc\",\"tenantId\":\"hijco\"},\"properties\":{\"steps\":[{\"name\":\"ctbzaq\",\"branches\":[{\"name\":\"sycbkbfk\",\"actions\":[]},{\"name\":\"ukdkexxppofmxa\",\"actions\":[]},{\"name\":\"c\",\"actions\":[]}]},{\"name\":\"jpgd\",\"branches\":[{\"name\":\"ocjjxhvpmouexh\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"Selector\",\"id\":\"xibqeojnx\",\"filter\":{\"type\":\"Filter\"},\"\":{\"btwnpzaoqvuhrhcf\":\"dataddntwndei\",\"pyeicxm\":\"datacyddglmjthjqk\"}},{\"type\":\"Selector\",\"id\":\"ciwqvhk\",\"filter\":{\"type\":\"Filter\"},\"\":{\"og\":\"dataigdtopbob\",\"w\":\"datam\",\"a\":\"dataa\",\"iotkftutqxl\":\"datahrzayvvtpgvdf\"}}],\"startOnCreation\":true},\"location\":\"lefgugnxk\",\"tags\":{\"tthzrvqd\":\"qmi\",\"ehoqfbowskan\":\"abhjybi\"},\"id\":\"ktzlcuiywg\",\"name\":\"ywgndrv\",\"type\":\"nhzgpphrcgyn\"},{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"m\":{\"principalId\":\"476e19ab-99eb-40d4-afdf-b8b3c91159ee\",\"clientId\":\"fbbd8d1e-0d13-48d9-89a8-770ebfc1179e\"},\"ofsx\":{\"principalId\":\"f7142431-862f-40ab-9a70-4341d6d34c60\",\"clientId\":\"661e2bcc-d2f9-4563-a367-0b8fddde9665\"}},\"principalId\":\"evgbmqjq\",\"tenantId\":\"c\"},\"properties\":{\"steps\":[{\"name\":\"mivkwlzuvcc\",\"branches\":[{\"name\":\"nfnbacfionlebxe\",\"actions\":[]},{\"name\":\"qgtz\",\"actions\":[]}]},{\"name\":\"dpnqbq\",\"branches\":[{\"name\":\"xrjfeallnwsub\",\"actions\":[]},{\"name\":\"snjampmng\",\"actions\":[]},{\"name\":\"zscxaqwo\",\"actions\":[]},{\"name\":\"chcbonqvpkvlrxnj\",\"actions\":[]}]},{\"name\":\"ase\",\"branches\":[{\"name\":\"heoflokeyyienjbd\",\"actions\":[]},{\"name\":\"wtgrhpdjpj\",\"actions\":[]},{\"name\":\"masxazjpqyegu\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"Selector\",\"id\":\"hb\",\"filter\":{\"type\":\"Filter\"},\"\":{\"zvdudgwdslfhotwm\":\"datajj\"}},{\"type\":\"Selector\",\"id\":\"ynpwlbj\",\"filter\":{\"type\":\"Filter\"},\"\":{\"nltyfsoppusuesnz\":\"datacftadeh\",\"xzdmohctb\":\"datadejbavo\"}},{\"type\":\"Selector\",\"id\":\"vudwx\",\"filter\":{\"type\":\"Filter\"},\"\":{\"gujjugwdkcglh\":\"datavo\",\"ofqweykhmenevfye\":\"datalazjdyggdtjixhbk\",\"dcsi\":\"datafwhybcibvy\"}},{\"type\":\"Selector\",\"id\":\"ynnaam\",\"filter\":{\"type\":\"Filter\"},\"\":{\"iqscjeypv\":\"dataeh\",\"gm\":\"dataezrkgqhcjrefo\",\"yyvxyqjpkcattpn\":\"dataqsl\",\"v\":\"datajcrcczsqpjhvmda\"}}],\"startOnCreation\":true},\"location\":\"ounqecano\",\"tags\":{\"rpmopjmc\":\"pfhyhl\"},\"id\":\"atuokthfuiu\",\"name\":\"odsfcpkvxodpuozm\",\"type\":\"zydagfuaxbezyiuo\"},{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"wz\":{\"principalId\":\"553b7af2-caea-4f7e-8708-4113725c7e0f\",\"clientId\":\"6a91372d-f022-4b5e-b1ac-17c2039d1263\"},\"sm\":{\"principalId\":\"119fde70-223d-49d1-bf05-b90bfb53bec6\",\"clientId\":\"4a9ebd2a-94a3-4b14-b4f6-9d9d2b55d834\"},\"reximoryocfs\":{\"principalId\":\"fec08330-339f-4701-abd7-ff1a32043da5\",\"clientId\":\"b401908a-87e9-4d08-b905-ef423a7b1d96\"}},\"principalId\":\"s\",\"tenantId\":\"ddystkiiuxhqy\"},\"properties\":{\"steps\":[{\"name\":\"xorrqnb\",\"branches\":[{\"name\":\"czvyifq\",\"actions\":[]},{\"name\":\"vkd\",\"actions\":[]}]},{\"name\":\"jsllrmv\",\"branches\":[{\"name\":\"f\",\"actions\":[]}]},{\"name\":\"atkpnp\",\"branches\":[{\"name\":\"exxbczwtr\",\"actions\":[]},{\"name\":\"wiqzbqjvsovmyo\",\"actions\":[]},{\"name\":\"acspkwl\",\"actions\":[]}]},{\"name\":\"zdobpxjmflbvvnch\",\"branches\":[{\"name\":\"cciw\",\"actions\":[]},{\"name\":\"zjuqkhrsaj\",\"actions\":[]},{\"name\":\"wkuofoskghsauu\",\"actions\":[]},{\"name\":\"mjmvxieduugidyjr\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"Selector\",\"id\":\"byao\",\"filter\":{\"type\":\"Filter\"},\"\":{\"slkevle\":\"datacsonpclhoco\"}}],\"startOnCreation\":false},\"location\":\"fbuhfmvfaxkffe\",\"tags\":{\"m\":\"hl\"},\"id\":\"zy\",\"name\":\"shxmzsbbzoggigrx\",\"type\":\"burvjxxjnspy\"}],\"nextLink\":\"tko\"}")
- .toObject(ExperimentListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExperimentListResult model = new ExperimentListResult();
- model = BinaryData.fromObject(model).toObject(ExperimentListResult.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentPropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentPropertiesTests.java
deleted file mode 100644
index b1dc96cbb73e..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentPropertiesTests.java
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentProperties;
-import com.azure.resourcemanager.chaos.models.Action;
-import com.azure.resourcemanager.chaos.models.Branch;
-import com.azure.resourcemanager.chaos.models.Filter;
-import com.azure.resourcemanager.chaos.models.Selector;
-import com.azure.resourcemanager.chaos.models.Step;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ExperimentPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExperimentProperties model =
- BinaryData
- .fromString(
- "{\"steps\":[{\"name\":\"bbaumnyquped\",\"branches\":[{\"name\":\"jn\",\"actions\":[{\"type\":\"Action\",\"name\":\"ckhsmtxpsieb\"},{\"type\":\"Action\",\"name\":\"fhvpesaps\"},{\"type\":\"Action\",\"name\":\"rdqmhjjdhtldwkyz\"}]},{\"name\":\"uutkncw\",\"actions\":[{\"type\":\"Action\",\"name\":\"wsvlxotogtwrupqs\"},{\"type\":\"Action\",\"name\":\"vnm\"},{\"type\":\"Action\",\"name\":\"cykvceo\"}]},{\"name\":\"eil\",\"actions\":[{\"type\":\"Action\",\"name\":\"notyfjfcnjbkcn\"},{\"type\":\"Action\",\"name\":\"dhbt\"},{\"type\":\"Action\",\"name\":\"kphywpnvjto\"}]},{\"name\":\"nermcl\",\"actions\":[{\"type\":\"Action\",\"name\":\"lphox\"},{\"type\":\"Action\",\"name\":\"scrpabgyepsbjt\"}]}]}],\"selectors\":[{\"type\":\"Selector\",\"id\":\"qugxywpmueefjzwf\",\"filter\":{\"type\":\"Filter\"},\"\":{\"xtccmg\":\"datajidsuyonobglaoc\",\"wfudwpzntxhdzhl\":\"dataudxytlmoyrx\",\"hckfrlhrx\":\"dataqj\"}}],\"startOnCreation\":false}")
- .toObject(ExperimentProperties.class);
- Assertions.assertEquals("bbaumnyquped", model.steps().get(0).name());
- Assertions.assertEquals("jn", model.steps().get(0).branches().get(0).name());
- Assertions.assertEquals("ckhsmtxpsieb", model.steps().get(0).branches().get(0).actions().get(0).name());
- Assertions.assertEquals("qugxywpmueefjzwf", model.selectors().get(0).id());
- Assertions.assertEquals(false, model.startOnCreation());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExperimentProperties model =
- new ExperimentProperties()
- .withSteps(
- Arrays
- .asList(
- new Step()
- .withName("bbaumnyquped")
- .withBranches(
- Arrays
- .asList(
- new Branch()
- .withName("jn")
- .withActions(
- Arrays
- .asList(
- new Action().withName("ckhsmtxpsieb"),
- new Action().withName("fhvpesaps"),
- new Action().withName("rdqmhjjdhtldwkyz"))),
- new Branch()
- .withName("uutkncw")
- .withActions(
- Arrays
- .asList(
- new Action().withName("wsvlxotogtwrupqs"),
- new Action().withName("vnm"),
- new Action().withName("cykvceo"))),
- new Branch()
- .withName("eil")
- .withActions(
- Arrays
- .asList(
- new Action().withName("notyfjfcnjbkcn"),
- new Action().withName("dhbt"),
- new Action().withName("kphywpnvjto"))),
- new Branch()
- .withName("nermcl")
- .withActions(
- Arrays
- .asList(
- new Action().withName("lphox"),
- new Action().withName("scrpabgyepsbjt")))))))
- .withSelectors(
- Arrays
- .asList(
- new Selector()
- .withId("qugxywpmueefjzwf")
- .withFilter(new Filter())
- .withAdditionalProperties(mapOf("type", "Selector"))))
- .withStartOnCreation(false);
- model = BinaryData.fromObject(model).toObject(ExperimentProperties.class);
- Assertions.assertEquals("bbaumnyquped", model.steps().get(0).name());
- Assertions.assertEquals("jn", model.steps().get(0).branches().get(0).name());
- Assertions.assertEquals("ckhsmtxpsieb", model.steps().get(0).branches().get(0).actions().get(0).name());
- Assertions.assertEquals("qugxywpmueefjzwf", model.selectors().get(0).id());
- Assertions.assertEquals(false, model.startOnCreation());
- }
-
- @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;
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentStartOperationResultInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentStartOperationResultInnerTests.java
deleted file mode 100644
index f3c44a5518fc..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentStartOperationResultInnerTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentStartOperationResultInner;
-
-public final class ExperimentStartOperationResultInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExperimentStartOperationResultInner model =
- BinaryData
- .fromString("{\"name\":\"tdhxujznbmpowuwp\",\"statusUrl\":\"qlveualupjmkh\"}")
- .toObject(ExperimentStartOperationResultInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExperimentStartOperationResultInner model = new ExperimentStartOperationResultInner();
- model = BinaryData.fromObject(model).toObject(ExperimentStartOperationResultInner.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentStatusInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentStatusInnerTests.java
deleted file mode 100644
index 0cff857fd16a..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentStatusInnerTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentStatusInner;
-
-public final class ExperimentStatusInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExperimentStatusInner model =
- BinaryData
- .fromString(
- "{\"type\":\"zjuzgwyz\",\"id\":\"txon\",\"name\":\"ts\",\"properties\":{\"status\":\"cbpwxqpsrknft\",\"createdDateUtc\":\"2021-04-20T10:14:36Z\",\"endDateUtc\":\"2021-01-01T20:16:55Z\"}}")
- .toObject(ExperimentStatusInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExperimentStatusInner model = new ExperimentStatusInner();
- model = BinaryData.fromObject(model).toObject(ExperimentStatusInner.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentStatusListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentStatusListResultTests.java
deleted file mode 100644
index f21726586306..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentStatusListResultTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.ExperimentStatusListResult;
-
-public final class ExperimentStatusListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExperimentStatusListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"type\":\"bcswsrt\",\"id\":\"iplrbpbewtghfgb\",\"name\":\"gw\",\"properties\":{\"status\":\"lvqhjkbegibtnmx\",\"createdDateUtc\":\"2021-04-16T06:52:16Z\",\"endDateUtc\":\"2021-03-05T02:51:46Z\"}}],\"nextLink\":\"loayqcgw\"}")
- .toObject(ExperimentStatusListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExperimentStatusListResult model = new ExperimentStatusListResult();
- model = BinaryData.fromObject(model).toObject(ExperimentStatusListResult.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentStatusPropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentStatusPropertiesTests.java
deleted file mode 100644
index 3629658444e0..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentStatusPropertiesTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentStatusProperties;
-
-public final class ExperimentStatusPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExperimentStatusProperties model =
- BinaryData
- .fromString(
- "{\"status\":\"hprwmdyv\",\"createdDateUtc\":\"2021-07-01T04:16:54Z\",\"endDateUtc\":\"2021-07-25T12:29:44Z\"}")
- .toObject(ExperimentStatusProperties.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExperimentStatusProperties model = new ExperimentStatusProperties();
- model = BinaryData.fromObject(model).toObject(ExperimentStatusProperties.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentUpdateTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentUpdateTests.java
deleted file mode 100644
index 5b13428e765d..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentUpdateTests.java
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.ExperimentUpdate;
-import com.azure.resourcemanager.chaos.models.ResourceIdentity;
-import com.azure.resourcemanager.chaos.models.ResourceIdentityType;
-import com.azure.resourcemanager.chaos.models.UserAssignedIdentity;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ExperimentUpdateTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExperimentUpdate model =
- BinaryData
- .fromString(
- "{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"it\":{\"principalId\":\"c1000e40-cee2-4311-b04e-e94747e05df2\",\"clientId\":\"147b9e75-fe91-49c9-b34f-5121d73c6b63\"},\"jawgqwg\":{\"principalId\":\"ab61a5da-1f68-4580-84f9-7d0dbb3c39a1\",\"clientId\":\"8744a7df-7546-485d-b3a1-c096cb036fad\"}},\"principalId\":\"ni\",\"tenantId\":\"x\"}}")
- .toObject(ExperimentUpdate.class);
- Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.identity().type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExperimentUpdate model =
- new ExperimentUpdate()
- .withIdentity(
- new ResourceIdentity()
- .withType(ResourceIdentityType.USER_ASSIGNED)
- .withUserAssignedIdentities(
- mapOf("it", new UserAssignedIdentity(), "jawgqwg", new UserAssignedIdentity())));
- model = BinaryData.fromObject(model).toObject(ExperimentUpdate.class);
- Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.identity().type());
- }
-
- @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;
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsCancelWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsCancelWithResponseMockTests.java
deleted file mode 100644
index 043aa45b9f92..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsCancelWithResponseMockTests.java
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.models.ExperimentCancelOperationResult;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ExperimentsCancelWithResponseMockTests {
- @Test
- public void testCancelWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"name\":\"xkk\",\"statusUrl\":\"h\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(202);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ExperimentCancelOperationResult response =
- manager
- .experiments()
- .cancelWithResponse("sgogczhonnxk", "lgnyhmo", com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsCreateOrUpdateWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsCreateOrUpdateWithResponseMockTests.java
deleted file mode 100644
index 47326d7582c9..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsCreateOrUpdateWithResponseMockTests.java
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.models.Branch;
-import com.azure.resourcemanager.chaos.models.Experiment;
-import com.azure.resourcemanager.chaos.models.Filter;
-import com.azure.resourcemanager.chaos.models.ResourceIdentity;
-import com.azure.resourcemanager.chaos.models.ResourceIdentityType;
-import com.azure.resourcemanager.chaos.models.Selector;
-import com.azure.resourcemanager.chaos.models.Step;
-import com.azure.resourcemanager.chaos.models.UserAssignedIdentity;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ExperimentsCreateOrUpdateWithResponseMockTests {
- @Test
- public void testCreateOrUpdateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"fgmblrrilbywdxsm\":{\"principalId\":\"6981a6ea-7d5f-43e8-a7e5-588b5fc19ebd\",\"clientId\":\"4800dd1a-97e6-4b07-81ad-e83847e391ab\"}},\"principalId\":\"cwrwfs\",\"tenantId\":\"fnynszqujizdvoqy\"},\"properties\":{\"steps\":[{\"name\":\"byowbblgyavutp\",\"branches\":[{\"name\":\"joxoism\",\"actions\":[]},{\"name\":\"ksbpimlqoljx\",\"actions\":[]}]},{\"name\":\"cgxxlxs\",\"branches\":[{\"name\":\"gcvizqzdwlvwlyou\",\"actions\":[]},{\"name\":\"fgfb\",\"actions\":[]}]},{\"name\":\"jub\",\"branches\":[{\"name\":\"hgkfmin\",\"actions\":[]}]},{\"name\":\"g\",\"branches\":[{\"name\":\"zfttsttktlahb\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"Selector\",\"id\":\"ctxtgzukxi\",\"filter\":{\"type\":\"Filter\"},\"\":{\"qqxhrnxrxcpj\":\"datatg\",\"dzf\":\"dataisavok\",\"atnwxyiopi\":\"dataazivjlfrqttbajl\"}},{\"type\":\"Selector\",\"id\":\"kqqfk\",\"filter\":{\"type\":\"Filter\"},\"\":{\"ibrxkp\":\"dataxkdmligo\",\"bteoybf\":\"dataloazuruocbgoo\",\"jgslordilmyww\":\"datajxakv\"}},{\"type\":\"Selector\",\"id\":\"kgkxn\",\"filter\":{\"type\":\"Filter\"},\"\":{\"yvudtjuewbci\":\"datab\",\"xccybvpa\":\"dataxuuwhcj\"}},{\"type\":\"Selector\",\"id\":\"akkud\",\"filter\":{\"type\":\"Filter\"},\"\":{\"stcyohpfkyrkdbd\":\"datawjplma\",\"nobaiyhddviacegf\":\"dataiogsjkmnwq\"}}],\"startOnCreation\":true},\"location\":\"tfpmvmemfnczdw\",\"tags\":{\"db\":\"alxlllchp\"},\"id\":\"evwrdnhfuk\",\"name\":\"vsjcswsmystuluqy\",\"type\":\"fcvlerch\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- Experiment response =
- manager
- .experiments()
- .define("hmkxmaehvbb")
- .withRegion("sivfomilo")
- .withExistingResourceGroup("eydbsd")
- .withSteps(
- Arrays
- .asList(
- new Step()
- .withName("tgk")
- .withBranches(
- Arrays
- .asList(
- new Branch().withName("tvdxeclzedqb").withActions(Arrays.asList()),
- new Branch().withName("vh").withActions(Arrays.asList()),
- new Branch().withName("lhpl").withActions(Arrays.asList()))),
- new Step()
- .withName("dqkdlwwqfbu")
- .withBranches(
- Arrays.asList(new Branch().withName("kxtrq").withActions(Arrays.asList())))))
- .withSelectors(
- Arrays
- .asList(
- new Selector()
- .withId("smlmbtxhwgfwsrta")
- .withFilter(new Filter())
- .withAdditionalProperties(mapOf("type", "Selector")),
- new Selector()
- .withId("qgzsles")
- .withFilter(new Filter())
- .withAdditionalProperties(mapOf("type", "Selector")),
- new Selector()
- .withId("ewzcjznmwcp")
- .withFilter(new Filter())
- .withAdditionalProperties(mapOf("type", "Selector")),
- new Selector()
- .withId("w")
- .withFilter(new Filter())
- .withAdditionalProperties(mapOf("type", "Selector"))))
- .withTags(mapOf("dieuzaofj", "dufiq", "otcubi", "hvcyyysfg"))
- .withIdentity(
- new ResourceIdentity()
- .withType(ResourceIdentityType.SYSTEM_ASSIGNED)
- .withUserAssignedIdentities(
- mapOf(
- "n",
- new UserAssignedIdentity(),
- "axkgx",
- new UserAssignedIdentity(),
- "ckpyklyhplu",
- new UserAssignedIdentity())))
- .withStartOnCreation(false)
- .create();
-
- Assertions.assertEquals("tfpmvmemfnczdw", response.location());
- Assertions.assertEquals("alxlllchp", response.tags().get("db"));
- Assertions.assertEquals(ResourceIdentityType.NONE, response.identity().type());
- Assertions.assertEquals("byowbblgyavutp", response.steps().get(0).name());
- Assertions.assertEquals("joxoism", response.steps().get(0).branches().get(0).name());
- Assertions.assertEquals("ctxtgzukxi", response.selectors().get(0).id());
- Assertions.assertEquals(true, response.startOnCreation());
- }
-
- @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;
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsDeleteByResourceGroupWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsDeleteByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index cf6fe4809dad..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsDeleteByResourceGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ExperimentsDeleteByResourceGroupWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .experiments()
- .deleteByResourceGroupWithResponse("tmmjihyeozph", "wau", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetByResourceGroupWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index 2e1d19da88a1..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetByResourceGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.models.Experiment;
-import com.azure.resourcemanager.chaos.models.ResourceIdentityType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ExperimentsGetByResourceGroupWithResponseMockTests {
- @Test
- public void testGetByResourceGroupWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"hojujbypelmcuv\":{\"principalId\":\"9151e949-2c21-426f-abce-12c7400f217f\",\"clientId\":\"89c26f2a-1891-48ed-a922-34da940492e4\"},\"bjx\":{\"principalId\":\"21310cad-a62d-4c74-a0b6-3431369872d4\",\"clientId\":\"84b97f4c-56da-4844-b613-5ce0881ac388\"},\"n\":{\"principalId\":\"4337f343-9ed0-4d83-b3ac-d1427c752f37\",\"clientId\":\"6f3e5a61-5997-47a6-a0d9-6bd2ba0ac851\"}},\"principalId\":\"r\",\"tenantId\":\"o\"},\"properties\":{\"steps\":[{\"name\":\"ttpkiwkkbnujrywv\",\"branches\":[{\"name\":\"lbfpncurd\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"Selector\",\"id\":\"wiithtywub\",\"filter\":{\"type\":\"Filter\"},\"\":{\"qknfd\":\"datah\",\"ihxumwctondzj\":\"datatwjchrdg\",\"fdlwg\":\"datauu\",\"gseinq\":\"dataytsbwtovv\"}}],\"startOnCreation\":true},\"location\":\"fxqknpirgneptt\",\"tags\":{\"mqnrojlpijnkr\":\"sniffc\",\"zronasxift\":\"frddhcrati\"},\"id\":\"zq\",\"name\":\"zh\",\"type\":\"tw\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- Experiment response =
- manager
- .experiments()
- .getByResourceGroupWithResponse("qncygupkvi", "mdscwxqupev", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("fxqknpirgneptt", response.location());
- Assertions.assertEquals("sniffc", response.tags().get("mqnrojlpijnkr"));
- Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.identity().type());
- Assertions.assertEquals("ttpkiwkkbnujrywv", response.steps().get(0).name());
- Assertions.assertEquals("lbfpncurd", response.steps().get(0).branches().get(0).name());
- Assertions.assertEquals("wiithtywub", response.selectors().get(0).id());
- Assertions.assertEquals(true, response.startOnCreation());
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetExecutionDetailsWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetExecutionDetailsWithResponseMockTests.java
deleted file mode 100644
index e5f9388f7908..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetExecutionDetailsWithResponseMockTests.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetails;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ExperimentsGetExecutionDetailsWithResponseMockTests {
- @Test
- public void testGetExecutionDetailsWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"type\":\"jv\",\"id\":\"imwkslircizj\",\"name\":\"ydfce\",\"properties\":{\"experimentId\":\"lhvygdyftu\",\"status\":\"twnawjslbiwkojgc\",\"failureReason\":\"tsf\",\"createdDateTime\":\"2021-10-17T10:06:27Z\",\"lastActionDateTime\":\"2021-07-03T06:16:35Z\",\"startDateTime\":\"2021-03-07T16:28:02Z\",\"stopDateTime\":\"2021-03-23T01:57:59Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"rn\",\"stepId\":\"x\",\"status\":\"uwrykqgaifmvikl\",\"branches\":[{}]},{\"stepName\":\"khbejdznxc\",\"stepId\":\"srhnjivo\",\"status\":\"tnovqfzgemjdftul\",\"branches\":[{},{}]},{\"stepName\":\"ucea\",\"stepId\":\"mczuo\",\"status\":\"jw\",\"branches\":[{},{}]},{\"stepName\":\"ioknssxmoj\",\"stepId\":\"vpkjpr\",\"status\":\"wcfzqljyxgt\",\"branches\":[{}]}]}}}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ExperimentExecutionDetails response =
- manager
- .experiments()
- .getExecutionDetailsWithResponse("ih", "jqgwzp", "fqntcyp", com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetStatusWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetStatusWithResponseMockTests.java
deleted file mode 100644
index 2ed0efcd1818..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetStatusWithResponseMockTests.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.models.ExperimentStatus;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ExperimentsGetStatusWithResponseMockTests {
- @Test
- public void testGetStatusWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"type\":\"uyovw\",\"id\":\"bkfezzxscyhwzdgi\",\"name\":\"jbzbomvzzbtdcq\",\"properties\":{\"status\":\"iyujviylwdshfs\",\"createdDateUtc\":\"2021-10-02T20:28:41Z\",\"endDateUtc\":\"2021-10-15T12:19:25Z\"}}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ExperimentStatus response =
- manager
- .experiments()
- .getStatusWithResponse("omtbghhavgrvkff", "vjzhpjbib", "jmfxumvf", com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListAllStatusesMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListAllStatusesMockTests.java
deleted file mode 100644
index ef3e9303cf02..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListAllStatusesMockTests.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.models.ExperimentStatus;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ExperimentsListAllStatusesMockTests {
- @Test
- public void testListAllStatuses() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"type\":\"zejntps\",\"id\":\"gioilqu\",\"name\":\"ydxtqm\",\"properties\":{\"status\":\"xorgg\",\"createdDateUtc\":\"2021-04-30T10:21:51Z\",\"endDateUtc\":\"2021-04-20T02:01Z\"}}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.experiments().listAllStatuses("rtkfawnopq", "ikyzirtxdy", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListByResourceGroupMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListByResourceGroupMockTests.java
deleted file mode 100644
index de214104968e..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListByResourceGroupMockTests.java
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.models.Experiment;
-import com.azure.resourcemanager.chaos.models.ResourceIdentityType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ExperimentsListByResourceGroupMockTests {
- @Test
- public void testListByResourceGroup() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"egxuvwzf\":{\"principalId\":\"da161d78-ceb8-493f-9d63-bd293c67a9d7\",\"clientId\":\"8593d58d-2ab7-4555-8cf4-bdd8dce1e247\"},\"lmctlpd\":{\"principalId\":\"655b6693-b1d9-475f-8bd0-4e041a8c52af\",\"clientId\":\"0d139c1e-327d-460e-9d22-5c4e25708cbf\"},\"tvgbmhrixkwmy\":{\"principalId\":\"74be79ee-70d8-411d-be02-a93159dba7d0\",\"clientId\":\"2f7ab16a-eda0-4e1f-9fe6-530b35ab4f50\"},\"jvegrhbpnaixexcc\":{\"principalId\":\"91aed7d7-9704-4376-bc1a-a760e3fe20b1\",\"clientId\":\"a765f368-dd76-4d56-ab35-eb7db505bcd4\"}},\"principalId\":\"reaxhcexdr\",\"tenantId\":\"qahqkghtpwijn\"},\"properties\":{\"steps\":[{\"name\":\"jsvfycxzbfvoowv\",\"branches\":[{\"name\":\"mtg\",\"actions\":[]},{\"name\":\"qp\",\"actions\":[]},{\"name\":\"y\",\"actions\":[]}]},{\"name\":\"s\",\"branches\":[{\"name\":\"on\",\"actions\":[]},{\"name\":\"myhgfipnsxkmc\",\"actions\":[]},{\"name\":\"a\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"Selector\",\"id\":\"rrjreafxtsgu\",\"filter\":{\"type\":\"Filter\"},\"\":{\"xwslolbqpv\":\"datalik\",\"crpw\":\"datazlmvfelfktgp\",\"brnjwmw\":\"dataxeznoi\"}},{\"type\":\"Selector\",\"id\":\"pn\",\"filter\":{\"type\":\"Filter\"},\"\":{\"gzxnfaazpxdtnk\":\"dataejjoqkagfhsxtta\",\"wuenvr\":\"datamkqjj\"}}],\"startOnCreation\":false},\"location\":\"ou\",\"tags\":{\"xqtnq\":\"rebqaaysjk\"},\"id\":\"tezlwff\",\"name\":\"iakp\",\"type\":\"pqqmted\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.experiments().listByResourceGroup("uhbxvvy", true, "s", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("ou", response.iterator().next().location());
- Assertions.assertEquals("rebqaaysjk", response.iterator().next().tags().get("xqtnq"));
- Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type());
- Assertions.assertEquals("jsvfycxzbfvoowv", response.iterator().next().steps().get(0).name());
- Assertions.assertEquals("mtg", response.iterator().next().steps().get(0).branches().get(0).name());
- Assertions.assertEquals("rrjreafxtsgu", response.iterator().next().selectors().get(0).id());
- Assertions.assertEquals(false, response.iterator().next().startOnCreation());
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListExecutionDetailsMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListExecutionDetailsMockTests.java
deleted file mode 100644
index d5cf83de372b..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListExecutionDetailsMockTests.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetails;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ExperimentsListExecutionDetailsMockTests {
- @Test
- public void testListExecutionDetails() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"type\":\"otmrfhir\",\"id\":\"ymoxoftpipiwyczu\",\"name\":\"a\",\"properties\":{\"experimentId\":\"jlihhyus\",\"status\":\"kasdvlm\",\"failureReason\":\"dgzxulucvpamrsr\",\"createdDateTime\":\"2021-12-07T21:14:58Z\",\"lastActionDateTime\":\"2021-03-05T11:45:05Z\",\"startDateTime\":\"2021-04-24T08:08:26Z\",\"stopDateTime\":\"2021-08-09T16:10:18Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"ytxifqjzgxmrh\",\"stepId\":\"lw\",\"status\":\"esutrgjupauutpw\",\"branches\":[{},{},{},{}]}]}}}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.experiments().listExecutionDetails("ye", "rymsgaojfmw", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListMockTests.java
deleted file mode 100644
index 738ebdd5cb5b..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListMockTests.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.models.Experiment;
-import com.azure.resourcemanager.chaos.models.ResourceIdentityType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ExperimentsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"flsjc\":{\"principalId\":\"4c7cbc3d-2c6e-4727-90a1-2ea9cc668963\",\"clientId\":\"afc8e789-a7dc-4f45-b17c-935e06e1b82e\"},\"zfjvfbgofe\":{\"principalId\":\"51256333-c15d-4f4c-a031-9c3f734caccc\",\"clientId\":\"bb3f4b67-5151-454c-a2db-cce7d9187729\"},\"grqmqhldvrii\":{\"principalId\":\"175e5096-c854-4e01-946d-940bbdd2b69d\",\"clientId\":\"9681afac-8c36-4d6e-bf43-abf10867808f\"},\"nalghfkvtvsexso\":{\"principalId\":\"1910718a-d2d1-428c-b5e8-c8f657406e06\",\"clientId\":\"4d435627-1e68-4c9c-aa27-ea75fb2fd655\"}},\"principalId\":\"el\",\"tenantId\":\"hhahhxvrhmzkwpjg\"},\"properties\":{\"steps\":[{\"name\":\"spughftqsxhq\",\"branches\":[{\"name\":\"j\",\"actions\":[]},{\"name\":\"ukndxdigrjgu\",\"actions\":[]},{\"name\":\"fzdm\",\"actions\":[]}]},{\"name\":\"yqtfihwh\",\"branches\":[{\"name\":\"tzingamvpph\",\"actions\":[]}]},{\"name\":\"szqzudphqamv\",\"branches\":[{\"name\":\"fwynwcvtbvkay\",\"actions\":[]},{\"name\":\"mtnvyq\",\"actions\":[]}]},{\"name\":\"atkzwpcnpw\",\"branches\":[{\"name\":\"jaesgvvsccya\",\"actions\":[]},{\"name\":\"g\",\"actions\":[]},{\"name\":\"qfhwyg\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"Selector\",\"id\":\"vdnkfxusem\",\"filter\":{\"type\":\"Filter\"},\"\":{\"svuo\":\"datamuhapfcqdpsqxqv\",\"mfe\":\"datamgccelvezrypq\",\"ob\":\"datakerqwkyh\"}},{\"type\":\"Selector\",\"id\":\"pg\",\"filter\":{\"type\":\"Filter\"},\"\":{\"ccsnjvcdwxlpq\":\"dataowepbqpcrfkb\"}}],\"startOnCreation\":false},\"location\":\"tn\",\"tags\":{\"dhtmdvypgikd\":\"jsyingwfqatm\",\"hlhkjoqrvqqaatj\":\"szywkbirryu\"},\"id\":\"nrvgoupmfiibfgg\",\"name\":\"ioolvrwxkvtkkgll\",\"type\":\"wjygvjayvblmhvk\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.experiments().list(true, "pwp", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("tn", response.iterator().next().location());
- Assertions.assertEquals("jsyingwfqatm", response.iterator().next().tags().get("dhtmdvypgikd"));
- Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type());
- Assertions.assertEquals("spughftqsxhq", response.iterator().next().steps().get(0).name());
- Assertions.assertEquals("j", response.iterator().next().steps().get(0).branches().get(0).name());
- Assertions.assertEquals("vdnkfxusem", response.iterator().next().selectors().get(0).id());
- Assertions.assertEquals(false, response.iterator().next().startOnCreation());
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsStartWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsStartWithResponseMockTests.java
deleted file mode 100644
index 64411fae9d61..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsStartWithResponseMockTests.java
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.models.ExperimentStartOperationResult;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ExperimentsStartWithResponseMockTests {
- @Test
- public void testStartWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"name\":\"nsvbuswdv\",\"statusUrl\":\"ybycnunvj\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(202);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ExperimentStartOperationResult response =
- manager
- .experiments()
- .startWithResponse("rghxjb", "hqxvcxgfrpdsofbs", com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/FilterTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/FilterTests.java
deleted file mode 100644
index 991b41981fce..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/FilterTests.java
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.Filter;
-
-public final class FilterTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Filter model = BinaryData.fromString("{\"type\":\"Filter\"}").toObject(Filter.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Filter model = new Filter();
- model = BinaryData.fromObject(model).toObject(Filter.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ListSelectorTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ListSelectorTests.java
deleted file mode 100644
index cae3c1379937..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ListSelectorTests.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.Filter;
-import com.azure.resourcemanager.chaos.models.ListSelector;
-import com.azure.resourcemanager.chaos.models.TargetReference;
-import com.azure.resourcemanager.chaos.models.TargetReferenceType;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ListSelectorTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ListSelector model =
- BinaryData
- .fromString(
- "{\"type\":\"List\",\"targets\":[{\"type\":\"ChaosTarget\",\"id\":\"lcvydy\"},{\"type\":\"ChaosTarget\",\"id\":\"tdooaoj\"}],\"id\":\"niodkooeb\",\"filter\":{\"type\":\"Filter\"},\"\":{\"vdkcrodtj\":\"datahemms\",\"lfoakg\":\"datanfwjlfltkacjvefk\"}}")
- .toObject(ListSelector.class);
- Assertions.assertEquals("niodkooeb", model.id());
- Assertions.assertEquals(TargetReferenceType.CHAOS_TARGET, model.targets().get(0).type());
- Assertions.assertEquals("lcvydy", model.targets().get(0).id());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ListSelector model =
- new ListSelector()
- .withId("niodkooeb")
- .withFilter(new Filter())
- .withTargets(
- Arrays
- .asList(
- new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("lcvydy"),
- new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("tdooaoj")));
- model = BinaryData.fromObject(model).toObject(ListSelector.class);
- Assertions.assertEquals("niodkooeb", model.id());
- Assertions.assertEquals(TargetReferenceType.CHAOS_TARGET, model.targets().get(0).type());
- Assertions.assertEquals("lcvydy", model.targets().get(0).id());
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationDisplayTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationDisplayTests.java
deleted file mode 100644
index 0901257abf49..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationDisplayTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.OperationDisplay;
-
-public final class OperationDisplayTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationDisplay model =
- BinaryData
- .fromString(
- "{\"provider\":\"crkvcikhnv\",\"resource\":\"mqg\",\"operation\":\"queziky\",\"description\":\"gxk\"}")
- .toObject(OperationDisplay.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationDisplay model = new OperationDisplay();
- model = BinaryData.fromObject(model).toObject(OperationDisplay.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationInnerTests.java
deleted file mode 100644
index b52a85b77253..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationInnerTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.fluent.models.OperationInner;
-import com.azure.resourcemanager.chaos.models.OperationDisplay;
-
-public final class OperationInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationInner model =
- BinaryData
- .fromString(
- "{\"name\":\"abikns\",\"isDataAction\":false,\"display\":{\"provider\":\"xbldtlwwrlkdmtn\",\"resource\":\"ok\",\"operation\":\"llxdyhgs\",\"description\":\"cogjltdtbn\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}")
- .toObject(OperationInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationInner model = new OperationInner().withDisplay(new OperationDisplay());
- model = BinaryData.fromObject(model).toObject(OperationInner.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationListResultTests.java
deleted file mode 100644
index 2e2dbd89789b..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationListResultTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.OperationListResult;
-
-public final class OperationListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"name\":\"wifto\",\"isDataAction\":true,\"display\":{\"provider\":\"uvksgplsaknynfsy\",\"resource\":\"jphuopxodlqi\",\"operation\":\"torzih\",\"description\":\"osjswsr\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"pzbchck\",\"isDataAction\":true,\"display\":{\"provider\":\"ox\",\"resource\":\"suiizynkedyat\",\"operation\":\"yhqmibzyhwi\",\"description\":\"mypyynpcdpu\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"z\"}")
- .toObject(OperationListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationListResult model = new OperationListResult();
- model = BinaryData.fromObject(model).toObject(OperationListResult.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/QuerySelectorTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/QuerySelectorTests.java
deleted file mode 100644
index 3060354b6f50..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/QuerySelectorTests.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.Filter;
-import com.azure.resourcemanager.chaos.models.QuerySelector;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class QuerySelectorTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- QuerySelector model =
- BinaryData
- .fromString(
- "{\"type\":\"Query\",\"queryString\":\"blylsyxkqjnsj\",\"subscriptionIds\":[\"vti\"],\"id\":\"gxsds\",\"filter\":{\"type\":\"Filter\"},\"\":{\"icvi\":\"datapsbzkfzbeyvpn\",\"jjxd\":\"datav\",\"ztzp\":\"datarbuukzclewyhmlwp\"}}")
- .toObject(QuerySelector.class);
- Assertions.assertEquals("gxsds", model.id());
- Assertions.assertEquals("blylsyxkqjnsj", model.queryString());
- Assertions.assertEquals("vti", model.subscriptionIds().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- QuerySelector model =
- new QuerySelector()
- .withId("gxsds")
- .withFilter(new Filter())
- .withQueryString("blylsyxkqjnsj")
- .withSubscriptionIds(Arrays.asList("vti"));
- model = BinaryData.fromObject(model).toObject(QuerySelector.class);
- Assertions.assertEquals("gxsds", model.id());
- Assertions.assertEquals("blylsyxkqjnsj", model.queryString());
- Assertions.assertEquals("vti", model.subscriptionIds().get(0));
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ResourceIdentityTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ResourceIdentityTests.java
deleted file mode 100644
index c3e3fa007ec9..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ResourceIdentityTests.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.ResourceIdentity;
-import com.azure.resourcemanager.chaos.models.ResourceIdentityType;
-import com.azure.resourcemanager.chaos.models.UserAssignedIdentity;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ResourceIdentityTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ResourceIdentity model =
- BinaryData
- .fromString(
- "{\"type\":\"None\",\"userAssignedIdentities\":{\"mkfssxqukkfplgm\":{\"principalId\":\"6999b89d-259f-44cf-ad3c-6d5076e3df83\",\"clientId\":\"326a00cb-dd9f-43b5-9b3f-416045e6fc59\"},\"nkjzkdeslpvlop\":{\"principalId\":\"3e8374dc-0257-4d89-a7ff-a9bd17a713d7\",\"clientId\":\"a9819cbc-ee4b-42dc-b115-cf907ae81f14\"}},\"principalId\":\"yighxpk\",\"tenantId\":\"zb\"}")
- .toObject(ResourceIdentity.class);
- Assertions.assertEquals(ResourceIdentityType.NONE, model.type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ResourceIdentity model =
- new ResourceIdentity()
- .withType(ResourceIdentityType.NONE)
- .withUserAssignedIdentities(
- mapOf("mkfssxqukkfplgm", new UserAssignedIdentity(), "nkjzkdeslpvlop", new UserAssignedIdentity()));
- model = BinaryData.fromObject(model).toObject(ResourceIdentity.class);
- Assertions.assertEquals(ResourceIdentityType.NONE, model.type());
- }
-
- @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;
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/SelectorTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/SelectorTests.java
deleted file mode 100644
index 3c8d1d3090ad..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/SelectorTests.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.Filter;
-import com.azure.resourcemanager.chaos.models.Selector;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class SelectorTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Selector model =
- BinaryData
- .fromString(
- "{\"type\":\"Selector\",\"id\":\"vo\",\"filter\":{\"type\":\"Filter\"},\"\":{\"jrwjueiotwm\":\"dataeuecivyhzceuoj\"}}")
- .toObject(Selector.class);
- Assertions.assertEquals("vo", model.id());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Selector model =
- new Selector().withId("vo").withFilter(new Filter()).withAdditionalProperties(mapOf("type", "Selector"));
- model = BinaryData.fromObject(model).toObject(Selector.class);
- Assertions.assertEquals("vo", model.id());
- }
-
- @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;
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/SimpleFilterParametersTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/SimpleFilterParametersTests.java
deleted file mode 100644
index 36134b883bd4..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/SimpleFilterParametersTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.SimpleFilterParameters;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class SimpleFilterParametersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SimpleFilterParameters model =
- BinaryData
- .fromString("{\"zones\":[\"jaltolmnc\",\"sobqw\",\"sdbnwdcfhucqdpf\"]}")
- .toObject(SimpleFilterParameters.class);
- Assertions.assertEquals("jaltolmnc", model.zones().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SimpleFilterParameters model =
- new SimpleFilterParameters().withZones(Arrays.asList("jaltolmnc", "sobqw", "sdbnwdcfhucqdpf"));
- model = BinaryData.fromObject(model).toObject(SimpleFilterParameters.class);
- Assertions.assertEquals("jaltolmnc", model.zones().get(0));
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/SimpleFilterTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/SimpleFilterTests.java
deleted file mode 100644
index 51953d40b2d9..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/SimpleFilterTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.SimpleFilter;
-import com.azure.resourcemanager.chaos.models.SimpleFilterParameters;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class SimpleFilterTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SimpleFilter model =
- BinaryData
- .fromString(
- "{\"type\":\"Simple\",\"parameters\":{\"zones\":[\"ckw\",\"fz\",\"whxxbuyqax\",\"feqztppriol\"]}}")
- .toObject(SimpleFilter.class);
- Assertions.assertEquals("ckw", model.parameters().zones().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SimpleFilter model =
- new SimpleFilter()
- .withParameters(
- new SimpleFilterParameters().withZones(Arrays.asList("ckw", "fz", "whxxbuyqax", "feqztppriol")));
- model = BinaryData.fromObject(model).toObject(SimpleFilter.class);
- Assertions.assertEquals("ckw", model.parameters().zones().get(0));
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/StepStatusTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/StepStatusTests.java
deleted file mode 100644
index b810f5ac48c6..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/StepStatusTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.StepStatus;
-
-public final class StepStatusTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- StepStatus model =
- BinaryData
- .fromString(
- "{\"stepName\":\"tdum\",\"stepId\":\"p\",\"status\":\"ebmnzbtbhjpglk\",\"branches\":[{\"branchName\":\"dneu\",\"branchId\":\"fphsdyhtozfikdow\",\"status\":\"uuvxz\",\"actions\":[{\"actionName\":\"ithhqzon\",\"actionId\":\"ggbhcohfwds\",\"status\":\"ka\",\"startTime\":\"2021-05-13T01:39:31Z\",\"endTime\":\"2021-03-15T03:19:59Z\",\"targets\":[{},{},{}]},{\"actionName\":\"acffgdkzzewkfvhq\",\"actionId\":\"a\",\"status\":\"vpnpp\",\"startTime\":\"2021-10-20T12:14:16Z\",\"endTime\":\"2021-03-21T05:49:29Z\",\"targets\":[{},{},{}]},{\"actionName\":\"hdlxyjrxsagafcn\",\"actionId\":\"gwq\",\"status\":\"nedgfbc\",\"startTime\":\"2021-07-29T10:41:12Z\",\"endTime\":\"2021-05-31T02:02:01Z\",\"targets\":[{},{},{},{}]},{\"actionName\":\"eqdcv\",\"actionId\":\"hvoodsotbobzd\",\"status\":\"cjwvn\",\"startTime\":\"2021-06-06T16:32:33Z\",\"endTime\":\"2021-11-29T05:13:59Z\",\"targets\":[{}]}]},{\"branchName\":\"cxrslpmutwuoe\",\"branchId\":\"pkhjwni\",\"status\":\"sluicpdggkzz\",\"actions\":[{\"actionName\":\"mpaxmodfvuefywsb\",\"actionId\":\"vmwy\",\"status\":\"fouyf\",\"startTime\":\"2021-03-21T19:22:18Z\",\"endTime\":\"2021-01-14T19:12:22Z\",\"targets\":[{},{},{},{}]},{\"actionName\":\"yzvqt\",\"actionId\":\"ubex\",\"status\":\"zksmondj\",\"startTime\":\"2021-10-31T06:50:30Z\",\"endTime\":\"2021-06-21T21:58:07Z\",\"targets\":[{},{},{},{}]},{\"actionName\":\"mg\",\"actionId\":\"pkwhojvpa\",\"status\":\"gxysmocmbqfqvm\",\"startTime\":\"2021-03-02T11:08:18Z\",\"endTime\":\"2021-10-15T15:22:20Z\",\"targets\":[{},{},{}]},{\"actionName\":\"helxprglya\",\"actionId\":\"dckcbc\",\"status\":\"jrjxgciqibrhosx\",\"startTime\":\"2021-10-09T16:21:07Z\",\"endTime\":\"2021-07-12T05:33:05Z\",\"targets\":[{}]}]}]}")
- .toObject(StepStatus.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- StepStatus model = new StepStatus();
- model = BinaryData.fromObject(model).toObject(StepStatus.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/StepTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/StepTests.java
deleted file mode 100644
index 9ff1ab7b0deb..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/StepTests.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.Action;
-import com.azure.resourcemanager.chaos.models.Branch;
-import com.azure.resourcemanager.chaos.models.Step;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class StepTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Step model =
- BinaryData
- .fromString(
- "{\"name\":\"yvpycanuzbpzk\",\"branches\":[{\"name\":\"kuwbcrnwb\",\"actions\":[{\"type\":\"Action\",\"name\":\"hhseyv\"},{\"type\":\"Action\",\"name\":\"us\"},{\"type\":\"Action\",\"name\":\"tslhspkdeem\"},{\"type\":\"Action\",\"name\":\"ofmxagkvtmelmqkr\"}]},{\"name\":\"ahvljuaha\",\"actions\":[{\"type\":\"Action\",\"name\":\"hcdhmdual\"},{\"type\":\"Action\",\"name\":\"exq\"}]},{\"name\":\"vfadmws\",\"actions\":[{\"type\":\"Action\",\"name\":\"r\"},{\"type\":\"Action\",\"name\":\"vxpvgomz\"},{\"type\":\"Action\",\"name\":\"fmisg\"}]},{\"name\":\"bnbbeldawkz\",\"actions\":[{\"type\":\"Action\",\"name\":\"liourqhak\"}]}]}")
- .toObject(Step.class);
- Assertions.assertEquals("yvpycanuzbpzk", model.name());
- Assertions.assertEquals("kuwbcrnwb", model.branches().get(0).name());
- Assertions.assertEquals("hhseyv", model.branches().get(0).actions().get(0).name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Step model =
- new Step()
- .withName("yvpycanuzbpzk")
- .withBranches(
- Arrays
- .asList(
- new Branch()
- .withName("kuwbcrnwb")
- .withActions(
- Arrays
- .asList(
- new Action().withName("hhseyv"),
- new Action().withName("us"),
- new Action().withName("tslhspkdeem"),
- new Action().withName("ofmxagkvtmelmqkr"))),
- new Branch()
- .withName("ahvljuaha")
- .withActions(
- Arrays.asList(new Action().withName("hcdhmdual"), new Action().withName("exq"))),
- new Branch()
- .withName("vfadmws")
- .withActions(
- Arrays
- .asList(
- new Action().withName("r"),
- new Action().withName("vxpvgomz"),
- new Action().withName("fmisg"))),
- new Branch()
- .withName("bnbbeldawkz")
- .withActions(Arrays.asList(new Action().withName("liourqhak")))));
- model = BinaryData.fromObject(model).toObject(Step.class);
- Assertions.assertEquals("yvpycanuzbpzk", model.name());
- Assertions.assertEquals("kuwbcrnwb", model.branches().get(0).name());
- Assertions.assertEquals("hhseyv", model.branches().get(0).actions().get(0).name());
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetInnerTests.java
deleted file mode 100644
index c1daa9a9f480..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetInnerTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.fluent.models.TargetInner;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class TargetInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- TargetInner model =
- BinaryData
- .fromString(
- "{\"location\":\"wzsyyceuzs\",\"properties\":{\"ytdw\":\"databjudpfrxtrthzv\"},\"id\":\"qbrqubpaxhexiili\",\"name\":\"pdtii\",\"type\":\"q\"}")
- .toObject(TargetInner.class);
- Assertions.assertEquals("wzsyyceuzs", model.location());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- TargetInner model =
- new TargetInner().withLocation("wzsyyceuzs").withProperties(mapOf("ytdw", "databjudpfrxtrthzv"));
- model = BinaryData.fromObject(model).toObject(TargetInner.class);
- Assertions.assertEquals("wzsyyceuzs", model.location());
- }
-
- @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;
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetListResultTests.java
deleted file mode 100644
index 6385cf4accef..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetListResultTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.TargetListResult;
-
-public final class TargetListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- TargetListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"location\":\"xllrxcyjm\",\"properties\":{\"hhyxxrw\":\"datadsuvarmywdmjsjqb\"},\"id\":\"yc\",\"name\":\"duhpk\",\"type\":\"kgymareqnajxqug\"},{\"location\":\"ycubeddgs\",\"properties\":{\"i\":\"datafwqmzqalkrmn\"},\"id\":\"pxacqqudfn\",\"name\":\"yxbaaabjyvayf\",\"type\":\"imrzrtuzqog\"}],\"nextLink\":\"xnevfdnwn\"}")
- .toObject(TargetListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- TargetListResult model = new TargetListResult();
- model = BinaryData.fromObject(model).toObject(TargetListResult.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetReferenceTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetReferenceTests.java
deleted file mode 100644
index c72d0b847dd0..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetReferenceTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.TargetReference;
-import com.azure.resourcemanager.chaos.models.TargetReferenceType;
-import org.junit.jupiter.api.Assertions;
-
-public final class TargetReferenceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- TargetReference model =
- BinaryData.fromString("{\"type\":\"ChaosTarget\",\"id\":\"fpagaowpulp\"}").toObject(TargetReference.class);
- Assertions.assertEquals(TargetReferenceType.CHAOS_TARGET, model.type());
- Assertions.assertEquals("fpagaowpulp", model.id());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- TargetReference model = new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("fpagaowpulp");
- model = BinaryData.fromObject(model).toObject(TargetReference.class);
- Assertions.assertEquals(TargetReferenceType.CHAOS_TARGET, model.type());
- Assertions.assertEquals("fpagaowpulp", model.id());
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypeInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypeInnerTests.java
deleted file mode 100644
index 8a541eb0485a..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypeInnerTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.fluent.models.TargetTypeInner;
-import org.junit.jupiter.api.Assertions;
-
-public final class TargetTypeInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- TargetTypeInner model =
- BinaryData
- .fromString(
- "{\"location\":\"mszkkfo\",\"properties\":{\"displayName\":\"eyfkzikfja\",\"description\":\"eaivxwczel\",\"propertiesSchema\":\"irels\",\"resourceTypes\":[\"enwabfatk\",\"ddxbjhwuaanoz\"]},\"id\":\"osphyoul\",\"name\":\"jrvxaglrv\",\"type\":\"mjwosytx\"}")
- .toObject(TargetTypeInner.class);
- Assertions.assertEquals("mszkkfo", model.location());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- TargetTypeInner model = new TargetTypeInner().withLocation("mszkkfo");
- model = BinaryData.fromObject(model).toObject(TargetTypeInner.class);
- Assertions.assertEquals("mszkkfo", model.location());
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypeListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypeListResultTests.java
deleted file mode 100644
index 51f7ccc4ade6..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypeListResultTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.TargetTypeListResult;
-
-public final class TargetTypeListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- TargetTypeListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"location\":\"melwuipiccjz\",\"properties\":{\"displayName\":\"ivgvvcna\",\"description\":\"hyrnxxmu\",\"propertiesSchema\":\"dndrdvstkwqqtche\",\"resourceTypes\":[\"fmtdaaygdvwvgp\",\"ohgwxrtfudxepxg\",\"qagvrvm\"]},\"id\":\"pkukghi\",\"name\":\"dblx\",\"type\":\"wi\"}],\"nextLink\":\"njhf\"}")
- .toObject(TargetTypeListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- TargetTypeListResult model = new TargetTypeListResult();
- model = BinaryData.fromObject(model).toObject(TargetTypeListResult.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypePropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypePropertiesTests.java
deleted file mode 100644
index ed3cdb1ef1c9..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypePropertiesTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.fluent.models.TargetTypeProperties;
-
-public final class TargetTypePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- TargetTypeProperties model =
- BinaryData
- .fromString(
- "{\"displayName\":\"cskfcktqumiekk\",\"description\":\"zikhl\",\"propertiesSchema\":\"jhdgqggebdunyga\",\"resourceTypes\":[\"db\"]}")
- .toObject(TargetTypeProperties.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- TargetTypeProperties model = new TargetTypeProperties();
- model = BinaryData.fromObject(model).toObject(TargetTypeProperties.class);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypesGetWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypesGetWithResponseMockTests.java
deleted file mode 100644
index 377b78914dbc..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypesGetWithResponseMockTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.models.TargetType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class TargetTypesGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"location\":\"rkjpvdwxfzwii\",\"properties\":{\"displayName\":\"zjb\",\"description\":\"zsxjrkambtrneg\",\"propertiesSchema\":\"nvuqeqvldspa\",\"resourceTypes\":[\"bkkd\",\"flvestmjlxrrilo\",\"apeewchpxlkt\",\"kuziycsle\"]},\"id\":\"ufuztcktyhjtq\",\"name\":\"dcgzul\",\"type\":\"mmrqz\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- TargetType response =
- manager
- .targetTypes()
- .getWithResponse("uajlyj", "lvofqzhvfcibyfmo", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("rkjpvdwxfzwii", response.location());
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypesListMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypesListMockTests.java
deleted file mode 100644
index 2e11eb2785b7..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypesListMockTests.java
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.models.TargetType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class TargetTypesListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"location\":\"ddrihpf\",\"properties\":{\"displayName\":\"qcaaewdaomdjvl\",\"description\":\"x\",\"propertiesSchema\":\"zb\",\"resourceTypes\":[\"geivsiykzkdncj\",\"xonbzoggculapz\"]},\"id\":\"y\",\"name\":\"pgogtqxepny\",\"type\":\"b\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.targetTypes().list("qbmfpjbabwidf", "xsspuunnoxyhk", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("ddrihpf", response.iterator().next().location());
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsCreateOrUpdateWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsCreateOrUpdateWithResponseMockTests.java
deleted file mode 100644
index 8d4a4a118be0..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsCreateOrUpdateWithResponseMockTests.java
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.fluent.models.TargetInner;
-import com.azure.resourcemanager.chaos.models.Target;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class TargetsCreateOrUpdateWithResponseMockTests {
- @Test
- public void testCreateOrUpdateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"location\":\"faxvxil\",\"properties\":{\"hnze\":\"datatg\"},\"id\":\"qxtjjfzqlqhyca\",\"name\":\"odggx\",\"type\":\"beesmieknlra\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- Target response =
- manager
- .targets()
- .createOrUpdateWithResponse(
- "ymbrnysuxmpraf",
- "g",
- "khocxvdfffwaf",
- "roud",
- "spave",
- new TargetInner()
- .withLocation("vkbunzozudh")
- .withProperties(mapOf("bzydvfvfcj", "datagkmoyxcdyuibhmfd")),
- com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("faxvxil", response.location());
- }
-
- @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;
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsDeleteWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsDeleteWithResponseMockTests.java
deleted file mode 100644
index 3d42aa00371b..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsDeleteWithResponseMockTests.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class TargetsDeleteWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .targets()
- .deleteWithResponse(
- "hzvhxnkomtkubo",
- "ppnvdxz",
- "hihfrbbcevqagtlt",
- "hlfkqojpy",
- "vgtrdcnifmzzs",
- com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsGetWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsGetWithResponseMockTests.java
deleted file mode 100644
index d0a7d51049a1..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.models.Target;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class TargetsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"location\":\"digumbnr\",\"properties\":{\"ezwwv\":\"datauzzptjazysdz\",\"kphhq\":\"dataiqyuvvfo\",\"luwmncst\":\"dataikvylauya\"},\"id\":\"ijf\",\"name\":\"bvpoekrsgsgbdhu\",\"type\":\"qgnjdgkynscli\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- Target response =
- manager
- .targets()
- .getWithResponse("iayz", "iykhy", "wf", "jlb", "xqvkjlmxhomdyn", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("digumbnr", response.location());
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsListMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsListMockTests.java
deleted file mode 100644
index e17ea1d4cad8..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsListMockTests.java
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.chaos.ChaosManager;
-import com.azure.resourcemanager.chaos.models.Target;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class TargetsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"location\":\"wytpzdmovz\",\"properties\":{\"wzqa\":\"datava\",\"gzuriglaecxndt\":\"dataf\"},\"id\":\"cokpv\",\"name\":\"mlqtmldgxob\",\"type\":\"irclnpk\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ChaosManager manager =
- ChaosManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.targets().list("rr", "vpglydz", "krvq", "ev", "oepry", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("wytpzdmovz", response.iterator().next().location());
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/UserAssignedIdentityTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/UserAssignedIdentityTests.java
deleted file mode 100644
index 64ca03406fdb..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/UserAssignedIdentityTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.chaos.models.UserAssignedIdentity;
-
-public final class UserAssignedIdentityTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- UserAssignedIdentity model =
- BinaryData
- .fromString(
- "{\"principalId\":\"f0587e23-7bf1-4453-bbb9-ab410faf672c\",\"clientId\":\"94a39a62-5bd2-4857-bd90-537aa9ca7742\"}")
- .toObject(UserAssignedIdentity.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- UserAssignedIdentity model = new UserAssignedIdentity();
- model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class);
- }
-}