diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 3c22cd94e7bb..5d39091d91f8 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -320,6 +320,7 @@ com.azure.resourcemanager:azure-resourcemanager-quota;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-extendedlocation;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-logz;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-storagepool;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-chaos;1.0.0-beta.1;1.0.0-beta.1
# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
# version. Unreleased dependencies are only valid for dependency versions.
diff --git a/pom.xml b/pom.xml
index c48350b9b837..7f536d9f123d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -732,6 +732,7 @@
sdk/boms
sdk/botservice
sdk/changeanalysis
+ sdk/chaos
sdk/cognitiveservices
sdk/commerce
sdk/communication
diff --git a/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md b/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md
new file mode 100644
index 000000000000..45b8b287c1d5
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2021-10-20)
+
+- Azure Resource Manager chaos client library for Java. This package contains Microsoft Azure SDK for chaos Management SDK. Azure Chaos Resource Provider REST API. Package tag package-2021-09-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
diff --git a/sdk/chaos/azure-resourcemanager-chaos/README.md b/sdk/chaos/azure-resourcemanager-chaos/README.md
new file mode 100644
index 000000000000..1b7d15e30869
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/README.md
@@ -0,0 +1,102 @@
+# Azure Resource Manager chaos client library for Java
+
+Azure Resource Manager chaos client library for Java.
+
+This package contains Microsoft Azure SDK for chaos Management SDK. Azure Chaos Resource Provider REST API. Package tag package-2021-09-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+## We'd love to hear your feedback
+
+We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
+
+If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
+
+Thank you in advance for your collaboration. We really appreciate your time!
+
+## Documentation
+
+Various documentation is available to help you get started
+
+- [API reference documentation][docs]
+
+## Getting started
+
+### Prerequisites
+
+- [Java Development Kit (JDK)][jdk] with version 8 or above
+- [Azure Subscription][azure_subscription]
+
+### Adding the package to your product
+
+[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-chaos;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-chaos
+ 1.0.0-beta.1
+
+```
+[//]: # ({x-version-update-end})
+
+### Include the recommended packages
+
+Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
+
+[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+
+### Authentication
+
+By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+
+- `AZURE_CLIENT_ID` for Azure client ID.
+- `AZURE_TENANT_ID` for Azure tenant ID.
+- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
+
+In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+
+With above configuration, `azure` client can be authenticated by following code:
+
+```java
+AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+TokenCredential credential = new DefaultAzureCredentialBuilder()
+ .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
+ .build();
+ChaosManager manager = ChaosManager
+ .authenticate(credential, profile);
+```
+
+The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+
+See [Authentication][authenticate] for more options.
+
+## Key concepts
+
+See [API design][design] for general introduction on design and key concepts on Azure Management Libraries.
+
+## Examples
+
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md)
+
+
+## Troubleshooting
+
+## Next steps
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
+
+1. Fork it
+1. Create your feature branch (`git checkout -b my-new-feature`)
+1. Commit your changes (`git commit -am 'Add some feature'`)
+1. Push to the branch (`git push origin my-new-feature`)
+1. Create new Pull Request
+
+
+[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
+[docs]: https://azure.github.io/azure-sdk-for-java/
+[jdk]: https://docs.microsoft.com/java/azure/jdk/
+[azure_subscription]: https://azure.microsoft.com/free/
+[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
+[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
+[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
+[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md b/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md
new file mode 100644
index 000000000000..6f47cafddd70
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md
@@ -0,0 +1,660 @@
+# Code snippets and samples
+
+
+## Capabilities
+
+- [CreateOrUpdate](#capabilities_createorupdate)
+- [Delete](#capabilities_delete)
+- [Get](#capabilities_get)
+- [List](#capabilities_list)
+
+## CapabilityTypes
+
+- [Get](#capabilitytypes_get)
+- [List](#capabilitytypes_list)
+
+## Experiments
+
+- [Cancel](#experiments_cancel)
+- [CreateOrUpdate](#experiments_createorupdate)
+- [Delete](#experiments_delete)
+- [GetByResourceGroup](#experiments_getbyresourcegroup)
+- [GetExecutionDetails](#experiments_getexecutiondetails)
+- [GetStatus](#experiments_getstatus)
+- [List](#experiments_list)
+- [ListAllStatuses](#experiments_listallstatuses)
+- [ListByResourceGroup](#experiments_listbyresourcegroup)
+- [ListExecutionDetails](#experiments_listexecutiondetails)
+- [Start](#experiments_start)
+
+## TargetTypes
+
+- [Get](#targettypes_get)
+- [List](#targettypes_list)
+
+## Targets
+
+- [CreateOrUpdate](#targets_createorupdate)
+- [Delete](#targets_delete)
+- [Get](#targets_get)
+- [List](#targets_list)
+### Capabilities_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner;
+
+/** Samples for Capabilities CreateOrUpdate. */
+public final class CapabilitiesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/CreateOrUpdateACapability.json
+ */
+ /**
+ * Sample code: Create/update a Capability that extends a virtual machine Target resource.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void createUpdateACapabilityThatExtendsAVirtualMachineTargetResource(
+ com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager
+ .capabilities()
+ .createOrUpdateWithResponse(
+ "exampleRG",
+ "Microsoft.Compute",
+ "virtualMachines",
+ "exampleVM",
+ "Microsoft-VirtualMachine",
+ "Shutdown-1.0",
+ new CapabilityInner(),
+ Context.NONE);
+ }
+}
+```
+
+### Capabilities_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Capabilities Delete. */
+public final class CapabilitiesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/DeleteACapability.json
+ */
+ /**
+ * Sample code: Delete a Capability that extends a virtual machine Target resource.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void deleteACapabilityThatExtendsAVirtualMachineTargetResource(
+ com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager
+ .capabilities()
+ .deleteWithResponse(
+ "exampleRG",
+ "Microsoft.Compute",
+ "virtualMachines",
+ "exampleVM",
+ "Microsoft-VirtualMachine",
+ "Shutdown-1.0",
+ Context.NONE);
+ }
+}
+```
+
+### Capabilities_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Capabilities Get. */
+public final class CapabilitiesGetSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/GetACapability.json
+ */
+ /**
+ * Sample code: Get a Capability that extends a virtual machine Target resource.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void getACapabilityThatExtendsAVirtualMachineTargetResource(
+ com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager
+ .capabilities()
+ .getWithResponse(
+ "exampleRG",
+ "Microsoft.Compute",
+ "virtualMachines",
+ "exampleVM",
+ "Microsoft-VirtualMachine",
+ "Shutdown-1.0",
+ Context.NONE);
+ }
+}
+```
+
+### Capabilities_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Capabilities List. */
+public final class CapabilitiesListSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/ListCapabilities.json
+ */
+ /**
+ * Sample code: List all Capabilities that extend a virtual machine Target resource.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void listAllCapabilitiesThatExtendAVirtualMachineTargetResource(
+ com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager
+ .capabilities()
+ .list(
+ "exampleRG",
+ "Microsoft.Compute",
+ "virtualMachines",
+ "exampleVM",
+ "Microsoft-VirtualMachine",
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### CapabilityTypes_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CapabilityTypes Get. */
+public final class CapabilityTypesGetSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/GetACapabilityType.json
+ */
+ /**
+ * Sample code: Get a Capability Type for a virtual machine Target resource on westus2 location.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void getACapabilityTypeForAVirtualMachineTargetResourceOnWestus2Location(
+ com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.capabilityTypes().getWithResponse("westus2", "Microsoft-VirtualMachine", "Shutdown-1.0", Context.NONE);
+ }
+}
+```
+
+### CapabilityTypes_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CapabilityTypes List. */
+public final class CapabilityTypesListSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/ListCapabilityTypes.json
+ */
+ /**
+ * Sample code: List all Capability Types for a virtual machine Target resource on westus2 location.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void listAllCapabilityTypesForAVirtualMachineTargetResourceOnWestus2Location(
+ com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.capabilityTypes().list("westus2", "Microsoft-VirtualMachine", null, Context.NONE);
+ }
+}
+```
+
+### Experiments_Cancel
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Experiments Cancel. */
+public final class ExperimentsCancelSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/CancelAExperiment.json
+ */
+ /**
+ * Sample code: Cancel a running Experiment.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void cancelARunningExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.experiments().cancel("exampleRG", "exampleExperiment", Context.NONE);
+ }
+}
+```
+
+### Experiments_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.chaos.models.Action;
+import com.azure.resourcemanager.chaos.models.Branch;
+import com.azure.resourcemanager.chaos.models.ResourceIdentity;
+import com.azure.resourcemanager.chaos.models.ResourceIdentityType;
+import com.azure.resourcemanager.chaos.models.Selector;
+import com.azure.resourcemanager.chaos.models.SelectorType;
+import com.azure.resourcemanager.chaos.models.Step;
+import com.azure.resourcemanager.chaos.models.TargetReference;
+import java.util.Arrays;
+
+/** Samples for Experiments CreateOrUpdate. */
+public final class ExperimentsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/CreateOrUpdateAExperiment.json
+ */
+ /**
+ * Sample code: Create/update a Experiment in a resource group.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void createUpdateAExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager
+ .experiments()
+ .define("exampleExperiment")
+ .withRegion("centraluseuap")
+ .withExistingResourceGroup("exampleRG")
+ .withSteps(
+ Arrays
+ .asList(
+ new Step()
+ .withName("step1")
+ .withBranches(
+ Arrays
+ .asList(
+ new Branch()
+ .withName("branch1")
+ .withActions(
+ Arrays
+ .asList(
+ new Action()
+ .withName(
+ "urn:csci:provider:providername:Shutdown/1.0")))))))
+ .withSelectors(
+ Arrays
+ .asList(
+ new Selector()
+ .withType(SelectorType.LIST)
+ .withId("selector1")
+ .withTargets(
+ Arrays
+ .asList(
+ new TargetReference()
+ .withId(
+ "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine")))))
+ .withIdentity(new ResourceIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
+ .create();
+ }
+}
+```
+
+### Experiments_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Experiments Delete. */
+public final class ExperimentsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/DeleteAExperiment.json
+ */
+ /**
+ * Sample code: Delete a Experiment in a resource group.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void deleteAExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.experiments().deleteWithResponse("exampleRG", "exampleExperiment", Context.NONE);
+ }
+}
+```
+
+### Experiments_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Experiments GetByResourceGroup. */
+public final class ExperimentsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/GetAExperiment.json
+ */
+ /**
+ * Sample code: Get a Experiment in a resource group.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void getAExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.experiments().getByResourceGroupWithResponse("exampleRG", "exampleExperiment", Context.NONE);
+ }
+}
+```
+
+### Experiments_GetExecutionDetails
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Experiments GetExecutionDetails. */
+public final class ExperimentsGetExecutionDetailsSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/GetAExperimentExecutionDetails.json
+ */
+ /**
+ * Sample code: Get experiment execution details.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void getExperimentExecutionDetails(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager
+ .experiments()
+ .getExecutionDetailsWithResponse(
+ "exampleRG", "exampleExperiment", "f24500ad-744e-4a26-864b-b76199eac333", Context.NONE);
+ }
+}
+```
+
+### Experiments_GetStatus
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Experiments GetStatus. */
+public final class ExperimentsGetStatusSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/GetAExperimentStatus.json
+ */
+ /**
+ * Sample code: Get the status of a Experiment.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void getTheStatusOfAExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager
+ .experiments()
+ .getStatusWithResponse(
+ "exampleRG", "exampleExperiment", "50734542-2e64-4e08-814c-cc0e7475f7e4", Context.NONE);
+ }
+}
+```
+
+### Experiments_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Experiments List. */
+public final class ExperimentsListSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/ListExperimentsInASubscription.json
+ */
+ /**
+ * Sample code: List all Experiments in a subscription.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void listAllExperimentsInASubscription(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.experiments().list(null, null, Context.NONE);
+ }
+}
+```
+
+### Experiments_ListAllStatuses
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Experiments ListAllStatuses. */
+public final class ExperimentsListAllStatusesSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/ListExperimentStatuses.json
+ */
+ /**
+ * Sample code: List all statuses of a Experiment.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void listAllStatusesOfAExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.experiments().listAllStatuses("exampleRG", "exampleExperiment", Context.NONE);
+ }
+}
+```
+
+### Experiments_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Experiments ListByResourceGroup. */
+public final class ExperimentsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/ListExperimentsInAResourceGroup.json
+ */
+ /**
+ * Sample code: List all Experiments in a resource group.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void listAllExperimentsInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.experiments().listByResourceGroup("exampleRG", null, null, Context.NONE);
+ }
+}
+```
+
+### Experiments_ListExecutionDetails
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Experiments ListExecutionDetails. */
+public final class ExperimentsListExecutionDetailsSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/ListExperimentExecutionsDetails.json
+ */
+ /**
+ * Sample code: List experiment executions details.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void listExperimentExecutionsDetails(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.experiments().listExecutionDetails("exampleRG", "exampleExperiment", Context.NONE);
+ }
+}
+```
+
+### Experiments_Start
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Experiments Start. */
+public final class ExperimentsStartSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/StartAExperiment.json
+ */
+ /**
+ * Sample code: Start a Experiment.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void startAExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.experiments().startWithResponse("exampleRG", "exampleExperiment", Context.NONE);
+ }
+}
+```
+
+### TargetTypes_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for TargetTypes Get. */
+public final class TargetTypesGetSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/GetATargetType.json
+ */
+ /**
+ * Sample code: Get a Target Type for westus2 location.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void getATargetTypeForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.targetTypes().getWithResponse("westus2", "Microsoft-Agent", Context.NONE);
+ }
+}
+```
+
+### TargetTypes_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for TargetTypes List. */
+public final class TargetTypesListSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/ListTargetTypes.json
+ */
+ /**
+ * Sample code: List all Target Types for westus2 location.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void listAllTargetTypesForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.targetTypes().list("westus2", null, Context.NONE);
+ }
+}
+```
+
+### Targets_CreateOrUpdate
+
+```java
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.Context;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.chaos.fluent.models.TargetInner;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Targets CreateOrUpdate. */
+public final class TargetsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/CreateOrUpdateATarget.json
+ */
+ /**
+ * Sample code: Create/update a Target that extends a virtual machine resource.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void createUpdateATargetThatExtendsAVirtualMachineResource(
+ com.azure.resourcemanager.chaos.ChaosManager manager) throws IOException {
+ manager
+ .targets()
+ .createOrUpdateWithResponse(
+ "exampleRG",
+ "Microsoft.Compute",
+ "virtualMachines",
+ "exampleVM",
+ "Microsoft-Agent",
+ new TargetInner()
+ .withProperties(
+ mapOf(
+ "identities",
+ SerializerFactory
+ .createDefaultManagementSerializerAdapter()
+ .deserialize(
+ "[{\"type\":\"CertificateSubjectIssuer\",\"subject\":\"CN=example.subject\"}]",
+ Object.class,
+ SerializerEncoding.JSON))),
+ Context.NONE);
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Targets_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Targets Delete. */
+public final class TargetsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/DeleteATarget.json
+ */
+ /**
+ * Sample code: Delete a Target that extends a virtual machine resource.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void deleteATargetThatExtendsAVirtualMachineResource(
+ com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager
+ .targets()
+ .deleteWithResponse(
+ "exampleRG", "Microsoft.Compute", "virtualMachines", "exampleVM", "Microsoft-Agent", Context.NONE);
+ }
+}
+```
+
+### Targets_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Targets Get. */
+public final class TargetsGetSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/GetATarget.json
+ */
+ /**
+ * Sample code: Get a Target that extends a virtual machine resource.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void getATargetThatExtendsAVirtualMachineResource(
+ com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager
+ .targets()
+ .getWithResponse(
+ "exampleRG", "Microsoft.Compute", "virtualMachines", "exampleVM", "Microsoft-Agent", Context.NONE);
+ }
+}
+```
+
+### Targets_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Targets List. */
+public final class TargetsListSamples {
+ /*
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/examples/ListTargets.json
+ */
+ /**
+ * Sample code: List all Targets that extend a virtual machine resource.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void listAllTargetsThatExtendAVirtualMachineResource(
+ com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.targets().list("exampleRG", "Microsoft.Compute", "virtualMachines", "exampleVM", null, Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/chaos/azure-resourcemanager-chaos/pom.xml b/sdk/chaos/azure-resourcemanager-chaos/pom.xml
new file mode 100644
index 000000000000..56d20659c2b1
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/pom.xml
@@ -0,0 +1,86 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-chaos
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for chaos Management
+ This package contains Microsoft Azure SDK for chaos Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Chaos Resource Provider REST API. Package tag package-2021-09-15-preview.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+
+
+
+
+ com.azure
+ azure-core
+ 1.21.0
+
+
+ com.azure
+ azure-core-management
+ 1.4.2
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.7
+
+ true
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
+
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/ChaosManager.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/ChaosManager.java
new file mode 100644
index 000000000000..3d0d5c0a0917
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/ChaosManager.java
@@ -0,0 +1,287 @@
+// 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;
+
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.HttpLogOptions;
+import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpPipelinePolicy;
+import com.azure.core.http.policy.HttpPolicyProviders;
+import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
+import com.azure.core.management.profile.AzureProfile;
+import com.azure.core.util.Configuration;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.chaos.fluent.MicrosoftAzureChaos;
+import com.azure.resourcemanager.chaos.implementation.CapabilitiesImpl;
+import com.azure.resourcemanager.chaos.implementation.CapabilityTypesImpl;
+import com.azure.resourcemanager.chaos.implementation.ExperimentsImpl;
+import com.azure.resourcemanager.chaos.implementation.MicrosoftAzureChaosBuilder;
+import com.azure.resourcemanager.chaos.implementation.OperationsImpl;
+import com.azure.resourcemanager.chaos.implementation.TargetTypesImpl;
+import com.azure.resourcemanager.chaos.implementation.TargetsImpl;
+import com.azure.resourcemanager.chaos.models.Capabilities;
+import com.azure.resourcemanager.chaos.models.CapabilityTypes;
+import com.azure.resourcemanager.chaos.models.Experiments;
+import com.azure.resourcemanager.chaos.models.Operations;
+import com.azure.resourcemanager.chaos.models.TargetTypes;
+import com.azure.resourcemanager.chaos.models.Targets;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/** Entry point to ChaosManager. Azure Chaos Resource Provider REST API. */
+public final class ChaosManager {
+ private Capabilities capabilities;
+
+ private Experiments experiments;
+
+ private Operations operations;
+
+ private Targets targets;
+
+ private TargetTypes targetTypes;
+
+ private CapabilityTypes capabilityTypes;
+
+ private final MicrosoftAzureChaos clientObject;
+
+ private ChaosManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new MicrosoftAzureChaosBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * 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 static ChaosManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return configure().authenticate(credential, profile);
+ }
+
+ /**
+ * Gets a Configurable instance that can be used to create ChaosManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new ChaosManager.Configurable();
+ }
+
+ /** The Configurable allowing configurations to be set. */
+ public static final class Configurable {
+ private final ClientLogger logger = new ClientLogger(Configurable.class);
+
+ private HttpClient httpClient;
+ private HttpLogOptions httpLogOptions;
+ private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private 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 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, "'retryPolicy' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' 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) {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new RequestIdPolicy());
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies.addAll(this.policies);
+ 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 MicrosoftAzureChaos providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ */
+ public MicrosoftAzureChaos 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..ff33f869a939
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/CapabilitiesClient.java
@@ -0,0 +1,208 @@
+// 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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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 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.
+ */
+ @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..900a9986f013
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/CapabilityTypesClient.java
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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/ExperimentsClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ExperimentsClient.java
new file mode 100644
index 000000000000..6c54580b570d
--- /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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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 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.
+ */
+ @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 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 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 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 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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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/MicrosoftAzureChaos.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/MicrosoftAzureChaos.java
new file mode 100644
index 000000000000..f0e759e6fab0
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/MicrosoftAzureChaos.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 MicrosoftAzureChaos class. */
+public interface MicrosoftAzureChaos {
+ /**
+ * 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/OperationsClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/OperationsClient.java
new file mode 100644
index 000000000000..9f770a81e164
--- /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.
+ */
+ @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.
+ */
+ @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..ad86728b20bf
--- /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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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..f6fb77d65372
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/TargetsClient.java
@@ -0,0 +1,189 @@
+// 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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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 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.
+ */
+ @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..8b7086ae42e9
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityInner.java
@@ -0,0 +1,104 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Model that represents a Capability resource. */
+@Immutable
+public final class CapabilityInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CapabilityInner.class);
+
+ /*
+ * 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..c238ba909ab4
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityProperties.java
@@ -0,0 +1,99 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Model that represents the Capability properties model. */
+@Immutable
+public final class CapabilityProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CapabilityProperties.class);
+
+ /*
+ * 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..9c45fb86ab7b
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeInner.java
@@ -0,0 +1,139 @@
+// 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.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Model that represents a Capability Type resource. */
+@Fluent
+public final class CapabilityTypeInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CapabilityTypeInner.class);
+
+ /*
+ * 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..69043a78c03a
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeProperties.java
@@ -0,0 +1,114 @@
+// 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.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Model that represents the Capability Type properties model. */
+@Immutable
+public final class CapabilityTypeProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CapabilityTypeProperties.class);
+
+ /*
+ * 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..f244cbc4785b
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentCancelOperationResultInner.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Model that represents the result of a cancel Experiment operation. */
+@Immutable
+public final class ExperimentCancelOperationResultInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ExperimentCancelOperationResultInner.class);
+
+ /*
+ * 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..f827b785fb31
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsInner.java
@@ -0,0 +1,161 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Model that represents the execution details of a Experiment. */
+@Immutable
+public final class ExperimentExecutionDetailsInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ExperimentExecutionDetailsInner.class);
+
+ /*
+ * 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..0f59304074ed
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsProperties.java
@@ -0,0 +1,149 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Model that represents the Experiment execution details properties model. */
+@Immutable
+public final class ExperimentExecutionDetailsProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ExperimentExecutionDetailsProperties.class);
+
+ /*
+ * 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..ac7d09e361b8
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentInner.java
@@ -0,0 +1,182 @@
+// 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.JsonIgnore;
+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 {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ExperimentInner.class);
+
+ /*
+ * 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();
+ }
+ }
+}
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..a84b6ce74bab
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentProperties.java
@@ -0,0 +1,122 @@
+// 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.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Model that represents the Experiment properties model. */
+@Fluent
+public final class ExperimentProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ExperimentProperties.class);
+
+ /*
+ * 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());
+ }
+ }
+}
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..b9ff077b9631
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentStartOperationResultInner.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Model that represents the result of a start Experiment operation. */
+@Immutable
+public final class ExperimentStartOperationResultInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ExperimentStartOperationResultInner.class);
+
+ /*
+ * 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..4c75bebcb733
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentStatusInner.java
@@ -0,0 +1,115 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Model that represents the status of a Experiment. */
+@Fluent
+public final class ExperimentStatusInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ExperimentStatusInner.class);
+
+ /*
+ * 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..a2f9924313a2
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentStatusProperties.java
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Model that represents the Experiment status properties model. */
+@Immutable
+public final class ExperimentStatusProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ExperimentStatusProperties.class);
+
+ /*
+ * 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..b3bb902603c7
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationInner.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.util.logging.ClientLogger;
+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.JsonIgnore;
+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 {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
+
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC).
+ * Examples: "Microsoft.Compute/virtualMachines/write",
+ * "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ @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..91b83725f972
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetInner.java
@@ -0,0 +1,101 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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.JsonIgnore;
+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 {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(TargetInner.class);
+
+ /*
+ * 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"));
+ }
+ }
+}
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..59f6a15c6b9c
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeInner.java
@@ -0,0 +1,126 @@
+// 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.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Model that represents a Target Type resource. */
+@Fluent
+public final class TargetTypeInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(TargetTypeInner.class);
+
+ /*
+ * 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();
+ }
+ }
+}
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..5d093891c1a1
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeProperties.java
@@ -0,0 +1,85 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Model that represents the base Target Type properties model. */
+@Immutable
+public final class TargetTypeProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(TargetTypeProperties.class);
+
+ /*
+ * 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..1f00553894d0
--- /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 MicrosoftAzureChaos. Azure Chaos Resource Provider REST API. */
+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..1e9382f7558c
--- /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 MicrosoftAzureChaos. Azure Chaos Resource Provider REST API. */
+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..e11abca4f7fc
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesClientImpl.java
@@ -0,0 +1,1356 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.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.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 {
+ private final ClientLogger logger = new ClientLogger(CapabilitiesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final CapabilitiesService service;
+
+ /** The service client containing this operation class. */
+ private final MicrosoftAzureChaosImpl client;
+
+ /**
+ * Initializes an instance of CapabilitiesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CapabilitiesClientImpl(MicrosoftAzureChaosImpl client) {
+ this.service =
+ RestProxy.create(CapabilitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MicrosoftAzureChaosCapabilities to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MicrosoftAzureChaosC")
+ 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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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 completion.
+ */
+ @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 completion.
+ */
+ @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 the completion.
+ */
+ @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 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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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..166f4c97489a
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesImpl.java
@@ -0,0 +1,223 @@
+// 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;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class CapabilitiesImpl implements Capabilities {
+ @JsonIgnore private 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..a83f6ad1228c
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesClientImpl.java
@@ -0,0 +1,542 @@
+// 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.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.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 {
+ private final ClientLogger logger = new ClientLogger(CapabilityTypesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final CapabilityTypesService service;
+
+ /** The service client containing this operation class. */
+ private final MicrosoftAzureChaosImpl client;
+
+ /**
+ * Initializes an instance of CapabilityTypesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CapabilityTypesClientImpl(MicrosoftAzureChaosImpl client) {
+ this.service =
+ RestProxy.create(CapabilityTypesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MicrosoftAzureChaosCapabilityTypes to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MicrosoftAzureChaosC")
+ 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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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..d030f7faad17
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesImpl.java
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.implementation;
+
+import com.azure.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;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class CapabilityTypesImpl implements CapabilityTypes {
+ @JsonIgnore private 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/ExperimentCancelOperationResultImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentCancelOperationResultImpl.java
new file mode 100644
index 000000000000..ab9f6c580516
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentCancelOperationResultImpl.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.implementation;
+
+import com.azure.resourcemanager.chaos.fluent.models.ExperimentCancelOperationResultInner;
+import com.azure.resourcemanager.chaos.models.ExperimentCancelOperationResult;
+
+public final class ExperimentCancelOperationResultImpl implements ExperimentCancelOperationResult {
+ private ExperimentCancelOperationResultInner innerObject;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ ExperimentCancelOperationResultImpl(
+ ExperimentCancelOperationResultInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String statusUrl() {
+ return this.innerModel().statusUrl();
+ }
+
+ public ExperimentCancelOperationResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.chaos.ChaosManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionDetailsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionDetailsImpl.java
new file mode 100644
index 000000000000..4c31007fba37
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionDetailsImpl.java
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.implementation;
+
+import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsInner;
+import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetails;
+import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation;
+import java.time.OffsetDateTime;
+
+public final class ExperimentExecutionDetailsImpl implements ExperimentExecutionDetails {
+ private ExperimentExecutionDetailsInner innerObject;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ ExperimentExecutionDetailsImpl(
+ ExperimentExecutionDetailsInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String experimentId() {
+ return this.innerModel().experimentId();
+ }
+
+ public String status() {
+ return this.innerModel().status();
+ }
+
+ public String failureReason() {
+ return this.innerModel().failureReason();
+ }
+
+ public OffsetDateTime createdDateUtc() {
+ return this.innerModel().createdDateUtc();
+ }
+
+ public OffsetDateTime lastActionDateUtc() {
+ return this.innerModel().lastActionDateUtc();
+ }
+
+ public OffsetDateTime startDateUtc() {
+ return this.innerModel().startDateUtc();
+ }
+
+ public OffsetDateTime stopDateUtc() {
+ return this.innerModel().stopDateUtc();
+ }
+
+ public ExperimentExecutionDetailsPropertiesRunInformation runInformation() {
+ return this.innerModel().runInformation();
+ }
+
+ public ExperimentExecutionDetailsInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.chaos.ChaosManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java
new file mode 100644
index 000000000000..55072ee7ae7e
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java
@@ -0,0 +1,230 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.chaos.fluent.models.ExperimentInner;
+import com.azure.resourcemanager.chaos.models.Experiment;
+import com.azure.resourcemanager.chaos.models.ExperimentCancelOperationResult;
+import com.azure.resourcemanager.chaos.models.ExperimentStartOperationResult;
+import com.azure.resourcemanager.chaos.models.ResourceIdentity;
+import com.azure.resourcemanager.chaos.models.Selector;
+import com.azure.resourcemanager.chaos.models.Step;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public final class ExperimentImpl implements Experiment, Experiment.Definition, Experiment.Update {
+ private ExperimentInner innerObject;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public ResourceIdentity identity() {
+ return this.innerModel().identity();
+ }
+
+ public List steps() {
+ List inner = this.innerModel().steps();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List selectors() {
+ List inner = this.innerModel().selectors();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Boolean startOnCreation() {
+ return this.innerModel().startOnCreation();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public ExperimentInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.chaos.ChaosManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String experimentName;
+
+ public ExperimentImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public Experiment create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExperiments()
+ .createOrUpdate(resourceGroupName, experimentName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Experiment create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExperiments()
+ .createOrUpdate(resourceGroupName, experimentName, this.innerModel(), context);
+ return this;
+ }
+
+ ExperimentImpl(String name, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerObject = new ExperimentInner();
+ this.serviceManager = serviceManager;
+ this.experimentName = name;
+ }
+
+ public ExperimentImpl update() {
+ return this;
+ }
+
+ public Experiment apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExperiments()
+ .createOrUpdate(resourceGroupName, experimentName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Experiment apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExperiments()
+ .createOrUpdate(resourceGroupName, experimentName, this.innerModel(), context);
+ return this;
+ }
+
+ ExperimentImpl(ExperimentInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.experimentName = Utils.getValueFromIdByName(innerObject.id(), "experiments");
+ }
+
+ public Experiment refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExperiments()
+ .getByResourceGroupWithResponse(resourceGroupName, experimentName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Experiment refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExperiments()
+ .getByResourceGroupWithResponse(resourceGroupName, experimentName, context)
+ .getValue();
+ return this;
+ }
+
+ public ExperimentCancelOperationResult cancel() {
+ return serviceManager.experiments().cancel(resourceGroupName, experimentName);
+ }
+
+ public ExperimentCancelOperationResult cancel(Context context) {
+ return serviceManager.experiments().cancel(resourceGroupName, experimentName, context);
+ }
+
+ public ExperimentStartOperationResult start() {
+ return serviceManager.experiments().start(resourceGroupName, experimentName);
+ }
+
+ public Response startWithResponse(Context context) {
+ return serviceManager.experiments().startWithResponse(resourceGroupName, experimentName, context);
+ }
+
+ public ExperimentImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public ExperimentImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public ExperimentImpl withSteps(List steps) {
+ this.innerModel().withSteps(steps);
+ return this;
+ }
+
+ public ExperimentImpl withSelectors(List selectors) {
+ this.innerModel().withSelectors(selectors);
+ return this;
+ }
+
+ public ExperimentImpl withTags(Map tags) {
+ this.innerModel().withTags(tags);
+ return this;
+ }
+
+ public ExperimentImpl withIdentity(ResourceIdentity identity) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ }
+
+ public ExperimentImpl withStartOnCreation(Boolean startOnCreation) {
+ this.innerModel().withStartOnCreation(startOnCreation);
+ return this;
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentStartOperationResultImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentStartOperationResultImpl.java
new file mode 100644
index 000000000000..8fa3ca1fcc2c
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentStartOperationResultImpl.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.implementation;
+
+import com.azure.resourcemanager.chaos.fluent.models.ExperimentStartOperationResultInner;
+import com.azure.resourcemanager.chaos.models.ExperimentStartOperationResult;
+
+public final class ExperimentStartOperationResultImpl implements ExperimentStartOperationResult {
+ private ExperimentStartOperationResultInner innerObject;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ ExperimentStartOperationResultImpl(
+ ExperimentStartOperationResultInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String statusUrl() {
+ return this.innerModel().statusUrl();
+ }
+
+ public ExperimentStartOperationResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.chaos.ChaosManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentStatusImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentStatusImpl.java
new file mode 100644
index 000000000000..491789a83855
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentStatusImpl.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.implementation;
+
+import com.azure.resourcemanager.chaos.fluent.models.ExperimentStatusInner;
+import com.azure.resourcemanager.chaos.models.ExperimentStatus;
+import java.time.OffsetDateTime;
+
+public final class ExperimentStatusImpl implements ExperimentStatus {
+ private ExperimentStatusInner innerObject;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ ExperimentStatusImpl(
+ ExperimentStatusInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String status() {
+ return this.innerModel().status();
+ }
+
+ public OffsetDateTime createdDateUtc() {
+ return this.innerModel().createdDateUtc();
+ }
+
+ public OffsetDateTime endDateUtc() {
+ return this.innerModel().endDateUtc();
+ }
+
+ public ExperimentStatusInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.chaos.ChaosManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java
new file mode 100644
index 000000000000..6cba3d101e1a
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java
@@ -0,0 +1,2591 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.chaos.fluent.ExperimentsClient;
+import com.azure.resourcemanager.chaos.fluent.models.ExperimentCancelOperationResultInner;
+import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsInner;
+import com.azure.resourcemanager.chaos.fluent.models.ExperimentInner;
+import com.azure.resourcemanager.chaos.fluent.models.ExperimentStartOperationResultInner;
+import com.azure.resourcemanager.chaos.fluent.models.ExperimentStatusInner;
+import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsListResult;
+import com.azure.resourcemanager.chaos.models.ExperimentListResult;
+import com.azure.resourcemanager.chaos.models.ExperimentStatusListResult;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ExperimentsClient. */
+public final class ExperimentsClientImpl implements ExperimentsClient {
+ private final ClientLogger logger = new ClientLogger(ExperimentsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final ExperimentsService service;
+
+ /** The service client containing this operation class. */
+ private final MicrosoftAzureChaosImpl client;
+
+ /**
+ * Initializes an instance of ExperimentsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ExperimentsClientImpl(MicrosoftAzureChaosImpl client) {
+ this.service =
+ RestProxy.create(ExperimentsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MicrosoftAzureChaosExperiments to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MicrosoftAzureChaosE")
+ private interface ExperimentsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/experiments")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("running") Boolean running,
+ @QueryParam("continuationToken") String continuationToken,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("running") Boolean running,
+ @QueryParam("continuationToken") String continuationToken,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments"
+ + "/{experimentName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("experimentName") String experimentName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments"
+ + "/{experimentName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("experimentName") String experimentName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments"
+ + "/{experimentName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("experimentName") String experimentName,
+ @BodyParam("application/json") ExperimentInner experiment,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments"
+ + "/{experimentName}/cancel")
+ @ExpectedResponses({202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> cancel(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("experimentName") String experimentName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments"
+ + "/{experimentName}/start")
+ @ExpectedResponses({202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> start(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("experimentName") String experimentName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments"
+ + "/{experimentName}/statuses")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listAllStatuses(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("experimentName") String experimentName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments"
+ + "/{experimentName}/statuses/{statusId}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getStatus(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("experimentName") String experimentName,
+ @PathParam("statusId") String statusId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments"
+ + "/{experimentName}/executionDetails")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listExecutionDetails(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("experimentName") String experimentName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments"
+ + "/{experimentName}/executionDetails/{executionDetailsId}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getExecutionDetails(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("experimentName") String experimentName,
+ @PathParam("executionDetailsId") String executionDetailsId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listAllNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listAllStatusesNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listExecutionDetailsNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get a list of Experiment resources in a subscription.
+ *
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Boolean running, String continuationToken) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ running,
+ continuationToken,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a list of Experiment resources in a subscription.
+ *
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ Boolean running, String continuationToken, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ running,
+ continuationToken,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get a list of Experiment resources in a subscription.
+ *
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Boolean running, String continuationToken) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(running, continuationToken), nextLink -> listAllNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of Experiment resources in a subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ final Boolean running = null;
+ final String continuationToken = null;
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(running, continuationToken), nextLink -> listAllNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of Experiment resources in a subscription.
+ *
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Boolean running, String continuationToken, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(running, continuationToken, context),
+ nextLink -> listAllNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get a list of Experiment resources in a subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ final Boolean running = null;
+ final String continuationToken = null;
+ return new PagedIterable<>(listAsync(running, continuationToken));
+ }
+
+ /**
+ * Get a list of Experiment resources in a subscription.
+ *
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Boolean running, String continuationToken, Context context) {
+ return new PagedIterable<>(listAsync(running, continuationToken, context));
+ }
+
+ /**
+ * Get a list of Experiment resources in a resource group.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, Boolean running, String continuationToken) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ running,
+ continuationToken,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a list of Experiment resources in a resource group.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, Boolean running, String continuationToken, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ running,
+ continuationToken,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get a list of Experiment resources in a resource group.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(
+ String resourceGroupName, Boolean running, String continuationToken) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, running, continuationToken),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of Experiment resources in a resource group.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ final Boolean running = null;
+ final String continuationToken = null;
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, running, continuationToken),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of Experiment resources in a resource group.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(
+ String resourceGroupName, Boolean running, String continuationToken, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, running, continuationToken, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get a list of Experiment resources in a resource group.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ final Boolean running = null;
+ final String continuationToken = null;
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, running, continuationToken));
+ }
+
+ /**
+ * Get a list of Experiment resources in a resource group.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param running Optional value that indicates whether to filter results based on if the Experiment is currently
+ * running. If null, then the results will not be filtered.
+ * @param continuationToken String that sets the continuation token.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Experiment resources in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(
+ String resourceGroupName, Boolean running, String continuationToken, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, running, continuationToken, context));
+ }
+
+ /**
+ * Delete a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String resourceGroupName, String experimentName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context);
+ }
+
+ /**
+ * Delete a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String experimentName) {
+ return deleteWithResponseAsync(resourceGroupName, experimentName).flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Delete a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String experimentName) {
+ deleteAsync(resourceGroupName, experimentName).block();
+ }
+
+ /**
+ * Delete a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String resourceGroupName, String experimentName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, experimentName, context).block();
+ }
+
+ /**
+ * Get a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String experimentName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String experimentName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, experimentName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Get a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExperimentInner getByResourceGroup(String resourceGroupName, String experimentName) {
+ return getByResourceGroupAsync(resourceGroupName, experimentName).block();
+ }
+
+ /**
+ * Get a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String experimentName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, experimentName, context).block();
+ }
+
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String experimentName, ExperimentInner experiment) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ if (experiment == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experiment is required and cannot be null."));
+ } else {
+ experiment.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ experiment,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ if (experiment == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experiment is required and cannot be null."));
+ } else {
+ experiment.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ experiment,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ExperimentInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String experimentName, ExperimentInner experiment) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, experimentName, experiment);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ExperimentInner.class, ExperimentInner.class, Context.NONE);
+ }
+
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ExperimentInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, experimentName, experiment, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ExperimentInner.class, ExperimentInner.class, context);
+ }
+
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ExperimentInner> beginCreateOrUpdate(
+ String resourceGroupName, String experimentName, ExperimentInner experiment) {
+ return beginCreateOrUpdateAsync(resourceGroupName, experimentName, experiment).getSyncPoller();
+ }
+
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ExperimentInner> beginCreateOrUpdate(
+ String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, experimentName, experiment, context).getSyncPoller();
+ }
+
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String experimentName, ExperimentInner experiment) {
+ return beginCreateOrUpdateAsync(resourceGroupName, experimentName, experiment)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, experimentName, experiment, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExperimentInner createOrUpdate(String resourceGroupName, String experimentName, ExperimentInner experiment) {
+ return createOrUpdateAsync(resourceGroupName, experimentName, experiment).block();
+ }
+
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExperimentInner createOrUpdate(
+ String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) {
+ return createOrUpdateAsync(resourceGroupName, experimentName, experiment, context).block();
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents the result of a cancel Experiment operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> cancelWithResponseAsync(String resourceGroupName, String experimentName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .cancel(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents the result of a cancel Experiment operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> cancelWithResponseAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .cancel(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context);
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents the result of a cancel Experiment operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ExperimentCancelOperationResultInner>
+ beginCancelAsync(String resourceGroupName, String experimentName) {
+ Mono>> mono = cancelWithResponseAsync(resourceGroupName, experimentName);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ExperimentCancelOperationResultInner.class,
+ ExperimentCancelOperationResultInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents the result of a cancel Experiment operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ExperimentCancelOperationResultInner>
+ beginCancelAsync(String resourceGroupName, String experimentName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = cancelWithResponseAsync(resourceGroupName, experimentName, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ExperimentCancelOperationResultInner.class,
+ ExperimentCancelOperationResultInner.class,
+ context);
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents the result of a cancel Experiment operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ExperimentCancelOperationResultInner>
+ beginCancel(String resourceGroupName, String experimentName) {
+ return beginCancelAsync(resourceGroupName, experimentName).getSyncPoller();
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents the result of a cancel Experiment operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ExperimentCancelOperationResultInner>
+ beginCancel(String resourceGroupName, String experimentName, Context context) {
+ return beginCancelAsync(resourceGroupName, experimentName, context).getSyncPoller();
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents the result of a cancel Experiment operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono cancelAsync(String resourceGroupName, String experimentName) {
+ return beginCancelAsync(resourceGroupName, experimentName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents the result of a cancel Experiment operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono cancelAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ return beginCancelAsync(resourceGroupName, experimentName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents the result of a cancel Experiment operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExperimentCancelOperationResultInner cancel(String resourceGroupName, String experimentName) {
+ return cancelAsync(resourceGroupName, experimentName).block();
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents the result of a cancel Experiment operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExperimentCancelOperationResultInner cancel(
+ String resourceGroupName, String experimentName, Context context) {
+ return cancelAsync(resourceGroupName, experimentName, context).block();
+ }
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents the result of a start Experiment operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> startWithResponseAsync(
+ String resourceGroupName, String experimentName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .start(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents the result of a start Experiment operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> startWithResponseAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .start(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context);
+ }
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents the result of a start Experiment operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono startAsync(String resourceGroupName, String experimentName) {
+ return startWithResponseAsync(resourceGroupName, experimentName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents the result of a start Experiment operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExperimentStartOperationResultInner start(String resourceGroupName, String experimentName) {
+ return startAsync(resourceGroupName, experimentName).block();
+ }
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents the result of a start Experiment operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response startWithResponse(
+ String resourceGroupName, String experimentName, Context context) {
+ return startWithResponseAsync(resourceGroupName, experimentName, context).block();
+ }
+
+ /**
+ * Get a list of statuses of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of statuses of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAllStatusesSinglePageAsync(
+ String resourceGroupName, String experimentName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listAllStatuses(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a list of statuses of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of statuses of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAllStatusesSinglePageAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listAllStatuses(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get a list of statuses of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of statuses of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAllStatusesAsync(String resourceGroupName, String experimentName) {
+ return new PagedFlux<>(
+ () -> listAllStatusesSinglePageAsync(resourceGroupName, experimentName),
+ nextLink -> listAllStatusesNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of statuses of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of statuses of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAllStatusesAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ return new PagedFlux<>(
+ () -> listAllStatusesSinglePageAsync(resourceGroupName, experimentName, context),
+ nextLink -> listAllStatusesNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get a list of statuses of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of statuses of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listAllStatuses(String resourceGroupName, String experimentName) {
+ return new PagedIterable<>(listAllStatusesAsync(resourceGroupName, experimentName));
+ }
+
+ /**
+ * Get a list of statuses of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of statuses of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listAllStatuses(
+ String resourceGroupName, String experimentName, Context context) {
+ return new PagedIterable<>(listAllStatusesAsync(resourceGroupName, experimentName, context));
+ }
+
+ /**
+ * Get a status of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param statusId GUID that represents a Experiment status.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a status of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getStatusWithResponseAsync(
+ String resourceGroupName, String experimentName, String statusId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ if (statusId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter statusId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getStatus(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ statusId,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a status of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param statusId GUID that represents a Experiment status.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a status of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getStatusWithResponseAsync(
+ String resourceGroupName, String experimentName, String statusId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ if (statusId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter statusId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getStatus(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ statusId,
+ accept,
+ context);
+ }
+
+ /**
+ * Get a status of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param statusId GUID that represents a Experiment status.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a status of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getStatusAsync(
+ String resourceGroupName, String experimentName, String statusId) {
+ return getStatusWithResponseAsync(resourceGroupName, experimentName, statusId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Get a status of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param statusId GUID that represents a Experiment status.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a status of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExperimentStatusInner getStatus(String resourceGroupName, String experimentName, String statusId) {
+ return getStatusAsync(resourceGroupName, experimentName, statusId).block();
+ }
+
+ /**
+ * Get a status of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param statusId GUID that represents a Experiment status.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a status of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getStatusWithResponse(
+ String resourceGroupName, String experimentName, String statusId, Context context) {
+ return getStatusWithResponseAsync(resourceGroupName, experimentName, statusId, context).block();
+ }
+
+ /**
+ * Get a list of execution details of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of execution details of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listExecutionDetailsSinglePageAsync(
+ String resourceGroupName, String experimentName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listExecutionDetails(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a list of execution details of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of execution details of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listExecutionDetailsSinglePageAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listExecutionDetails(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get a list of execution details of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of execution details of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listExecutionDetailsAsync(
+ String resourceGroupName, String experimentName) {
+ return new PagedFlux<>(
+ () -> listExecutionDetailsSinglePageAsync(resourceGroupName, experimentName),
+ nextLink -> listExecutionDetailsNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of execution details of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of execution details of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listExecutionDetailsAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ return new PagedFlux<>(
+ () -> listExecutionDetailsSinglePageAsync(resourceGroupName, experimentName, context),
+ nextLink -> listExecutionDetailsNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get a list of execution details of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of execution details of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listExecutionDetails(
+ String resourceGroupName, String experimentName) {
+ return new PagedIterable<>(listExecutionDetailsAsync(resourceGroupName, experimentName));
+ }
+
+ /**
+ * Get a list of execution details of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of execution details of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listExecutionDetails(
+ String resourceGroupName, String experimentName, Context context) {
+ return new PagedIterable<>(listExecutionDetailsAsync(resourceGroupName, experimentName, context));
+ }
+
+ /**
+ * Get an execution detail of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param executionDetailsId GUID that represents a Experiment execution detail.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an execution detail of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getExecutionDetailsWithResponseAsync(
+ String resourceGroupName, String experimentName, String executionDetailsId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ if (executionDetailsId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter executionDetailsId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getExecutionDetails(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ executionDetailsId,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get an execution detail of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param executionDetailsId GUID that represents a Experiment execution detail.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an execution detail of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getExecutionDetailsWithResponseAsync(
+ String resourceGroupName, String experimentName, String executionDetailsId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (experimentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
+ }
+ if (executionDetailsId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter executionDetailsId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getExecutionDetails(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ experimentName,
+ executionDetailsId,
+ accept,
+ context);
+ }
+
+ /**
+ * Get an execution detail of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param executionDetailsId GUID that represents a Experiment execution detail.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an execution detail of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getExecutionDetailsAsync(
+ String resourceGroupName, String experimentName, String executionDetailsId) {
+ return getExecutionDetailsWithResponseAsync(resourceGroupName, experimentName, executionDetailsId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Get an execution detail of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param executionDetailsId GUID that represents a Experiment execution detail.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an execution detail of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExperimentExecutionDetailsInner getExecutionDetails(
+ String resourceGroupName, String experimentName, String executionDetailsId) {
+ return getExecutionDetailsAsync(resourceGroupName, experimentName, executionDetailsId).block();
+ }
+
+ /**
+ * Get an execution detail of a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param executionDetailsId GUID that represents a Experiment execution detail.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an execution detail of a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getExecutionDetailsWithResponse(
+ String resourceGroupName, String experimentName, String executionDetailsId, Context context) {
+ return getExecutionDetailsWithResponseAsync(resourceGroupName, experimentName, executionDetailsId, 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 Experiment resources and a link for pagination.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAllNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a list of Experiment resources and a link for pagination.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAllNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listAllNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a list of Experiment resources and a link for pagination.
+ */
+ @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 Experiment resources and a link for pagination.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a list of Experiment statuses and a link for pagination.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAllStatusesNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listAllStatusesNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a list of Experiment statuses and a link for pagination.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAllStatusesNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listAllStatusesNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a list of Experiment execution details and a link for pagination.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listExecutionDetailsNextSinglePageAsync(
+ String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listExecutionDetailsNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents a list of Experiment execution details and a link for pagination.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listExecutionDetailsNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listExecutionDetailsNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java
new file mode 100644
index 000000000000..45e897db09f8
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java
@@ -0,0 +1,301 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.chaos.fluent.ExperimentsClient;
+import com.azure.resourcemanager.chaos.fluent.models.ExperimentCancelOperationResultInner;
+import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsInner;
+import com.azure.resourcemanager.chaos.fluent.models.ExperimentInner;
+import com.azure.resourcemanager.chaos.fluent.models.ExperimentStartOperationResultInner;
+import com.azure.resourcemanager.chaos.fluent.models.ExperimentStatusInner;
+import com.azure.resourcemanager.chaos.models.Experiment;
+import com.azure.resourcemanager.chaos.models.ExperimentCancelOperationResult;
+import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetails;
+import com.azure.resourcemanager.chaos.models.ExperimentStartOperationResult;
+import com.azure.resourcemanager.chaos.models.ExperimentStatus;
+import com.azure.resourcemanager.chaos.models.Experiments;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class ExperimentsImpl implements Experiments {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ExperimentsImpl.class);
+
+ private final ExperimentsClient innerClient;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ public ExperimentsImpl(ExperimentsClient innerClient, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Boolean running, String continuationToken, Context context) {
+ PagedIterable inner = this.serviceClient().list(running, continuationToken, context);
+ return Utils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(
+ String resourceGroupName, Boolean running, String continuationToken, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByResourceGroup(resourceGroupName, running, continuationToken, context);
+ return Utils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager()));
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String experimentName) {
+ this.serviceClient().delete(resourceGroupName, experimentName);
+ }
+
+ public Response deleteWithResponse(String resourceGroupName, String experimentName, Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, experimentName, context);
+ }
+
+ public Experiment getByResourceGroup(String resourceGroupName, String experimentName) {
+ ExperimentInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, experimentName);
+ if (inner != null) {
+ return new ExperimentImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String experimentName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, experimentName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ExperimentImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public ExperimentCancelOperationResult cancel(String resourceGroupName, String experimentName) {
+ ExperimentCancelOperationResultInner inner = this.serviceClient().cancel(resourceGroupName, experimentName);
+ if (inner != null) {
+ return new ExperimentCancelOperationResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public ExperimentCancelOperationResult cancel(String resourceGroupName, String experimentName, Context context) {
+ ExperimentCancelOperationResultInner inner =
+ this.serviceClient().cancel(resourceGroupName, experimentName, context);
+ if (inner != null) {
+ return new ExperimentCancelOperationResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public ExperimentStartOperationResult start(String resourceGroupName, String experimentName) {
+ ExperimentStartOperationResultInner inner = this.serviceClient().start(resourceGroupName, experimentName);
+ if (inner != null) {
+ return new ExperimentStartOperationResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response startWithResponse(
+ String resourceGroupName, String experimentName, Context context) {
+ Response inner =
+ this.serviceClient().startWithResponse(resourceGroupName, experimentName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ExperimentStartOperationResultImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listAllStatuses(String resourceGroupName, String experimentName) {
+ PagedIterable inner =
+ this.serviceClient().listAllStatuses(resourceGroupName, experimentName);
+ return Utils.mapPage(inner, inner1 -> new ExperimentStatusImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable