diff --git a/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md b/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md
index b8119aab96d9..43ca0f821e46 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md
+++ b/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md
@@ -1,14 +1,141 @@
# Release History
-## 1.3.0-beta.1 (Unreleased)
+## 1.0.0-beta.1 (2025-01-26)
-### Features Added
+- Azure Resource Manager Chaos client library for Java. This package contains Microsoft Azure SDK for Chaos Management SDK. Chaos Management Client. Package tag package-2025-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Breaking Changes
-### Bugs Fixed
+#### `models.ResourceIdentity` was removed
+
+#### `models.ResourceIdentityType` was removed
+
+#### `models.OperationStatus` was removed
+
+#### `models.TargetType` was modified
+
+* `location()` was removed
+
+#### `models.ExperimentExecutionDetails` was modified
+
+* `failureReason()` was removed
+* `status()` was removed
+* `runInformation()` was removed
+* `stoppedAt()` was removed
+* `startedAt()` was removed
+* `lastActionAt()` was removed
+
+#### `models.DelayAction` was modified
+
+* `java.lang.String type()` -> `models.ExperimentActionType type()`
+
+#### `models.ContinuousAction` was modified
+
+* `java.lang.String type()` -> `models.ExperimentActionType type()`
+
+#### `models.CapabilityType` was modified
+
+* `location()` was removed
+
+#### `models.Experiment$Definition` was modified
+
+* `withIdentity(models.ResourceIdentity)` was removed
+
+#### `models.ChaosExperimentAction` was modified
+
+* `java.lang.String type()` -> `models.ExperimentActionType type()`
+
+#### `models.Experiment` was modified
+
+* `models.ResourceIdentity identity()` -> `models.ManagedServiceIdentity identity()`
+
+#### `models.DiscreteAction` was modified
+
+* `java.lang.String type()` -> `models.ExperimentActionType type()`
+
+#### `models.ChaosTargetSelector` was modified
+
+* `additionalProperties()` was removed
+* `withAdditionalProperties(java.util.Map)` was removed
+
+#### `models.ExperimentUpdate` was modified
+
+* `withIdentity(models.ResourceIdentity)` was removed
+* `models.ResourceIdentity identity()` -> `models.ManagedServiceIdentity identity()`
+
+#### `models.Experiment$Update` was modified
+
+* `withIdentity(models.ResourceIdentity)` was removed
+
+#### `models.OperationStatuses` was modified
+
+* `models.OperationStatus get(java.lang.String,java.lang.String)` -> `models.OperationStatusResult get(java.lang.String,java.lang.String)`
+
+### Features Added
+
+* `models.ExperimentActionType` was added
+
+* `models.ExperimentExecutionDetailsProperties` was added
+
+* `models.ManagedServiceIdentityType` was added
+
+* `models.OperationStatusResult` was added
+
+* `models.ManagedServiceIdentity` was added
+
+#### `models.TargetListResult` was modified
+
+* `withValue(java.util.List)` was added
+* `withNextLink(java.lang.String)` was added
+
+#### `models.ExperimentExecutionDetails` was modified
+
+* `properties()` was added
+
+#### `models.CapabilityTypeListResult` was modified
+
+* `withNextLink(java.lang.String)` was added
+* `withValue(java.util.List)` was added
+
+#### `models.ExperimentListResult` was modified
+
+* `withValue(java.util.List)` was added
+* `withNextLink(java.lang.String)` was added
+
+#### `models.CapabilityType` was modified
+
+* `requiredAzureRoleDefinitionIds()` was added
+
+#### `models.ExperimentExecutionListResult` was modified
+
+* `withNextLink(java.lang.String)` was added
+* `withValue(java.util.List)` was added
+
+#### `models.ExperimentExecution` was modified
+
+* `systemData()` was added
+
+#### `models.Experiment$Definition` was modified
+
+* `withIdentity(models.ManagedServiceIdentity)` was added
+
+#### `models.TargetTypeListResult` was modified
+
+* `withValue(java.util.List)` was added
+* `withNextLink(java.lang.String)` was added
+
+#### `models.CapabilityListResult` was modified
+
+* `withValue(java.util.List)` was added
+* `withNextLink(java.lang.String)` was added
+
+#### `models.ExperimentUpdate` was modified
+
+* `withIdentity(models.ManagedServiceIdentity)` was added
+
+#### `models.Experiment$Update` was modified
-### Other Changes
+* `withIdentity(models.ManagedServiceIdentity)` was added
## 1.2.0 (2024-12-19)
diff --git a/sdk/chaos/azure-resourcemanager-chaos/README.md b/sdk/chaos/azure-resourcemanager-chaos/README.md
index a140203fe8be..f4a3cd47e4ee 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/README.md
+++ b/sdk/chaos/azure-resourcemanager-chaos/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager Chaos client library for Java.
-This package contains Microsoft Azure SDK for Chaos Management SDK. Chaos Management Client. Package tag package-2024-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for Chaos Management SDK. Chaos Management Client. Package tag package-2025-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-chaos
- 1.2.0
+ 1.3.0-beta.1
```
[//]: # ({x-version-update-end})
diff --git a/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md b/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md
index a66670314ad0..4a9de666e153 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md
+++ b/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md
@@ -31,6 +31,10 @@
- [Get](#operationstatuses_get)
+## Operations
+
+- [ListAll](#operations_listall)
+
## TargetTypes
- [Get](#targettypes_get)
@@ -53,7 +57,7 @@ import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner;
public final class CapabilitiesCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateCapability.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Capabilities_CreateOrUpdate.json
*/
/**
* Sample code: Create/update a Capability that extends a virtual machine Target resource.
@@ -78,7 +82,7 @@ public final class CapabilitiesCreateOrUpdateSamples {
public final class CapabilitiesDeleteSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteCapability.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Capabilities_Delete.json
*/
/**
* Sample code: Delete a Capability that extends a virtual machine Target resource.
@@ -103,7 +107,7 @@ public final class CapabilitiesDeleteSamples {
public final class CapabilitiesGetSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetCapability.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Capabilities_Get.json
*/
/**
* Sample code: Get a Capability that extends a virtual machine Target resource.
@@ -128,7 +132,7 @@ public final class CapabilitiesGetSamples {
public final class CapabilitiesListSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListCapabilities.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Capabilities_List.json
*/
/**
* Sample code: List all Capabilities that extend a virtual machine Target resource.
@@ -153,7 +157,7 @@ public final class CapabilitiesListSamples {
public final class CapabilityTypesGetSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetCapabilityType.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/CapabilityTypes_Get.json
*/
/**
* Sample code: Get a Capability Type for a virtual machine Target resource on westus2 location.
@@ -177,7 +181,7 @@ public final class CapabilityTypesGetSamples {
public final class CapabilityTypesListSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListCapabilityTypes.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/CapabilityTypes_List.json
*/
/**
* Sample code: List all Capability Types for a virtual machine Target resource on westus2 location.
@@ -200,7 +204,7 @@ public final class CapabilityTypesListSamples {
public final class ExperimentsCancelSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CancelExperiment.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Experiments_Cancel.json
*/
/**
* Sample code: Cancel a running Experiment.
@@ -221,12 +225,14 @@ import com.azure.resourcemanager.chaos.models.ChaosExperimentStep;
import com.azure.resourcemanager.chaos.models.ChaosTargetListSelector;
import com.azure.resourcemanager.chaos.models.ContinuousAction;
import com.azure.resourcemanager.chaos.models.KeyValuePair;
-import com.azure.resourcemanager.chaos.models.ResourceIdentity;
-import com.azure.resourcemanager.chaos.models.ResourceIdentityType;
+import com.azure.resourcemanager.chaos.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType;
import com.azure.resourcemanager.chaos.models.TargetReference;
import com.azure.resourcemanager.chaos.models.TargetReferenceType;
import java.time.Duration;
import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
/**
* Samples for Experiments CreateOrUpdate.
@@ -234,7 +240,7 @@ import java.util.Arrays;
public final class ExperimentsCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateExperiment.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Experiments_CreateOrUpdate.json
*/
/**
* Sample code: Create/update a Experiment in a resource group.
@@ -259,9 +265,22 @@ public final class ExperimentsCreateOrUpdateSamples {
.withTargets(Arrays.asList(new TargetReference().withType(TargetReferenceType.CHAOS_TARGET)
.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))
+ .withTags(mapOf("key2138", "fakeTokenPlaceholder", "key7131", "fakeTokenPlaceholder"))
+ .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED))
.create();
}
+
+ // Use "Map.of" if available
+ @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;
+ }
}
```
@@ -274,7 +293,7 @@ public final class ExperimentsCreateOrUpdateSamples {
public final class ExperimentsDeleteSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteExperiment.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Experiments_Delete.json
*/
/**
* Sample code: Delete a Experiment in a resource group.
@@ -296,7 +315,7 @@ public final class ExperimentsDeleteSamples {
public final class ExperimentsExecutionDetailsSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DetailsExperiment.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Experiments_ExecutionDetails.json
*/
/**
* Sample code: Get experiment execution details.
@@ -320,7 +339,7 @@ public final class ExperimentsExecutionDetailsSamples {
public final class ExperimentsGetByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetExperiment.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Experiments_Get.json
*/
/**
* Sample code: Get a Experiment in a resource group.
@@ -343,7 +362,7 @@ public final class ExperimentsGetByResourceGroupSamples {
public final class ExperimentsGetExecutionSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetExperimentExecution.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Experiments_GetExecution.json
*/
/**
* Sample code: Get the execution of a Experiment.
@@ -367,8 +386,7 @@ public final class ExperimentsGetExecutionSamples {
public final class ExperimentsListSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentsInASubscription.
- * json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Experiments_ListAll.json
*/
/**
* Sample code: List all Experiments in a subscription.
@@ -390,7 +408,8 @@ public final class ExperimentsListSamples {
public final class ExperimentsListAllExecutionsSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentExecutions.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Experiments_ListAllExecutions.
+ * json
*/
/**
* Sample code: List all executions of an Experiment.
@@ -412,8 +431,7 @@ public final class ExperimentsListAllExecutionsSamples {
public final class ExperimentsListByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentsInAResourceGroup.
- * json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Experiments_List.json
*/
/**
* Sample code: List all Experiments in a resource group.
@@ -435,7 +453,7 @@ public final class ExperimentsListByResourceGroupSamples {
public final class ExperimentsStartSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/StartExperiment.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Experiments_Start.json
*/
/**
* Sample code: Start a Experiment.
@@ -452,8 +470,8 @@ public final class ExperimentsStartSamples {
```java
import com.azure.resourcemanager.chaos.models.Experiment;
-import com.azure.resourcemanager.chaos.models.ResourceIdentity;
-import com.azure.resourcemanager.chaos.models.ResourceIdentityType;
+import com.azure.resourcemanager.chaos.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType;
import com.azure.resourcemanager.chaos.models.UserAssignedIdentity;
import java.util.HashMap;
import java.util.Map;
@@ -464,7 +482,7 @@ import java.util.Map;
public final class ExperimentsUpdateSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/UpdateExperiment.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Experiments_Update.json
*/
/**
* Sample code: Update an Experiment in a resource group.
@@ -477,7 +495,7 @@ public final class ExperimentsUpdateSamples {
.getValue();
resource.update()
.withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder"))
- .withIdentity(new ResourceIdentity().withType(ResourceIdentityType.USER_ASSIGNED)
+ .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED)
.withUserAssignedIdentities(mapOf(
"/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentity/exampleUMI",
new UserAssignedIdentity())))
@@ -507,16 +525,38 @@ public final class ExperimentsUpdateSamples {
public final class OperationStatusesGetSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetOperationStatus.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/OperationStatuses_Get.json
*/
/**
- * Sample code: Get specific operation status.
+ * Sample code: Gets Chaos Studio async operation status.
*
* @param manager Entry point to ChaosManager.
*/
- public static void getSpecificOperationStatus(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ public static void getsChaosStudioAsyncOperationStatus(com.azure.resourcemanager.chaos.ChaosManager manager) {
manager.operationStatuses()
- .getWithResponse("West US", "713192d7-503f-477a-9cfe-4efc3ee2bd11", com.azure.core.util.Context.NONE);
+ .getWithResponse("westus2", "4bdadd97-207c-4de8-9bba-08339ae099c7", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Operations_ListAll
+
+```java
+/**
+ * Samples for Operations ListAll.
+ */
+public final class OperationsListAllSamples {
+ /*
+ * x-ms-original-file:
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Operations_List.json
+ */
+ /**
+ * Sample code: Lists all Chaos Studio operations.
+ *
+ * @param manager Entry point to ChaosManager.
+ */
+ public static void listsAllChaosStudioOperations(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.operations().listAll(com.azure.core.util.Context.NONE);
}
}
```
@@ -530,7 +570,7 @@ public final class OperationStatusesGetSamples {
public final class TargetTypesGetSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetTargetType.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/TargetTypes_Get.json
*/
/**
* Sample code: Get a Target Type for westus2 location.
@@ -552,7 +592,7 @@ public final class TargetTypesGetSamples {
public final class TargetTypesListSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListTargetTypes.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/TargetTypes_List.json
*/
/**
* Sample code: List all Target Types for westus2 location.
@@ -568,10 +608,7 @@ public final class TargetTypesListSamples {
### Targets_CreateOrUpdate
```java
-import com.azure.core.management.serializer.SerializerFactory;
-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;
@@ -581,22 +618,18 @@ import java.util.Map;
public final class TargetsCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateTarget.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Targets_CreateOrUpdate.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 {
+ public static void
+ createUpdateATargetThatExtendsAVirtualMachineResource(com.azure.resourcemanager.chaos.ChaosManager manager) {
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))),
+ "Microsoft-VirtualMachine", new TargetInner().withProperties(mapOf()),
com.azure.core.util.Context.NONE);
}
@@ -623,7 +656,7 @@ public final class TargetsCreateOrUpdateSamples {
public final class TargetsDeleteSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteTarget.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Targets_Delete.json
*/
/**
* Sample code: Delete a Target that extends a virtual machine resource.
@@ -648,7 +681,7 @@ public final class TargetsDeleteSamples {
public final class TargetsGetSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetTarget.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Targets_Get.json
*/
/**
* Sample code: Get a Target that extends a virtual machine resource.
@@ -673,7 +706,7 @@ public final class TargetsGetSamples {
public final class TargetsListSamples {
/*
* x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListTargets.json
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Targets_List.json
*/
/**
* Sample code: List all Targets that extend a virtual machine resource.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/pom.xml b/sdk/chaos/azure-resourcemanager-chaos/pom.xml
index ad034488b524..db0fcd7fdba9 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/pom.xml
+++ b/sdk/chaos/azure-resourcemanager-chaos/pom.xml
@@ -18,7 +18,7 @@
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. Chaos Management Client. Package tag package-2024-01.
+ 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. Chaos Management Client. Package tag package-2025-01.
https://github.com/Azure/azure-sdk-for-java
@@ -45,8 +45,8 @@
UTF-8
0
0
- false
true
+ false
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
index 97227acbd3a5..2485a577d0a7 100644
--- 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
@@ -51,20 +51,20 @@
* Chaos Management Client.
*/
public final class ChaosManager {
- private Capabilities capabilities;
-
- private CapabilityTypes capabilityTypes;
+ private Operations operations;
private Experiments experiments;
private OperationStatuses operationStatuses;
- private Operations operations;
-
private TargetTypes targetTypes;
+ private CapabilityTypes capabilityTypes;
+
private Targets targets;
+ private Capabilities capabilities;
+
private final ChaosManagementClient clientObject;
private ChaosManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -229,7 +229,7 @@ public ChaosManager authenticate(TokenCredential credential, AzureProfile profil
.append("-")
.append("com.azure.resourcemanager.chaos")
.append("/")
- .append("1.2.0");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -276,27 +276,15 @@ public ChaosManager authenticate(TokenCredential credential, AzureProfile profil
}
/**
- * Gets the resource collection API of Capabilities.
- *
- * @return Resource collection API of Capabilities.
- */
- public Capabilities capabilities() {
- if (this.capabilities == null) {
- this.capabilities = new CapabilitiesImpl(clientObject.getCapabilities(), this);
- }
- return capabilities;
- }
-
- /**
- * Gets the resource collection API of CapabilityTypes.
+ * Gets the resource collection API of Operations.
*
- * @return Resource collection API of CapabilityTypes.
+ * @return Resource collection API of Operations.
*/
- public CapabilityTypes capabilityTypes() {
- if (this.capabilityTypes == null) {
- this.capabilityTypes = new CapabilityTypesImpl(clientObject.getCapabilityTypes(), this);
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
}
- return capabilityTypes;
+ return operations;
}
/**
@@ -323,18 +311,6 @@ public OperationStatuses operationStatuses() {
return operationStatuses;
}
- /**
- * Gets the resource collection API of Operations.
- *
- * @return Resource collection API of Operations.
- */
- public Operations operations() {
- if (this.operations == null) {
- this.operations = new OperationsImpl(clientObject.getOperations(), this);
- }
- return operations;
- }
-
/**
* Gets the resource collection API of TargetTypes.
*
@@ -347,6 +323,18 @@ public TargetTypes targetTypes() {
return targetTypes;
}
+ /**
+ * Gets the resource collection API of CapabilityTypes.
+ *
+ * @return Resource collection API of CapabilityTypes.
+ */
+ public CapabilityTypes capabilityTypes() {
+ if (this.capabilityTypes == null) {
+ this.capabilityTypes = new CapabilityTypesImpl(clientObject.getCapabilityTypes(), this);
+ }
+ return capabilityTypes;
+ }
+
/**
* Gets the resource collection API of Targets.
*
@@ -359,6 +347,18 @@ public Targets targets() {
return targets;
}
+ /**
+ * Gets the resource collection API of Capabilities.
+ *
+ * @return Resource collection API of Capabilities.
+ */
+ public Capabilities capabilities() {
+ if (this.capabilities == null) {
+ this.capabilities = new CapabilitiesImpl(clientObject.getCapabilities(), this);
+ }
+ return capabilities;
+ }
+
/**
* Gets wrapped service client ChaosManagementClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
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
index 711876aab678..a9206b44d00c 100644
--- 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
@@ -16,17 +16,17 @@
*/
public interface CapabilitiesClient {
/**
- * Get a list of Capability resources that extend a Target resource..
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of Capability resources that extend a Target resource. as paginated response with
+ * @return a list of Capability resources that extend a Target resource as paginated response with
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -34,19 +34,19 @@ PagedIterable list(String resourceGroupName, String parentProvi
String parentResourceType, String parentResourceName, String targetName);
/**
- * Get a list of Capability resources that extend a Target resource..
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param continuationToken String that sets the continuation token.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of Capability resources that extend a Target resource. as paginated response with
+ * @return a list of Capability resources that extend a Target resource as paginated response with
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -57,10 +57,10 @@ PagedIterable list(String resourceGroupName, String parentProvi
/**
* 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent 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.
@@ -77,10 +77,10 @@ Response getWithResponse(String resourceGroupName, String paren
/**
* 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent 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.
@@ -93,79 +93,79 @@ CapabilityInner get(String resourceGroupName, String parentProviderNamespace, St
String parentResourceName, String targetName, String capabilityName);
/**
- * Delete a Capability that extends a Target resource.
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param capabilityName String that represents a Capability resource name.
+ * @param resource 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 the {@link Response}.
+ * @return model that represents a Capability resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteWithResponse(String resourceGroupName, String parentProviderNamespace,
+ Response createOrUpdateWithResponse(String resourceGroupName, String parentProviderNamespace,
String parentResourceType, String parentResourceName, String targetName, String capabilityName,
- Context context);
+ CapabilityInner resource, Context context);
/**
- * Delete a Capability that extends a Target resource.
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param capabilityName String that represents a Capability resource name.
+ * @param resource 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)
- void delete(String resourceGroupName, String parentProviderNamespace, String parentResourceType,
- String parentResourceName, String targetName, String capabilityName);
+ CapabilityInner createOrUpdate(String resourceGroupName, String parentProviderNamespace, String parentResourceType,
+ String parentResourceName, String targetName, String capabilityName, CapabilityInner resource);
/**
- * Create or update a Capability resource that extends a Target resource.
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param capabilityName String that represents a Capability resource name.
- * @param capability Capability resource to be created or updated.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents a Capability resource along with {@link Response}.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateWithResponse(String resourceGroupName, String parentProviderNamespace,
+ Response deleteWithResponse(String resourceGroupName, String parentProviderNamespace,
String parentResourceType, String parentResourceName, String targetName, String capabilityName,
- CapabilityInner capability, Context context);
+ Context context);
/**
- * Create or update a Capability resource that extends a Target resource.
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent 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);
+ void delete(String resourceGroupName, String parentProviderNamespace, String parentResourceType,
+ String parentResourceName, String targetName, String capabilityName);
}
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
index 723d735439ac..659e98011b2c 100644
--- 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
@@ -18,7 +18,7 @@ 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 location The name of the Azure region.
* @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.
@@ -27,12 +27,12 @@ public interface CapabilityTypesClient {
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String locationName, String targetTypeName);
+ PagedIterable list(String location, 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 location The name of the Azure region.
* @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.
@@ -43,13 +43,13 @@ public interface CapabilityTypesClient {
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String locationName, String targetTypeName, String continuationToken,
+ PagedIterable list(String location, 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 location The name of the Azure region.
* @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.
@@ -59,13 +59,13 @@ PagedIterable list(String locationName, String targetTypeNa
* @return a Capability Type resource for given Target Type and location along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String locationName, String targetTypeName, String capabilityTypeName,
+ Response getWithResponse(String location, String targetTypeName, String capabilityTypeName,
Context context);
/**
* Get a Capability Type resource for given Target Type and location.
*
- * @param locationName String that represents a Location resource name.
+ * @param location The name of the Azure region.
* @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.
@@ -74,5 +74,5 @@ Response getWithResponse(String locationName, String target
* @return a Capability Type resource for given Target Type and location.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- CapabilityTypeInner get(String locationName, String targetTypeName, String capabilityTypeName);
+ CapabilityTypeInner get(String location, String targetTypeName, String capabilityTypeName);
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ChaosManagementClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ChaosManagementClient.java
index 0957af884ce8..5bca5dc4c8fd 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ChaosManagementClient.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ChaosManagementClient.java
@@ -12,7 +12,7 @@
*/
public interface ChaosManagementClient {
/**
- * Gets GUID that represents an Azure subscription ID.
+ * Gets The ID of the target subscription. The value must be an UUID.
*
* @return the subscriptionId value.
*/
@@ -47,18 +47,11 @@ public interface ChaosManagementClient {
Duration getDefaultPollInterval();
/**
- * Gets the CapabilitiesClient object to access its operations.
- *
- * @return the CapabilitiesClient object.
- */
- CapabilitiesClient getCapabilities();
-
- /**
- * Gets the CapabilityTypesClient object to access its operations.
+ * Gets the OperationsClient object to access its operations.
*
- * @return the CapabilityTypesClient object.
+ * @return the OperationsClient object.
*/
- CapabilityTypesClient getCapabilityTypes();
+ OperationsClient getOperations();
/**
* Gets the ExperimentsClient object to access its operations.
@@ -75,18 +68,18 @@ public interface ChaosManagementClient {
OperationStatusesClient getOperationStatuses();
/**
- * Gets the OperationsClient object to access its operations.
+ * Gets the TargetTypesClient object to access its operations.
*
- * @return the OperationsClient object.
+ * @return the TargetTypesClient object.
*/
- OperationsClient getOperations();
+ TargetTypesClient getTargetTypes();
/**
- * Gets the TargetTypesClient object to access its operations.
+ * Gets the CapabilityTypesClient object to access its operations.
*
- * @return the TargetTypesClient object.
+ * @return the CapabilityTypesClient object.
*/
- TargetTypesClient getTargetTypes();
+ CapabilityTypesClient getCapabilityTypes();
/**
* Gets the TargetsClient object to access its operations.
@@ -94,4 +87,11 @@ public interface ChaosManagementClient {
* @return the TargetsClient object.
*/
TargetsClient getTargets();
+
+ /**
+ * Gets the CapabilitiesClient object to access its operations.
+ *
+ * @return the CapabilitiesClient object.
+ */
+ CapabilitiesClient getCapabilities();
}
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
index 266e6c4ba7ea..580ab736c901 100644
--- 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
@@ -48,7 +48,7 @@ public interface ExperimentsClient {
/**
* Get a list of Experiment resources in a resource group.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -60,7 +60,7 @@ public interface ExperimentsClient {
/**
* Get a list of Experiment resources in a resource group.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -74,62 +74,10 @@ public interface ExperimentsClient {
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.
- * @return the {@link SyncPoller} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginDelete(String resourceGroupName, String experimentName);
-
- /**
- * Delete a Experiment resource.
- *
- * @param resourceGroupName String that represents an Azure resource group.
- * @param experimentName String that represents a Experiment resource name.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginDelete(String resourceGroupName, String experimentName, Context context);
-
- /**
- * Delete a Experiment resource.
- *
- * @param resourceGroupName String that represents an Azure resource group.
- * @param experimentName String that represents a Experiment resource name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String experimentName);
-
- /**
- * 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String experimentName, Context context);
-
/**
* Get a Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -144,7 +92,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNam
/**
* Get a Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -157,9 +105,9 @@ Response getByResourceGroupWithResponse(String resourceGroupNam
/**
* Create or update a Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param experimentName String that represents a Experiment resource name.
- * @param experiment Experiment resource to be created or updated.
+ * @param resource 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.
@@ -167,14 +115,14 @@ Response getByResourceGroupWithResponse(String resourceGroupNam
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ExperimentInner> beginCreateOrUpdate(String resourceGroupName,
- String experimentName, ExperimentInner experiment);
+ String experimentName, ExperimentInner resource);
/**
* Create or update a Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param experimentName String that represents a Experiment resource name.
- * @param experiment Experiment resource to be created or updated.
+ * @param resource 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.
@@ -183,28 +131,28 @@ SyncPoller, ExperimentInner> beginCreateOrUpdate(Str
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ExperimentInner> beginCreateOrUpdate(String resourceGroupName,
- String experimentName, ExperimentInner experiment, Context context);
+ String experimentName, ExperimentInner resource, Context context);
/**
* Create or update a Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param experimentName String that represents a Experiment resource name.
- * @param experiment Experiment resource to be created or updated.
+ * @param resource 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);
+ ExperimentInner createOrUpdate(String resourceGroupName, String experimentName, ExperimentInner resource);
/**
* Create or update a Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param experimentName String that represents a Experiment resource name.
- * @param experiment Experiment resource to be created or updated.
+ * @param resource 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.
@@ -212,15 +160,15 @@ SyncPoller, ExperimentInner> beginCreateOrUpdate(Str
* @return model that represents a Experiment resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ExperimentInner createOrUpdate(String resourceGroupName, String experimentName, ExperimentInner experiment,
+ ExperimentInner createOrUpdate(String resourceGroupName, String experimentName, ExperimentInner resource,
Context context);
/**
* The operation to update an experiment.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param experimentName String that represents a Experiment resource name.
- * @param experiment Parameters supplied to the Update experiment operation.
+ * @param properties Parameters supplied to the Update experiment 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.
@@ -228,14 +176,14 @@ ExperimentInner createOrUpdate(String resourceGroupName, String experimentName,
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ExperimentInner> beginUpdate(String resourceGroupName,
- String experimentName, ExperimentUpdate experiment);
+ String experimentName, ExperimentUpdate properties);
/**
* The operation to update an experiment.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param experimentName String that represents a Experiment resource name.
- * @param experiment Parameters supplied to the Update experiment operation.
+ * @param properties Parameters supplied to the Update experiment operation.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -244,28 +192,28 @@ SyncPoller, ExperimentInner> beginUpdate(String reso
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ExperimentInner> beginUpdate(String resourceGroupName,
- String experimentName, ExperimentUpdate experiment, Context context);
+ String experimentName, ExperimentUpdate properties, Context context);
/**
* The operation to update an experiment.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param experimentName String that represents a Experiment resource name.
- * @param experiment Parameters supplied to the Update experiment operation.
+ * @param properties Parameters supplied to the Update experiment 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 update(String resourceGroupName, String experimentName, ExperimentUpdate experiment);
+ ExperimentInner update(String resourceGroupName, String experimentName, ExperimentUpdate properties);
/**
* The operation to update an experiment.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param experimentName String that represents a Experiment resource name.
- * @param experiment Parameters supplied to the Update experiment operation.
+ * @param properties Parameters supplied to the Update experiment operation.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -273,13 +221,13 @@ SyncPoller, ExperimentInner> beginUpdate(String reso
* @return model that represents a Experiment resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ExperimentInner update(String resourceGroupName, String experimentName, ExperimentUpdate experiment,
+ ExperimentInner update(String resourceGroupName, String experimentName, ExperimentUpdate properties,
Context context);
/**
- * Cancel a running Experiment resource.
+ * Delete a Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -287,12 +235,12 @@ ExperimentInner update(String resourceGroupName, String experimentName, Experime
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginCancel(String resourceGroupName, String experimentName);
+ SyncPoller, Void> beginDelete(String resourceGroupName, String experimentName);
/**
- * Cancel a running Experiment resource.
+ * Delete a Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -301,24 +249,24 @@ ExperimentInner update(String resourceGroupName, String experimentName, Experime
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginCancel(String resourceGroupName, String experimentName, Context context);
+ SyncPoller, Void> beginDelete(String resourceGroupName, String experimentName, Context context);
/**
- * Cancel a running Experiment resource.
+ * Delete a Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 cancel(String resourceGroupName, String experimentName);
+ void delete(String resourceGroupName, String experimentName);
/**
- * Cancel a running Experiment resource.
+ * Delete a Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -326,12 +274,12 @@ ExperimentInner update(String resourceGroupName, String experimentName, Experime
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void cancel(String resourceGroupName, String experimentName, Context context);
+ void delete(String resourceGroupName, String experimentName, Context context);
/**
- * Start a Experiment resource.
+ * Cancel a running Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -339,12 +287,12 @@ ExperimentInner update(String resourceGroupName, String experimentName, Experime
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginStart(String resourceGroupName, String experimentName);
+ SyncPoller, Void> beginCancel(String resourceGroupName, String experimentName);
/**
- * Start a Experiment resource.
+ * Cancel a running Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -353,24 +301,24 @@ ExperimentInner update(String resourceGroupName, String experimentName, Experime
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginStart(String resourceGroupName, String experimentName, Context context);
+ SyncPoller, Void> beginCancel(String resourceGroupName, String experimentName, Context context);
/**
- * Start a Experiment resource.
+ * Cancel a running Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 start(String resourceGroupName, String experimentName);
+ void cancel(String resourceGroupName, String experimentName);
/**
- * Start a Experiment resource.
+ * Cancel a running Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -378,12 +326,12 @@ ExperimentInner update(String resourceGroupName, String experimentName, Experime
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void start(String resourceGroupName, String experimentName, Context context);
+ void cancel(String resourceGroupName, String experimentName, Context context);
/**
* Get a list of executions of an Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -396,7 +344,7 @@ ExperimentInner update(String resourceGroupName, String experimentName, Experime
/**
* Get a list of executions of an Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -411,7 +359,7 @@ PagedIterable listAllExecutions(String resourceGroupNa
/**
* Get an execution of an Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param experimentName String that represents a Experiment resource name.
* @param executionId GUID that represents a Experiment execution detail.
* @param context The context to associate with this operation.
@@ -427,7 +375,7 @@ Response getExecutionWithResponse(String resourceGroup
/**
* Get an execution of an Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param experimentName String that represents a Experiment resource name.
* @param executionId GUID that represents a Experiment execution detail.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -441,7 +389,7 @@ Response getExecutionWithResponse(String resourceGroup
/**
* Execution details of an experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param experimentName String that represents a Experiment resource name.
* @param executionId GUID that represents a Experiment execution detail.
* @param context The context to associate with this operation.
@@ -457,7 +405,7 @@ Response executionDetailsWithResponse(String re
/**
* Execution details of an experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param experimentName String that represents a Experiment resource name.
* @param executionId GUID that represents a Experiment execution detail.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -468,4 +416,56 @@ Response executionDetailsWithResponse(String re
@ServiceMethod(returns = ReturnType.SINGLE)
ExperimentExecutionDetailsInner executionDetails(String resourceGroupName, String experimentName,
String executionId);
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStart(String resourceGroupName, String experimentName);
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStart(String resourceGroupName, String experimentName, Context context);
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 start(String resourceGroupName, String experimentName);
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void start(String resourceGroupName, String experimentName, Context context);
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/OperationStatusesClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/OperationStatusesClient.java
index 87083b88e1ee..01de49de494e 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/OperationStatusesClient.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/OperationStatusesClient.java
@@ -8,36 +8,36 @@
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.chaos.fluent.models.OperationStatusInner;
+import com.azure.resourcemanager.chaos.fluent.models.OperationStatusResultInner;
/**
* An instance of this class provides access to all the operations defined in OperationStatusesClient.
*/
public interface OperationStatusesClient {
/**
- * Get the status of a long running azure asynchronous operation.
+ * Returns the current status of an async operation.
*
* @param location The name of the Azure region.
- * @param asyncOperationId The operation Id.
+ * @param operationId The ID of an ongoing async operation.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the status of a long running azure asynchronous operation along with {@link Response}.
+ * @return the current status of an async operation along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String location, String asyncOperationId, Context context);
+ Response getWithResponse(String location, String operationId, Context context);
/**
- * Get the status of a long running azure asynchronous operation.
+ * Returns the current status of an async operation.
*
* @param location The name of the Azure region.
- * @param asyncOperationId The operation Id.
+ * @param operationId The ID of an ongoing async operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the status of a long running azure asynchronous operation.
+ * @return the current status of an async operation.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- OperationStatusInner get(String location, String asyncOperationId);
+ OperationStatusResultInner get(String location, String operationId);
}
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
index 6be2ec3d60b2..2989c0dafb7a 100644
--- 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
@@ -15,23 +15,25 @@
*/
public interface OperationsClient {
/**
- * Get a list all available Operations.
+ * List the operations for the provider.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list all available Operations as paginated response with {@link PagedIterable}.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listAll();
/**
- * Get a list all available Operations.
+ * List the operations for the provider.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list all available Operations as paginated response with {@link PagedIterable}.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listAll(Context context);
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/TargetTypesClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/TargetTypesClient.java
index 92e8fb223c8f..01639c997d89 100644
--- 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
@@ -18,19 +18,19 @@ public interface TargetTypesClient {
/**
* Get a list of Target Type resources for given location.
*
- * @param locationName String that represents a Location resource name.
+ * @param location The name of the Azure region.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of Target Type resources for given location as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String locationName);
+ PagedIterable list(String location);
/**
* Get a list of Target Type resources for given location.
*
- * @param locationName String that represents a Location resource name.
+ * @param location The name of the Azure region.
* @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.
@@ -39,12 +39,12 @@ public interface TargetTypesClient {
* @return a list of Target Type resources for given location as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String locationName, String continuationToken, Context context);
+ PagedIterable list(String location, String continuationToken, Context context);
/**
* Get a Target Type resources for given location.
*
- * @param locationName String that represents a Location resource name.
+ * @param location The name of the Azure region.
* @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.
@@ -53,12 +53,12 @@ public interface TargetTypesClient {
* @return a Target Type resources for given location along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String locationName, String targetTypeName, Context context);
+ Response getWithResponse(String location, String targetTypeName, Context context);
/**
* Get a Target Type resources for given location.
*
- * @param locationName String that represents a Location resource name.
+ * @param location The name of the Azure region.
* @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.
@@ -66,5 +66,5 @@ public interface TargetTypesClient {
* @return a Target Type resources for given location.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- TargetTypeInner get(String locationName, String targetTypeName);
+ TargetTypeInner get(String location, String targetTypeName);
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/TargetsClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/TargetsClient.java
index 0caf92afda5d..5a2a0c90c7a9 100644
--- 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
@@ -18,10 +18,10 @@ 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.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent 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.
@@ -35,10 +35,10 @@ PagedIterable list(String resourceGroupName, String parentProviderN
/**
* 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent 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.
@@ -54,10 +54,10 @@ PagedIterable list(String resourceGroupName, String parentProviderN
/**
* 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent 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.
@@ -72,10 +72,10 @@ Response getWithResponse(String resourceGroupName, String parentPro
/**
* 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent 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.
@@ -87,73 +87,73 @@ TargetInner get(String resourceGroupName, String parentProviderNamespace, String
String parentResourceName, String targetName);
/**
- * Delete a Target resource that extends a tracked regional resource.
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
+ * @param resource 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 the {@link Response}.
+ * @return model that represents a Target resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteWithResponse(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, Context context);
+ Response createOrUpdateWithResponse(String resourceGroupName, String parentProviderNamespace,
+ String parentResourceType, String parentResourceName, String targetName, TargetInner resource, Context context);
/**
- * Delete a Target resource that extends a tracked regional resource.
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
+ * @param resource 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)
- void delete(String resourceGroupName, String parentProviderNamespace, String parentResourceType,
- String parentResourceName, String targetName);
+ TargetInner createOrUpdate(String resourceGroupName, String parentProviderNamespace, String parentResourceType,
+ String parentResourceName, String targetName, TargetInner resource);
/**
- * Create or update a Target resource that extends a tracked regional resource.
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
- * @param target Target resource to be created or updated.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents a Target resource along with {@link Response}.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateWithResponse(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, TargetInner target, Context context);
+ 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.
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent 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);
+ void delete(String resourceGroupName, String parentProviderNamespace, String parentResourceType,
+ String parentResourceName, String targetName);
}
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
index 88dd47d4314f..0440075ed445 100644
--- 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
@@ -18,14 +18,14 @@
@Immutable
public final class CapabilityInner extends ProxyResource {
/*
- * The standard system metadata of a resource type.
+ * The properties of a capability resource.
*/
- private SystemData systemData;
+ private CapabilityProperties innerProperties;
/*
- * The properties of a capability resource.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- private CapabilityProperties innerProperties;
+ private SystemData systemData;
/*
* The type of the resource.
@@ -49,21 +49,21 @@ public CapabilityInner() {
}
/**
- * Get the systemData property: The standard system metadata of a resource type.
+ * Get the innerProperties property: The properties of a capability resource.
*
- * @return the systemData value.
+ * @return the innerProperties value.
*/
- public SystemData systemData() {
- return this.systemData;
+ private CapabilityProperties innerProperties() {
+ return this.innerProperties;
}
/**
- * Get the innerProperties property: The properties of a capability resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @return the innerProperties value.
+ * @return the systemData value.
*/
- private CapabilityProperties innerProperties() {
- return this.innerProperties;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
@@ -158,6 +158,7 @@ public void validate() {
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
return jsonWriter.writeEndObject();
}
@@ -183,10 +184,10 @@ public static CapabilityInner fromJson(JsonReader jsonReader) throws IOException
deserializedCapabilityInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedCapabilityInner.type = reader.getString();
- } else if ("systemData".equals(fieldName)) {
- deserializedCapabilityInner.systemData = SystemData.fromJson(reader);
} else if ("properties".equals(fieldName)) {
deserializedCapabilityInner.innerProperties = CapabilityProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedCapabilityInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
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
index 16d896faffe0..72409082d016 100644
--- 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
@@ -4,7 +4,7 @@
package com.azure.resourcemanager.chaos.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
@@ -17,22 +17,17 @@
/**
* Model that represents a Capability Type resource.
*/
-@Fluent
+@Immutable
public final class CapabilityTypeInner extends ProxyResource {
/*
- * The system metadata properties of the capability type resource.
- */
- private SystemData systemData;
-
- /*
- * Location of the Capability Type resource.
+ * The properties of the capability type resource.
*/
- private String location;
+ private CapabilityTypeProperties innerProperties;
/*
- * The properties of the capability type resource.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- private CapabilityTypeProperties innerProperties;
+ private SystemData systemData;
/*
* The type of the resource.
@@ -56,41 +51,21 @@ public CapabilityTypeInner() {
}
/**
- * Get the systemData property: The system metadata properties of the capability type resource.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
- /**
- * Get the location property: Location of the Capability Type resource.
- *
- * @return the location value.
- */
- public String location() {
- return this.location;
- }
-
- /**
- * Set the location property: Location of the Capability Type resource.
+ * Get the innerProperties property: The properties of the capability type resource.
*
- * @param location the location value to set.
- * @return the CapabilityTypeInner object itself.
+ * @return the innerProperties value.
*/
- public CapabilityTypeInner withLocation(String location) {
- this.location = location;
- return this;
+ private CapabilityTypeProperties innerProperties() {
+ return this.innerProperties;
}
/**
- * Get the innerProperties property: The properties of the capability type resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @return the innerProperties value.
+ * @return the systemData value.
*/
- private CapabilityTypeProperties innerProperties() {
- return this.innerProperties;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
@@ -195,20 +170,6 @@ public List azureRbacActions() {
return this.innerProperties() == null ? null : this.innerProperties().azureRbacActions();
}
- /**
- * Set the azureRbacActions property: Control plane actions necessary to execute capability type.
- *
- * @param azureRbacActions the azureRbacActions value to set.
- * @return the CapabilityTypeInner object itself.
- */
- public CapabilityTypeInner withAzureRbacActions(List azureRbacActions) {
- if (this.innerProperties() == null) {
- this.innerProperties = new CapabilityTypeProperties();
- }
- this.innerProperties().withAzureRbacActions(azureRbacActions);
- return this;
- }
-
/**
* Get the azureRbacDataActions property: Data plane actions necessary to execute capability type.
*
@@ -219,17 +180,12 @@ public List azureRbacDataActions() {
}
/**
- * Set the azureRbacDataActions property: Data plane actions necessary to execute capability type.
+ * Get the requiredAzureRoleDefinitionIds property: Required Azure Role Definition Ids to execute capability type.
*
- * @param azureRbacDataActions the azureRbacDataActions value to set.
- * @return the CapabilityTypeInner object itself.
+ * @return the requiredAzureRoleDefinitionIds value.
*/
- public CapabilityTypeInner withAzureRbacDataActions(List azureRbacDataActions) {
- if (this.innerProperties() == null) {
- this.innerProperties = new CapabilityTypeProperties();
- }
- this.innerProperties().withAzureRbacDataActions(azureRbacDataActions);
- return this;
+ public List requiredAzureRoleDefinitionIds() {
+ return this.innerProperties() == null ? null : this.innerProperties().requiredAzureRoleDefinitionIds();
}
/**
@@ -241,20 +197,6 @@ public CapabilityTypePropertiesRuntimeProperties runtimeProperties() {
return this.innerProperties() == null ? null : this.innerProperties().runtimeProperties();
}
- /**
- * Set the runtimeProperties property: Runtime properties of this Capability Type.
- *
- * @param runtimeProperties the runtimeProperties value to set.
- * @return the CapabilityTypeInner object itself.
- */
- public CapabilityTypeInner withRuntimeProperties(CapabilityTypePropertiesRuntimeProperties runtimeProperties) {
- if (this.innerProperties() == null) {
- this.innerProperties = new CapabilityTypeProperties();
- }
- this.innerProperties().withRuntimeProperties(runtimeProperties);
- return this;
- }
-
/**
* Validates the instance.
*
@@ -272,7 +214,7 @@ public void validate() {
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
- jsonWriter.writeStringField("location", this.location);
+ jsonWriter.writeJsonField("properties", this.innerProperties);
return jsonWriter.writeEndObject();
}
@@ -298,12 +240,10 @@ public static CapabilityTypeInner fromJson(JsonReader jsonReader) throws IOExcep
deserializedCapabilityTypeInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedCapabilityTypeInner.type = reader.getString();
- } else if ("systemData".equals(fieldName)) {
- deserializedCapabilityTypeInner.systemData = SystemData.fromJson(reader);
- } else if ("location".equals(fieldName)) {
- deserializedCapabilityTypeInner.location = reader.getString();
} else if ("properties".equals(fieldName)) {
deserializedCapabilityTypeInner.innerProperties = CapabilityTypeProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedCapabilityTypeInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
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
index 1dad8bc5d866..b1713e3245d3 100644
--- 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
@@ -4,7 +4,7 @@
package com.azure.resourcemanager.chaos.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -16,7 +16,7 @@
/**
* Model that represents the Capability Type properties model.
*/
-@Fluent
+@Immutable
public final class CapabilityTypeProperties implements JsonSerializable {
/*
* String of the Publisher that this Capability Type extends.
@@ -63,6 +63,11 @@ public final class CapabilityTypeProperties implements JsonSerializable azureRbacDataActions;
+ /*
+ * Required Azure Role Definition Ids to execute capability type.
+ */
+ private List requiredAzureRoleDefinitionIds;
+
/*
* Runtime properties of this Capability Type.
*/
@@ -146,17 +151,6 @@ public List azureRbacActions() {
return this.azureRbacActions;
}
- /**
- * Set the azureRbacActions property: Control plane actions necessary to execute capability type.
- *
- * @param azureRbacActions the azureRbacActions value to set.
- * @return the CapabilityTypeProperties object itself.
- */
- public CapabilityTypeProperties withAzureRbacActions(List azureRbacActions) {
- this.azureRbacActions = azureRbacActions;
- return this;
- }
-
/**
* Get the azureRbacDataActions property: Data plane actions necessary to execute capability type.
*
@@ -167,14 +161,12 @@ public List azureRbacDataActions() {
}
/**
- * Set the azureRbacDataActions property: Data plane actions necessary to execute capability type.
+ * Get the requiredAzureRoleDefinitionIds property: Required Azure Role Definition Ids to execute capability type.
*
- * @param azureRbacDataActions the azureRbacDataActions value to set.
- * @return the CapabilityTypeProperties object itself.
+ * @return the requiredAzureRoleDefinitionIds value.
*/
- public CapabilityTypeProperties withAzureRbacDataActions(List azureRbacDataActions) {
- this.azureRbacDataActions = azureRbacDataActions;
- return this;
+ public List requiredAzureRoleDefinitionIds() {
+ return this.requiredAzureRoleDefinitionIds;
}
/**
@@ -186,17 +178,6 @@ public CapabilityTypePropertiesRuntimeProperties runtimeProperties() {
return this.runtimeProperties;
}
- /**
- * Set the runtimeProperties property: Runtime properties of this Capability Type.
- *
- * @param runtimeProperties the runtimeProperties value to set.
- * @return the CapabilityTypeProperties object itself.
- */
- public CapabilityTypeProperties withRuntimeProperties(CapabilityTypePropertiesRuntimeProperties runtimeProperties) {
- this.runtimeProperties = runtimeProperties;
- return this;
- }
-
/**
* Validates the instance.
*
@@ -214,11 +195,6 @@ public void validate() {
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
- jsonWriter.writeArrayField("azureRbacActions", this.azureRbacActions,
- (writer, element) -> writer.writeString(element));
- jsonWriter.writeArrayField("azureRbacDataActions", this.azureRbacDataActions,
- (writer, element) -> writer.writeString(element));
- jsonWriter.writeJsonField("runtimeProperties", this.runtimeProperties);
return jsonWriter.writeEndObject();
}
@@ -257,6 +233,10 @@ public static CapabilityTypeProperties fromJson(JsonReader jsonReader) throws IO
} else if ("azureRbacDataActions".equals(fieldName)) {
List azureRbacDataActions = reader.readArray(reader1 -> reader1.getString());
deserializedCapabilityTypeProperties.azureRbacDataActions = azureRbacDataActions;
+ } else if ("requiredAzureRoleDefinitionIds".equals(fieldName)) {
+ List requiredAzureRoleDefinitionIds = reader.readArray(reader1 -> reader1.getString());
+ deserializedCapabilityTypeProperties.requiredAzureRoleDefinitionIds
+ = requiredAzureRoleDefinitionIds;
} else if ("runtimeProperties".equals(fieldName)) {
deserializedCapabilityTypeProperties.runtimeProperties
= CapabilityTypePropertiesRuntimeProperties.fromJson(reader);
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
index ce9678995479..a7f261d5c42d 100644
--- 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
@@ -9,9 +9,8 @@
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
-import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation;
+import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsProperties;
import java.io.IOException;
-import java.time.OffsetDateTime;
/**
* Model that represents the execution details of an Experiment.
@@ -36,7 +35,7 @@ public final class ExperimentExecutionDetailsInner implements JsonSerializable {
+public final class ExperimentExecutionInner extends ProxyResource {
/*
- * String of the resource type.
+ * The properties of experiment execution status.
*/
- private String type;
+ private ExperimentExecutionProperties innerProperties;
/*
- * String of the fully qualified resource ID.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- private String id;
+ private SystemData systemData;
/*
- * String of the resource name.
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
*/
private String name;
/*
- * The properties of experiment execution status.
+ * Fully qualified resource Id for the resource.
*/
- private ExperimentExecutionProperties innerProperties;
+ private String id;
/**
* Creates an instance of ExperimentExecutionInner class.
@@ -44,39 +50,51 @@ public ExperimentExecutionInner() {
}
/**
- * Get the type property: String of the resource type.
+ * Get the innerProperties property: The properties of experiment execution status.
*
- * @return the type value.
+ * @return the innerProperties value.
*/
- public String type() {
- return this.type;
+ private ExperimentExecutionProperties innerProperties() {
+ return this.innerProperties;
}
/**
- * Get the id property: String of the fully qualified resource ID.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @return the id value.
+ * @return the systemData value.
*/
- public String id() {
- return this.id;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
- * Get the name property: String of the resource name.
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
*
* @return the name value.
*/
+ @Override
public String name() {
return this.name;
}
/**
- * Get the innerProperties property: The properties of experiment execution status.
+ * Get the id property: Fully qualified resource Id for the resource.
*
- * @return the innerProperties value.
+ * @return the id value.
*/
- private ExperimentExecutionProperties innerProperties() {
- return this.innerProperties;
+ @Override
+ public String id() {
+ return this.id;
}
/**
@@ -133,6 +151,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
* @param jsonReader The JsonReader being read.
* @return An instance of ExperimentExecutionInner if the JsonReader was pointing to an instance of it, or null if
* it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
* @throws IOException If an error occurs while reading the ExperimentExecutionInner.
*/
public static ExperimentExecutionInner fromJson(JsonReader jsonReader) throws IOException {
@@ -142,15 +161,17 @@ public static ExperimentExecutionInner fromJson(JsonReader jsonReader) throws IO
String fieldName = reader.getFieldName();
reader.nextToken();
- if ("type".equals(fieldName)) {
- deserializedExperimentExecutionInner.type = reader.getString();
- } else if ("id".equals(fieldName)) {
+ if ("id".equals(fieldName)) {
deserializedExperimentExecutionInner.id = reader.getString();
} else if ("name".equals(fieldName)) {
deserializedExperimentExecutionInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedExperimentExecutionInner.type = reader.getString();
} else if ("properties".equals(fieldName)) {
deserializedExperimentExecutionInner.innerProperties
= ExperimentExecutionProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedExperimentExecutionInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionProperties.java
index 338aa56c85a7..dee02d8b6c32 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionProperties.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionProperties.java
@@ -17,7 +17,7 @@
* Model that represents the execution properties of an Experiment.
*/
@Immutable
-public class ExperimentExecutionProperties implements JsonSerializable {
+public final class ExperimentExecutionProperties implements JsonSerializable {
/*
* The status of the execution.
*/
@@ -48,17 +48,6 @@ public String status() {
return this.status;
}
- /**
- * Set the status property: The status of the execution.
- *
- * @param status the status value to set.
- * @return the ExperimentExecutionProperties object itself.
- */
- ExperimentExecutionProperties withStatus(String status) {
- this.status = status;
- return this;
- }
-
/**
* Get the startedAt property: String that represents the start date time.
*
@@ -68,17 +57,6 @@ public OffsetDateTime startedAt() {
return this.startedAt;
}
- /**
- * Set the startedAt property: String that represents the start date time.
- *
- * @param startedAt the startedAt value to set.
- * @return the ExperimentExecutionProperties object itself.
- */
- ExperimentExecutionProperties withStartedAt(OffsetDateTime startedAt) {
- this.startedAt = startedAt;
- return this;
- }
-
/**
* Get the stoppedAt property: String that represents the stop date time.
*
@@ -88,17 +66,6 @@ public OffsetDateTime stoppedAt() {
return this.stoppedAt;
}
- /**
- * Set the stoppedAt property: String that represents the stop date time.
- *
- * @param stoppedAt the stoppedAt value to set.
- * @return the ExperimentExecutionProperties object itself.
- */
- ExperimentExecutionProperties withStoppedAt(OffsetDateTime stoppedAt) {
- this.stoppedAt = stoppedAt;
- return this;
- }
-
/**
* Validates the instance.
*
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
index b034403833ae..20911b6c5fd2 100644
--- 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
@@ -13,8 +13,8 @@
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.chaos.models.ChaosExperimentStep;
import com.azure.resourcemanager.chaos.models.ChaosTargetSelector;
+import com.azure.resourcemanager.chaos.models.ManagedServiceIdentity;
import com.azure.resourcemanager.chaos.models.ProvisioningState;
-import com.azure.resourcemanager.chaos.models.ResourceIdentity;
import java.io.IOException;
import java.util.List;
import java.util.Map;
@@ -25,19 +25,19 @@
@Fluent
public final class ExperimentInner extends Resource {
/*
- * The system metadata of the experiment resource.
+ * The managed service identities assigned to this resource.
*/
- private SystemData systemData;
+ private ManagedServiceIdentity identity;
/*
- * The identity of the experiment resource.
+ * The properties of the experiment resource.
*/
- private ResourceIdentity identity;
+ private ExperimentProperties innerProperties = new ExperimentProperties();
/*
- * The properties of the experiment resource.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- private ExperimentProperties innerProperties = new ExperimentProperties();
+ private SystemData systemData;
/*
* The type of the resource.
@@ -61,30 +61,21 @@ public ExperimentInner() {
}
/**
- * Get the systemData property: The system metadata of the experiment resource.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
- /**
- * Get the identity property: The identity of the experiment resource.
+ * Get the identity property: The managed service identities assigned to this resource.
*
* @return the identity value.
*/
- public ResourceIdentity identity() {
+ public ManagedServiceIdentity identity() {
return this.identity;
}
/**
- * Set the identity property: The identity of the experiment resource.
+ * Set the identity property: The managed service identities assigned to this resource.
*
* @param identity the identity value to set.
* @return the ExperimentInner object itself.
*/
- public ExperimentInner withIdentity(ResourceIdentity identity) {
+ public ExperimentInner withIdentity(ManagedServiceIdentity identity) {
this.identity = identity;
return this;
}
@@ -98,6 +89,15 @@ private ExperimentProperties innerProperties() {
return this.innerProperties;
}
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Get the type property: The type of the resource.
*
@@ -263,10 +263,10 @@ public static ExperimentInner fromJson(JsonReader jsonReader) throws IOException
deserializedExperimentInner.withTags(tags);
} else if ("properties".equals(fieldName)) {
deserializedExperimentInner.innerProperties = ExperimentProperties.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedExperimentInner.identity = ManagedServiceIdentity.fromJson(reader);
} else if ("systemData".equals(fieldName)) {
deserializedExperimentInner.systemData = SystemData.fromJson(reader);
- } else if ("identity".equals(fieldName)) {
- deserializedExperimentInner.identity = ResourceIdentity.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationStatusInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationStatusInner.java
deleted file mode 100644
index bfcf9bb40f92..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationStatusInner.java
+++ /dev/null
@@ -1,214 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.management.exception.ManagementError;
-import com.azure.core.util.CoreUtils;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-import java.time.OffsetDateTime;
-
-/**
- * The status of operation.
- */
-@Fluent
-public final class OperationStatusInner implements JsonSerializable {
- /*
- * The operation Id.
- */
- private String id;
-
- /*
- * The operation name.
- */
- private String name;
-
- /*
- * The start time of the operation.
- */
- private OffsetDateTime startTime;
-
- /*
- * The end time of the operation.
- */
- private OffsetDateTime endTime;
-
- /*
- * The status of the operation.
- */
- private String status;
-
- /*
- * The error object.
- */
- private ManagementError error;
-
- /**
- * Creates an instance of OperationStatusInner class.
- */
- public OperationStatusInner() {
- }
-
- /**
- * Get the id property: The operation Id.
- *
- * @return the id value.
- */
- public String id() {
- return this.id;
- }
-
- /**
- * Set the id property: The operation Id.
- *
- * @param id the id value to set.
- * @return the OperationStatusInner object itself.
- */
- public OperationStatusInner withId(String id) {
- this.id = id;
- return this;
- }
-
- /**
- * Get the name property: The operation name.
- *
- * @return the name value.
- */
- public String name() {
- return this.name;
- }
-
- /**
- * Set the name property: The operation name.
- *
- * @param name the name value to set.
- * @return the OperationStatusInner object itself.
- */
- public OperationStatusInner withName(String name) {
- this.name = name;
- return this;
- }
-
- /**
- * Get the startTime property: The start time of the operation.
- *
- * @return the startTime value.
- */
- public OffsetDateTime startTime() {
- return this.startTime;
- }
-
- /**
- * Get the endTime property: The end time of the operation.
- *
- * @return the endTime value.
- */
- public OffsetDateTime endTime() {
- return this.endTime;
- }
-
- /**
- * Get the status property: The status of the operation.
- *
- * @return the status value.
- */
- public String status() {
- return this.status;
- }
-
- /**
- * Set the status property: The status of the operation.
- *
- * @param status the status value to set.
- * @return the OperationStatusInner object itself.
- */
- public OperationStatusInner withStatus(String status) {
- this.status = status;
- return this;
- }
-
- /**
- * Get the error property: The error object.
- *
- * @return the error value.
- */
- public ManagementError error() {
- return this.error;
- }
-
- /**
- * Set the error property: The error object.
- *
- * @param error the error value to set.
- * @return the OperationStatusInner object itself.
- */
- public OperationStatusInner withError(ManagementError error) {
- this.error = error;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("id", this.id);
- jsonWriter.writeStringField("name", this.name);
- jsonWriter.writeStringField("status", this.status);
- jsonWriter.writeJsonField("error", this.error);
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of OperationStatusInner from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of OperationStatusInner if the JsonReader was pointing to an instance of it, or null if it
- * was pointing to JSON null.
- * @throws IOException If an error occurs while reading the OperationStatusInner.
- */
- public static OperationStatusInner fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- OperationStatusInner deserializedOperationStatusInner = new OperationStatusInner();
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
-
- if ("id".equals(fieldName)) {
- deserializedOperationStatusInner.id = reader.getString();
- } else if ("name".equals(fieldName)) {
- deserializedOperationStatusInner.name = reader.getString();
- } else if ("startTime".equals(fieldName)) {
- deserializedOperationStatusInner.startTime = reader
- .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
- } else if ("endTime".equals(fieldName)) {
- deserializedOperationStatusInner.endTime = reader
- .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
- } else if ("status".equals(fieldName)) {
- deserializedOperationStatusInner.status = reader.getString();
- } else if ("error".equals(fieldName)) {
- deserializedOperationStatusInner.error = ManagementError.fromJson(reader);
- } else {
- reader.skipChildren();
- }
- }
-
- return deserializedOperationStatusInner;
- });
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationStatusResultInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationStatusResultInner.java
new file mode 100644
index 000000000000..6cfdebb3e1b9
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationStatusResultInner.java
@@ -0,0 +1,329 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.List;
+
+/**
+ * The current status of an async operation.
+ */
+@Fluent
+public final class OperationStatusResultInner implements JsonSerializable {
+ /*
+ * Fully qualified ID for the async operation.
+ */
+ private String id;
+
+ /*
+ * Fully qualified ID of the resource against which the original async operation was started.
+ */
+ private String resourceId;
+
+ /*
+ * Name of the async operation.
+ */
+ private String name;
+
+ /*
+ * Operation status.
+ */
+ private String status;
+
+ /*
+ * Percent of the operation that is complete.
+ */
+ private Float percentComplete;
+
+ /*
+ * The start time of the operation.
+ */
+ private OffsetDateTime startTime;
+
+ /*
+ * The end time of the operation.
+ */
+ private OffsetDateTime endTime;
+
+ /*
+ * The operations list.
+ */
+ private List operations;
+
+ /*
+ * If present, details of the operation error.
+ */
+ private ManagementError error;
+
+ /**
+ * Creates an instance of OperationStatusResultInner class.
+ */
+ public OperationStatusResultInner() {
+ }
+
+ /**
+ * Get the id property: Fully qualified ID for the async operation.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Fully qualified ID for the async operation.
+ *
+ * @param id the id value to set.
+ * @return the OperationStatusResultInner object itself.
+ */
+ public OperationStatusResultInner withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was
+ * started.
+ *
+ * @return the resourceId value.
+ */
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Get the name property: Name of the async operation.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name of the async operation.
+ *
+ * @param name the name value to set.
+ * @return the OperationStatusResultInner object itself.
+ */
+ public OperationStatusResultInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the status property: Operation status.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Operation status.
+ *
+ * @param status the status value to set.
+ * @return the OperationStatusResultInner object itself.
+ */
+ public OperationStatusResultInner withStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the percentComplete property: Percent of the operation that is complete.
+ *
+ * @return the percentComplete value.
+ */
+ public Float percentComplete() {
+ return this.percentComplete;
+ }
+
+ /**
+ * Set the percentComplete property: Percent of the operation that is complete.
+ *
+ * @param percentComplete the percentComplete value to set.
+ * @return the OperationStatusResultInner object itself.
+ */
+ public OperationStatusResultInner withPercentComplete(Float percentComplete) {
+ this.percentComplete = percentComplete;
+ return this;
+ }
+
+ /**
+ * Get the startTime property: The start time of the operation.
+ *
+ * @return the startTime value.
+ */
+ public OffsetDateTime startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Set the startTime property: The start time of the operation.
+ *
+ * @param startTime the startTime value to set.
+ * @return the OperationStatusResultInner object itself.
+ */
+ public OperationStatusResultInner withStartTime(OffsetDateTime startTime) {
+ this.startTime = startTime;
+ return this;
+ }
+
+ /**
+ * Get the endTime property: The end time of the operation.
+ *
+ * @return the endTime value.
+ */
+ public OffsetDateTime endTime() {
+ return this.endTime;
+ }
+
+ /**
+ * Set the endTime property: The end time of the operation.
+ *
+ * @param endTime the endTime value to set.
+ * @return the OperationStatusResultInner object itself.
+ */
+ public OperationStatusResultInner withEndTime(OffsetDateTime endTime) {
+ this.endTime = endTime;
+ return this;
+ }
+
+ /**
+ * Get the operations property: The operations list.
+ *
+ * @return the operations value.
+ */
+ public List operations() {
+ return this.operations;
+ }
+
+ /**
+ * Set the operations property: The operations list.
+ *
+ * @param operations the operations value to set.
+ * @return the OperationStatusResultInner object itself.
+ */
+ public OperationStatusResultInner withOperations(List operations) {
+ this.operations = operations;
+ return this;
+ }
+
+ /**
+ * Get the error property: If present, details of the operation error.
+ *
+ * @return the error value.
+ */
+ public ManagementError error() {
+ return this.error;
+ }
+
+ /**
+ * Set the error property: If present, details of the operation error.
+ *
+ * @param error the error value to set.
+ * @return the OperationStatusResultInner object itself.
+ */
+ public OperationStatusResultInner withError(ManagementError error) {
+ this.error = error;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (status() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property status in model OperationStatusResultInner"));
+ }
+ if (operations() != null) {
+ operations().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(OperationStatusResultInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("status", this.status);
+ jsonWriter.writeStringField("id", this.id);
+ jsonWriter.writeStringField("name", this.name);
+ jsonWriter.writeNumberField("percentComplete", this.percentComplete);
+ jsonWriter.writeStringField("startTime",
+ this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime));
+ jsonWriter.writeStringField("endTime",
+ this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime));
+ jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeJsonField("error", this.error);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationStatusResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationStatusResultInner if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the OperationStatusResultInner.
+ */
+ public static OperationStatusResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationStatusResultInner deserializedOperationStatusResultInner = new OperationStatusResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("status".equals(fieldName)) {
+ deserializedOperationStatusResultInner.status = reader.getString();
+ } else if ("id".equals(fieldName)) {
+ deserializedOperationStatusResultInner.id = reader.getString();
+ } else if ("resourceId".equals(fieldName)) {
+ deserializedOperationStatusResultInner.resourceId = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedOperationStatusResultInner.name = reader.getString();
+ } else if ("percentComplete".equals(fieldName)) {
+ deserializedOperationStatusResultInner.percentComplete = reader.getNullable(JsonReader::getFloat);
+ } else if ("startTime".equals(fieldName)) {
+ deserializedOperationStatusResultInner.startTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("endTime".equals(fieldName)) {
+ deserializedOperationStatusResultInner.endTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("operations".equals(fieldName)) {
+ List operations
+ = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1));
+ deserializedOperationStatusResultInner.operations = operations;
+ } else if ("error".equals(fieldName)) {
+ deserializedOperationStatusResultInner.error = ManagementError.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationStatusResultInner;
+ });
+ }
+}
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
index 9c7156ae10fc..5ec238584ae2 100644
--- 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
@@ -7,7 +7,6 @@
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.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -20,19 +19,19 @@
@Fluent
public final class TargetInner extends ProxyResource {
/*
- * The system metadata of the target resource.
+ * The properties of the target resource.
*/
- private SystemData systemData;
+ private Map properties;
/*
- * Location of the target resource.
+ * Azure resource location.
*/
private String location;
/*
- * The properties of the target resource.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- private Map properties;
+ private SystemData systemData;
/*
* The type of the resource.
@@ -56,16 +55,27 @@ public TargetInner() {
}
/**
- * Get the systemData property: The system metadata of the target resource.
+ * Get the properties property: The properties of the target resource.
*
- * @return the systemData value.
+ * @return the properties value.
*/
- public SystemData systemData() {
- return this.systemData;
+ 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;
}
/**
- * Get the location property: Location of the target resource.
+ * Get the location property: Azure resource location.
*
* @return the location value.
*/
@@ -74,7 +84,7 @@ public String location() {
}
/**
- * Set the location property: Location of the target resource.
+ * Set the location property: Azure resource location.
*
* @param location the location value to set.
* @return the TargetInner object itself.
@@ -85,23 +95,12 @@ public TargetInner withLocation(String location) {
}
/**
- * 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.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @param properties the properties value to set.
- * @return the TargetInner object itself.
+ * @return the systemData value.
*/
- public TargetInner withProperties(Map properties) {
- this.properties = properties;
- return this;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
@@ -140,14 +139,8 @@ public String id() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (properties() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property properties in model TargetInner"));
- }
}
- private static final ClientLogger LOGGER = new ClientLogger(TargetInner.class);
-
/**
* {@inheritDoc}
*/
@@ -184,10 +177,10 @@ public static TargetInner fromJson(JsonReader jsonReader) throws IOException {
} else if ("properties".equals(fieldName)) {
Map properties = reader.readMap(reader1 -> reader1.readUntyped());
deserializedTargetInner.properties = properties;
- } else if ("systemData".equals(fieldName)) {
- deserializedTargetInner.systemData = SystemData.fromJson(reader);
} else if ("location".equals(fieldName)) {
deserializedTargetInner.location = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedTargetInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
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
index 0f944a6e9ac3..a00babf2945a 100644
--- 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
@@ -4,7 +4,7 @@
package com.azure.resourcemanager.chaos.fluent.models;
-import com.azure.core.annotation.Fluent;
+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;
@@ -17,22 +17,17 @@
/**
* Model that represents a Target Type resource.
*/
-@Fluent
+@Immutable
public final class TargetTypeInner extends ProxyResource {
/*
- * The system metadata properties of the target type resource.
- */
- private SystemData systemData;
-
- /*
- * Location of the Target Type resource.
+ * The properties of the target type resource.
*/
- private String location;
+ private TargetTypeProperties innerProperties = new TargetTypeProperties();
/*
- * The properties of the target type resource.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- private TargetTypeProperties innerProperties = new TargetTypeProperties();
+ private SystemData systemData;
/*
* The type of the resource.
@@ -56,41 +51,21 @@ public TargetTypeInner() {
}
/**
- * Get the systemData property: The system metadata properties of the target type resource.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
- /**
- * Get the location property: Location of the Target Type resource.
- *
- * @return the location value.
- */
- public String location() {
- return this.location;
- }
-
- /**
- * Set the location property: Location of the Target Type resource.
+ * Get the innerProperties property: The properties of the target type resource.
*
- * @param location the location value to set.
- * @return the TargetTypeInner object itself.
+ * @return the innerProperties value.
*/
- public TargetTypeInner withLocation(String location) {
- this.location = location;
- return this;
+ private TargetTypeProperties innerProperties() {
+ return this.innerProperties;
}
/**
- * Get the innerProperties property: The properties of the target type resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @return the innerProperties value.
+ * @return the systemData value.
*/
- private TargetTypeProperties innerProperties() {
- return this.innerProperties;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
@@ -183,7 +158,6 @@ public void validate() {
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeJsonField("properties", this.innerProperties);
- jsonWriter.writeStringField("location", this.location);
return jsonWriter.writeEndObject();
}
@@ -213,8 +187,6 @@ public static TargetTypeInner fromJson(JsonReader jsonReader) throws IOException
deserializedTargetTypeInner.innerProperties = TargetTypeProperties.fromJson(reader);
} else if ("systemData".equals(fieldName)) {
deserializedTargetTypeInner.systemData = SystemData.fromJson(reader);
- } else if ("location".equals(fieldName)) {
- deserializedTargetTypeInner.location = reader.getString();
} else {
reader.skipChildren();
}
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
index 4a986b0ee909..ee2cee6fe7a7 100644
--- 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
@@ -74,9 +74,9 @@ Mono> list(@HostParam("$host") String endpoint,
@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);
+ @PathParam("parentResourceName") String parentResourceName,
+ @QueryParam("continuationToken") String continuationToken, @PathParam("targetName") String targetName,
+ @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}")
@@ -91,30 +91,29 @@ Mono> get(@HostParam("$host") String endpoint,
@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 })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}")
+ @ExpectedResponses({ 200, 201 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
+ 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, @HeaderParam("Accept") String accept, Context context);
+ @PathParam("capabilityName") String capabilityName, @BodyParam("application/json") CapabilityInner resource,
+ @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 })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}")
+ @ExpectedResponses({ 200, 204 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> createOrUpdate(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ 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,
- @BodyParam("application/json") CapabilityInner capability, @HeaderParam("Accept") String accept,
- Context context);
+ @PathParam("capabilityName") String capabilityName, @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@@ -125,18 +124,18 @@ Mono> listNext(@PathParam(value = "nextLink", enc
}
/**
- * Get a list of Capability resources that extend a Target resource..
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param continuationToken String that sets the continuation token.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of Capability resources that extend a Target resource. along with {@link PagedResponse} on
+ * @return a list of Capability resources that extend a Target resource along with {@link PagedResponse} on
* successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -174,26 +173,26 @@ private Mono> listSinglePageAsync(String resource
return FluxUtil
.withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, continuationToken, accept, context))
+ parentResourceName, continuationToken, targetName, 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..
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param continuationToken String that sets the continuation token.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of Capability resources that extend a Target resource. along with {@link PagedResponse} on
+ * @return a list of Capability resources that extend a Target resource along with {@link PagedResponse} on
* successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -231,25 +230,25 @@ private Mono> listSinglePageAsync(String resource
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)
+ resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, continuationToken,
+ targetName, 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..
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param continuationToken String that sets the continuation token.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of Capability resources that extend a Target resource. as paginated response with
+ * @return a list of Capability resources that extend a Target resource as paginated response with
* {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -260,17 +259,17 @@ private PagedFlux listAsync(String resourceGroupName, String pa
}
/**
- * Get a list of Capability resources that extend a Target resource..
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of Capability resources that extend a Target resource. as paginated response with
+ * @return a list of Capability resources that extend a Target resource as paginated response with
* {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -282,19 +281,19 @@ private PagedFlux listAsync(String resourceGroupName, String pa
}
/**
- * Get a list of Capability resources that extend a Target resource..
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param continuationToken String that sets the continuation token.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of Capability resources that extend a Target resource. as paginated response with
+ * @return a list of Capability resources that extend a Target resource as paginated response with
* {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -308,17 +307,17 @@ private PagedFlux listAsync(String resourceGroupName, String pa
}
/**
- * Get a list of Capability resources that extend a Target resource..
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of Capability resources that extend a Target resource. as paginated response with
+ * @return a list of Capability resources that extend a Target resource as paginated response with
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -330,19 +329,19 @@ public PagedIterable list(String resourceGroupName, String pare
}
/**
- * Get a list of Capability resources that extend a Target resource..
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param continuationToken String that sets the continuation token.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of Capability resources that extend a Target resource. as paginated response with
+ * @return a list of Capability resources that extend a Target resource as paginated response with
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -356,10 +355,10 @@ public PagedIterable list(String resourceGroupName, String pare
/**
* 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent 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.
@@ -413,10 +412,10 @@ private Mono> getWithResponseAsync(String resourceGrou
/**
* 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent 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.
@@ -470,10 +469,10 @@ private Mono> getWithResponseAsync(String resourceGrou
/**
* 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent 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.
@@ -491,10 +490,10 @@ private Mono getAsync(String resourceGroupName, String parentPr
/**
* 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent 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.
@@ -514,10 +513,10 @@ public Response getWithResponse(String resourceGroupName, Strin
/**
* 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent 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.
@@ -533,22 +532,25 @@ public CapabilityInner get(String resourceGroupName, String parentProviderNamesp
}
/**
- * Delete a Capability that extends a Target resource.
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param capabilityName String that represents a Capability resource name.
+ * @param resource 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 the {@link Response} on successful completion of {@link Mono}.
+ * @return model that represents a Capability resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> deleteWithResponseAsync(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, String capabilityName) {
+ private Mono> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName,
+ String capabilityName, CapabilityInner resource) {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
@@ -579,33 +581,40 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S
if (capabilityName == null) {
return Mono.error(new IllegalArgumentException("Parameter capabilityName is required and cannot be null."));
}
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, capabilityName, accept, context))
+ parentResourceName, targetName, capabilityName, resource, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Delete a Capability that extends a Target resource.
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param capabilityName String that represents a Capability resource name.
+ * @param resource 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 the {@link Response} on successful completion of {@link Mono}.
+ * @return model that represents a Capability resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> deleteWithResponseAsync(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, String capabilityName,
- Context context) {
+ private Mono> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName,
+ String capabilityName, CapabilityInner resource, Context context) {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
@@ -636,97 +645,105 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S
if (capabilityName == null) {
return Mono.error(new IllegalArgumentException("Parameter capabilityName is required and cannot be null."));
}
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
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);
+ return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType,
+ parentResourceName, targetName, capabilityName, resource, accept, context);
}
/**
- * Delete a Capability that extends a Target resource.
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param capabilityName String that represents a Capability resource name.
+ * @param resource 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 A {@link Mono} that completes when a successful response is received.
+ * @return model that represents a Capability resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String parentProviderNamespace, String parentResourceType,
- String parentResourceName, String targetName, String capabilityName) {
- return deleteWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, capabilityName).flatMap(ignored -> Mono.empty());
+ private Mono createOrUpdateAsync(String resourceGroupName, String parentProviderNamespace,
+ String parentResourceType, String parentResourceName, String targetName, String capabilityName,
+ CapabilityInner resource) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType,
+ parentResourceName, targetName, capabilityName, resource).flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
- * Delete a Capability that extends a Target resource.
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param capabilityName String that represents a Capability resource name.
+ * @param resource 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 the {@link Response}.
+ * @return model that represents a Capability resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteWithResponse(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, String capabilityName,
- Context context) {
- return deleteWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, capabilityName, context).block();
+ public Response createOrUpdateWithResponse(String resourceGroupName,
+ String parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName,
+ String capabilityName, CapabilityInner resource, Context context) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType,
+ parentResourceName, targetName, capabilityName, resource, context).block();
}
/**
- * Delete a Capability that extends a Target resource.
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param capabilityName String that represents a Capability resource name.
+ * @param resource 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 void delete(String resourceGroupName, String parentProviderNamespace, String parentResourceType,
- String parentResourceName, String targetName, String capabilityName) {
- deleteWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName,
- targetName, capabilityName, Context.NONE);
+ public CapabilityInner createOrUpdate(String resourceGroupName, String parentProviderNamespace,
+ String parentResourceType, String parentResourceName, String targetName, String capabilityName,
+ CapabilityInner resource) {
+ return createOrUpdateWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType,
+ parentResourceName, targetName, capabilityName, resource, Context.NONE).getValue();
}
/**
- * Create or update a Capability resource that extends a Target resource.
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param capabilityName String that represents a Capability resource name.
- * @param capability Capability resource to be created or updated.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents a Capability resource along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createOrUpdateWithResponseAsync(String resourceGroupName,
- String parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName,
- String capabilityName, CapabilityInner capability) {
+ 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."));
@@ -757,40 +774,33 @@ private Mono> createOrUpdateWithResponseAsync(String r
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(),
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, capabilityName, capability, accept, context))
+ parentResourceName, targetName, capabilityName, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Create or update a Capability resource that extends a Target resource.
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param capabilityName String that represents a Capability resource name.
- * @param capability Capability resource to be created or updated.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents a Capability resource along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createOrUpdateWithResponseAsync(String resourceGroupName,
- String parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName,
- String capabilityName, CapabilityInner capability, Context context) {
+ 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."));
@@ -821,87 +831,75 @@ private Mono> createOrUpdateWithResponseAsync(String r
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);
+ return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName,
+ capabilityName, accept, context);
}
/**
- * Create or update a Capability resource that extends a Target resource.
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param capabilityName String that represents a Capability resource name.
- * @param capability Capability resource to be created or updated.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents a Capability resource on successful completion of {@link Mono}.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAsync(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, String capabilityName,
- CapabilityInner capability) {
- return createOrUpdateWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, capabilityName, capability)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ private Mono deleteAsync(String resourceGroupName, String parentProviderNamespace, String parentResourceType,
+ String parentResourceName, String targetName, String capabilityName) {
+ return deleteWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType,
+ parentResourceName, targetName, capabilityName).flatMap(ignored -> Mono.empty());
}
/**
- * Create or update a Capability resource that extends a Target resource.
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param capabilityName String that represents a Capability resource name.
- * @param capability Capability resource to be created or updated.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents a Capability resource along with {@link Response}.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response createOrUpdateWithResponse(String resourceGroupName,
- String parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName,
- String capabilityName, CapabilityInner capability, Context context) {
- return createOrUpdateWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, capabilityName, capability, context).block();
+ 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.
+ * 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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parentProviderNamespace The parent resource provider namespace.
+ * @param parentResourceType The parent resource type.
+ * @param parentResourceName The parent resource name.
* @param targetName String that represents a Target resource name.
* @param capabilityName String that represents a Capability resource name.
- * @param capability Capability resource to be created or updated.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents a Capability resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public CapabilityInner createOrUpdate(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, String capabilityName,
- CapabilityInner capability) {
- return createOrUpdateWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, capabilityName, capability, Context.NONE).getValue();
+ public void delete(String resourceGroupName, String parentProviderNamespace, String parentResourceType,
+ String parentResourceName, String targetName, String capabilityName) {
+ deleteWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName,
+ targetName, capabilityName, Context.NONE);
}
/**
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
index b3eff31ef35e..d63976d37605 100644
--- 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
@@ -69,27 +69,12 @@ public Capability get(String resourceGroupName, String parentProviderNamespace,
}
}
- public Response deleteWithResponse(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, String capabilityName,
- Context context) {
- return this.serviceClient()
- .deleteWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName,
- targetName, capabilityName, context);
- }
-
- public void delete(String resourceGroupName, String parentProviderNamespace, String parentResourceType,
- String parentResourceName, String targetName, String capabilityName) {
- this.serviceClient()
- .delete(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName,
- capabilityName);
- }
-
public Response createOrUpdateWithResponse(String resourceGroupName, String parentProviderNamespace,
String parentResourceType, String parentResourceName, String targetName, String capabilityName,
- CapabilityInner capability, Context context) {
+ CapabilityInner resource, Context context) {
Response inner = this.serviceClient()
.createOrUpdateWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, capabilityName, capability, context);
+ parentResourceName, targetName, capabilityName, resource, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new CapabilityImpl(inner.getValue(), this.manager()));
@@ -100,10 +85,10 @@ public Response createOrUpdateWithResponse(String resourceGroupName,
public Capability createOrUpdate(String resourceGroupName, String parentProviderNamespace,
String parentResourceType, String parentResourceName, String targetName, String capabilityName,
- CapabilityInner capability) {
+ CapabilityInner resource) {
CapabilityInner inner = this.serviceClient()
.createOrUpdate(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName,
- targetName, capabilityName, capability);
+ targetName, capabilityName, resource);
if (inner != null) {
return new CapabilityImpl(inner, this.manager());
} else {
@@ -111,6 +96,21 @@ public Capability createOrUpdate(String resourceGroupName, String parentProvider
}
}
+ public Response deleteWithResponse(String resourceGroupName, String parentProviderNamespace,
+ String parentResourceType, String parentResourceName, String targetName, String capabilityName,
+ Context context) {
+ return this.serviceClient()
+ .deleteWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName,
+ targetName, capabilityName, context);
+ }
+
+ public void delete(String resourceGroupName, String parentProviderNamespace, String parentResourceType,
+ String parentResourceName, String targetName, String capabilityName) {
+ this.serviceClient()
+ .delete(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName,
+ capabilityName);
+ }
+
private CapabilitiesClient serviceClient() {
return this.innerClient;
}
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
index c6076205a25a..96abb179ab57 100644
--- 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
@@ -37,10 +37,6 @@ public SystemData systemData() {
return this.innerModel().systemData();
}
- public String location() {
- return this.innerModel().location();
- }
-
public String publisher() {
return this.innerModel().publisher();
}
@@ -87,6 +83,15 @@ public List azureRbacDataActions() {
}
}
+ public List requiredAzureRoleDefinitionIds() {
+ List inner = this.innerModel().requiredAzureRoleDefinitionIds();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
public CapabilityTypePropertiesRuntimeProperties runtimeProperties() {
return this.innerModel().runtimeProperties();
}
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
index f9a5e16e973c..4c5c047b972b 100644
--- 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
@@ -63,22 +63,22 @@ public final class CapabilityTypesClientImpl implements CapabilityTypesClient {
@ServiceInterface(name = "ChaosManagementClien")
public interface CapabilityTypesService {
@Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}/capabilityTypes")
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/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,
+ @PathParam("location") String location, @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}")
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/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("location") String location, @PathParam("targetTypeName") String targetTypeName,
@PathParam("capabilityTypeName") String capabilityTypeName, @HeaderParam("Accept") String accept,
Context context);
@@ -94,7 +94,7 @@ Mono> listNext(
/**
* Get a list of Capability Type resources for given Target Type and location.
*
- * @param locationName String that represents a Location resource name.
+ * @param location The name of the Azure region.
* @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.
@@ -104,7 +104,7 @@ Mono> listNext(
* on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String locationName, String targetTypeName,
+ private Mono> listSinglePageAsync(String location, String targetTypeName,
String continuationToken) {
if (this.client.getEndpoint() == null) {
return Mono.error(
@@ -114,8 +114,8 @@ private Mono> listSinglePageAsync(String loca
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 (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
}
if (targetTypeName == null) {
return Mono.error(new IllegalArgumentException("Parameter targetTypeName is required and cannot be null."));
@@ -123,7 +123,7 @@ private Mono> listSinglePageAsync(String loca
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))
+ this.client.getSubscriptionId(), location, 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()));
@@ -132,7 +132,7 @@ private Mono> listSinglePageAsync(String loca
/**
* Get a list of Capability Type resources for given Target Type and location.
*
- * @param locationName String that represents a Location resource name.
+ * @param location The name of the Azure region.
* @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.
@@ -143,7 +143,7 @@ private Mono> listSinglePageAsync(String loca
* on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String locationName, String targetTypeName,
+ private Mono> listSinglePageAsync(String location, String targetTypeName,
String continuationToken, Context context) {
if (this.client.getEndpoint() == null) {
return Mono.error(
@@ -153,8 +153,8 @@ private Mono> listSinglePageAsync(String loca
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 (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
}
if (targetTypeName == null) {
return Mono.error(new IllegalArgumentException("Parameter targetTypeName is required and cannot be null."));
@@ -162,7 +162,7 @@ private Mono> listSinglePageAsync(String loca
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), locationName,
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location,
targetTypeName, continuationToken, accept, context)
.map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
res.getValue().value(), res.getValue().nextLink(), null));
@@ -171,7 +171,7 @@ private Mono> listSinglePageAsync(String loca
/**
* Get a list of Capability Type resources for given Target Type and location.
*
- * @param locationName String that represents a Location resource name.
+ * @param location The name of the Azure region.
* @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.
@@ -181,16 +181,15 @@ private Mono> listSinglePageAsync(String loca
* {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String locationName, String targetTypeName,
- String continuationToken) {
- return new PagedFlux<>(() -> listSinglePageAsync(locationName, targetTypeName, continuationToken),
+ private PagedFlux listAsync(String location, String targetTypeName, String continuationToken) {
+ return new PagedFlux<>(() -> listSinglePageAsync(location, 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 location The name of the Azure region.
* @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.
@@ -199,16 +198,16 @@ private PagedFlux listAsync(String locationName, String tar
* {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String locationName, String targetTypeName) {
+ private PagedFlux listAsync(String location, String targetTypeName) {
final String continuationToken = null;
- return new PagedFlux<>(() -> listSinglePageAsync(locationName, targetTypeName, continuationToken),
+ return new PagedFlux<>(() -> listSinglePageAsync(location, 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 location The name of the Azure region.
* @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.
@@ -219,16 +218,16 @@ private PagedFlux listAsync(String locationName, String tar
* {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String locationName, String targetTypeName,
- String continuationToken, Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(locationName, targetTypeName, continuationToken, context),
+ private PagedFlux listAsync(String location, String targetTypeName, String continuationToken,
+ Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(location, 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 location The name of the Azure region.
* @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.
@@ -237,15 +236,15 @@ private PagedFlux listAsync(String locationName, String tar
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String locationName, String targetTypeName) {
+ public PagedIterable list(String location, String targetTypeName) {
final String continuationToken = null;
- return new PagedIterable<>(listAsync(locationName, targetTypeName, continuationToken));
+ return new PagedIterable<>(listAsync(location, 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 location The name of the Azure region.
* @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.
@@ -256,15 +255,15 @@ public PagedIterable list(String locationName, String targe
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String locationName, String targetTypeName, String continuationToken,
+ public PagedIterable list(String location, String targetTypeName, String continuationToken,
Context context) {
- return new PagedIterable<>(listAsync(locationName, targetTypeName, continuationToken, context));
+ return new PagedIterable<>(listAsync(location, targetTypeName, continuationToken, context));
}
/**
* Get a Capability Type resource for given Target Type and location.
*
- * @param locationName String that represents a Location resource name.
+ * @param location The name of the Azure region.
* @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.
@@ -274,7 +273,7 @@ public PagedIterable list(String locationName, String targe
* completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String locationName, String targetTypeName,
+ private Mono> getWithResponseAsync(String location, String targetTypeName,
String capabilityTypeName) {
if (this.client.getEndpoint() == null) {
return Mono.error(
@@ -284,8 +283,8 @@ private Mono> getWithResponseAsync(String location
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 (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
}
if (targetTypeName == null) {
return Mono.error(new IllegalArgumentException("Parameter targetTypeName is required and cannot be null."));
@@ -297,14 +296,14 @@ private Mono> getWithResponseAsync(String location
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))
+ this.client.getSubscriptionId(), location, 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 location The name of the Azure region.
* @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.
@@ -315,7 +314,7 @@ private Mono> getWithResponseAsync(String location
* completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String locationName, String targetTypeName,
+ private Mono> getWithResponseAsync(String location, String targetTypeName,
String capabilityTypeName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono.error(
@@ -325,8 +324,8 @@ private Mono> getWithResponseAsync(String location
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 (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
}
if (targetTypeName == null) {
return Mono.error(new IllegalArgumentException("Parameter targetTypeName is required and cannot be null."));
@@ -338,13 +337,13 @@ private Mono> getWithResponseAsync(String location
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);
+ location, 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 location The name of the Azure region.
* @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.
@@ -353,15 +352,15 @@ private Mono> getWithResponseAsync(String location
* @return a Capability Type resource for given Target Type and location on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getAsync(String locationName, String targetTypeName, String capabilityTypeName) {
- return getWithResponseAsync(locationName, targetTypeName, capabilityTypeName)
+ private Mono getAsync(String location, String targetTypeName, String capabilityTypeName) {
+ return getWithResponseAsync(location, targetTypeName, capabilityTypeName)
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
* Get a Capability Type resource for given Target Type and location.
*
- * @param locationName String that represents a Location resource name.
+ * @param location The name of the Azure region.
* @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.
@@ -371,15 +370,15 @@ private Mono getAsync(String locationName, String targetTyp
* @return a Capability Type resource for given Target Type and location along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(String locationName, String targetTypeName,
+ public Response getWithResponse(String location, String targetTypeName,
String capabilityTypeName, Context context) {
- return getWithResponseAsync(locationName, targetTypeName, capabilityTypeName, context).block();
+ return getWithResponseAsync(location, targetTypeName, capabilityTypeName, context).block();
}
/**
* Get a Capability Type resource for given Target Type and location.
*
- * @param locationName String that represents a Location resource name.
+ * @param location The name of the Azure region.
* @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.
@@ -388,8 +387,8 @@ public Response getWithResponse(String locationName, String
* @return a Capability Type resource for given Target Type and location.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public CapabilityTypeInner get(String locationName, String targetTypeName, String capabilityTypeName) {
- return getWithResponse(locationName, targetTypeName, capabilityTypeName, Context.NONE).getValue();
+ public CapabilityTypeInner get(String location, String targetTypeName, String capabilityTypeName) {
+ return getWithResponse(location, targetTypeName, capabilityTypeName, Context.NONE).getValue();
}
/**
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
index 6a206147b558..8d31c9d59a33 100644
--- 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
@@ -27,22 +27,22 @@ public CapabilityTypesImpl(CapabilityTypesClient innerClient,
this.serviceManager = serviceManager;
}
- public PagedIterable list(String locationName, String targetTypeName) {
- PagedIterable inner = this.serviceClient().list(locationName, targetTypeName);
+ public PagedIterable list(String location, String targetTypeName) {
+ PagedIterable inner = this.serviceClient().list(location, targetTypeName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new CapabilityTypeImpl(inner1, this.manager()));
}
- public PagedIterable list(String locationName, String targetTypeName, String continuationToken,
+ public PagedIterable list(String location, String targetTypeName, String continuationToken,
Context context) {
PagedIterable inner
- = this.serviceClient().list(locationName, targetTypeName, continuationToken, context);
+ = this.serviceClient().list(location, targetTypeName, continuationToken, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new CapabilityTypeImpl(inner1, this.manager()));
}
- public Response getWithResponse(String locationName, String targetTypeName,
- String capabilityTypeName, Context context) {
+ public Response getWithResponse(String location, String targetTypeName, String capabilityTypeName,
+ Context context) {
Response inner
- = this.serviceClient().getWithResponse(locationName, targetTypeName, capabilityTypeName, context);
+ = this.serviceClient().getWithResponse(location, targetTypeName, capabilityTypeName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new CapabilityTypeImpl(inner.getValue(), this.manager()));
@@ -51,8 +51,8 @@ public Response getWithResponse(String locationName, String targ
}
}
- public CapabilityType get(String locationName, String targetTypeName, String capabilityTypeName) {
- CapabilityTypeInner inner = this.serviceClient().get(locationName, targetTypeName, capabilityTypeName);
+ public CapabilityType get(String location, String targetTypeName, String capabilityTypeName) {
+ CapabilityTypeInner inner = this.serviceClient().get(location, targetTypeName, capabilityTypeName);
if (inner != null) {
return new CapabilityTypeImpl(inner, this.manager());
} else {
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java
index c892e3f2aaca..4d3d5ef4d500 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java
@@ -20,12 +20,12 @@
@ServiceClientBuilder(serviceClients = { ChaosManagementClientImpl.class })
public final class ChaosManagementClientBuilder {
/*
- * GUID that represents an Azure subscription ID.
+ * The ID of the target subscription. The value must be an UUID.
*/
private String subscriptionId;
/**
- * Sets GUID that represents an Azure subscription ID.
+ * Sets The ID of the target subscription. The value must be an UUID.
*
* @param subscriptionId the subscriptionId value.
* @return the ChaosManagementClientBuilder.
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java
index 27d1a8b81b6f..e2c632df760e 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java
@@ -46,12 +46,12 @@
@ServiceClient(builder = ChaosManagementClientBuilder.class)
public final class ChaosManagementClientImpl implements ChaosManagementClient {
/**
- * GUID that represents an Azure subscription ID.
+ * The ID of the target subscription. The value must be an UUID.
*/
private final String subscriptionId;
/**
- * Gets GUID that represents an Azure subscription ID.
+ * Gets The ID of the target subscription. The value must be an UUID.
*
* @return the subscriptionId value.
*/
@@ -130,31 +130,17 @@ public Duration getDefaultPollInterval() {
}
/**
- * The CapabilitiesClient object to access its operations.
- */
- private final CapabilitiesClient capabilities;
-
- /**
- * Gets the CapabilitiesClient object to access its operations.
- *
- * @return the CapabilitiesClient object.
- */
- public CapabilitiesClient getCapabilities() {
- return this.capabilities;
- }
-
- /**
- * The CapabilityTypesClient object to access its operations.
+ * The OperationsClient object to access its operations.
*/
- private final CapabilityTypesClient capabilityTypes;
+ private final OperationsClient operations;
/**
- * Gets the CapabilityTypesClient object to access its operations.
+ * Gets the OperationsClient object to access its operations.
*
- * @return the CapabilityTypesClient object.
+ * @return the OperationsClient object.
*/
- public CapabilityTypesClient getCapabilityTypes() {
- return this.capabilityTypes;
+ public OperationsClient getOperations() {
+ return this.operations;
}
/**
@@ -186,31 +172,31 @@ public OperationStatusesClient getOperationStatuses() {
}
/**
- * The OperationsClient object to access its operations.
+ * The TargetTypesClient object to access its operations.
*/
- private final OperationsClient operations;
+ private final TargetTypesClient targetTypes;
/**
- * Gets the OperationsClient object to access its operations.
+ * Gets the TargetTypesClient object to access its operations.
*
- * @return the OperationsClient object.
+ * @return the TargetTypesClient object.
*/
- public OperationsClient getOperations() {
- return this.operations;
+ public TargetTypesClient getTargetTypes() {
+ return this.targetTypes;
}
/**
- * The TargetTypesClient object to access its operations.
+ * The CapabilityTypesClient object to access its operations.
*/
- private final TargetTypesClient targetTypes;
+ private final CapabilityTypesClient capabilityTypes;
/**
- * Gets the TargetTypesClient object to access its operations.
+ * Gets the CapabilityTypesClient object to access its operations.
*
- * @return the TargetTypesClient object.
+ * @return the CapabilityTypesClient object.
*/
- public TargetTypesClient getTargetTypes() {
- return this.targetTypes;
+ public CapabilityTypesClient getCapabilityTypes() {
+ return this.capabilityTypes;
}
/**
@@ -227,6 +213,20 @@ public TargetsClient getTargets() {
return this.targets;
}
+ /**
+ * The CapabilitiesClient object to access its operations.
+ */
+ private final CapabilitiesClient capabilities;
+
+ /**
+ * Gets the CapabilitiesClient object to access its operations.
+ *
+ * @return the CapabilitiesClient object.
+ */
+ public CapabilitiesClient getCapabilities() {
+ return this.capabilities;
+ }
+
/**
* Initializes an instance of ChaosManagementClient client.
*
@@ -234,7 +234,7 @@ public TargetsClient getTargets() {
* @param serializerAdapter The serializer to serialize an object into a string.
* @param defaultPollInterval The default poll interval for long-running operation.
* @param environment The Azure environment.
- * @param subscriptionId GUID that represents an Azure subscription ID.
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
* @param endpoint server parameter.
*/
ChaosManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
@@ -244,14 +244,14 @@ public TargetsClient getTargets() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2024-01-01";
- this.capabilities = new CapabilitiesClientImpl(this);
- this.capabilityTypes = new CapabilityTypesClientImpl(this);
+ this.apiVersion = "2025-01-01";
+ this.operations = new OperationsClientImpl(this);
this.experiments = new ExperimentsClientImpl(this);
this.operationStatuses = new OperationStatusesClientImpl(this);
- this.operations = new OperationsClientImpl(this);
this.targetTypes = new TargetTypesClientImpl(this);
+ this.capabilityTypes = new CapabilityTypesClientImpl(this);
this.targets = new TargetsClientImpl(this);
+ this.capabilities = new CapabilitiesClientImpl(this);
}
/**
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
index f8574189f064..c45c88d31ae4 100644
--- 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
@@ -6,8 +6,7 @@
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;
+import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsProperties;
public final class ExperimentExecutionDetailsImpl implements ExperimentExecutionDetails {
private ExperimentExecutionDetailsInner innerObject;
@@ -32,28 +31,8 @@ public String name() {
return this.innerModel().name();
}
- public String failureReason() {
- return this.innerModel().failureReason();
- }
-
- public OffsetDateTime lastActionAt() {
- return this.innerModel().lastActionAt();
- }
-
- public ExperimentExecutionDetailsPropertiesRunInformation runInformation() {
- return this.innerModel().runInformation();
- }
-
- public String status() {
- return this.innerModel().status();
- }
-
- public OffsetDateTime startedAt() {
- return this.innerModel().startedAt();
- }
-
- public OffsetDateTime stoppedAt() {
- return this.innerModel().stoppedAt();
+ public ExperimentExecutionDetailsProperties properties() {
+ return this.innerModel().properties();
}
public ExperimentExecutionDetailsInner innerModel() {
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionImpl.java
index 5e188019d810..11689da61e1e 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionImpl.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionImpl.java
@@ -4,6 +4,7 @@
package com.azure.resourcemanager.chaos.implementation;
+import com.azure.core.management.SystemData;
import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionInner;
import com.azure.resourcemanager.chaos.models.ExperimentExecution;
import java.time.OffsetDateTime;
@@ -19,10 +20,6 @@ public final class ExperimentExecutionImpl implements ExperimentExecution {
this.serviceManager = serviceManager;
}
- public String type() {
- return this.innerModel().type();
- }
-
public String id() {
return this.innerModel().id();
}
@@ -31,6 +28,14 @@ public String name() {
return this.innerModel().name();
}
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public String status() {
return this.innerModel().status();
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java
index 105b47e7f110..6cfacf131262 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java
@@ -12,8 +12,8 @@
import com.azure.resourcemanager.chaos.models.ChaosTargetSelector;
import com.azure.resourcemanager.chaos.models.Experiment;
import com.azure.resourcemanager.chaos.models.ExperimentUpdate;
+import com.azure.resourcemanager.chaos.models.ManagedServiceIdentity;
import com.azure.resourcemanager.chaos.models.ProvisioningState;
-import com.azure.resourcemanager.chaos.models.ResourceIdentity;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -48,12 +48,12 @@ public Map tags() {
}
}
- public SystemData systemData() {
- return this.innerModel().systemData();
+ public ManagedServiceIdentity identity() {
+ return this.innerModel().identity();
}
- public ResourceIdentity identity() {
- return this.innerModel().identity();
+ public SystemData systemData() {
+ return this.innerModel().systemData();
}
public ProvisioningState provisioningState() {
@@ -102,7 +102,7 @@ private com.azure.resourcemanager.chaos.ChaosManager manager() {
private String experimentName;
- private ExperimentUpdate updateExperiment;
+ private ExperimentUpdate updateProperties;
public ExperimentImpl withExistingResourceGroup(String resourceGroupName) {
this.resourceGroupName = resourceGroupName;
@@ -130,21 +130,21 @@ public Experiment create(Context context) {
}
public ExperimentImpl update() {
- this.updateExperiment = new ExperimentUpdate();
+ this.updateProperties = new ExperimentUpdate();
return this;
}
public Experiment apply() {
this.innerObject = serviceManager.serviceClient()
.getExperiments()
- .update(resourceGroupName, experimentName, updateExperiment, Context.NONE);
+ .update(resourceGroupName, experimentName, updateProperties, Context.NONE);
return this;
}
public Experiment apply(Context context) {
this.innerObject = serviceManager.serviceClient()
.getExperiments()
- .update(resourceGroupName, experimentName, updateExperiment, context);
+ .update(resourceGroupName, experimentName, updateProperties, context);
return this;
}
@@ -212,17 +212,17 @@ public ExperimentImpl withTags(Map tags) {
this.innerModel().withTags(tags);
return this;
} else {
- this.updateExperiment.withTags(tags);
+ this.updateProperties.withTags(tags);
return this;
}
}
- public ExperimentImpl withIdentity(ResourceIdentity identity) {
+ public ExperimentImpl withIdentity(ManagedServiceIdentity identity) {
if (isInCreateMode()) {
this.innerModel().withIdentity(identity);
return this;
} else {
- this.updateExperiment.withIdentity(identity);
+ this.updateProperties.withIdentity(identity);
return this;
}
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java
index b76583e4324e..705706263db4 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java
@@ -95,15 +95,6 @@ Mono> listByResourceGroup(@HostParam("$host") Str
@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({ 202 })
- @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 })
@@ -120,35 +111,34 @@ Mono> getByResourceGroup(@HostParam("$host") String en
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);
+ @PathParam("experimentName") String experimentName, @BodyParam("application/json") ExperimentInner resource,
+ @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}")
- @ExpectedResponses({ 202 })
+ @ExpectedResponses({ 200, 202 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> update(@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("experimentName") String experimentName,
- @BodyParam("application/json") ExperimentUpdate experiment, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") ExperimentUpdate properties, @HeaderParam("Accept") String accept,
Context context);
@Headers({ "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/cancel")
- @ExpectedResponses({ 202 })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}")
+ @ExpectedResponses({ 202, 204 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> cancel(@HostParam("$host") String endpoint,
+ 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" })
- @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/start")
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/cancel")
@ExpectedResponses({ 202 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> start(@HostParam("$host") String endpoint,
+ 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);
@@ -182,6 +172,15 @@ Mono> executionDetails(@HostParam("$ho
@PathParam("experimentName") String experimentName, @PathParam("executionId") String executionId,
@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("{nextLink}")
@ExpectedResponses({ 200 })
@@ -353,7 +352,7 @@ public PagedIterable list(Boolean running, String continuationT
/**
* Get a list of Experiment resources in a resource group.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -390,7 +389,7 @@ private Mono> listByResourceGroupSinglePageAsync(
/**
* Get a list of Experiment resources in a resource group.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -428,7 +427,7 @@ private Mono> listByResourceGroupSinglePageAsync(
/**
* Get a list of Experiment resources in a resource group.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -447,7 +446,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroup
/**
* Get a list of Experiment resources in a resource group.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -464,7 +463,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroup
/**
* Get a list of Experiment resources in a resource group.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -485,7 +484,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroup
/**
* Get a list of Experiment resources in a resource group.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -501,7 +500,7 @@ public PagedIterable listByResourceGroup(String resourceGroupNa
/**
* Get a list of Experiment resources in a resource group.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -517,210 +516,10 @@ public PagedIterable listByResourceGroup(String resourceGroupNa
return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, running, continuationToken, context));
}
- /**
- * Delete a Experiment resource.
- *
- * @param resourceGroupName String that represents an Azure resource group.
- * @param experimentName String that represents a Experiment resource name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(String resourceGroupName, String experimentName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (experimentName == null) {
- return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, experimentName, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Delete a Experiment resource.
- *
- * @param resourceGroupName String that represents an Azure resource group.
- * @param experimentName String that represents a Experiment resource name.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(String resourceGroupName, String experimentName,
- Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (experimentName == null) {
- return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, experimentName, accept, context);
- }
-
- /**
- * Delete a Experiment resource.
- *
- * @param resourceGroupName String that represents an Azure resource group.
- * @param experimentName String that represents a Experiment resource name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String experimentName) {
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, experimentName);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- this.client.getContext());
- }
-
- /**
- * Delete a Experiment resource.
- *
- * @param resourceGroupName String that represents an Azure resource group.
- * @param experimentName String that represents a Experiment resource name.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String experimentName,
- Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, experimentName, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- context);
- }
-
- /**
- * Delete a Experiment resource.
- *
- * @param resourceGroupName String that represents an Azure resource group.
- * @param experimentName String that represents a Experiment resource name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, Void> beginDelete(String resourceGroupName, String experimentName) {
- return this.beginDeleteAsync(resourceGroupName, experimentName).getSyncPoller();
- }
-
- /**
- * Delete a Experiment resource.
- *
- * @param resourceGroupName String that represents an Azure resource group.
- * @param experimentName String that represents a Experiment resource name.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, Void> beginDelete(String resourceGroupName, String experimentName,
- Context context) {
- return this.beginDeleteAsync(resourceGroupName, experimentName, context).getSyncPoller();
- }
-
- /**
- * Delete a Experiment resource.
- *
- * @param resourceGroupName String that represents an Azure resource group.
- * @param experimentName String that represents a Experiment resource name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return A {@link Mono} that completes when a successful response is received.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String experimentName) {
- return beginDeleteAsync(resourceGroupName, experimentName).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * 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 A {@link Mono} that completes when a successful response is received.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String experimentName, Context context) {
- return beginDeleteAsync(resourceGroupName, experimentName, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String experimentName, Context context) {
- deleteAsync(resourceGroupName, experimentName, context).block();
- }
-
/**
* Get a Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -755,7 +554,7 @@ private Mono> getByResourceGroupWithResponseAsync(Stri
/**
* Get a Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -790,7 +589,7 @@ private Mono> getByResourceGroupWithResponseAsync(Stri
/**
* Get a Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -806,7 +605,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName,
/**
* Get a Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -823,7 +622,7 @@ public Response getByResourceGroupWithResponse(String resourceG
/**
* Get a Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -838,9 +637,9 @@ public ExperimentInner getByResourceGroup(String resourceGroupName, String exper
/**
* Create or update a Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param experimentName String that represents a Experiment resource name.
- * @param experiment Experiment resource to be created or updated.
+ * @param resource 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.
@@ -849,7 +648,7 @@ public ExperimentInner getByResourceGroup(String resourceGroupName, String exper
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
- String experimentName, ExperimentInner experiment) {
+ String experimentName, ExperimentInner resource) {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
@@ -865,24 +664,24 @@ private Mono>> createOrUpdateWithResponseAsync(String
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."));
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
} else {
- experiment.validate();
+ resource.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))
+ this.client.getSubscriptionId(), resourceGroupName, experimentName, resource, 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 resourceGroupName The name of the resource group. The name is case insensitive.
* @param experimentName String that represents a Experiment resource name.
- * @param experiment Experiment resource to be created or updated.
+ * @param resource 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.
@@ -892,7 +691,7 @@ private Mono>> createOrUpdateWithResponseAsync(String
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
- String experimentName, ExperimentInner experiment, Context context) {
+ String experimentName, ExperimentInner resource, Context context) {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
@@ -908,23 +707,23 @@ private Mono>> createOrUpdateWithResponseAsync(String
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."));
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
} else {
- experiment.validate();
+ resource.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);
+ this.client.getSubscriptionId(), resourceGroupName, experimentName, resource, accept, context);
}
/**
* Create or update a Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param experimentName String that represents a Experiment resource name.
- * @param experiment Experiment resource to be created or updated.
+ * @param resource 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.
@@ -932,9 +731,9 @@ private Mono>> createOrUpdateWithResponseAsync(String
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, ExperimentInner> beginCreateOrUpdateAsync(String resourceGroupName,
- String experimentName, ExperimentInner experiment) {
+ String experimentName, ExperimentInner resource) {
Mono>> mono
- = createOrUpdateWithResponseAsync(resourceGroupName, experimentName, experiment);
+ = createOrUpdateWithResponseAsync(resourceGroupName, experimentName, resource);
return this.client.getLroResult(mono, this.client.getHttpPipeline(),
ExperimentInner.class, ExperimentInner.class, this.client.getContext());
}
@@ -942,9 +741,9 @@ private PollerFlux, ExperimentInner> beginCreateOrUp
/**
* Create or update a Experiment resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param experimentName String that represents a Experiment resource name.
- * @param experiment Experiment resource to be created or updated.
+ * @param resource 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.
@@ -953,10 +752,10 @@ private PollerFlux, ExperimentInner> beginCreateOrUp
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, ExperimentInner> beginCreateOrUpdateAsync(String resourceGroupName,
- String experimentName, ExperimentInner experiment, Context context) {
+ String experimentName, ExperimentInner resource, Context context) {
context = this.client.mergeContext(context);
Mono>> mono
- = createOrUpdateWithResponseAsync(resourceGroupName, experimentName, experiment, context);
+ = createOrUpdateWithResponseAsync(resourceGroupName, experimentName, resource, context);
return this.client.