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);
+ }
+ }
+
+ /** @return Resource collection API of Capabilities. */
+ public Capabilities capabilities() {
+ if (this.capabilities == null) {
+ this.capabilities = new CapabilitiesImpl(clientObject.getCapabilities(), this);
+ }
+ return capabilities;
+ }
+
+ /** @return Resource collection API of Experiments. */
+ public Experiments experiments() {
+ if (this.experiments == null) {
+ this.experiments = new ExperimentsImpl(clientObject.getExperiments(), this);
+ }
+ return experiments;
+ }
+
+ /** @return Resource collection API of Operations. */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /** @return Resource collection API of Targets. */
+ public Targets targets() {
+ if (this.targets == null) {
+ this.targets = new TargetsImpl(clientObject.getTargets(), this);
+ }
+ return targets;
+ }
+
+ /** @return Resource collection API of TargetTypes. */
+ public TargetTypes targetTypes() {
+ if (this.targetTypes == null) {
+ this.targetTypes = new TargetTypesImpl(clientObject.getTargetTypes(), this);
+ }
+ return targetTypes;
+ }
+
+ /** @return Resource collection API of CapabilityTypes. */
+ public CapabilityTypes capabilityTypes() {
+ if (this.capabilityTypes == null) {
+ this.capabilityTypes = new CapabilityTypesImpl(clientObject.getCapabilityTypes(), this);
+ }
+ return capabilityTypes;
+ }
+
+ /**
+ * @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 000000000000..5a146d66fbf4
--- /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.
+ * @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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+}
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 000000000000..53a325b85cb6
--- /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.
+ * @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);
+
+ /**
+ * 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);
+}
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 000000000000..93692b41e70d
--- /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 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 TargetsClient object to access its operations.
+ *
+ * @return the TargetsClient object.
+ */
+ TargetsClient getTargets();
+
+ /**
+ * Gets the TargetTypesClient object to access its operations.
+ *
+ * @return the TargetTypesClient object.
+ */
+ TargetTypesClient getTargetTypes();
+
+ /**
+ * Gets the CapabilityTypesClient object to access its operations.
+ *
+ * @return the CapabilityTypesClient object.
+ */
+ CapabilityTypesClient getCapabilityTypes();
+}
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 000000000000..1a3cdaebc78b
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ExperimentsClient.java
@@ -0,0 +1,392 @@
+// 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.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+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.
+ * @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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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 the {@link SyncPoller} for polling of model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ExperimentInner> beginCreateOrUpdate(
+ String resourceGroupName, String experimentName, ExperimentInner experiment);
+
+ /**
+ * 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 the {@link SyncPoller} for polling of model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ExperimentInner> beginCreateOrUpdate(
+ 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);
+
+ /**
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExperimentInner createOrUpdate(
+ String resourceGroupName, String experimentName, ExperimentInner experiment, 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 the {@link SyncPoller} for polling of model that represents the result of a cancel Experiment operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ExperimentCancelOperationResultInner> beginCancel(
+ String resourceGroupName, String experimentName);
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of model that represents the result of a cancel Experiment operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ExperimentCancelOperationResultInner> beginCancel(
+ 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);
+
+ /**
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExperimentCancelOperationResultInner cancel(String resourceGroupName, String experimentName, Context context);
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @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);
+
+ /**
+ * 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);
+
+ /**
+ * 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.
+ * @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 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 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.
+ * @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);
+
+ /**
+ * 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);
+}
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 000000000000..fdd25c05ff15
--- /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 000000000000..dfa7bb383942
--- /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.
+ * @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);
+
+ /**
+ * 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);
+}
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 000000000000..0e868c8b6093
--- /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.
+ * @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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+}
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 000000000000..76803893897d
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityInner.java
@@ -0,0 +1,100 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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;
+
+ /**
+ * 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 000000000000..f77bb3d2afbc
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityProperties.java
@@ -0,0 +1,95 @@
+// 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;
+
+ /**
+ * 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 000000000000..c39ffeeb0c5a
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeInner.java
@@ -0,0 +1,135 @@
+// 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.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;
+
+ /**
+ * 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();
+ }
+
+ /**
+ * 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 000000000000..349bdd073ed6
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeProperties.java
@@ -0,0 +1,110 @@
+// 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 Type properties model. */
+@Immutable
+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;
+
+ /**
+ * 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;
+ }
+
+ /**
+ * 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/ExperimentCancelOperationResultInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentCancelOperationResultInner.java
new file mode 100644
index 000000000000..cf03b53e3d0a
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentCancelOperationResultInner.java
@@ -0,0 +1,50 @@
+// 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;
+
+ /**
+ * 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 000000000000..0b7ea82f7198
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsInner.java
@@ -0,0 +1,157 @@
+// 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;
+
+ /**
+ * 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 createdDateUtc property: String that represents the created date time.
+ *
+ * @return the createdDateUtc value.
+ */
+ public OffsetDateTime createdDateUtc() {
+ return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc();
+ }
+
+ /**
+ * Get the lastActionDateUtc property: String that represents the last action date time.
+ *
+ * @return the lastActionDateUtc value.
+ */
+ public OffsetDateTime lastActionDateUtc() {
+ return this.innerProperties() == null ? null : this.innerProperties().lastActionDateUtc();
+ }
+
+ /**
+ * Get the startDateUtc property: String that represents the start date time.
+ *
+ * @return the startDateUtc value.
+ */
+ public OffsetDateTime startDateUtc() {
+ return this.innerProperties() == null ? null : this.innerProperties().startDateUtc();
+ }
+
+ /**
+ * Get the stopDateUtc property: String that represents the stop date time.
+ *
+ * @return the stopDateUtc value.
+ */
+ public OffsetDateTime stopDateUtc() {
+ return this.innerProperties() == null ? null : this.innerProperties().stopDateUtc();
+ }
+
+ /**
+ * 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 000000000000..8154ce0849be
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsProperties.java
@@ -0,0 +1,145 @@
+// 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 = "createdDateUtc", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime createdDateUtc;
+
+ /*
+ * String that represents the last action date time.
+ */
+ @JsonProperty(value = "lastActionDateUtc", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime lastActionDateUtc;
+
+ /*
+ * String that represents the start date time.
+ */
+ @JsonProperty(value = "startDateUtc", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime startDateUtc;
+
+ /*
+ * String that represents the stop date time.
+ */
+ @JsonProperty(value = "stopDateUtc", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime stopDateUtc;
+
+ /*
+ * The information of the experiment run.
+ */
+ @JsonProperty(value = "runInformation", access = JsonProperty.Access.WRITE_ONLY)
+ private ExperimentExecutionDetailsPropertiesRunInformation runInformation;
+
+ /**
+ * 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 createdDateUtc property: String that represents the created date time.
+ *
+ * @return the createdDateUtc value.
+ */
+ public OffsetDateTime createdDateUtc() {
+ return this.createdDateUtc;
+ }
+
+ /**
+ * Get the lastActionDateUtc property: String that represents the last action date time.
+ *
+ * @return the lastActionDateUtc value.
+ */
+ public OffsetDateTime lastActionDateUtc() {
+ return this.lastActionDateUtc;
+ }
+
+ /**
+ * Get the startDateUtc property: String that represents the start date time.
+ *
+ * @return the startDateUtc value.
+ */
+ public OffsetDateTime startDateUtc() {
+ return this.startDateUtc;
+ }
+
+ /**
+ * Get the stopDateUtc property: String that represents the stop date time.
+ *
+ * @return the stopDateUtc value.
+ */
+ public OffsetDateTime stopDateUtc() {
+ return this.stopDateUtc;
+ }
+
+ /**
+ * 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 000000000000..4ead767f2de7
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentInner.java
@@ -0,0 +1,181 @@
+// 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();
+
+ /**
+ * 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 000000000000..ae1ba4e8893f
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentProperties.java
@@ -0,0 +1,121 @@
+// 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;
+
+ /**
+ * 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 000000000000..1fc28fe0f757
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentStartOperationResultInner.java
@@ -0,0 +1,50 @@
+// 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;
+
+ /**
+ * 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 000000000000..bf8ab77ccfb6
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentStatusInner.java
@@ -0,0 +1,111 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Model that represents the status of a Experiment. */
+@Fluent
+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;
+
+ /**
+ * 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 000000000000..f0f599d752b8
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentStatusProperties.java
@@ -0,0 +1,66 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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;
+
+ /**
+ * 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 000000000000..199e950d7c4e
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationInner.java
@@ -0,0 +1,121 @@
+// 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;
+
+ /**
+ * 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 000000000000..ebc5cf3f8da0
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetInner.java
@@ -0,0 +1,100 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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;
+
+ /**
+ * 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 000000000000..a663349af5b8
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeInner.java
@@ -0,0 +1,125 @@
+// 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();
+
+ /**
+ * 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 000000000000..ad42fb56ac93
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeProperties.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.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;
+
+ /**
+ * 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 000000000000..528b3b0bc960
--- /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 000000000000..80b2eb1aca61
--- /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 000000000000..d3b4db6868fc
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesClientImpl.java
@@ -0,0 +1,1366 @@
+// 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(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * 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 getAsync(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName)
+ .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.
+ * @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();
+ }
+
+ /**
+ * 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((Response res) -> 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.
+ * @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) {
+ deleteAsync(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName)
+ .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.
+ * @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();
+ }
+
+ /**
+ * 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(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * 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 createOrUpdateAsync(
+ resourceGroupName,
+ parentProviderNamespace,
+ parentResourceType,
+ parentResourceName,
+ targetName,
+ capabilityName,
+ capability)
+ .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.
+ * @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();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink 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 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 000000000000..0d840fb73c7a
--- /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 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 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 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 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 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;
+ }
+ }
+
+ 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;
+ }
+ }
+
+ 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 000000000000..1fae5a86f13a
--- /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 000000000000..7f2abecf819f
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypeImpl.java
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeInner;
+import com.azure.resourcemanager.chaos.models.CapabilityType;
+
+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 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 000000000000..becde87966c4
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesClientImpl.java
@@ -0,0 +1,550 @@
+// 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(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * 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 getAsync(locationName, targetTypeName, capabilityTypeName).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.
+ * @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 the next page of items.
+ *
+ * @param nextLink 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 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 000000000000..a6aaa1802f98
--- /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 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;
+ }
+ }
+
+ 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;
+ }
+ }
+
+ 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 000000000000..fd7fcb26e45b
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java
@@ -0,0 +1,142 @@
+// 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() {
+ if (endpoint == null) {
+ this.endpoint = "https://management.azure.com";
+ }
+ if (environment == null) {
+ this.environment = AzureEnvironment.AZURE;
+ }
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
+ if (defaultPollInterval == null) {
+ this.defaultPollInterval = Duration.ofSeconds(30);
+ }
+ if (serializerAdapter == null) {
+ this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
+ }
+ ChaosManagementClientImpl client =
+ new ChaosManagementClientImpl(
+ pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ 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 000000000000..b00fbd1e0751
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java
@@ -0,0 +1,363 @@
+// 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.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 java.util.Map;
+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 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 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;
+ }
+
+ /** 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 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;
+ }
+
+ /**
+ * 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 = "2021-09-15-preview";
+ this.capabilities = new CapabilitiesClientImpl(this);
+ this.experiments = new ExperimentsClientImpl(this);
+ this.operations = new OperationsClientImpl(this);
+ this.targets = new TargetsClientImpl(this);
+ this.targetTypes = new TargetTypesClientImpl(this);
+ this.capabilityTypes = new CapabilityTypesClientImpl(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) {
+ for (Map.Entry