scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
+ private Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Sets the retry policy to the HTTP pipeline.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the default poll interval, used when service does not provide "Retry-After" header.
+ *
+ * @param defaultPollInterval the default poll interval.
+ * @return the configurable object itself.
+ */
+ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of Chaos service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Chaos service API instance.
+ */
+ public ChaosManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder
+ .append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.chaos")
+ .append("/")
+ .append("1.0.0-beta.1");
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder
+ .append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
+ if (retryPolicy == null) {
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
+ policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new ChaosManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of Capabilities.
+ *
+ * @return Resource collection API of Capabilities.
+ */
+ public Capabilities capabilities() {
+ if (this.capabilities == null) {
+ this.capabilities = new CapabilitiesImpl(clientObject.getCapabilities(), this);
+ }
+ return capabilities;
+ }
+
+ /**
+ * Gets the resource collection API of CapabilityTypes.
+ *
+ * @return Resource collection API of CapabilityTypes.
+ */
+ public CapabilityTypes capabilityTypes() {
+ if (this.capabilityTypes == null) {
+ this.capabilityTypes = new CapabilityTypesImpl(clientObject.getCapabilityTypes(), this);
+ }
+ return capabilityTypes;
+ }
+
+ /**
+ * Gets the resource collection API of Experiments. It manages Experiment.
+ *
+ * @return Resource collection API of Experiments.
+ */
+ public Experiments experiments() {
+ if (this.experiments == null) {
+ this.experiments = new ExperimentsImpl(clientObject.getExperiments(), this);
+ }
+ return experiments;
+ }
+
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * Gets the resource collection API of TargetTypes.
+ *
+ * @return Resource collection API of TargetTypes.
+ */
+ public TargetTypes targetTypes() {
+ if (this.targetTypes == null) {
+ this.targetTypes = new TargetTypesImpl(clientObject.getTargetTypes(), this);
+ }
+ return targetTypes;
+ }
+
+ /**
+ * Gets the resource collection API of Targets.
+ *
+ * @return Resource collection API of Targets.
+ */
+ public Targets targets() {
+ if (this.targets == null) {
+ this.targets = new TargetsImpl(clientObject.getTargets(), this);
+ }
+ return targets;
+ }
+
+ /**
+ * @return Wrapped service client ChaosManagementClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ */
+ public ChaosManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/CapabilitiesClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/CapabilitiesClient.java
new file mode 100644
index 0000000000000..9de7900898eea
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/CapabilitiesClient.java
@@ -0,0 +1,210 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner;
+
+/** An instance of this class provides access to all the operations defined in CapabilitiesClient. */
+public interface CapabilitiesClient {
+ /**
+ * Get a list of Capability resources that extend a Target resource..
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Capability resources that extend a Target resource. as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName);
+
+ /**
+ * Get a list of Capability resources that extend a Target resource..
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Capability resources that extend a Target resource. as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String continuationToken,
+ Context context);
+
+ /**
+ * Get a Capability resource that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Capability resource that extends a Target resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName,
+ Context context);
+
+ /**
+ * Get a Capability resource that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Capability resource that extends a Target resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CapabilityInner get(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName);
+
+ /**
+ * Delete a Capability that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability 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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName,
+ Context context);
+
+ /**
+ * Delete a Capability that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName);
+
+ /**
+ * Create or update a Capability resource that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability resource name.
+ * @param capability Capability resource to be created or updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a Capability resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName,
+ CapabilityInner capability,
+ Context context);
+
+ /**
+ * Create or update a Capability resource that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability resource name.
+ * @param capability Capability resource to be created or updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a Capability resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CapabilityInner createOrUpdate(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName,
+ CapabilityInner capability);
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/CapabilityTypesClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/CapabilityTypesClient.java
new file mode 100644
index 0000000000000..1bf7ffdeaf694
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/CapabilityTypesClient.java
@@ -0,0 +1,76 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeInner;
+
+/** An instance of this class provides access to all the operations defined in CapabilityTypesClient. */
+public interface CapabilityTypesClient {
+ /**
+ * Get a list of Capability Type resources for given Target Type and location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param targetTypeName String that represents a Target Type resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Capability Type resources for given Target Type and location as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String locationName, String targetTypeName);
+
+ /**
+ * Get a list of Capability Type resources for given Target Type and location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param targetTypeName String that represents a Target Type resource name.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Capability Type resources for given Target Type and location as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String locationName, String targetTypeName, String continuationToken, Context context);
+
+ /**
+ * Get a Capability Type resource for given Target Type and location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param targetTypeName String that represents a Target Type resource name.
+ * @param capabilityTypeName String that represents a Capability Type resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Capability Type resource for given Target Type and location along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String locationName, String targetTypeName, String capabilityTypeName, Context context);
+
+ /**
+ * Get a Capability Type resource for given Target Type and location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param targetTypeName String that represents a Target Type resource name.
+ * @param capabilityTypeName String that represents a Capability Type resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Capability Type resource for given Target Type and location.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CapabilityTypeInner get(String locationName, String targetTypeName, String capabilityTypeName);
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ChaosManagementClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ChaosManagementClient.java
new file mode 100644
index 0000000000000..a0154a97764ed
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ChaosManagementClient.java
@@ -0,0 +1,88 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for ChaosManagementClient class. */
+public interface ChaosManagementClient {
+ /**
+ * Gets GUID that represents an Azure subscription ID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the CapabilitiesClient object to access its operations.
+ *
+ * @return the CapabilitiesClient object.
+ */
+ CapabilitiesClient getCapabilities();
+
+ /**
+ * Gets the CapabilityTypesClient object to access its operations.
+ *
+ * @return the CapabilityTypesClient object.
+ */
+ CapabilityTypesClient getCapabilityTypes();
+
+ /**
+ * Gets the ExperimentsClient object to access its operations.
+ *
+ * @return the ExperimentsClient object.
+ */
+ ExperimentsClient getExperiments();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the TargetTypesClient object to access its operations.
+ *
+ * @return the TargetTypesClient object.
+ */
+ TargetTypesClient getTargetTypes();
+
+ /**
+ * Gets the TargetsClient object to access its operations.
+ *
+ * @return the TargetsClient object.
+ */
+ TargetsClient getTargets();
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ExperimentsClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ExperimentsClient.java
new file mode 100644
index 0000000000000..30bff058e38e9
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ExperimentsClient.java
@@ -0,0 +1,331 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.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;
+
+/** An instance of this class provides access to all the operations defined in ExperimentsClient. */
+public interface ExperimentsClient {
+ /**
+ * Get a list of Experiment resources in a subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Get a list of Experiment resources in a subscription.
+ *
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Boolean running, String continuationToken, Context context);
+
+ /**
+ * Get a list of Experiment resources in a resource group.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a resource group as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Get a list of Experiment resources in a resource group.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a resource group as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(
+ String resourceGroupName, Boolean running, String continuationToken, Context context);
+
+ /**
+ * 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.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String experimentName, Context 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String experimentName);
+
+ /**
+ * Get 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 a Experiment resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String experimentName, Context context);
+
+ /**
+ * Get 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExperimentInner getByResourceGroup(String resourceGroupName, String experimentName);
+
+ /**
+ * 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 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 a Experiment resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName, String experimentName, ExperimentInner experiment, Context 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 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 a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExperimentInner createOrUpdate(String resourceGroupName, String experimentName, ExperimentInner experiment);
+
+ /**
+ * 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 along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response cancelWithResponse(
+ String resourceGroupName, String experimentName, Context 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExperimentCancelOperationResultInner cancel(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 along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response startWithResponse(
+ 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.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExperimentStartOperationResultInner start(String resourceGroupName, String experimentName);
+
+ /**
+ * Get a list of statuses of 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of statuses of a Experiment resource as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listAllStatuses(String resourceGroupName, String experimentName);
+
+ /**
+ * Get a list of statuses of 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 a list of statuses of a Experiment resource as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listAllStatuses(
+ String resourceGroupName, String experimentName, Context context);
+
+ /**
+ * Get a status of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param statusId GUID that represents a Experiment status.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a status of a Experiment resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getStatusWithResponse(
+ String resourceGroupName, String experimentName, String statusId, Context context);
+
+ /**
+ * Get a status of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param statusId GUID that represents a Experiment status.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a status of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExperimentStatusInner getStatus(String resourceGroupName, String experimentName, String statusId);
+
+ /**
+ * Get a list of execution details of 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of execution details of a Experiment resource as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listExecutionDetails(
+ String resourceGroupName, String experimentName);
+
+ /**
+ * Get a list of execution details of 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 a list of execution details of a Experiment resource as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listExecutionDetails(
+ String resourceGroupName, String experimentName, Context context);
+
+ /**
+ * Get an execution detail of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param executionDetailsId GUID that represents a Experiment execution detail.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an execution detail of a Experiment resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getExecutionDetailsWithResponse(
+ String resourceGroupName, String experimentName, String executionDetailsId, Context context);
+
+ /**
+ * Get an execution detail of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param executionDetailsId GUID that represents a Experiment execution detail.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an execution detail of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExperimentExecutionDetailsInner getExecutionDetails(
+ String resourceGroupName, String experimentName, String executionDetailsId);
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/OperationsClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/OperationsClient.java
new file mode 100644
index 0000000000000..fdd25c05ff159
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/OperationsClient.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.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.chaos.fluent.models.OperationInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * Get a list all available Operations.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list all available Operations as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listAll();
+
+ /**
+ * Get a list all available Operations.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list all available Operations as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listAll(Context context);
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/TargetTypesClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/TargetTypesClient.java
new file mode 100644
index 0000000000000..46f1a4177d1fe
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/TargetTypesClient.java
@@ -0,0 +1,68 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.chaos.fluent.models.TargetTypeInner;
+
+/** An instance of this class provides access to all the operations defined in TargetTypesClient. */
+public interface TargetTypesClient {
+ /**
+ * Get a list of Target Type resources for given location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Target Type resources for given location as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String locationName);
+
+ /**
+ * Get a list of Target Type resources for given location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Target Type resources for given location as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String locationName, String continuationToken, Context context);
+
+ /**
+ * Get a Target Type resources for given location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param targetTypeName String that represents a Target Type resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Target Type resources for given location along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String locationName, String targetTypeName, Context context);
+
+ /**
+ * Get a Target Type resources for given location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param targetTypeName String that represents a Target Type resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Target Type resources for given location.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TargetTypeInner get(String locationName, String targetTypeName);
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/TargetsClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/TargetsClient.java
new file mode 100644
index 0000000000000..a3ec48e28f4b0
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/TargetsClient.java
@@ -0,0 +1,191 @@
+// 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;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.chaos.fluent.models.TargetInner;
+
+/** An instance of this class provides access to all the operations defined in TargetsClient. */
+public interface TargetsClient {
+ /**
+ * Get a list of Target resources that extend a tracked regional resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Target resources that extend a tracked regional resource as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String resourceGroupName, String parentProviderNamespace, String parentResourceType, String parentResourceName);
+
+ /**
+ * Get a list of Target resources that extend a tracked regional resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Target resources that extend a tracked regional resource as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String continuationToken,
+ Context context);
+
+ /**
+ * Get a Target resource that extends a tracked regional resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Target resource that extends a tracked regional resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ Context context);
+
+ /**
+ * Get a Target resource that extends a tracked regional resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Target resource that extends a tracked regional resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TargetInner get(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName);
+
+ /**
+ * Delete a Target resource that extends a tracked regional resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target 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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ Context context);
+
+ /**
+ * Delete a Target resource that extends a tracked regional resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName);
+
+ /**
+ * Create or update a Target resource that extends a tracked regional resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param target Target resource to be created or updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a Target resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ TargetInner target,
+ Context context);
+
+ /**
+ * Create or update a Target resource that extends a tracked regional resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param target Target resource to be created or updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a Target resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TargetInner createOrUpdate(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ TargetInner target);
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityInner.java
new file mode 100644
index 0000000000000..32126fd4a0729
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityInner.java
@@ -0,0 +1,104 @@
+// 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.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Model that represents a Capability resource. */
+@Immutable
+public final class CapabilityInner extends ProxyResource {
+ /*
+ * The standard system metadata of a resource type.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /*
+ * The properties of a capability resource.
+ */
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private CapabilityProperties innerProperties;
+
+ /** Creates an instance of CapabilityInner class. */
+ public CapabilityInner() {
+ }
+
+ /**
+ * Get the systemData property: The standard system metadata of a resource type.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the innerProperties property: The properties of a capability resource.
+ *
+ * @return the innerProperties value.
+ */
+ private CapabilityProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the publisher property: String of the Publisher that this Capability extends.
+ *
+ * @return the publisher value.
+ */
+ public String publisher() {
+ return this.innerProperties() == null ? null : this.innerProperties().publisher();
+ }
+
+ /**
+ * Get the targetType property: String of the Target Type that this Capability extends.
+ *
+ * @return the targetType value.
+ */
+ public String targetType() {
+ return this.innerProperties() == null ? null : this.innerProperties().targetType();
+ }
+
+ /**
+ * Get the description property: Localized string of the description.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * Get the parametersSchema property: URL to retrieve JSON schema of the Capability parameters.
+ *
+ * @return the parametersSchema value.
+ */
+ public String parametersSchema() {
+ return this.innerProperties() == null ? null : this.innerProperties().parametersSchema();
+ }
+
+ /**
+ * Get the urn property: String of the URN for this Capability Type.
+ *
+ * @return the urn value.
+ */
+ public String urn() {
+ return this.innerProperties() == null ? null : this.innerProperties().urn();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityProperties.java
new file mode 100644
index 0000000000000..4970fe21a6cac
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityProperties.java
@@ -0,0 +1,99 @@
+// 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 Capability properties model. */
+@Immutable
+public final class CapabilityProperties {
+ /*
+ * String of the Publisher that this Capability extends.
+ */
+ @JsonProperty(value = "publisher", access = JsonProperty.Access.WRITE_ONLY)
+ private String publisher;
+
+ /*
+ * String of the Target Type that this Capability extends.
+ */
+ @JsonProperty(value = "targetType", access = JsonProperty.Access.WRITE_ONLY)
+ private String targetType;
+
+ /*
+ * Localized string of the description.
+ */
+ @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
+ private String description;
+
+ /*
+ * URL to retrieve JSON schema of the Capability parameters.
+ */
+ @JsonProperty(value = "parametersSchema", access = JsonProperty.Access.WRITE_ONLY)
+ private String parametersSchema;
+
+ /*
+ * String of the URN for this Capability Type.
+ */
+ @JsonProperty(value = "urn", access = JsonProperty.Access.WRITE_ONLY)
+ private String urn;
+
+ /** Creates an instance of CapabilityProperties class. */
+ public CapabilityProperties() {
+ }
+
+ /**
+ * Get the publisher property: String of the Publisher that this Capability extends.
+ *
+ * @return the publisher value.
+ */
+ public String publisher() {
+ return this.publisher;
+ }
+
+ /**
+ * Get the targetType property: String of the Target Type that this Capability extends.
+ *
+ * @return the targetType value.
+ */
+ public String targetType() {
+ return this.targetType;
+ }
+
+ /**
+ * Get the description property: Localized string of the description.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Get the parametersSchema property: URL to retrieve JSON schema of the Capability parameters.
+ *
+ * @return the parametersSchema value.
+ */
+ public String parametersSchema() {
+ return this.parametersSchema;
+ }
+
+ /**
+ * Get the urn property: String of the URN for this Capability Type.
+ *
+ * @return the urn value.
+ */
+ public String urn() {
+ return this.urn;
+ }
+
+ /**
+ * 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/CapabilityTypeInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeInner.java
new file mode 100644
index 0000000000000..adc631cb22ee4
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeInner.java
@@ -0,0 +1,172 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.chaos.models.CapabilityTypePropertiesRuntimeProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Model that represents a Capability Type resource. */
+@Fluent
+public final class CapabilityTypeInner extends ProxyResource {
+ /*
+ * The system metadata properties of the capability type resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /*
+ * Location of the Capability Type resource.
+ */
+ @JsonProperty(value = "location")
+ private String location;
+
+ /*
+ * The properties of the capability type resource.
+ */
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private CapabilityTypeProperties innerProperties;
+
+ /** Creates an instance of CapabilityTypeInner class. */
+ public CapabilityTypeInner() {
+ }
+
+ /**
+ * Get the systemData property: The system metadata properties of the capability type resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the location property: Location of the Capability Type resource.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: Location of the Capability Type resource.
+ *
+ * @param location the location value to set.
+ * @return the CapabilityTypeInner object itself.
+ */
+ public CapabilityTypeInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the innerProperties property: The properties of the capability type resource.
+ *
+ * @return the innerProperties value.
+ */
+ private CapabilityTypeProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the publisher property: String of the Publisher that this Capability Type extends.
+ *
+ * @return the publisher value.
+ */
+ public String publisher() {
+ return this.innerProperties() == null ? null : this.innerProperties().publisher();
+ }
+
+ /**
+ * Get the targetType property: String of the Target Type that this Capability Type extends.
+ *
+ * @return the targetType value.
+ */
+ public String targetType() {
+ return this.innerProperties() == null ? null : this.innerProperties().targetType();
+ }
+
+ /**
+ * Get the displayName property: Localized string of the display name.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.innerProperties() == null ? null : this.innerProperties().displayName();
+ }
+
+ /**
+ * Get the description property: Localized string of the description.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * Get the parametersSchema property: URL to retrieve JSON schema of the Capability Type parameters.
+ *
+ * @return the parametersSchema value.
+ */
+ public String parametersSchema() {
+ return this.innerProperties() == null ? null : this.innerProperties().parametersSchema();
+ }
+
+ /**
+ * Get the urn property: String of the URN for this Capability Type.
+ *
+ * @return the urn value.
+ */
+ public String urn() {
+ return this.innerProperties() == null ? null : this.innerProperties().urn();
+ }
+
+ /**
+ * Get the kind property: String of the kind of this Capability Type.
+ *
+ * @return the kind value.
+ */
+ public String kind() {
+ return this.innerProperties() == null ? null : this.innerProperties().kind();
+ }
+
+ /**
+ * Get the runtimeProperties property: Runtime properties of this Capability Type.
+ *
+ * @return the runtimeProperties value.
+ */
+ public CapabilityTypePropertiesRuntimeProperties runtimeProperties() {
+ return this.innerProperties() == null ? null : this.innerProperties().runtimeProperties();
+ }
+
+ /**
+ * Set the runtimeProperties property: Runtime properties of this Capability Type.
+ *
+ * @param runtimeProperties the runtimeProperties value to set.
+ * @return the CapabilityTypeInner object itself.
+ */
+ public CapabilityTypeInner withRuntimeProperties(CapabilityTypePropertiesRuntimeProperties runtimeProperties) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CapabilityTypeProperties();
+ }
+ this.innerProperties().withRuntimeProperties(runtimeProperties);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeProperties.java
new file mode 100644
index 0000000000000..550aa50f64630
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeProperties.java
@@ -0,0 +1,159 @@
+// 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.resourcemanager.chaos.models.CapabilityTypePropertiesRuntimeProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Model that represents the Capability Type properties model. */
+@Fluent
+public final class CapabilityTypeProperties {
+ /*
+ * String of the Publisher that this Capability Type extends.
+ */
+ @JsonProperty(value = "publisher", access = JsonProperty.Access.WRITE_ONLY)
+ private String publisher;
+
+ /*
+ * String of the Target Type that this Capability Type extends.
+ */
+ @JsonProperty(value = "targetType", access = JsonProperty.Access.WRITE_ONLY)
+ private String targetType;
+
+ /*
+ * Localized string of the display name.
+ */
+ @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String displayName;
+
+ /*
+ * Localized string of the description.
+ */
+ @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
+ private String description;
+
+ /*
+ * URL to retrieve JSON schema of the Capability Type parameters.
+ */
+ @JsonProperty(value = "parametersSchema", access = JsonProperty.Access.WRITE_ONLY)
+ private String parametersSchema;
+
+ /*
+ * String of the URN for this Capability Type.
+ */
+ @JsonProperty(value = "urn", access = JsonProperty.Access.WRITE_ONLY)
+ private String urn;
+
+ /*
+ * String of the kind of this Capability Type.
+ */
+ @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY)
+ private String kind;
+
+ /*
+ * Runtime properties of this Capability Type.
+ */
+ @JsonProperty(value = "runtimeProperties")
+ private CapabilityTypePropertiesRuntimeProperties runtimeProperties;
+
+ /** Creates an instance of CapabilityTypeProperties class. */
+ public CapabilityTypeProperties() {
+ }
+
+ /**
+ * Get the publisher property: String of the Publisher that this Capability Type extends.
+ *
+ * @return the publisher value.
+ */
+ public String publisher() {
+ return this.publisher;
+ }
+
+ /**
+ * Get the targetType property: String of the Target Type that this Capability Type extends.
+ *
+ * @return the targetType value.
+ */
+ public String targetType() {
+ return this.targetType;
+ }
+
+ /**
+ * Get the displayName property: Localized string of the display name.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Get the description property: Localized string of the description.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Get the parametersSchema property: URL to retrieve JSON schema of the Capability Type parameters.
+ *
+ * @return the parametersSchema value.
+ */
+ public String parametersSchema() {
+ return this.parametersSchema;
+ }
+
+ /**
+ * Get the urn property: String of the URN for this Capability Type.
+ *
+ * @return the urn value.
+ */
+ public String urn() {
+ return this.urn;
+ }
+
+ /**
+ * Get the kind property: String of the kind of this Capability Type.
+ *
+ * @return the kind value.
+ */
+ public String kind() {
+ return this.kind;
+ }
+
+ /**
+ * Get the runtimeProperties property: Runtime properties of this Capability Type.
+ *
+ * @return the runtimeProperties value.
+ */
+ public CapabilityTypePropertiesRuntimeProperties runtimeProperties() {
+ return this.runtimeProperties;
+ }
+
+ /**
+ * Set the runtimeProperties property: Runtime properties of this Capability Type.
+ *
+ * @param runtimeProperties the runtimeProperties value to set.
+ * @return the CapabilityTypeProperties object itself.
+ */
+ public CapabilityTypeProperties withRuntimeProperties(CapabilityTypePropertiesRuntimeProperties runtimeProperties) {
+ this.runtimeProperties = runtimeProperties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (runtimeProperties() != null) {
+ runtimeProperties().validate();
+ }
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentCancelOperationResultInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentCancelOperationResultInner.java
new file mode 100644
index 0000000000000..051a70ae06f43
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentCancelOperationResultInner.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Model that represents the result of a cancel Experiment operation. */
+@Immutable
+public final class ExperimentCancelOperationResultInner {
+ /*
+ * 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 ExperimentCancelOperationResultInner class. */
+ public ExperimentCancelOperationResultInner() {
+ }
+
+ /**
+ * 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/ExperimentExecutionDetailsInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsInner.java
new file mode 100644
index 0000000000000..0df49eb47164c
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsInner.java
@@ -0,0 +1,161 @@
+// 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.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Model that represents the execution details of a Experiment. */
+@Immutable
+public final class ExperimentExecutionDetailsInner {
+ /*
+ * String of the resource type.
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private String type;
+
+ /*
+ * String of the fully qualified resource ID.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /*
+ * String of the resource name.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * The properties of the experiment execution details.
+ */
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private ExperimentExecutionDetailsProperties innerProperties;
+
+ /** Creates an instance of ExperimentExecutionDetailsInner class. */
+ public ExperimentExecutionDetailsInner() {
+ }
+
+ /**
+ * Get the type property: String of the resource type.
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the id property: String of the fully qualified resource ID.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: String of the resource name.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the innerProperties property: The properties of the experiment execution details.
+ *
+ * @return the innerProperties value.
+ */
+ private ExperimentExecutionDetailsProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the experimentId property: The id of the experiment.
+ *
+ * @return the experimentId value.
+ */
+ public String experimentId() {
+ return this.innerProperties() == null ? null : this.innerProperties().experimentId();
+ }
+
+ /**
+ * Get the status property: The value of the status of the experiment execution.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.innerProperties() == null ? null : this.innerProperties().status();
+ }
+
+ /**
+ * Get the failureReason property: The reason why the execution failed.
+ *
+ * @return the failureReason value.
+ */
+ public String failureReason() {
+ return this.innerProperties() == null ? null : this.innerProperties().failureReason();
+ }
+
+ /**
+ * Get the createdDateTime property: String that represents the created date time.
+ *
+ * @return the createdDateTime value.
+ */
+ public OffsetDateTime createdDateTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().createdDateTime();
+ }
+
+ /**
+ * Get the lastActionDateTime property: String that represents the last action date time.
+ *
+ * @return the lastActionDateTime value.
+ */
+ public OffsetDateTime lastActionDateTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().lastActionDateTime();
+ }
+
+ /**
+ * Get the startDateTime property: String that represents the start date time.
+ *
+ * @return the startDateTime value.
+ */
+ public OffsetDateTime startDateTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().startDateTime();
+ }
+
+ /**
+ * Get the stopDateTime property: String that represents the stop date time.
+ *
+ * @return the stopDateTime value.
+ */
+ public OffsetDateTime stopDateTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().stopDateTime();
+ }
+
+ /**
+ * Get the runInformation property: The information of the experiment run.
+ *
+ * @return the runInformation value.
+ */
+ public ExperimentExecutionDetailsPropertiesRunInformation runInformation() {
+ return this.innerProperties() == null ? null : this.innerProperties().runInformation();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsProperties.java
new file mode 100644
index 0000000000000..4ef82667e0726
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsProperties.java
@@ -0,0 +1,149 @@
+// 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.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Model that represents the Experiment execution details properties model. */
+@Immutable
+public final class ExperimentExecutionDetailsProperties {
+ /*
+ * The id of the experiment.
+ */
+ @JsonProperty(value = "experimentId", access = JsonProperty.Access.WRITE_ONLY)
+ private String experimentId;
+
+ /*
+ * The value of the status of the experiment execution.
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private String status;
+
+ /*
+ * The reason why the execution failed.
+ */
+ @JsonProperty(value = "failureReason", access = JsonProperty.Access.WRITE_ONLY)
+ private String failureReason;
+
+ /*
+ * String that represents the created date time.
+ */
+ @JsonProperty(value = "createdDateTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime createdDateTime;
+
+ /*
+ * String that represents the last action date time.
+ */
+ @JsonProperty(value = "lastActionDateTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime lastActionDateTime;
+
+ /*
+ * String that represents the start date time.
+ */
+ @JsonProperty(value = "startDateTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime startDateTime;
+
+ /*
+ * String that represents the stop date time.
+ */
+ @JsonProperty(value = "stopDateTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime stopDateTime;
+
+ /*
+ * The information of the experiment run.
+ */
+ @JsonProperty(value = "runInformation", access = JsonProperty.Access.WRITE_ONLY)
+ private ExperimentExecutionDetailsPropertiesRunInformation runInformation;
+
+ /** Creates an instance of ExperimentExecutionDetailsProperties class. */
+ public ExperimentExecutionDetailsProperties() {
+ }
+
+ /**
+ * Get the experimentId property: The id of the experiment.
+ *
+ * @return the experimentId value.
+ */
+ public String experimentId() {
+ return this.experimentId;
+ }
+
+ /**
+ * Get the status property: The value of the status of the experiment execution.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Get the failureReason property: The reason why the execution failed.
+ *
+ * @return the failureReason value.
+ */
+ public String failureReason() {
+ return this.failureReason;
+ }
+
+ /**
+ * Get the createdDateTime property: String that represents the created date time.
+ *
+ * @return the createdDateTime value.
+ */
+ public OffsetDateTime createdDateTime() {
+ return this.createdDateTime;
+ }
+
+ /**
+ * Get the lastActionDateTime property: String that represents the last action date time.
+ *
+ * @return the lastActionDateTime value.
+ */
+ public OffsetDateTime lastActionDateTime() {
+ return this.lastActionDateTime;
+ }
+
+ /**
+ * Get the startDateTime property: String that represents the start date time.
+ *
+ * @return the startDateTime value.
+ */
+ public OffsetDateTime startDateTime() {
+ return this.startDateTime;
+ }
+
+ /**
+ * Get the stopDateTime property: String that represents the stop date time.
+ *
+ * @return the stopDateTime value.
+ */
+ public OffsetDateTime stopDateTime() {
+ return this.stopDateTime;
+ }
+
+ /**
+ * Get the runInformation property: The information of the experiment run.
+ *
+ * @return the runInformation value.
+ */
+ public ExperimentExecutionDetailsPropertiesRunInformation runInformation() {
+ return this.runInformation;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (runInformation() != null) {
+ runInformation().validate();
+ }
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentInner.java
new file mode 100644
index 0000000000000..6e8ea34c269d7
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentInner.java
@@ -0,0 +1,185 @@
+// 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.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.chaos.models.ResourceIdentity;
+import com.azure.resourcemanager.chaos.models.Selector;
+import com.azure.resourcemanager.chaos.models.Step;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** Model that represents a Experiment resource. */
+@Fluent
+public final class ExperimentInner extends Resource {
+ /*
+ * The system metadata of the experiment resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /*
+ * The identity of the experiment resource.
+ */
+ @JsonProperty(value = "identity")
+ private ResourceIdentity identity;
+
+ /*
+ * The properties of the experiment resource.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private ExperimentProperties innerProperties = new ExperimentProperties();
+
+ /** Creates an instance of ExperimentInner class. */
+ public ExperimentInner() {
+ }
+
+ /**
+ * Get the systemData property: The system metadata of the experiment resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the identity property: The identity of the experiment resource.
+ *
+ * @return the identity value.
+ */
+ public ResourceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The identity of the experiment resource.
+ *
+ * @param identity the identity value to set.
+ * @return the ExperimentInner object itself.
+ */
+ public ExperimentInner withIdentity(ResourceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the innerProperties property: The properties of the experiment resource.
+ *
+ * @return the innerProperties value.
+ */
+ private ExperimentProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ExperimentInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ExperimentInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the steps property: List of steps.
+ *
+ * @return the steps value.
+ */
+ public List steps() {
+ return this.innerProperties() == null ? null : this.innerProperties().steps();
+ }
+
+ /**
+ * Set the steps property: List of steps.
+ *
+ * @param steps the steps value to set.
+ * @return the ExperimentInner object itself.
+ */
+ public ExperimentInner withSteps(List steps) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ExperimentProperties();
+ }
+ this.innerProperties().withSteps(steps);
+ return this;
+ }
+
+ /**
+ * Get the selectors property: List of selectors.
+ *
+ * @return the selectors value.
+ */
+ public List selectors() {
+ return this.innerProperties() == null ? null : this.innerProperties().selectors();
+ }
+
+ /**
+ * Set the selectors property: List of selectors.
+ *
+ * @param selectors the selectors value to set.
+ * @return the ExperimentInner object itself.
+ */
+ public ExperimentInner withSelectors(List selectors) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ExperimentProperties();
+ }
+ this.innerProperties().withSelectors(selectors);
+ return this;
+ }
+
+ /**
+ * Get the startOnCreation property: A boolean value that indicates if experiment should be started on creation or
+ * not.
+ *
+ * @return the startOnCreation value.
+ */
+ public Boolean startOnCreation() {
+ return this.innerProperties() == null ? null : this.innerProperties().startOnCreation();
+ }
+
+ /**
+ * Set the startOnCreation property: A boolean value that indicates if experiment should be started on creation or
+ * not.
+ *
+ * @param startOnCreation the startOnCreation value to set.
+ * @return the ExperimentInner object itself.
+ */
+ public ExperimentInner withStartOnCreation(Boolean startOnCreation) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ExperimentProperties();
+ }
+ this.innerProperties().withStartOnCreation(startOnCreation);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (identity() != null) {
+ identity().validate();
+ }
+ if (innerProperties() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property innerProperties in model ExperimentInner"));
+ } else {
+ innerProperties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ExperimentInner.class);
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentProperties.java
new file mode 100644
index 0000000000000..81e0dcaf89e35
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentProperties.java
@@ -0,0 +1,124 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.chaos.models.Selector;
+import com.azure.resourcemanager.chaos.models.Step;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Model that represents the Experiment properties model. */
+@Fluent
+public final class ExperimentProperties {
+ /*
+ * List of steps.
+ */
+ @JsonProperty(value = "steps", required = true)
+ private List steps;
+
+ /*
+ * List of selectors.
+ */
+ @JsonProperty(value = "selectors", required = true)
+ private List selectors;
+
+ /*
+ * A boolean value that indicates if experiment should be started on creation or not.
+ */
+ @JsonProperty(value = "startOnCreation")
+ private Boolean startOnCreation;
+
+ /** Creates an instance of ExperimentProperties class. */
+ public ExperimentProperties() {
+ }
+
+ /**
+ * Get the steps property: List of steps.
+ *
+ * @return the steps value.
+ */
+ public List steps() {
+ return this.steps;
+ }
+
+ /**
+ * Set the steps property: List of steps.
+ *
+ * @param steps the steps value to set.
+ * @return the ExperimentProperties object itself.
+ */
+ public ExperimentProperties withSteps(List steps) {
+ this.steps = steps;
+ return this;
+ }
+
+ /**
+ * Get the selectors property: List of selectors.
+ *
+ * @return the selectors value.
+ */
+ public List selectors() {
+ return this.selectors;
+ }
+
+ /**
+ * Set the selectors property: List of selectors.
+ *
+ * @param selectors the selectors value to set.
+ * @return the ExperimentProperties object itself.
+ */
+ public ExperimentProperties withSelectors(List selectors) {
+ this.selectors = selectors;
+ return this;
+ }
+
+ /**
+ * Get the startOnCreation property: A boolean value that indicates if experiment should be started on creation or
+ * not.
+ *
+ * @return the startOnCreation value.
+ */
+ public Boolean startOnCreation() {
+ return this.startOnCreation;
+ }
+
+ /**
+ * Set the startOnCreation property: A boolean value that indicates if experiment should be started on creation or
+ * not.
+ *
+ * @param startOnCreation the startOnCreation value to set.
+ * @return the ExperimentProperties object itself.
+ */
+ public ExperimentProperties withStartOnCreation(Boolean startOnCreation) {
+ this.startOnCreation = startOnCreation;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (steps() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property steps in model ExperimentProperties"));
+ } else {
+ steps().forEach(e -> e.validate());
+ }
+ if (selectors() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property selectors in model ExperimentProperties"));
+ } else {
+ selectors().forEach(e -> e.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
new file mode 100644
index 0000000000000..03dc806d31cd5
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentStartOperationResultInner.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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/ExperimentStatusInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentStatusInner.java
new file mode 100644
index 0000000000000..9d65b12242b61
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentStatusInner.java
@@ -0,0 +1,115 @@
+// 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;
+import java.time.OffsetDateTime;
+
+/** Model that represents the status of a Experiment. */
+@Immutable
+public final class ExperimentStatusInner {
+ /*
+ * String of the resource type.
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private String type;
+
+ /*
+ * String of the fully qualified resource ID.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /*
+ * String of the resource name.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * The properties of experiment execution status.
+ */
+ @JsonProperty(value = "properties")
+ private ExperimentStatusProperties innerProperties;
+
+ /** Creates an instance of ExperimentStatusInner class. */
+ public ExperimentStatusInner() {
+ }
+
+ /**
+ * Get the type property: String of the resource type.
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the id property: String of the fully qualified resource ID.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: String of the resource name.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the innerProperties property: The properties of experiment execution status.
+ *
+ * @return the innerProperties value.
+ */
+ private ExperimentStatusProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the status property: String that represents the status of a Experiment.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.innerProperties() == null ? null : this.innerProperties().status();
+ }
+
+ /**
+ * Get the createdDateUtc property: String that represents the created date time of a Experiment.
+ *
+ * @return the createdDateUtc value.
+ */
+ public OffsetDateTime createdDateUtc() {
+ return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc();
+ }
+
+ /**
+ * Get the endDateUtc property: String that represents the end date time of a Experiment.
+ *
+ * @return the endDateUtc value.
+ */
+ public OffsetDateTime endDateUtc() {
+ return this.innerProperties() == null ? null : this.innerProperties().endDateUtc();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentStatusProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentStatusProperties.java
new file mode 100644
index 0000000000000..cef7dca7b1fbb
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentStatusProperties.java
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Model that represents the Experiment status properties model. */
+@Immutable
+public final class ExperimentStatusProperties {
+ /*
+ * String that represents the status of a Experiment.
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private String status;
+
+ /*
+ * String that represents the created date time of a Experiment.
+ */
+ @JsonProperty(value = "createdDateUtc", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime createdDateUtc;
+
+ /*
+ * String that represents the end date time of a Experiment.
+ */
+ @JsonProperty(value = "endDateUtc", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime endDateUtc;
+
+ /** Creates an instance of ExperimentStatusProperties class. */
+ public ExperimentStatusProperties() {
+ }
+
+ /**
+ * Get the status property: String that represents the status of a Experiment.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Get the createdDateUtc property: String that represents the created date time of a Experiment.
+ *
+ * @return the createdDateUtc value.
+ */
+ public OffsetDateTime createdDateUtc() {
+ return this.createdDateUtc;
+ }
+
+ /**
+ * Get the endDateUtc property: String that represents the end date time of a Experiment.
+ *
+ * @return the endDateUtc value.
+ */
+ public OffsetDateTime endDateUtc() {
+ return this.endDateUtc;
+ }
+
+ /**
+ * 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/OperationInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationInner.java
new file mode 100644
index 0000000000000..e710daaf81ae3
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationInner.java
@@ -0,0 +1,127 @@
+// 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.resourcemanager.chaos.models.ActionType;
+import com.azure.resourcemanager.chaos.models.OperationDisplay;
+import com.azure.resourcemanager.chaos.models.Origin;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * REST API Operation
+ *
+ * Details of a REST API operation, returned from the Resource Provider Operations API.
+ */
+@Fluent
+public final class OperationInner {
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
+ * ARM/control-plane operations.
+ */
+ @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ @JsonProperty(value = "display")
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
+ * value is "user,system"
+ */
+ @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY)
+ private Origin origin;
+
+ /*
+ * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+ @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY)
+ private ActionType actionType;
+
+ /** Creates an instance of OperationInner class. */
+ public OperationInner() {
+ }
+
+ /**
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for ARM/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Localized display information for this particular operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
+ * only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetInner.java
new file mode 100644
index 0000000000000..7145cd04d0680
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetInner.java
@@ -0,0 +1,104 @@
+// 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.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Model that represents a Target resource. */
+@Fluent
+public final class TargetInner extends ProxyResource {
+ /*
+ * The system metadata of the target resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /*
+ * Location of the target resource.
+ */
+ @JsonProperty(value = "location")
+ private String location;
+
+ /*
+ * The properties of the target resource.
+ */
+ @JsonProperty(value = "properties", required = true)
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map properties;
+
+ /** Creates an instance of TargetInner class. */
+ public TargetInner() {
+ }
+
+ /**
+ * Get the systemData property: The system metadata of the target resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the location property: Location of the target resource.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: Location of the target resource.
+ *
+ * @param location the location value to set.
+ * @return the TargetInner object itself.
+ */
+ public TargetInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the properties property: The properties of the target resource.
+ *
+ * @return the properties value.
+ */
+ public Map properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The properties of the target resource.
+ *
+ * @param properties the properties value to set.
+ * @return the TargetInner object itself.
+ */
+ public TargetInner withProperties(Map properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property properties in model TargetInner"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(TargetInner.class);
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeInner.java
new file mode 100644
index 0000000000000..d96b2afce917e
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeInner.java
@@ -0,0 +1,129 @@
+// 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.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Model that represents a Target Type resource. */
+@Fluent
+public final class TargetTypeInner extends ProxyResource {
+ /*
+ * The system metadata properties of the target type resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /*
+ * Location of the Target Type resource.
+ */
+ @JsonProperty(value = "location")
+ private String location;
+
+ /*
+ * The properties of the target type resource.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private TargetTypeProperties innerProperties = new TargetTypeProperties();
+
+ /** Creates an instance of TargetTypeInner class. */
+ public TargetTypeInner() {
+ }
+
+ /**
+ * Get the systemData property: The system metadata properties of the target type resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the location property: Location of the Target Type resource.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: Location of the Target Type resource.
+ *
+ * @param location the location value to set.
+ * @return the TargetTypeInner object itself.
+ */
+ public TargetTypeInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the innerProperties property: The properties of the target type resource.
+ *
+ * @return the innerProperties value.
+ */
+ private TargetTypeProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the displayName property: Localized string of the display name.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.innerProperties() == null ? null : this.innerProperties().displayName();
+ }
+
+ /**
+ * Get the description property: Localized string of the description.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * Get the propertiesSchema property: URL to retrieve JSON schema of the Target Type properties.
+ *
+ * @return the propertiesSchema value.
+ */
+ public String propertiesSchema() {
+ return this.innerProperties() == null ? null : this.innerProperties().propertiesSchema();
+ }
+
+ /**
+ * Get the resourceTypes property: List of resource types this Target Type can extend.
+ *
+ * @return the resourceTypes value.
+ */
+ public List resourceTypes() {
+ return this.innerProperties() == null ? null : this.innerProperties().resourceTypes();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property innerProperties in model TargetTypeInner"));
+ } else {
+ innerProperties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(TargetTypeInner.class);
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeProperties.java
new file mode 100644
index 0000000000000..9bc624dedb5c0
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeProperties.java
@@ -0,0 +1,85 @@
+// 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;
+import java.util.List;
+
+/** Model that represents the base Target Type properties model. */
+@Immutable
+public final class TargetTypeProperties {
+ /*
+ * Localized string of the display name.
+ */
+ @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String displayName;
+
+ /*
+ * Localized string of the description.
+ */
+ @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
+ private String description;
+
+ /*
+ * URL to retrieve JSON schema of the Target Type properties.
+ */
+ @JsonProperty(value = "propertiesSchema", access = JsonProperty.Access.WRITE_ONLY)
+ private String propertiesSchema;
+
+ /*
+ * List of resource types this Target Type can extend.
+ */
+ @JsonProperty(value = "resourceTypes", access = JsonProperty.Access.WRITE_ONLY)
+ private List resourceTypes;
+
+ /** Creates an instance of TargetTypeProperties class. */
+ public TargetTypeProperties() {
+ }
+
+ /**
+ * Get the displayName property: Localized string of the display name.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Get the description property: Localized string of the description.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Get the propertiesSchema property: URL to retrieve JSON schema of the Target Type properties.
+ *
+ * @return the propertiesSchema value.
+ */
+ public String propertiesSchema() {
+ return this.propertiesSchema;
+ }
+
+ /**
+ * Get the resourceTypes property: List of resource types this Target Type can extend.
+ *
+ * @return the resourceTypes value.
+ */
+ public List resourceTypes() {
+ return this.resourceTypes;
+ }
+
+ /**
+ * 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/package-info.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/package-info.java
new file mode 100644
index 0000000000000..528b3b0bc9607
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the inner data models for ChaosManagementClient. Chaos Management Client. */
+package com.azure.resourcemanager.chaos.fluent.models;
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/package-info.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/package-info.java
new file mode 100644
index 0000000000000..80b2eb1aca618
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the service clients for ChaosManagementClient. Chaos Management Client. */
+package com.azure.resourcemanager.chaos.fluent;
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesClientImpl.java
new file mode 100644
index 0000000000000..a9d1af58ab108
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesClientImpl.java
@@ -0,0 +1,1356 @@
+// 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.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.chaos.fluent.CapabilitiesClient;
+import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner;
+import com.azure.resourcemanager.chaos.models.CapabilityListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in CapabilitiesClient. */
+public final class CapabilitiesClientImpl implements CapabilitiesClient {
+ /** The proxy service used to perform REST calls. */
+ private final CapabilitiesService service;
+
+ /** The service client containing this operation class. */
+ private final ChaosManagementClientImpl client;
+
+ /**
+ * Initializes an instance of CapabilitiesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CapabilitiesClientImpl(ChaosManagementClientImpl client) {
+ this.service =
+ RestProxy.create(CapabilitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ChaosManagementClientCapabilities to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ChaosManagementClien")
+ private interface CapabilitiesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}"
+ + "/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}"
+ + "/capabilities")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("parentProviderNamespace") String parentProviderNamespace,
+ @PathParam("parentResourceType") String parentResourceType,
+ @PathParam("parentResourceName") String parentResourceName,
+ @PathParam("targetName") String targetName,
+ @QueryParam("continuationToken") String continuationToken,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}"
+ + "/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}"
+ + "/capabilities/{capabilityName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("parentProviderNamespace") String parentProviderNamespace,
+ @PathParam("parentResourceType") String parentResourceType,
+ @PathParam("parentResourceName") String parentResourceName,
+ @PathParam("targetName") String targetName,
+ @PathParam("capabilityName") String capabilityName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}"
+ + "/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}"
+ + "/capabilities/{capabilityName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("parentProviderNamespace") String parentProviderNamespace,
+ @PathParam("parentResourceType") String parentResourceType,
+ @PathParam("parentResourceName") String parentResourceName,
+ @PathParam("targetName") String targetName,
+ @PathParam("capabilityName") String capabilityName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}"
+ + "/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}"
+ + "/capabilities/{capabilityName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("parentProviderNamespace") String parentProviderNamespace,
+ @PathParam("parentResourceType") String parentResourceType,
+ @PathParam("parentResourceName") String parentResourceName,
+ @PathParam("targetName") String targetName,
+ @PathParam("capabilityName") String capabilityName,
+ @BodyParam("application/json") CapabilityInner capability,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get a list of Capability resources that extend a Target resource..
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param continuationToken String that sets the continuation token.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Capability resources that extend a Target resource. along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String continuationToken) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (parentProviderNamespace == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null."));
+ }
+ if (parentResourceType == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter parentResourceType is required and cannot be null."));
+ }
+ if (parentResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter parentResourceName is required and cannot be null."));
+ }
+ if (targetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ continuationToken,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a list of Capability resources that extend a Target resource..
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Capability resources that extend a Target resource. along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String continuationToken,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (parentProviderNamespace == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null."));
+ }
+ if (parentResourceType == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter parentResourceType is required and cannot be null."));
+ }
+ if (parentResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter parentResourceName is required and cannot be null."));
+ }
+ if (targetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ continuationToken,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get a list of Capability resources that extend a Target resource..
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param continuationToken String that sets the continuation token.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Capability resources that extend a Target resource. as paginated response with {@link
+ * PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String continuationToken) {
+ return new PagedFlux<>(
+ () ->
+ listSinglePageAsync(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ continuationToken),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of Capability resources that extend a Target resource..
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target 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 list of Capability resources that extend a Target resource. as paginated response with {@link
+ * PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName) {
+ final String continuationToken = null;
+ return new PagedFlux<>(
+ () ->
+ listSinglePageAsync(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ continuationToken),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of Capability resources that extend a Target resource..
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Capability resources that extend a Target resource. as paginated response with {@link
+ * PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String continuationToken,
+ Context context) {
+ return new PagedFlux<>(
+ () ->
+ listSinglePageAsync(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ continuationToken,
+ context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get a list of Capability resources that extend a Target resource..
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target 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 list of Capability resources that extend a Target resource. as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName) {
+ final String continuationToken = null;
+ return new PagedIterable<>(
+ listAsync(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ continuationToken));
+ }
+
+ /**
+ * Get a list of Capability resources that extend a Target resource..
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Capability resources that extend a Target resource. as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String continuationToken,
+ Context context) {
+ return new PagedIterable<>(
+ listAsync(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ continuationToken,
+ context));
+ }
+
+ /**
+ * Get a Capability resource that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability 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 Capability resource that extends a Target resource along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (parentProviderNamespace == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null."));
+ }
+ if (parentResourceType == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter parentResourceType is required and cannot be null."));
+ }
+ if (parentResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter parentResourceName is required and cannot be null."));
+ }
+ if (targetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetName is required and cannot be null."));
+ }
+ if (capabilityName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter capabilityName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a Capability resource that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability 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 a Capability resource that extends a Target resource along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (parentProviderNamespace == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null."));
+ }
+ if (parentResourceType == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter parentResourceType is required and cannot be null."));
+ }
+ if (parentResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter parentResourceName is required and cannot be null."));
+ }
+ if (targetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetName is required and cannot be null."));
+ }
+ if (capabilityName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter capabilityName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get a Capability resource that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability 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 Capability resource that extends a Target resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName) {
+ return getWithResponseAsync(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a Capability resource that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability 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 a Capability resource that extends a Target resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName,
+ Context context) {
+ return getWithResponseAsync(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName,
+ context)
+ .block();
+ }
+
+ /**
+ * Get a Capability resource that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability 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 Capability resource that extends a Target resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CapabilityInner get(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName) {
+ return getWithResponse(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName,
+ Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * Delete a Capability that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability 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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (parentProviderNamespace == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null."));
+ }
+ if (parentResourceType == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter parentResourceType is required and cannot be null."));
+ }
+ if (parentResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter parentResourceName is required and cannot be null."));
+ }
+ if (targetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetName is required and cannot be null."));
+ }
+ if (capabilityName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter capabilityName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a Capability that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability 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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (parentProviderNamespace == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null."));
+ }
+ if (parentResourceType == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter parentResourceType is required and cannot be null."));
+ }
+ if (parentResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter parentResourceName is required and cannot be null."));
+ }
+ if (targetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetName is required and cannot be null."));
+ }
+ if (capabilityName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter capabilityName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName,
+ accept,
+ context);
+ }
+
+ /**
+ * Delete a Capability that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability 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 deleteAsync(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName) {
+ return deleteWithResponseAsync(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName)
+ .flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Delete a Capability that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability 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 Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName,
+ Context context) {
+ return deleteWithResponseAsync(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName,
+ context)
+ .block();
+ }
+
+ /**
+ * Delete a Capability that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability 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 delete(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName) {
+ deleteWithResponse(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName,
+ Context.NONE);
+ }
+
+ /**
+ * Create or update a Capability resource that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability resource name.
+ * @param capability Capability 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 model that represents a Capability resource along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName,
+ CapabilityInner capability) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (parentProviderNamespace == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null."));
+ }
+ if (parentResourceType == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter parentResourceType is required and cannot be null."));
+ }
+ if (parentResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter parentResourceName is required and cannot be null."));
+ }
+ if (targetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetName is required and cannot be null."));
+ }
+ if (capabilityName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter capabilityName is required and cannot be null."));
+ }
+ if (capability == null) {
+ return Mono.error(new IllegalArgumentException("Parameter capability is required and cannot be null."));
+ } else {
+ capability.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName,
+ capability,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or update a Capability resource that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability resource name.
+ * @param capability Capability 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 Capability resource along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName,
+ CapabilityInner capability,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (parentProviderNamespace == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null."));
+ }
+ if (parentResourceType == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter parentResourceType is required and cannot be null."));
+ }
+ if (parentResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter parentResourceName is required and cannot be null."));
+ }
+ if (targetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetName is required and cannot be null."));
+ }
+ if (capabilityName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter capabilityName is required and cannot be null."));
+ }
+ if (capability == null) {
+ return Mono.error(new IllegalArgumentException("Parameter capability is required and cannot be null."));
+ } else {
+ capability.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName,
+ capability,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or update a Capability resource that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability resource name.
+ * @param capability Capability 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 model that represents a Capability resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName,
+ CapabilityInner capability) {
+ return createOrUpdateWithResponseAsync(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName,
+ capability)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Create or update a Capability resource that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability resource name.
+ * @param capability Capability 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 Capability resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName,
+ CapabilityInner capability,
+ Context context) {
+ return createOrUpdateWithResponseAsync(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName,
+ capability,
+ context)
+ .block();
+ }
+
+ /**
+ * Create or update a Capability resource that extends a Target resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param parentProviderNamespace String that represents a resource provider namespace.
+ * @param parentResourceType String that represents a resource type.
+ * @param parentResourceName String that represents a resource name.
+ * @param targetName String that represents a Target resource name.
+ * @param capabilityName String that represents a Capability resource name.
+ * @param capability Capability 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 model that represents a Capability resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CapabilityInner createOrUpdate(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName,
+ CapabilityInner capability) {
+ return createOrUpdateWithResponse(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName,
+ capability,
+ Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a list of Capability resources and a link for pagination along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a list of Capability resources and a link for pagination along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesImpl.java
new file mode 100644
index 0000000000000..524e853d9a4c6
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesImpl.java
@@ -0,0 +1,222 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.chaos.fluent.CapabilitiesClient;
+import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner;
+import com.azure.resourcemanager.chaos.models.Capabilities;
+import com.azure.resourcemanager.chaos.models.Capability;
+
+public final class CapabilitiesImpl implements Capabilities {
+ private static final ClientLogger LOGGER = new ClientLogger(CapabilitiesImpl.class);
+
+ private final CapabilitiesClient innerClient;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ public CapabilitiesImpl(
+ CapabilitiesClient innerClient, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName) {
+ PagedIterable inner =
+ this
+ .serviceClient()
+ .list(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName);
+ return Utils.mapPage(inner, inner1 -> new CapabilityImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String continuationToken,
+ Context context) {
+ PagedIterable inner =
+ this
+ .serviceClient()
+ .list(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ continuationToken,
+ context);
+ return Utils.mapPage(inner, inner1 -> new CapabilityImpl(inner1, this.manager()));
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getWithResponse(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName,
+ context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new CapabilityImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Capability get(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName) {
+ CapabilityInner inner =
+ this
+ .serviceClient()
+ .get(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName);
+ if (inner != null) {
+ return new CapabilityImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response deleteWithResponse(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName,
+ Context context) {
+ return this
+ .serviceClient()
+ .deleteWithResponse(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName,
+ context);
+ }
+
+ public void delete(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName) {
+ this
+ .serviceClient()
+ .delete(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName);
+ }
+
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName,
+ CapabilityInner capability,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .createOrUpdateWithResponse(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName,
+ capability,
+ context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new CapabilityImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Capability createOrUpdate(
+ String resourceGroupName,
+ String parentProviderNamespace,
+ String parentResourceType,
+ String parentResourceName,
+ String targetName,
+ String capabilityName,
+ CapabilityInner capability) {
+ CapabilityInner inner =
+ this
+ .serviceClient()
+ .createOrUpdate(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName,
+ capability);
+ if (inner != null) {
+ return new CapabilityImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private CapabilitiesClient 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/implementation/CapabilityImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityImpl.java
new file mode 100644
index 0000000000000..1fae5a86f13a8
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityImpl.java
@@ -0,0 +1,64 @@
+// 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.SystemData;
+import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner;
+import com.azure.resourcemanager.chaos.models.Capability;
+
+public final class CapabilityImpl implements Capability {
+ private CapabilityInner innerObject;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ CapabilityImpl(CapabilityInner 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 type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String publisher() {
+ return this.innerModel().publisher();
+ }
+
+ public String targetType() {
+ return this.innerModel().targetType();
+ }
+
+ public String description() {
+ return this.innerModel().description();
+ }
+
+ public String parametersSchema() {
+ return this.innerModel().parametersSchema();
+ }
+
+ public String urn() {
+ return this.innerModel().urn();
+ }
+
+ public CapabilityInner 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/CapabilityTypeImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypeImpl.java
new file mode 100644
index 0000000000000..faf5a74f27a01
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypeImpl.java
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeInner;
+import com.azure.resourcemanager.chaos.models.CapabilityType;
+import com.azure.resourcemanager.chaos.models.CapabilityTypePropertiesRuntimeProperties;
+
+public final class CapabilityTypeImpl implements CapabilityType {
+ private CapabilityTypeInner innerObject;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ CapabilityTypeImpl(CapabilityTypeInner 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 type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public String publisher() {
+ return this.innerModel().publisher();
+ }
+
+ public String targetType() {
+ return this.innerModel().targetType();
+ }
+
+ public String displayName() {
+ return this.innerModel().displayName();
+ }
+
+ public String description() {
+ return this.innerModel().description();
+ }
+
+ public String parametersSchema() {
+ return this.innerModel().parametersSchema();
+ }
+
+ public String urn() {
+ return this.innerModel().urn();
+ }
+
+ public String kind() {
+ return this.innerModel().kind();
+ }
+
+ public CapabilityTypePropertiesRuntimeProperties runtimeProperties() {
+ return this.innerModel().runtimeProperties();
+ }
+
+ public CapabilityTypeInner 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/CapabilityTypesClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesClientImpl.java
new file mode 100644
index 0000000000000..3a69847e6c120
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesClientImpl.java
@@ -0,0 +1,545 @@
+// 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.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient;
+import com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeInner;
+import com.azure.resourcemanager.chaos.models.CapabilityTypeListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in CapabilityTypesClient. */
+public final class CapabilityTypesClientImpl implements CapabilityTypesClient {
+ /** The proxy service used to perform REST calls. */
+ private final CapabilityTypesService service;
+
+ /** The service client containing this operation class. */
+ private final ChaosManagementClientImpl client;
+
+ /**
+ * Initializes an instance of CapabilityTypesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CapabilityTypesClientImpl(ChaosManagementClientImpl client) {
+ this.service =
+ RestProxy.create(CapabilityTypesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ChaosManagementClientCapabilityTypes to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ChaosManagementClien")
+ private interface CapabilityTypesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes"
+ + "/{targetTypeName}/capabilityTypes")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("locationName") String locationName,
+ @PathParam("targetTypeName") String targetTypeName,
+ @QueryParam("continuationToken") String continuationToken,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes"
+ + "/{targetTypeName}/capabilityTypes/{capabilityTypeName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("locationName") String locationName,
+ @PathParam("targetTypeName") String targetTypeName,
+ @PathParam("capabilityTypeName") String capabilityTypeName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get a list of Capability Type resources for given Target Type and location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param targetTypeName String that represents a Target Type resource name.
+ * @param continuationToken String that sets the continuation token.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Capability Type resources for given Target Type and location along with {@link PagedResponse}
+ * on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String locationName, String targetTypeName, String continuationToken) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (locationName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
+ }
+ if (targetTypeName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetTypeName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ locationName,
+ targetTypeName,
+ continuationToken,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a list of Capability Type resources for given Target Type and location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param targetTypeName String that represents a Target Type resource name.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Capability Type resources for given Target Type and location along with {@link PagedResponse}
+ * on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String locationName, String targetTypeName, String continuationToken, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (locationName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
+ }
+ if (targetTypeName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetTypeName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ locationName,
+ targetTypeName,
+ continuationToken,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get a list of Capability Type resources for given Target Type and location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param targetTypeName String that represents a Target Type resource name.
+ * @param continuationToken String that sets the continuation token.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Capability Type resources for given Target Type and location as paginated response with {@link
+ * PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String locationName, String targetTypeName, String continuationToken) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(locationName, targetTypeName, continuationToken),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of Capability Type resources for given Target Type and location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param targetTypeName String that represents a Target Type 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 list of Capability Type resources for given Target Type and location as paginated response with {@link
+ * PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String locationName, String targetTypeName) {
+ final String continuationToken = null;
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(locationName, targetTypeName, continuationToken),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of Capability Type resources for given Target Type and location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param targetTypeName String that represents a Target Type resource name.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Capability Type resources for given Target Type and location as paginated response with {@link
+ * PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String locationName, String targetTypeName, String continuationToken, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(locationName, targetTypeName, continuationToken, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get a list of Capability Type resources for given Target Type and location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param targetTypeName String that represents a Target Type 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 list of Capability Type resources for given Target Type and location as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String locationName, String targetTypeName) {
+ final String continuationToken = null;
+ return new PagedIterable<>(listAsync(locationName, targetTypeName, continuationToken));
+ }
+
+ /**
+ * Get a list of Capability Type resources for given Target Type and location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param targetTypeName String that represents a Target Type resource name.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Capability Type resources for given Target Type and location as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String locationName, String targetTypeName, String continuationToken, Context context) {
+ return new PagedIterable<>(listAsync(locationName, targetTypeName, continuationToken, context));
+ }
+
+ /**
+ * Get a Capability Type resource for given Target Type and location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param targetTypeName String that represents a Target Type resource name.
+ * @param capabilityTypeName String that represents a Capability Type 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 Capability Type resource for given Target Type and location along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String locationName, String targetTypeName, String capabilityTypeName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (locationName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
+ }
+ if (targetTypeName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetTypeName is required and cannot be null."));
+ }
+ if (capabilityTypeName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter capabilityTypeName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ locationName,
+ targetTypeName,
+ capabilityTypeName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a Capability Type resource for given Target Type and location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param targetTypeName String that represents a Target Type resource name.
+ * @param capabilityTypeName String that represents a Capability Type 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 a Capability Type resource for given Target Type and location along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String locationName, String targetTypeName, String capabilityTypeName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (locationName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
+ }
+ if (targetTypeName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetTypeName is required and cannot be null."));
+ }
+ if (capabilityTypeName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter capabilityTypeName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ locationName,
+ targetTypeName,
+ capabilityTypeName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get a Capability Type resource for given Target Type and location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param targetTypeName String that represents a Target Type resource name.
+ * @param capabilityTypeName String that represents a Capability Type 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 Capability Type resource for given Target Type and location on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String locationName, String targetTypeName, String capabilityTypeName) {
+ return getWithResponseAsync(locationName, targetTypeName, capabilityTypeName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a Capability Type resource for given Target Type and location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param targetTypeName String that represents a Target Type resource name.
+ * @param capabilityTypeName String that represents a Capability Type 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 a Capability Type resource for given Target Type and location along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String locationName, String targetTypeName, String capabilityTypeName, Context context) {
+ return getWithResponseAsync(locationName, targetTypeName, capabilityTypeName, context).block();
+ }
+
+ /**
+ * Get a Capability Type resource for given Target Type and location.
+ *
+ * @param locationName String that represents a Location resource name.
+ * @param targetTypeName String that represents a Target Type resource name.
+ * @param capabilityTypeName String that represents a Capability Type 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 Capability Type resource for given Target Type and location.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CapabilityTypeInner get(String locationName, String targetTypeName, String capabilityTypeName) {
+ return getWithResponse(locationName, targetTypeName, capabilityTypeName, Context.NONE).getValue();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a list of Capability Type resources and a link for pagination along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a list of Capability Type resources and a link for pagination along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesImpl.java
new file mode 100644
index 0000000000000..d846aab402ea6
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesImpl.java
@@ -0,0 +1,73 @@
+// 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.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient;
+import com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeInner;
+import com.azure.resourcemanager.chaos.models.CapabilityType;
+import com.azure.resourcemanager.chaos.models.CapabilityTypes;
+
+public final class CapabilityTypesImpl implements CapabilityTypes {
+ private static final ClientLogger LOGGER = new ClientLogger(CapabilityTypesImpl.class);
+
+ private final CapabilityTypesClient innerClient;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ public CapabilityTypesImpl(
+ CapabilityTypesClient innerClient, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String locationName, String targetTypeName) {
+ PagedIterable inner = this.serviceClient().list(locationName, targetTypeName);
+ return Utils.mapPage(inner, inner1 -> new CapabilityTypeImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(
+ String locationName, String targetTypeName, String continuationToken, Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(locationName, targetTypeName, continuationToken, context);
+ return Utils.mapPage(inner, inner1 -> new CapabilityTypeImpl(inner1, this.manager()));
+ }
+
+ public Response getWithResponse(
+ String locationName, String targetTypeName, String capabilityTypeName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(locationName, targetTypeName, capabilityTypeName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new CapabilityTypeImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public CapabilityType get(String locationName, String targetTypeName, String capabilityTypeName) {
+ CapabilityTypeInner inner = this.serviceClient().get(locationName, targetTypeName, capabilityTypeName);
+ if (inner != null) {
+ return new CapabilityTypeImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private CapabilityTypesClient 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/implementation/ChaosManagementClientBuilder.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java
new file mode 100644
index 0000000000000..ed74ff20611a7
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java
@@ -0,0 +1,144 @@
+// 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.ServiceClientBuilder;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerAdapter;
+import java.time.Duration;
+
+/** A builder for creating a new instance of the ChaosManagementClientImpl type. */
+@ServiceClientBuilder(serviceClients = {ChaosManagementClientImpl.class})
+public final class ChaosManagementClientBuilder {
+ /*
+ * GUID that represents an Azure subscription ID.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets GUID that represents an Azure subscription ID.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the ChaosManagementClientBuilder.
+ */
+ public ChaosManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the ChaosManagementClientBuilder.
+ */
+ public ChaosManagementClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the ChaosManagementClientBuilder.
+ */
+ public ChaosManagementClientBuilder environment(AzureEnvironment environment) {
+ this.environment = environment;
+ return this;
+ }
+
+ /*
+ * The HTTP pipeline to send requests through
+ */
+ private HttpPipeline pipeline;
+
+ /**
+ * Sets The HTTP pipeline to send requests through.
+ *
+ * @param pipeline the pipeline value.
+ * @return the ChaosManagementClientBuilder.
+ */
+ public ChaosManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The default poll interval for long-running operation
+ */
+ private Duration defaultPollInterval;
+
+ /**
+ * Sets The default poll interval for long-running operation.
+ *
+ * @param defaultPollInterval the defaultPollInterval value.
+ * @return the ChaosManagementClientBuilder.
+ */
+ public ChaosManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
+ return this;
+ }
+
+ /*
+ * The serializer to serialize an object into a string
+ */
+ private SerializerAdapter serializerAdapter;
+
+ /**
+ * Sets The serializer to serialize an object into a string.
+ *
+ * @param serializerAdapter the serializerAdapter value.
+ * @return the ChaosManagementClientBuilder.
+ */
+ public ChaosManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of ChaosManagementClientImpl with the provided parameters.
+ *
+ * @return an instance of ChaosManagementClientImpl.
+ */
+ public ChaosManagementClientImpl buildClient() {
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline =
+ (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval =
+ (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter =
+ (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
+ ChaosManagementClientImpl client =
+ new ChaosManagementClientImpl(
+ localPipeline,
+ localSerializerAdapter,
+ localDefaultPollInterval,
+ localEnvironment,
+ 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
new file mode 100644
index 0000000000000..eb6a7dfa8350c
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java
@@ -0,0 +1,360 @@
+// 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.ServiceClient;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.AsyncPollResponse;
+import com.azure.core.util.polling.LongRunningOperationStatus;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.serializer.SerializerAdapter;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.chaos.fluent.CapabilitiesClient;
+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.OperationsClient;
+import com.azure.resourcemanager.chaos.fluent.TargetTypesClient;
+import com.azure.resourcemanager.chaos.fluent.TargetsClient;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** Initializes a new instance of the ChaosManagementClientImpl type. */
+@ServiceClient(builder = ChaosManagementClientBuilder.class)
+public final class ChaosManagementClientImpl implements ChaosManagementClient {
+ /** GUID that represents an Azure subscription ID. */
+ private final String subscriptionId;
+
+ /**
+ * Gets GUID that represents an Azure subscription ID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /** server parameter. */
+ private final String endpoint;
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /** Api Version. */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /** The HTTP pipeline to send requests through. */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /** The serializer to serialize an object into a string. */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /** The default poll interval for long-running operation. */
+ private final Duration defaultPollInterval;
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ public Duration getDefaultPollInterval() {
+ return this.defaultPollInterval;
+ }
+
+ /** The CapabilitiesClient object to access its operations. */
+ private final CapabilitiesClient capabilities;
+
+ /**
+ * Gets the CapabilitiesClient object to access its operations.
+ *
+ * @return the CapabilitiesClient object.
+ */
+ public CapabilitiesClient getCapabilities() {
+ return this.capabilities;
+ }
+
+ /** The CapabilityTypesClient object to access its operations. */
+ private final CapabilityTypesClient capabilityTypes;
+
+ /**
+ * Gets the CapabilityTypesClient object to access its operations.
+ *
+ * @return the CapabilityTypesClient object.
+ */
+ public CapabilityTypesClient getCapabilityTypes() {
+ return this.capabilityTypes;
+ }
+
+ /** The ExperimentsClient object to access its operations. */
+ private final ExperimentsClient experiments;
+
+ /**
+ * Gets the ExperimentsClient object to access its operations.
+ *
+ * @return the ExperimentsClient object.
+ */
+ public ExperimentsClient getExperiments() {
+ return this.experiments;
+ }
+
+ /** The OperationsClient object to access its operations. */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /** The TargetTypesClient object to access its operations. */
+ private final TargetTypesClient targetTypes;
+
+ /**
+ * Gets the TargetTypesClient object to access its operations.
+ *
+ * @return the TargetTypesClient object.
+ */
+ public TargetTypesClient getTargetTypes() {
+ return this.targetTypes;
+ }
+
+ /** The TargetsClient object to access its operations. */
+ private final TargetsClient targets;
+
+ /**
+ * Gets the TargetsClient object to access its operations.
+ *
+ * @return the TargetsClient object.
+ */
+ public TargetsClient getTargets() {
+ return this.targets;
+ }
+
+ /**
+ * Initializes an instance of ChaosManagementClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param subscriptionId GUID that represents an Azure subscription ID.
+ * @param endpoint server parameter.
+ */
+ ChaosManagementClientImpl(
+ HttpPipeline httpPipeline,
+ SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval,
+ AzureEnvironment environment,
+ String subscriptionId,
+ String endpoint) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.apiVersion = "2022-10-01-preview";
+ this.capabilities = new CapabilitiesClientImpl(this);
+ this.capabilityTypes = new CapabilityTypesClientImpl(this);
+ this.experiments = new ExperimentsClientImpl(this);
+ this.operations = new OperationsClientImpl(this);
+ this.targetTypes = new TargetTypesClientImpl(this);
+ this.targets = new TargetsClientImpl(this);
+ }
+
+ /**
+ * Gets default client context.
+ *
+ * @return the default client context.
+ */
+ public Context getContext() {
+ return Context.NONE;
+ }
+
+ /**
+ * Merges default client context with provided context.
+ *
+ * @param context the context to be merged with default client context.
+ * @return the merged context.
+ */
+ public Context mergeContext(Context context) {
+ return CoreUtils.mergeContexts(this.getContext(), context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param httpPipeline the http pipeline.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return poller flux for poll result and final result.
+ */
+ public PollerFlux, U> getLroResult(
+ Mono>> activationResponse,
+ HttpPipeline httpPipeline,
+ Type pollResultType,
+ Type finalResultType,
+ Context context) {
+ return PollerFactory
+ .create(
+ serializerAdapter,
+ httpPipeline,
+ pollResultType,
+ finalResultType,
+ defaultPollInterval,
+ activationResponse,
+ context);
+ }
+
+ /**
+ * Gets the final result, or an error, based on last async poll response.
+ *
+ * @param response the last async poll response.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return the final result, or an error.
+ */
+ public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) {
+ if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
+ String errorMessage;
+ ManagementError managementError = null;
+ HttpResponse errorResponse = null;
+ PollResult.Error lroError = response.getValue().getError();
+ if (lroError != null) {
+ errorResponse =
+ new HttpResponseImpl(
+ lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody());
+
+ errorMessage = response.getValue().getError().getMessage();
+ String errorBody = response.getValue().getError().getResponseBody();
+ if (errorBody != null) {
+ // try to deserialize error body to ManagementError
+ try {
+ managementError =
+ this
+ .getSerializerAdapter()
+ .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
+ if (managementError.getCode() == null || managementError.getMessage() == null) {
+ managementError = null;
+ }
+ } catch (IOException | RuntimeException ioe) {
+ LOGGER.logThrowableAsWarning(ioe);
+ }
+ }
+ } else {
+ // fallback to default error message
+ errorMessage = "Long running operation failed.";
+ }
+ if (managementError == null) {
+ // fallback to default ManagementError
+ managementError = new ManagementError(response.getStatus().toString(), errorMessage);
+ }
+ return Mono.error(new ManagementException(errorMessage, errorResponse, managementError));
+ } else {
+ return response.getFinalResult();
+ }
+ }
+
+ private static final class HttpResponseImpl extends HttpResponse {
+ private final int statusCode;
+
+ private final byte[] responseBody;
+
+ private final HttpHeaders httpHeaders;
+
+ HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) {
+ super(null);
+ this.statusCode = statusCode;
+ this.httpHeaders = httpHeaders;
+ this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
+ }
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public String getHeaderValue(String s) {
+ return httpHeaders.getValue(s);
+ }
+
+ public HttpHeaders getHeaders() {
+ return httpHeaders;
+ }
+
+ public Flux getBody() {
+ return Flux.just(ByteBuffer.wrap(responseBody));
+ }
+
+ public Mono getBodyAsByteArray() {
+ return Mono.just(responseBody);
+ }
+
+ public Mono getBodyAsString() {
+ return Mono.just(new String(responseBody, StandardCharsets.UTF_8));
+ }
+
+ public Mono getBodyAsString(Charset charset) {
+ return Mono.just(new String(responseBody, charset));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ChaosManagementClientImpl.class);
+}
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
new file mode 100644
index 0000000000000..ab9f6c580516b
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentCancelOperationResultImpl.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.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/ExperimentExecutionDetailsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionDetailsImpl.java
new file mode 100644
index 0000000000000..abb9d17a9c4b1
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionDetailsImpl.java
@@ -0,0 +1,74 @@
+// 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.ExperimentExecutionDetailsInner;
+import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetails;
+import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation;
+import java.time.OffsetDateTime;
+
+public final class ExperimentExecutionDetailsImpl implements ExperimentExecutionDetails {
+ private ExperimentExecutionDetailsInner innerObject;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ ExperimentExecutionDetailsImpl(
+ ExperimentExecutionDetailsInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String experimentId() {
+ return this.innerModel().experimentId();
+ }
+
+ public String status() {
+ return this.innerModel().status();
+ }
+
+ public String failureReason() {
+ return this.innerModel().failureReason();
+ }
+
+ public OffsetDateTime createdDateTime() {
+ return this.innerModel().createdDateTime();
+ }
+
+ public OffsetDateTime lastActionDateTime() {
+ return this.innerModel().lastActionDateTime();
+ }
+
+ public OffsetDateTime startDateTime() {
+ return this.innerModel().startDateTime();
+ }
+
+ public OffsetDateTime stopDateTime() {
+ return this.innerModel().stopDateTime();
+ }
+
+ public ExperimentExecutionDetailsPropertiesRunInformation runInformation() {
+ return this.innerModel().runInformation();
+ }
+
+ public ExperimentExecutionDetailsInner 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
new file mode 100644
index 0000000000000..e29d0a848bd9f
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java
@@ -0,0 +1,238 @@
+// 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.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.Experiment;
+import com.azure.resourcemanager.chaos.models.ExperimentCancelOperationResult;
+import com.azure.resourcemanager.chaos.models.ExperimentStartOperationResult;
+import com.azure.resourcemanager.chaos.models.ResourceIdentity;
+import com.azure.resourcemanager.chaos.models.Selector;
+import com.azure.resourcemanager.chaos.models.Step;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public final class ExperimentImpl implements Experiment, Experiment.Definition, Experiment.Update {
+ private ExperimentInner innerObject;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public ResourceIdentity identity() {
+ return this.innerModel().identity();
+ }
+
+ public List steps() {
+ List inner = this.innerModel().steps();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List selectors() {
+ List inner = this.innerModel().selectors();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Boolean startOnCreation() {
+ return this.innerModel().startOnCreation();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public ExperimentInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.chaos.ChaosManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String experimentName;
+
+ public ExperimentImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public Experiment create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExperiments()
+ .createOrUpdateWithResponse(resourceGroupName, experimentName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Experiment create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExperiments()
+ .createOrUpdateWithResponse(resourceGroupName, experimentName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ ExperimentImpl(String name, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerObject = new ExperimentInner();
+ this.serviceManager = serviceManager;
+ this.experimentName = name;
+ }
+
+ public ExperimentImpl update() {
+ return this;
+ }
+
+ public Experiment apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExperiments()
+ .createOrUpdateWithResponse(resourceGroupName, experimentName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Experiment apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExperiments()
+ .createOrUpdateWithResponse(resourceGroupName, experimentName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ ExperimentImpl(ExperimentInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.experimentName = Utils.getValueFromIdByName(innerObject.id(), "experiments");
+ }
+
+ public Experiment refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExperiments()
+ .getByResourceGroupWithResponse(resourceGroupName, experimentName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Experiment refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExperiments()
+ .getByResourceGroupWithResponse(resourceGroupName, experimentName, context)
+ .getValue();
+ return this;
+ }
+
+ public Response cancelWithResponse(Context context) {
+ return serviceManager.experiments().cancelWithResponse(resourceGroupName, experimentName, context);
+ }
+
+ public ExperimentCancelOperationResult cancel() {
+ return serviceManager.experiments().cancel(resourceGroupName, experimentName);
+ }
+
+ public Response startWithResponse(Context context) {
+ return serviceManager.experiments().startWithResponse(resourceGroupName, experimentName, context);
+ }
+
+ public ExperimentStartOperationResult start() {
+ return serviceManager.experiments().start(resourceGroupName, experimentName);
+ }
+
+ public ExperimentImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public ExperimentImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public ExperimentImpl withSteps(List steps) {
+ this.innerModel().withSteps(steps);
+ return this;
+ }
+
+ public ExperimentImpl withSelectors(List selectors) {
+ this.innerModel().withSelectors(selectors);
+ return this;
+ }
+
+ public ExperimentImpl withTags(Map tags) {
+ this.innerModel().withTags(tags);
+ return this;
+ }
+
+ public ExperimentImpl withIdentity(ResourceIdentity identity) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ }
+
+ public ExperimentImpl withStartOnCreation(Boolean startOnCreation) {
+ this.innerModel().withStartOnCreation(startOnCreation);
+ 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
new file mode 100644
index 0000000000000..8fa3ca1fcc2c6
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentStartOperationResultImpl.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.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/ExperimentStatusImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentStatusImpl.java
new file mode 100644
index 0000000000000..491789a838555
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentStatusImpl.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.implementation;
+
+import com.azure.resourcemanager.chaos.fluent.models.ExperimentStatusInner;
+import com.azure.resourcemanager.chaos.models.ExperimentStatus;
+import java.time.OffsetDateTime;
+
+public final class ExperimentStatusImpl implements ExperimentStatus {
+ private ExperimentStatusInner innerObject;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ ExperimentStatusImpl(
+ ExperimentStatusInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String status() {
+ return this.innerModel().status();
+ }
+
+ public OffsetDateTime createdDateUtc() {
+ return this.innerModel().createdDateUtc();
+ }
+
+ public OffsetDateTime endDateUtc() {
+ return this.innerModel().endDateUtc();
+ }
+
+ public ExperimentStatusInner 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
new file mode 100644
index 0000000000000..d80c2c41d9690
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java
@@ -0,0 +1,2386 @@
+// 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.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.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 reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ExperimentsClient. */
+public final class ExperimentsClientImpl implements ExperimentsClient {
+ /** The proxy service used to perform REST calls. */
+ private final ExperimentsService service;
+
+ /** The service client containing this operation class. */
+ private final ChaosManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ExperimentsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ExperimentsClientImpl(ChaosManagementClientImpl client) {
+ this.service =
+ RestProxy.create(ExperimentsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ChaosManagementClientExperiments to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ChaosManagementClien")
+ private interface ExperimentsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/experiments")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("running") Boolean running,
+ @QueryParam("continuationToken") String continuationToken,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("running") Boolean running,
+ @QueryParam("continuationToken") String continuationToken,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments"
+ + "/{experimentName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("experimentName") String experimentName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments"
+ + "/{experimentName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("experimentName") String experimentName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments"
+ + "/{experimentName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("experimentName") String experimentName,
+ @BodyParam("application/json") ExperimentInner experiment,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments"
+ + "/{experimentName}/cancel")
+ @ExpectedResponses({202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> cancel(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("experimentName") String experimentName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments"
+ + "/{experimentName}/start")
+ @ExpectedResponses({202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> start(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("experimentName") String experimentName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments"
+ + "/{experimentName}/statuses")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listAllStatuses(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("experimentName") String experimentName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments"
+ + "/{experimentName}/statuses/{statusId}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getStatus(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("experimentName") String experimentName,
+ @PathParam("statusId") String statusId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments"
+ + "/{experimentName}/executionDetails")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listExecutionDetails(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("experimentName") String experimentName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments"
+ + "/{experimentName}/executionDetails/{executionDetailsId}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getExecutionDetails(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("experimentName") String experimentName,
+ @PathParam("executionDetailsId") String executionDetailsId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listAllNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listAllStatusesNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listExecutionDetailsNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get a list of Experiment resources in a subscription.
+ *
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a subscription along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Boolean running, String continuationToken) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ running,
+ continuationToken,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a list of Experiment resources in a subscription.
+ *
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a subscription along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ Boolean running, String continuationToken, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ running,
+ continuationToken,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get a list of Experiment resources in a subscription.
+ *
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a subscription as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Boolean running, String continuationToken) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(running, continuationToken), nextLink -> listAllNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of Experiment resources in a subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a subscription as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ final Boolean running = null;
+ final String continuationToken = null;
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(running, continuationToken), nextLink -> listAllNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of Experiment resources in a subscription.
+ *
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a subscription as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Boolean running, String continuationToken, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(running, continuationToken, context),
+ nextLink -> listAllNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get a list of Experiment resources in a subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ final Boolean running = null;
+ final String continuationToken = null;
+ return new PagedIterable<>(listAsync(running, continuationToken));
+ }
+
+ /**
+ * Get a list of Experiment resources in a subscription.
+ *
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Boolean running, String continuationToken, Context context) {
+ return new PagedIterable<>(listAsync(running, continuationToken, context));
+ }
+
+ /**
+ * Get a list of Experiment resources in a resource group.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a resource group along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, Boolean running, String continuationToken) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ running,
+ continuationToken,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a list of Experiment resources in a resource group.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a resource group along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, Boolean running, String continuationToken, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ running,
+ continuationToken,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get a list of Experiment resources in a resource group.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a resource group as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(
+ String resourceGroupName, Boolean running, String continuationToken) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, running, continuationToken),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of Experiment resources in a resource group.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a resource group as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ final Boolean running = null;
+ final String continuationToken = null;
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, running, continuationToken),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of Experiment resources in a resource group.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a resource group as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(
+ String resourceGroupName, Boolean running, String continuationToken, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, running, continuationToken, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get a list of Experiment resources in a resource group.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a resource group as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ final Boolean running = null;
+ final String continuationToken = null;
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, running, continuationToken));
+ }
+
+ /**
+ * Get a list of Experiment resources in a resource group.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a resource group as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(
+ String resourceGroupName, Boolean running, String continuationToken, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, running, continuationToken, 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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String resourceGroupName, String experimentName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String experimentName) {
+ return deleteWithResponseAsync(resourceGroupName, experimentName).flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * 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 Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String resourceGroupName, String experimentName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, experimentName, context).block();
+ }
+
+ /**
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String experimentName) {
+ deleteWithResponse(resourceGroupName, experimentName, Context.NONE);
+ }
+
+ /**
+ * Get 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 Experiment resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String experimentName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get 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 a Experiment resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get 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 Experiment resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String experimentName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, experimentName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get 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 a Experiment resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String experimentName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, experimentName, context).block();
+ }
+
+ /**
+ * Get 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 Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExperimentInner getByResourceGroup(String resourceGroupName, String experimentName) {
+ return getByResourceGroupWithResponse(resourceGroupName, experimentName, Context.NONE).getValue();
+ }
+
+ /**
+ * 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 model that represents a Experiment resource along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String experimentName, ExperimentInner experiment) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ if (experiment == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experiment is required and cannot be null."));
+ } else {
+ experiment.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ experiment,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ if (experiment == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experiment is required and cannot be null."));
+ } else {
+ experiment.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ experiment,
+ accept,
+ 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 model that represents a Experiment resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String experimentName, ExperimentInner experiment) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, experimentName, experiment)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * 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 along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, experimentName, experiment, context).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.
+ * @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) {
+ return createOrUpdateWithResponse(resourceGroupName, experimentName, experiment, Context.NONE).getValue();
+ }
+
+ /**
+ * 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 model that represents the result of a cancel Experiment operation along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> cancelWithResponseAsync(
+ String resourceGroupName, String experimentName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .cancel(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 model that represents the result of a cancel Experiment operation along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> cancelWithResponseAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .cancel(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ 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 model that represents the result of a cancel Experiment operation on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono cancelAsync(String resourceGroupName, String experimentName) {
+ return cancelWithResponseAsync(resourceGroupName, experimentName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * 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 model that represents the result of a cancel Experiment operation along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response cancelWithResponse(
+ String resourceGroupName, String experimentName, Context context) {
+ return cancelWithResponseAsync(resourceGroupName, experimentName, context).block();
+ }
+
+ /**
+ * 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 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();
+ }
+
+ /**
+ * 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 model that represents the result of a start Experiment operation along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> startWithResponseAsync(
+ String resourceGroupName, String experimentName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .start(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 model that represents the result of a start Experiment operation along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> startWithResponseAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .start(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ 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 model that represents the result of a start Experiment operation on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono startAsync(String resourceGroupName, String experimentName) {
+ return startWithResponseAsync(resourceGroupName, experimentName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * 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 model that represents the result of a start Experiment operation along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response startWithResponse(
+ String resourceGroupName, String experimentName, Context context) {
+ return startWithResponseAsync(resourceGroupName, experimentName, context).block();
+ }
+
+ /**
+ * 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 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();
+ }
+
+ /**
+ * Get a list of statuses of 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 list of statuses of a Experiment resource along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAllStatusesSinglePageAsync(
+ String resourceGroupName, String experimentName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listAllStatuses(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a list of statuses of 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 a list of statuses of a Experiment resource along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAllStatusesSinglePageAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listAllStatuses(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get a list of statuses of 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 list of statuses of a Experiment resource as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAllStatusesAsync(String resourceGroupName, String experimentName) {
+ return new PagedFlux<>(
+ () -> listAllStatusesSinglePageAsync(resourceGroupName, experimentName),
+ nextLink -> listAllStatusesNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of statuses of 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 a list of statuses of a Experiment resource as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAllStatusesAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ return new PagedFlux<>(
+ () -> listAllStatusesSinglePageAsync(resourceGroupName, experimentName, context),
+ nextLink -> listAllStatusesNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get a list of statuses of 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 list of statuses of a Experiment resource as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listAllStatuses(String resourceGroupName, String experimentName) {
+ return new PagedIterable<>(listAllStatusesAsync(resourceGroupName, experimentName));
+ }
+
+ /**
+ * Get a list of statuses of 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 a list of statuses of a Experiment resource as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listAllStatuses(
+ String resourceGroupName, String experimentName, Context context) {
+ return new PagedIterable<>(listAllStatusesAsync(resourceGroupName, experimentName, context));
+ }
+
+ /**
+ * Get a status of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param statusId GUID that represents a Experiment status.
+ * @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 status of a Experiment resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getStatusWithResponseAsync(
+ String resourceGroupName, String experimentName, String statusId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ if (statusId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter statusId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getStatus(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ statusId,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a status of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param statusId GUID that represents a Experiment status.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a status of a Experiment resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getStatusWithResponseAsync(
+ String resourceGroupName, String experimentName, String statusId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ if (statusId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter statusId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getStatus(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ statusId,
+ accept,
+ context);
+ }
+
+ /**
+ * Get a status of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param statusId GUID that represents a Experiment status.
+ * @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 status of a Experiment resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getStatusAsync(
+ String resourceGroupName, String experimentName, String statusId) {
+ return getStatusWithResponseAsync(resourceGroupName, experimentName, statusId)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a status of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param statusId GUID that represents a Experiment status.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a status of a Experiment resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getStatusWithResponse(
+ String resourceGroupName, String experimentName, String statusId, Context context) {
+ return getStatusWithResponseAsync(resourceGroupName, experimentName, statusId, context).block();
+ }
+
+ /**
+ * Get a status of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param statusId GUID that represents a Experiment status.
+ * @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 status of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExperimentStatusInner getStatus(String resourceGroupName, String experimentName, String statusId) {
+ return getStatusWithResponse(resourceGroupName, experimentName, statusId, Context.NONE).getValue();
+ }
+
+ /**
+ * Get a list of execution details of 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 list of execution details of a Experiment resource along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listExecutionDetailsSinglePageAsync(
+ String resourceGroupName, String experimentName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listExecutionDetails(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a list of execution details of 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 a list of execution details of a Experiment resource along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listExecutionDetailsSinglePageAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listExecutionDetails(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get a list of execution details of 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 list of execution details of a Experiment resource as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listExecutionDetailsAsync(
+ String resourceGroupName, String experimentName) {
+ return new PagedFlux<>(
+ () -> listExecutionDetailsSinglePageAsync(resourceGroupName, experimentName),
+ nextLink -> listExecutionDetailsNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of execution details of 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 a list of execution details of a Experiment resource as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listExecutionDetailsAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ return new PagedFlux<>(
+ () -> listExecutionDetailsSinglePageAsync(resourceGroupName, experimentName, context),
+ nextLink -> listExecutionDetailsNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get a list of execution details of 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 list of execution details of a Experiment resource as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listExecutionDetails(
+ String resourceGroupName, String experimentName) {
+ return new PagedIterable<>(listExecutionDetailsAsync(resourceGroupName, experimentName));
+ }
+
+ /**
+ * Get a list of execution details of 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 a list of execution details of a Experiment resource as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listExecutionDetails(
+ String resourceGroupName, String experimentName, Context context) {
+ return new PagedIterable<>(listExecutionDetailsAsync(resourceGroupName, experimentName, context));
+ }
+
+ /**
+ * Get an execution detail of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param executionDetailsId GUID that represents a Experiment execution detail.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an execution detail of a Experiment resource along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getExecutionDetailsWithResponseAsync(
+ String resourceGroupName, String experimentName, String executionDetailsId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ if (executionDetailsId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter executionDetailsId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getExecutionDetails(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ executionDetailsId,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get an execution detail of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param executionDetailsId GUID that represents a Experiment execution detail.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an execution detail of a Experiment resource along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getExecutionDetailsWithResponseAsync(
+ String resourceGroupName, String experimentName, String executionDetailsId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ if (executionDetailsId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter executionDetailsId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getExecutionDetails(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ executionDetailsId,
+ accept,
+ context);
+ }
+
+ /**
+ * Get an execution detail of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param executionDetailsId GUID that represents a Experiment execution detail.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an execution detail of a Experiment resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getExecutionDetailsAsync(
+ String resourceGroupName, String experimentName, String executionDetailsId) {
+ return getExecutionDetailsWithResponseAsync(resourceGroupName, experimentName, executionDetailsId)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get an execution detail of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param executionDetailsId GUID that represents a Experiment execution detail.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an execution detail of a Experiment resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getExecutionDetailsWithResponse(
+ String resourceGroupName, String experimentName, String executionDetailsId, Context context) {
+ return getExecutionDetailsWithResponseAsync(resourceGroupName, experimentName, executionDetailsId, context)
+ .block();
+ }
+
+ /**
+ * Get an execution detail of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param executionDetailsId GUID that represents a Experiment execution detail.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an execution detail of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExperimentExecutionDetailsInner getExecutionDetails(
+ String resourceGroupName, String experimentName, String executionDetailsId) {
+ return getExecutionDetailsWithResponse(resourceGroupName, experimentName, executionDetailsId, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a list of Experiment resources and a link for pagination along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAllNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a list of Experiment resources and a link for pagination along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAllNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listAllNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @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 list of Experiment resources and a link for pagination along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a list of Experiment resources and a link for pagination along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a list of Experiment statuses and a link for pagination along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAllStatusesNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listAllStatusesNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a list of Experiment statuses and a link for pagination along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAllStatusesNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listAllStatusesNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @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 list of Experiment execution details and a link for pagination along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listExecutionDetailsNextSinglePageAsync(
+ String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listExecutionDetailsNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a list of Experiment execution details and a link for pagination along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listExecutionDetailsNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listExecutionDetailsNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/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
new file mode 100644
index 0000000000000..66d80202a470f
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java
@@ -0,0 +1,306 @@
+// 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.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.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;
+
+public final class ExperimentsImpl implements Experiments {
+ private static final ClientLogger LOGGER = new ClientLogger(ExperimentsImpl.class);
+
+ private final ExperimentsClient innerClient;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ public ExperimentsImpl(ExperimentsClient innerClient, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Boolean running, String continuationToken, Context context) {
+ PagedIterable inner = this.serviceClient().list(running, continuationToken, context);
+ return Utils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(
+ String resourceGroupName, Boolean running, String continuationToken, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByResourceGroup(resourceGroupName, running, continuationToken, context);
+ 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 Response getByResourceGroupWithResponse(
+ String resourceGroupName, String experimentName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, experimentName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ExperimentImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Experiment getByResourceGroup(String resourceGroupName, String experimentName) {
+ ExperimentInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, experimentName);
+ if (inner != null) {
+ return new ExperimentImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ 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 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 Response