diff --git a/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md b/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md
index ce03fbe3ff670..7d8dc0d373ceb 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md
+++ b/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md
@@ -1,14 +1,400 @@
# Release History
-## 1.2.0-beta.1 (Unreleased)
+## 1.0.0-beta.1 (2024-11-16)
-### 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.OperationStatuses` was removed
+
+#### `models.Experiment$DefinitionStages` was modified
+
+* `withSteps(java.util.List)` was removed in stage 3
+
+#### `models.TargetType` was modified
+
+* `description()` was removed
+* `location()` was removed
+* `displayName()` was removed
+* `resourceTypes()` was removed
+* `propertiesSchema()` was removed
+
+#### `models.ExperimentExecutionDetails` was modified
+
+* `lastActionAt()` was removed
+* `status()` was removed
+* `failureReason()` was removed
+* `startedAt()` was removed
+* `stoppedAt()` was removed
+* `runInformation()` was removed
+
+#### `models.Experiments` was modified
+
+* `getExecution(java.lang.String,java.lang.String,java.lang.String)` was removed
+* `void cancel(java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `models.PostActionResponse cancel(java.lang.String,java.lang.String,com.azure.core.util.Context)`
+* `executionDetails(java.lang.String,java.lang.String,java.lang.String)` was removed
+* `void start(java.lang.String,java.lang.String)` -> `models.PostActionResponse start(java.lang.String,java.lang.String)`
+* `listAllExecutions(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed
+* `listAllExecutions(java.lang.String,java.lang.String)` was removed
+* `void cancel(java.lang.String,java.lang.String)` -> `models.PostActionResponse cancel(java.lang.String,java.lang.String)`
+* `getExecutionWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed
+* `executionDetailsWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed
+* `void start(java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `models.PostActionResponse start(java.lang.String,java.lang.String,com.azure.core.util.Context)`
+
+#### `models.CapabilityType` was modified
+
+* `runtimeProperties()` was removed
+* `kind()` was removed
+* `location()` was removed
+* `targetType()` was removed
+* `publisher()` was removed
+* `description()` was removed
+* `urn()` was removed
+* `azureRbacActions()` was removed
+* `azureRbacDataActions()` was removed
+* `displayName()` was removed
+* `parametersSchema()` was removed
+
+#### `models.ExperimentExecution` was modified
+
+* `status()` was removed
+* `startedAt()` was removed
+* `stoppedAt()` was removed
+
+#### `models.Capabilities` was modified
+
+* `get(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was removed
+* `list(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed
+* `getWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed
+* `createOrUpdate(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,fluent.models.CapabilityInner)` was removed
+* `deleteWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed
+* `list(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was removed
+* `delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was removed
+* `createOrUpdateWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,fluent.models.CapabilityInner,com.azure.core.util.Context)` was removed
+
+#### `models.Operations` was modified
+
+* `listAll()` was removed
+* `listAll(com.azure.core.util.Context)` was removed
+
+#### `models.Experiment$Definition` was modified
+
+* `withSteps(java.util.List)` was removed
+* `withSelectors(java.util.List)` was removed
+* `withIdentity(models.ResourceIdentity)` was removed
+
+#### `models.Experiment` was modified
+
+* `models.ResourceIdentity identity()` -> `models.ManagedServiceIdentity identity()`
+* `void start()` -> `models.PostActionResponse start()`
+* `void start(com.azure.core.util.Context)` -> `models.PostActionResponse start(com.azure.core.util.Context)`
+* `void cancel(com.azure.core.util.Context)` -> `models.PostActionResponse cancel(com.azure.core.util.Context)`
+* `void cancel()` -> `models.PostActionResponse cancel()`
+* `provisioningState()` was removed
+* `steps()` was removed
+* `selectors()` was removed
+
+#### `models.Capability` was modified
+
+* `publisher()` was removed
+* `description()` was removed
+* `targetType()` was removed
+* `parametersSchema()` was removed
+* `urn()` was removed
+
+#### `ChaosManager` was modified
+
+* `operationStatuses()` was removed
+
+#### `models.ExperimentUpdate` was modified
+
+* `models.ResourceIdentity identity()` -> `models.ManagedServiceIdentityUpdate identity()`
+* `withIdentity(models.ResourceIdentity)` was removed
+
+#### `models.Experiment$Update` was modified
+
+* `withIdentity(models.ResourceIdentity)` was removed
+
+### Features Added
+
+* `models.ManagedServiceIdentityUpdate` was added
+
+* `models.UserAssignedIdentities` was added
+
+* `models.ExperimentActionType` was added
+
+* `models.ExperimentExecutions` was added
+
+* `models.ExperimentExecutionDetailsProperties` was added
+
+* `models.Capability$UpdateStages` was added
+
+* `models.ManagedServiceIdentityType` was added
+
+* `models.Capability$Definition` was added
+
+* `models.Capability$DefinitionStages` was added
+
+* `models.TargetTypeProperties` was added
+
+* `models.PostActionResponse` was added
+
+* `models.ExperimentExecutionProperties` was added
+
+* `models.Capability$Update` was added
+
+* `models.ExperimentProperties` was added
+
+* `models.ManagedServiceIdentity` was added
+
+* `models.CapabilityTypeProperties` was added
+
+* `models.CapabilityProperties` was added
+
+#### `models.TargetListResult` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `withNextLink(java.lang.String)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `withValue(java.util.List)` was added
+
+#### `models.ChaosTargetListSelector` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `type()` was added
+
+#### `models.OperationDisplay` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.TargetType` was modified
+
+* `properties()` was added
+
+#### `models.ChaosTargetSimpleFilterParameters` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.UserAssignedIdentity` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ExperimentExecutionDetails` was modified
+
+* `properties()` was added
+
+#### `models.DelayAction` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `type()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.OperationListResult` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.CapabilityTypeListResult` was modified
+
+* `withNextLink(java.lang.String)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `withValue(java.util.List)` was added
+
+#### `models.ChaosTargetQuerySelector` was modified
+
+* `type()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ExperimentExecutionDetailsPropertiesRunInformation` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.StepStatus` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ContinuousAction` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `type()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.CapabilityTypePropertiesRuntimeProperties` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ExperimentExecutionActionTargetDetailsError` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ExperimentListResult` was modified
+
+* `withNextLink(java.lang.String)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `withValue(java.util.List)` was added
+
+#### `models.CapabilityType` was modified
+
+* `properties()` was added
+
+#### `models.ExperimentExecutionListResult` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `withValue(java.util.List)` was added
+* `withNextLink(java.lang.String)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ExperimentExecution` was modified
+
+* `systemData()` was added
+* `properties()` was added
+
+#### `models.ChaosExperimentBranch` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.KeyValuePair` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ChaosTargetFilter` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `type()` was added
+
+#### `models.ChaosTargetSimpleFilter` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `type()` was added
+
+#### `models.Capabilities` was modified
+
+* `deleteWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
+* `getWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
+* `delete(java.lang.String,java.lang.String,java.lang.String)` was added
+* `get(java.lang.String,java.lang.String,java.lang.String)` was added
+* `deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was added
+* `define(java.lang.String)` was added
+* `getByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was added
+* `getById(java.lang.String)` was added
+* `deleteById(java.lang.String)` was added
+* `list(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
+* `list(java.lang.String,java.lang.String)` was added
+
+#### `models.Operations` was modified
+
+* `list()` was added
+* `list(com.azure.core.util.Context)` was added
+
+#### `models.Experiment$Definition` was modified
+
+* `withIdentity(models.ManagedServiceIdentity)` was added
+* `withProperties(models.ExperimentProperties)` was added
+
+#### `models.ChaosExperimentStep` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ChaosExperimentAction` was modified
+
+* `type()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.BranchStatus` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.TargetTypeListResult` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `withValue(java.util.List)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `withNextLink(java.lang.String)` was added
+
+#### `models.Experiment` was modified
+
+* `properties()` was added
+
+#### `models.DiscreteAction` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `type()` was added
+
+#### `models.Capability` was modified
+
+* `update()` was added
+* `resourceGroupName()` was added
+* `refresh(com.azure.core.util.Context)` was added
+* `properties()` was added
+* `refresh()` was added
+
+#### `models.ActionStatus` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ChaosTargetSelector` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `type()` was added
+
+#### `ChaosManager` was modified
+
+* `experimentExecutions()` was added
+
+#### `models.CapabilityListResult` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `withValue(java.util.List)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `withNextLink(java.lang.String)` was added
+
+#### `models.ExperimentExecutionActionTargetDetailsProperties` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ExperimentUpdate` was modified
+
+* `withIdentity(models.ManagedServiceIdentityUpdate)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.TargetReference` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.Experiment$Update` was modified
-### Other Changes
+* `withIdentity(models.ManagedServiceIdentityUpdate)` was added
## 1.1.0 (2024-03-15)
diff --git a/sdk/chaos/azure-resourcemanager-chaos/README.md b/sdk/chaos/azure-resourcemanager-chaos/README.md
index 4aaf374a2027c..9e1f009448386 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.1.0
+ 1.2.0-beta.1
```
[//]: # ({x-version-update-end})
@@ -45,15 +45,11 @@ Azure Management Libraries require a `TokenCredential` implementation for authen
### Authentication
-By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.
+Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.
-- `AZURE_CLIENT_ID` for Azure client ID.
-- `AZURE_TENANT_ID` for Azure tenant ID.
-- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
+Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-
-With above configuration, `azure` client can be authenticated using the following code:
+Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -74,6 +70,19 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+```java
+keyVaultManager.vaults()
+ .define(kvName)
+ .withRegion(REGION)
+ .withExistingResourceGroup(resourceGroupName)
+ .withRoleBasedAccessControl()
+ .withSku(SkuName.STANDARD)
+ .create();
+
+target = chaosManager.targets()
+ .createOrUpdate(resourceGroupName, "microsoft.keyvault", "vaults", kvName, "microsoft-keyvault",
+ new TargetInner().withLocation(REGION.name()).withProperties(Collections.emptyMap()));
+```
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md)
@@ -97,6 +106,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
+[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md b/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md
index fa5e6756ef177..6e399a1f0a1fd 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md
+++ b/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md
@@ -13,24 +13,23 @@
- [Get](#capabilitytypes_get)
- [List](#capabilitytypes_list)
+## ExperimentExecutions
+
+- [Get](#experimentexecutions_get)
+- [GetExecutionDetails](#experimentexecutions_getexecutiondetails)
+- [List](#experimentexecutions_list)
+
## Experiments
- [Cancel](#experiments_cancel)
- [CreateOrUpdate](#experiments_createorupdate)
- [Delete](#experiments_delete)
-- [ExecutionDetails](#experiments_executiondetails)
- [GetByResourceGroup](#experiments_getbyresourcegroup)
-- [GetExecution](#experiments_getexecution)
- [List](#experiments_list)
-- [ListAllExecutions](#experiments_listallexecutions)
- [ListByResourceGroup](#experiments_listbyresourcegroup)
- [Start](#experiments_start)
- [Update](#experiments_update)
-## OperationStatuses
-
-- [Get](#operationstatuses_get)
-
## TargetTypes
- [Get](#targettypes_get)
@@ -45,7 +44,7 @@
### Capabilities_CreateOrUpdate
```java
-import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner;
+import com.azure.resourcemanager.chaos.models.CapabilityProperties;
/**
* Samples for Capabilities CreateOrUpdate.
@@ -53,7 +52,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.
@@ -62,9 +61,11 @@ public final class CapabilitiesCreateOrUpdateSamples {
*/
public static void createUpdateACapabilityThatExtendsAVirtualMachineTargetResource(
com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.capabilities().createOrUpdateWithResponse("exampleRG", "Microsoft.Compute", "virtualMachines",
- "exampleVM", "Microsoft-VirtualMachine", "Shutdown-1.0", new CapabilityInner(),
- com.azure.core.util.Context.NONE);
+ manager.capabilities()
+ .define("Shutdown-1.0")
+ .withExistingTarget("exampleRG", "Microsoft-VirtualMachine")
+ .withProperties(new CapabilityProperties())
+ .create();
}
}
```
@@ -78,7 +79,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.
@@ -87,8 +88,9 @@ public final class CapabilitiesDeleteSamples {
*/
public static void deleteACapabilityThatExtendsAVirtualMachineTargetResource(
com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.capabilities().deleteWithResponse("exampleRG", "Microsoft.Compute", "virtualMachines", "exampleVM",
- "Microsoft-VirtualMachine", "Shutdown-1.0", com.azure.core.util.Context.NONE);
+ manager.capabilities()
+ .deleteWithResponse("exampleRG", "Microsoft-VirtualMachine", "Shutdown-1.0",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -102,7 +104,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.
@@ -111,8 +113,8 @@ public final class CapabilitiesGetSamples {
*/
public static void
getACapabilityThatExtendsAVirtualMachineTargetResource(com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.capabilities().getWithResponse("exampleRG", "Microsoft.Compute", "virtualMachines", "exampleVM",
- "Microsoft-VirtualMachine", "Shutdown-1.0", com.azure.core.util.Context.NONE);
+ manager.capabilities()
+ .getWithResponse("exampleRG", "Microsoft-VirtualMachine", "Shutdown-1.0", com.azure.core.util.Context.NONE);
}
}
```
@@ -126,7 +128,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.
@@ -135,8 +137,7 @@ public final class CapabilitiesListSamples {
*/
public static void listAllCapabilitiesThatExtendAVirtualMachineTargetResource(
com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.capabilities().list("exampleRG", "Microsoft.Compute", "virtualMachines", "exampleVM",
- "Microsoft-VirtualMachine", null, com.azure.core.util.Context.NONE);
+ manager.capabilities().list("exampleRG", "Microsoft-VirtualMachine", null, com.azure.core.util.Context.NONE);
}
}
```
@@ -150,7 +151,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.
@@ -159,8 +160,8 @@ public final class CapabilityTypesGetSamples {
*/
public static void getACapabilityTypeForAVirtualMachineTargetResourceOnWestus2Location(
com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.capabilityTypes().getWithResponse("westus2", "Microsoft-VirtualMachine", "Shutdown-1.0",
- com.azure.core.util.Context.NONE);
+ manager.capabilityTypes()
+ .getWithResponse("westus2", "Microsoft-VirtualMachine", "Shutdown-1.0", com.azure.core.util.Context.NONE);
}
}
```
@@ -174,7 +175,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.
@@ -188,208 +189,232 @@ public final class CapabilityTypesListSamples {
}
```
-### Experiments_Cancel
+### ExperimentExecutions_Get
```java
/**
- * Samples for Experiments Cancel.
+ * Samples for ExperimentExecutions Get.
*/
-public final class ExperimentsCancelSamples {
+public final class ExperimentExecutionsGetSamples {
/*
* 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/ExperimentExecutions_Get.json
*/
/**
- * Sample code: Cancel a running Experiment.
+ * Sample code: Get the execution of a Experiment.
*
* @param manager Entry point to ChaosManager.
*/
- public static void cancelARunningExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.experiments().cancel("exampleRG", "exampleExperiment", com.azure.core.util.Context.NONE);
+ public static void getTheExecutionOfAExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.experimentExecutions()
+ .getWithResponse("exampleRG", "exampleExperiment", "f24500ad-744e-4a26-864b-b76199eac333",
+ com.azure.core.util.Context.NONE);
}
}
```
-### Experiments_CreateOrUpdate
+### ExperimentExecutions_GetExecutionDetails
```java
-import com.azure.resourcemanager.chaos.models.ChaosExperimentBranch;
-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.TargetReference;
-import com.azure.resourcemanager.chaos.models.TargetReferenceType;
-import java.time.Duration;
-import java.util.Arrays;
-
/**
- * Samples for Experiments CreateOrUpdate.
+ * Samples for ExperimentExecutions GetExecutionDetails.
*/
-public final class ExperimentsCreateOrUpdateSamples {
+public final class ExperimentExecutionsGetExecutionDetailsSamples {
/*
- * x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateExperiment.json
+ * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/
+ * ExperimentExecutions_GetExecutionDetails.json
*/
/**
- * Sample code: Create/update a Experiment in a resource group.
+ * Sample code: Get experiment execution details.
*
* @param manager Entry point to ChaosManager.
*/
- public static void createUpdateAExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.experiments().define("exampleExperiment").withRegion("eastus2euap")
- .withExistingResourceGroup("exampleRG")
- .withSteps(
- Arrays.asList(new ChaosExperimentStep().withName("step1")
- .withBranches(Arrays.asList(new ChaosExperimentBranch().withName("branch1")
- .withActions(Arrays.asList(new ContinuousAction()
- .withName("urn:csci:microsoft:virtualMachine:shutdown/1.0")
- .withDuration(Duration.parse("PT10M"))
- .withParameters(
- Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder").withValue("false")))
- .withSelectorId("selector1")))))))
- .withSelectors(Arrays.asList(new ChaosTargetListSelector().withId("selector1")
- .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)).create();
+ public static void getExperimentExecutionDetails(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.experimentExecutions()
+ .getExecutionDetailsWithResponse("exampleRG", "exampleExperiment", "f24500ad-744e-4a26-864b-b76199eac333",
+ com.azure.core.util.Context.NONE);
}
}
```
-### Experiments_Delete
+### ExperimentExecutions_List
```java
/**
- * Samples for Experiments Delete.
+ * Samples for ExperimentExecutions List.
*/
-public final class ExperimentsDeleteSamples {
+public final class ExperimentExecutionsListSamples {
/*
* 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/ExperimentExecutions_List.json
*/
/**
- * Sample code: Delete a Experiment in a resource group.
+ * Sample code: List all executions of an Experiment.
*
* @param manager Entry point to ChaosManager.
*/
- public static void deleteAExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.experiments().delete("exampleRG", "exampleExperiment", com.azure.core.util.Context.NONE);
+ public static void listAllExecutionsOfAnExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.experimentExecutions().list("exampleRG", "exampleExperiment", com.azure.core.util.Context.NONE);
}
}
```
-### Experiments_ExecutionDetails
+### Experiments_Cancel
```java
/**
- * Samples for Experiments ExecutionDetails.
+ * Samples for Experiments Cancel.
*/
-public final class ExperimentsExecutionDetailsSamples {
+public final class ExperimentsCancelSamples {
/*
* 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_Cancel.json
*/
/**
- * Sample code: Get experiment execution details.
+ * Sample code: Cancel a running Experiment.
*
* @param manager Entry point to ChaosManager.
*/
- public static void getExperimentExecutionDetails(com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.experiments().executionDetailsWithResponse("exampleRG", "exampleExperiment",
- "f24500ad-744e-4a26-864b-b76199eac333", com.azure.core.util.Context.NONE);
+ public static void cancelARunningExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.experiments().cancel("exampleRG", "exampleExperiment", com.azure.core.util.Context.NONE);
}
}
```
-### Experiments_GetByResourceGroup
+### Experiments_CreateOrUpdate
```java
+import com.azure.resourcemanager.chaos.models.ChaosExperimentBranch;
+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.ExperimentProperties;
+import com.azure.resourcemanager.chaos.models.KeyValuePair;
+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 GetByResourceGroup.
+ * Samples for Experiments CreateOrUpdate.
*/
-public final class ExperimentsGetByResourceGroupSamples {
+public final class ExperimentsCreateOrUpdateSamples {
/*
* 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_CreateOrUpdate.json
*/
/**
- * Sample code: Get a Experiment in a resource group.
+ * Sample code: Create/update a Experiment in a resource group.
*
* @param manager Entry point to ChaosManager.
*/
- public static void getAExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.experiments().getByResourceGroupWithResponse("exampleRG", "exampleExperiment",
- com.azure.core.util.Context.NONE);
+ public static void createUpdateAExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.experiments()
+ .define("exampleExperiment")
+ .withRegion("eastus2euap")
+ .withExistingResourceGroup("exampleRG")
+ .withProperties(
+ new ExperimentProperties()
+ .withSteps(Arrays.asList(new ChaosExperimentStep().withName("step1")
+ .withBranches(Arrays.asList(new ChaosExperimentBranch().withName("branch1")
+ .withActions(Arrays.asList(
+ new ContinuousAction().withName("urn:csci:microsoft:virtualMachine:shutdown/1.0")
+ .withDuration(Duration.parse("PT10M"))
+ .withParameters(Arrays.asList(new KeyValuePair()
+ .withKey("fakeTokenPlaceholder")
+ .withValue("false")))
+ .withSelectorId("selector1")))))))
+ .withSelectors(Arrays.asList(new ChaosTargetListSelector().withId("selector1")
+ .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"))))))
+ .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;
}
}
```
-### Experiments_GetExecution
+### Experiments_Delete
```java
/**
- * Samples for Experiments GetExecution.
+ * Samples for Experiments Delete.
*/
-public final class ExperimentsGetExecutionSamples {
+public final class ExperimentsDeleteSamples {
/*
* 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_Delete.json
*/
/**
- * Sample code: Get the execution of a Experiment.
+ * Sample code: Delete a Experiment in a resource group.
*
* @param manager Entry point to ChaosManager.
*/
- public static void getTheExecutionOfAExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.experiments().getExecutionWithResponse("exampleRG", "exampleExperiment",
- "f24500ad-744e-4a26-864b-b76199eac333", com.azure.core.util.Context.NONE);
+ public static void deleteAExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.experiments().delete("exampleRG", "exampleExperiment", com.azure.core.util.Context.NONE);
}
}
```
-### Experiments_List
+### Experiments_GetByResourceGroup
```java
/**
- * Samples for Experiments List.
+ * Samples for Experiments GetByResourceGroup.
*/
-public final class ExperimentsListSamples {
+public final class ExperimentsGetByResourceGroupSamples {
/*
* 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_Get.json
*/
/**
- * Sample code: List all Experiments in a subscription.
+ * Sample code: Get a Experiment in a resource group.
*
* @param manager Entry point to ChaosManager.
*/
- public static void listAllExperimentsInASubscription(com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.experiments().list(null, null, com.azure.core.util.Context.NONE);
+ public static void getAExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.experiments()
+ .getByResourceGroupWithResponse("exampleRG", "exampleExperiment", com.azure.core.util.Context.NONE);
}
}
```
-### Experiments_ListAllExecutions
+### Experiments_List
```java
/**
- * Samples for Experiments ListAllExecutions.
+ * Samples for Experiments List.
*/
-public final class ExperimentsListAllExecutionsSamples {
+public final class ExperimentsListSamples {
/*
* 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_ListBySubscription.
+ * json
*/
/**
- * Sample code: List all executions of an Experiment.
+ * Sample code: List all Experiments in a subscription.
*
* @param manager Entry point to ChaosManager.
*/
- public static void listAllExecutionsOfAnExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.experiments().listAllExecutions("exampleRG", "exampleExperiment", com.azure.core.util.Context.NONE);
+ public static void listAllExperimentsInASubscription(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.experiments().list(null, null, com.azure.core.util.Context.NONE);
}
}
```
@@ -403,7 +428,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.
+ * specification/chaos/resource-manager/Microsoft.Chaos/stable/2025-01-01/examples/Experiments_ListByResourceGroup.
* json
*/
/**
@@ -426,7 +451,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.
@@ -443,11 +468,6 @@ 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.UserAssignedIdentity;
-import java.util.HashMap;
-import java.util.Map;
/**
* Samples for Experiments Update.
@@ -455,57 +475,18 @@ 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.
+ * Sample code: Update an Experiment.
*
* @param manager Entry point to ChaosManager.
*/
- public static void updateAnExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ public static void updateAnExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) {
Experiment resource = manager.experiments()
.getByResourceGroupWithResponse("exampleRG", "exampleExperiment", com.azure.core.util.Context.NONE)
.getValue();
- resource.update().withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")).withIdentity(
- new ResourceIdentity().withType(ResourceIdentityType.USER_ASSIGNED).withUserAssignedIdentities(mapOf(
- "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentity/exampleUMI",
- new UserAssignedIdentity())))
- .apply();
- }
-
- // 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;
- }
-}
-```
-
-### OperationStatuses_Get
-
-```java
-/**
- * Samples for OperationStatuses Get.
- */
-public final class OperationStatusesGetSamples {
- /*
- * x-ms-original-file:
- * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetOperationStatus.json
- */
- /**
- * Sample code: Get specific operation status.
- *
- * @param manager Entry point to ChaosManager.
- */
- public static void getSpecificOperationStatus(com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.operationStatuses().getWithResponse("West US", "713192d7-503f-477a-9cfe-4efc3ee2bd11",
- com.azure.core.util.Context.NONE);
+ resource.update().apply();
}
}
```
@@ -519,7 +500,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.
@@ -541,7 +522,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.
@@ -557,12 +538,6 @@ 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;
/**
* Samples for Targets CreateOrUpdate.
@@ -570,34 +545,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 {
- 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))),
- com.azure.core.util.Context.NONE);
- }
-
- // 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;
+ public static void
+ createUpdateATargetThatExtendsAVirtualMachineResource(com.azure.resourcemanager.chaos.ChaosManager manager) {
+ manager.targets()
+ .createOrUpdateWithResponse("exampleRG", "Microsoft-Agent", "Microsoft.Compute", "virtualMachines",
+ "exampleVM", null, com.azure.core.util.Context.NONE);
}
}
```
@@ -611,7 +570,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.
@@ -620,8 +579,9 @@ public final class TargetsDeleteSamples {
*/
public static void
deleteATargetThatExtendsAVirtualMachineResource(com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.targets().deleteWithResponse("exampleRG", "Microsoft.Compute", "virtualMachines", "exampleVM",
- "Microsoft-Agent", com.azure.core.util.Context.NONE);
+ manager.targets()
+ .deleteWithResponse("exampleRG", "Microsoft-Agent", "Microsoft.Compute", "virtualMachines", "exampleVM",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -635,7 +595,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.
@@ -644,8 +604,9 @@ public final class TargetsGetSamples {
*/
public static void
getATargetThatExtendsAVirtualMachineResource(com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.targets().getWithResponse("exampleRG", "Microsoft.Compute", "virtualMachines", "exampleVM",
- "Microsoft-Agent", com.azure.core.util.Context.NONE);
+ manager.targets()
+ .getWithResponse("exampleRG", "Microsoft-Agent", "Microsoft.Compute", "virtualMachines", "exampleVM",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -659,7 +620,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.
@@ -668,8 +629,9 @@ public final class TargetsListSamples {
*/
public static void
listAllTargetsThatExtendAVirtualMachineResource(com.azure.resourcemanager.chaos.ChaosManager manager) {
- manager.targets().list("exampleRG", "Microsoft.Compute", "virtualMachines", "exampleVM", null,
- com.azure.core.util.Context.NONE);
+ manager.targets()
+ .list("exampleRG", "Microsoft.Compute", "virtualMachines", "exampleVM", null,
+ com.azure.core.util.Context.NONE);
}
}
```
diff --git a/sdk/chaos/azure-resourcemanager-chaos/pom.xml b/sdk/chaos/azure-resourcemanager-chaos/pom.xml
index f022ae455d2e5..0860718842b8a 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,6 +45,8 @@
UTF-8
0
0
+ 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 14c663927577a..9a8eff8b37026 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
@@ -11,6 +11,7 @@
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
+import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -19,7 +20,6 @@
import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
-import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
@@ -27,15 +27,15 @@
import com.azure.resourcemanager.chaos.implementation.CapabilitiesImpl;
import com.azure.resourcemanager.chaos.implementation.CapabilityTypesImpl;
import com.azure.resourcemanager.chaos.implementation.ChaosManagementClientBuilder;
+import com.azure.resourcemanager.chaos.implementation.ExperimentExecutionsImpl;
import com.azure.resourcemanager.chaos.implementation.ExperimentsImpl;
-import com.azure.resourcemanager.chaos.implementation.OperationStatusesImpl;
import com.azure.resourcemanager.chaos.implementation.OperationsImpl;
import com.azure.resourcemanager.chaos.implementation.TargetTypesImpl;
import com.azure.resourcemanager.chaos.implementation.TargetsImpl;
import com.azure.resourcemanager.chaos.models.Capabilities;
import com.azure.resourcemanager.chaos.models.CapabilityTypes;
+import com.azure.resourcemanager.chaos.models.ExperimentExecutions;
import com.azure.resourcemanager.chaos.models.Experiments;
-import com.azure.resourcemanager.chaos.models.OperationStatuses;
import com.azure.resourcemanager.chaos.models.Operations;
import com.azure.resourcemanager.chaos.models.TargetTypes;
import com.azure.resourcemanager.chaos.models.Targets;
@@ -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 ExperimentExecutions experimentExecutions;
+
+ 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.1.0");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -262,7 +262,7 @@ public ChaosManager authenticate(TokenCredential credential, AzureProfile profil
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
- policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
@@ -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;
}
/**
@@ -311,30 +299,6 @@ public Experiments experiments() {
return experiments;
}
- /**
- * Gets the resource collection API of OperationStatuses.
- *
- * @return Resource collection API of OperationStatuses.
- */
- public OperationStatuses operationStatuses() {
- if (this.operationStatuses == null) {
- this.operationStatuses = new OperationStatusesImpl(clientObject.getOperationStatuses(), this);
- }
- 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 +311,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 +335,30 @@ public Targets targets() {
return targets;
}
+ /**
+ * Gets the resource collection API of ExperimentExecutions.
+ *
+ * @return Resource collection API of ExperimentExecutions.
+ */
+ public ExperimentExecutions experimentExecutions() {
+ if (this.experimentExecutions == null) {
+ this.experimentExecutions = new ExperimentExecutionsImpl(clientObject.getExperimentExecutions(), this);
+ }
+ return experimentExecutions;
+ }
+
+ /**
+ * Gets the resource collection API of Capabilities. It manages Capability.
+ *
+ * @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 711876aab678d..0e2e422b4a65c 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
@@ -18,10 +18,7 @@ public interface CapabilitiesClient {
/**
* Get a list of Capability resources that extend a Target resource..
*
- * @param resourceGroupName String that represents an Azure resource group.
- * @param parentProviderNamespace String that represents a resource provider namespace.
- * @param parentResourceType String that represents a resource type.
- * @param parentResourceName String that represents a resource name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -30,16 +27,12 @@ public interface CapabilitiesClient {
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName);
+ PagedIterable list(String resourceGroupName, String targetName);
/**
* Get a list of Capability resources that extend a Target resource..
*
- * @param resourceGroupName String that represents an Azure resource group.
- * @param parentProviderNamespace String that represents a resource provider namespace.
- * @param parentResourceType String that represents a resource type.
- * @param parentResourceName String that represents a resource name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -50,17 +43,13 @@ PagedIterable list(String resourceGroupName, String parentProvi
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, String continuationToken,
+ PagedIterable list(String resourceGroupName, String targetName, String continuationToken,
Context context);
/**
* Get a Capability resource that extends a Target resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
- * @param parentProviderNamespace String that represents a resource provider namespace.
- * @param parentResourceType String that represents a resource type.
- * @param parentResourceName String that represents a resource name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -70,17 +59,13 @@ PagedIterable list(String resourceGroupName, String parentProvi
* @return a Capability resource that extends a Target resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, String capabilityName,
+ Response getWithResponse(String resourceGroupName, String targetName, String capabilityName,
Context context);
/**
* Get a Capability resource that extends a Target resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
- * @param parentProviderNamespace String that represents a resource provider namespace.
- * @param parentResourceType String that represents a resource type.
- * @param parentResourceName String that represents a resource name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -89,83 +74,67 @@ Response getWithResponse(String resourceGroupName, String paren
* @return a Capability resource that extends a Target resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- CapabilityInner get(String resourceGroupName, String parentProviderNamespace, String parentResourceType,
- String parentResourceName, String targetName, String capabilityName);
+ CapabilityInner get(String resourceGroupName, 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 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,
- String parentResourceType, String parentResourceName, String targetName, String capabilityName,
- Context context);
+ Response createOrUpdateWithResponse(String resourceGroupName, String targetName,
+ String capabilityName, 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 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 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 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,
- String parentResourceType, String parentResourceName, String targetName, String capabilityName,
- CapabilityInner capability, Context context);
+ Response deleteWithResponse(String resourceGroupName, String targetName, String capabilityName,
+ 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 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 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 723d735439ac3..659e98011b2c9 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 0957af884ce84..73855613c3a5d 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,51 +47,51 @@ public interface ChaosManagementClient {
Duration getDefaultPollInterval();
/**
- * Gets the CapabilitiesClient object to access its operations.
+ * Gets the OperationsClient object to access its operations.
*
- * @return the CapabilitiesClient object.
+ * @return the OperationsClient object.
*/
- CapabilitiesClient getCapabilities();
+ OperationsClient getOperations();
/**
- * Gets the CapabilityTypesClient object to access its operations.
+ * Gets the ExperimentsClient object to access its operations.
*
- * @return the CapabilityTypesClient object.
+ * @return the ExperimentsClient object.
*/
- CapabilityTypesClient getCapabilityTypes();
+ ExperimentsClient getExperiments();
/**
- * Gets the ExperimentsClient object to access its operations.
+ * Gets the TargetTypesClient object to access its operations.
*
- * @return the ExperimentsClient object.
+ * @return the TargetTypesClient object.
*/
- ExperimentsClient getExperiments();
+ TargetTypesClient getTargetTypes();
/**
- * Gets the OperationStatusesClient object to access its operations.
+ * Gets the CapabilityTypesClient object to access its operations.
*
- * @return the OperationStatusesClient object.
+ * @return the CapabilityTypesClient object.
*/
- OperationStatusesClient getOperationStatuses();
+ CapabilityTypesClient getCapabilityTypes();
/**
- * Gets the OperationsClient object to access its operations.
+ * Gets the TargetsClient object to access its operations.
*
- * @return the OperationsClient object.
+ * @return the TargetsClient object.
*/
- OperationsClient getOperations();
+ TargetsClient getTargets();
/**
- * Gets the TargetTypesClient object to access its operations.
+ * Gets the ExperimentExecutionsClient object to access its operations.
*
- * @return the TargetTypesClient object.
+ * @return the ExperimentExecutionsClient object.
*/
- TargetTypesClient getTargetTypes();
+ ExperimentExecutionsClient getExperimentExecutions();
/**
- * Gets the TargetsClient object to access its operations.
+ * Gets the CapabilitiesClient object to access its operations.
*
- * @return the TargetsClient object.
+ * @return the CapabilitiesClient object.
*/
- TargetsClient getTargets();
+ CapabilitiesClient getCapabilities();
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ExperimentExecutionsClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ExperimentExecutionsClient.java
new file mode 100644
index 0000000000000..d2525b03ce706
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ExperimentExecutionsClient.java
@@ -0,0 +1,106 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsInner;
+import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in ExperimentExecutionsClient.
+ */
+public interface ExperimentExecutionsClient {
+ /**
+ * Get a list of executions of an 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 a list of executions of an Experiment resource as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String experimentName);
+
+ /**
+ * Get a list of executions of an 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 a list of executions of an Experiment resource as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String experimentName, Context context);
+
+ /**
+ * Get an execution of an 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 executionId GUID that represents a Experiment execution detail.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an execution of an Experiment resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String experimentName,
+ String executionId, Context context);
+
+ /**
+ * Get an execution of an 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 executionId GUID that represents a Experiment execution detail.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an execution of an Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExperimentExecutionInner get(String resourceGroupName, String experimentName, String executionId);
+
+ /**
+ * Execution details of an 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 executionId GUID that represents a Experiment execution detail.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents the execution details of an Experiment along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getExecutionDetailsWithResponse(String resourceGroupName,
+ String experimentName, String executionId, Context context);
+
+ /**
+ * Execution details of an 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 executionId GUID that represents a Experiment execution detail.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents the execution details of an Experiment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExperimentExecutionDetailsInner getExecutionDetails(String resourceGroupName, String experimentName,
+ String executionId);
+}
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 266e6c4ba7ea1..afc8c715fde56 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
@@ -11,9 +11,8 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsInner;
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionInner;
import com.azure.resourcemanager.chaos.fluent.models.ExperimentInner;
+import com.azure.resourcemanager.chaos.fluent.models.PostActionResponseInner;
import com.azure.resourcemanager.chaos.models.ExperimentUpdate;
/**
@@ -48,7 +47,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 +59,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 +73,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 +91,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 +104,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 +114,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 +130,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 +159,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 +175,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 +191,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 +220,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 +234,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 +248,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,146 +273,117 @@ 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.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of long-running operation.
+ * @return the {@link SyncPoller} for polling of model that represents the post action response.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginStart(String resourceGroupName, String experimentName);
+ SyncPoller, PostActionResponseInner> 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.
* @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.
+ * @return the {@link SyncPoller} for polling of model that represents the post action response.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginStart(String resourceGroupName, String experimentName, Context context);
+ SyncPoller, PostActionResponseInner> 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.
+ * @return model that represents the post action response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void start(String resourceGroupName, String experimentName);
+ PostActionResponseInner 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.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return model that represents the post action response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void start(String resourceGroupName, String experimentName, Context context);
+ PostActionResponseInner 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 experimentName String that represents a Experiment resource name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of executions of an Experiment resource as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listAllExecutions(String resourceGroupName, String experimentName);
-
- /**
- * Get a list of executions of an Experiment resource.
+ * Start 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.
* @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 executions of an Experiment resource as paginated response with {@link PagedIterable}.
+ * @return the {@link SyncPoller} for polling of model that represents the post action response.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listAllExecutions(String resourceGroupName, String experimentName,
- Context context);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PostActionResponseInner> beginStart(String resourceGroupName,
+ String experimentName);
/**
- * Get an execution of an Experiment resource.
+ * Start 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 executionId GUID that represents a Experiment execution detail.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an execution of an Experiment resource along with {@link Response}.
+ * @return the {@link SyncPoller} for polling of model that represents the post action response.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getExecutionWithResponse(String resourceGroupName, String experimentName,
- String executionId, Context context);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PostActionResponseInner> beginStart(String resourceGroupName,
+ String experimentName, Context context);
/**
- * Get an execution of an Experiment resource.
+ * Start 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 executionId GUID that represents a Experiment execution detail.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an execution of an Experiment resource.
+ * @return model that represents the post action response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ExperimentExecutionInner getExecution(String resourceGroupName, String experimentName, String executionId);
+ PostActionResponseInner start(String resourceGroupName, String experimentName);
/**
- * Execution details of an experiment resource.
+ * Start 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 executionId GUID that represents a Experiment execution detail.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the execution details of an Experiment along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response executionDetailsWithResponse(String resourceGroupName,
- String experimentName, String executionId, Context context);
-
- /**
- * Execution details of an experiment resource.
- *
- * @param resourceGroupName String that represents an Azure resource group.
- * @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.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the execution details of an Experiment.
+ * @return model that represents the post action response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ExperimentExecutionDetailsInner executionDetails(String resourceGroupName, String experimentName,
- String executionId);
+ PostActionResponseInner 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
deleted file mode 100644
index 87083b88e1ee8..0000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/OperationStatusesClient.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.fluent;
-
-import com.azure.core.annotation.ReturnType;
-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;
-
-/**
- * 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.
- *
- * @param location The name of the Azure region.
- * @param asyncOperationId The operation Id.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the status of a long running azure asynchronous operation along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String location, String asyncOperationId, Context context);
-
- /**
- * Get the status of a long running azure asynchronous operation.
- *
- * @param location The name of the Azure region.
- * @param asyncOperationId The operation Id.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the status of a long running azure asynchronous operation.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- OperationStatusInner get(String location, String asyncOperationId);
-}
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 6be2ec3d60b24..bfae884ffd6e2 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,24 +15,26 @@
*/
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();
+ PagedIterable list();
/**
- * 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);
+ PagedIterable list(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 92e8fb223c8f3..01639c997d894 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 0caf92afda5df..74af0ccf3ba78 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 Name of schema group.
+ * @param parentResourceType Name of schema group.
+ * @param parentResourceName Name of schema group.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -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 Name of schema group.
+ * @param parentResourceType Name of schema group.
+ * @param parentResourceName Name of schema group.
* @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,11 +54,11 @@ 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 targetName String that represents a Target resource name.
+ * @param parentProviderNamespace Name of schema group.
+ * @param parentResourceType Name of schema group.
+ * @param parentResourceName Name of schema group.
* @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.
@@ -66,94 +66,95 @@ PagedIterable list(String resourceGroupName, String parentProviderN
* @return a Target resource that extends a tracked regional resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, Context context);
+ Response getWithResponse(String resourceGroupName, String targetName, String parentProviderNamespace,
+ String parentResourceType, String parentResourceName, Context context);
/**
* Get a Target resource that extends a tracked regional resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
- * @param parentProviderNamespace String that represents a resource provider namespace.
- * @param parentResourceType String that represents a resource type.
- * @param parentResourceName String that represents a resource name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param targetName String that represents a Target resource name.
+ * @param parentProviderNamespace Name of schema group.
+ * @param parentResourceType Name of schema group.
+ * @param parentResourceName Name of schema group.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a Target resource that extends a tracked regional resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- TargetInner get(String resourceGroupName, String parentProviderNamespace, String parentResourceType,
- String parentResourceName, String targetName);
+ TargetInner get(String resourceGroupName, String targetName, String parentProviderNamespace,
+ String parentResourceType, String parentResourceName);
/**
- * 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 targetName String that represents a Target resource name.
+ * @param parentProviderNamespace Name of schema group.
+ * @param parentResourceType Name of schema group.
+ * @param parentResourceName Name of schema group.
+ * @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 targetName,
+ String parentProviderNamespace, String parentResourceType, String parentResourceName, 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 targetName String that represents a Target resource name.
+ * @param parentProviderNamespace Name of schema group.
+ * @param parentResourceType Name of schema group.
+ * @param parentResourceName Name of schema group.
+ * @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 targetName, String parentProviderNamespace,
+ String parentResourceType, String parentResourceName, 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 targetName String that represents a Target resource name.
- * @param target Target resource to be created or updated.
+ * @param parentProviderNamespace Name of schema group.
+ * @param parentResourceType Name of schema group.
+ * @param parentResourceName Name of schema group.
* @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 targetName, String parentProviderNamespace,
+ String parentResourceType, String parentResourceName, 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 targetName String that represents a Target resource name.
- * @param target Target resource to be created or updated.
+ * @param parentProviderNamespace Name of schema group.
+ * @param parentResourceType Name of schema group.
+ * @param parentResourceName Name of schema group.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return 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 targetName, String parentProviderNamespace, String parentResourceType,
+ String parentResourceName);
}
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 77d0fabdd71f2..a2c782693593a 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
@@ -4,27 +4,44 @@
package com.azure.resourcemanager.chaos.fluent.models;
-import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.chaos.models.CapabilityProperties;
+import java.io.IOException;
/**
* Model that represents a Capability resource.
*/
-@Immutable
+@Fluent
public final class CapabilityInner extends ProxyResource {
/*
- * The standard system metadata of a resource type.
+ * The properties of a capability resource.
+ */
+ private CapabilityProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
/*
- * The properties of a capability resource.
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
*/
- @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
- private CapabilityProperties innerProperties;
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
/**
* Creates an instance of CapabilityInner class.
@@ -33,76 +50,117 @@ public CapabilityInner() {
}
/**
- * Get the systemData property: The standard system metadata of a resource type.
+ * Get the properties property: The properties of a capability resource.
*
- * @return the systemData value.
+ * @return the properties value.
*/
- public SystemData systemData() {
- return this.systemData;
+ public CapabilityProperties properties() {
+ return this.properties;
}
/**
- * Get the innerProperties property: The properties of a capability resource.
+ * Set the properties property: The properties of a capability resource.
*
- * @return the innerProperties value.
+ * @param properties the properties value to set.
+ * @return the CapabilityInner object itself.
*/
- private CapabilityProperties innerProperties() {
- return this.innerProperties;
+ public CapabilityInner withProperties(CapabilityProperties properties) {
+ this.properties = properties;
+ return this;
}
/**
- * Get the publisher property: String of the Publisher that this Capability extends.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @return the publisher value.
+ * @return the systemData value.
*/
- public String publisher() {
- return this.innerProperties() == null ? null : this.innerProperties().publisher();
+ public SystemData systemData() {
+ return this.systemData;
}
/**
- * Get the targetType property: String of the Target Type that this Capability extends.
+ * Get the type property: The type of the resource.
*
- * @return the targetType value.
+ * @return the type value.
*/
- public String targetType() {
- return this.innerProperties() == null ? null : this.innerProperties().targetType();
+ @Override
+ public String type() {
+ return this.type;
}
/**
- * Get the description property: Localized string of the description.
+ * Get the name property: The name of the resource.
*
- * @return the description value.
+ * @return the name value.
*/
- public String description() {
- return this.innerProperties() == null ? null : this.innerProperties().description();
+ @Override
+ public String name() {
+ return this.name;
}
/**
- * Get the parametersSchema property: URL to retrieve JSON schema of the Capability parameters.
+ * Get the id property: Fully qualified resource Id for the resource.
*
- * @return the parametersSchema value.
+ * @return the id value.
*/
- public String parametersSchema() {
- return this.innerProperties() == null ? null : this.innerProperties().parametersSchema();
+ @Override
+ public String id() {
+ return this.id;
}
/**
- * Get the urn property: String of the URN for this Capability Type.
+ * Validates the instance.
*
- * @return the urn value.
+ * @throws IllegalArgumentException thrown if the instance is not valid.
*/
- public String urn() {
- return this.innerProperties() == null ? null : this.innerProperties().urn();
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
}
/**
- * Validates the instance.
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CapabilityInner from the JsonReader.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CapabilityInner 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 CapabilityInner.
*/
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
+ public static CapabilityInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CapabilityInner deserializedCapabilityInner = new CapabilityInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedCapabilityInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedCapabilityInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedCapabilityInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedCapabilityInner.properties = CapabilityProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedCapabilityInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCapabilityInner;
+ });
}
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityProperties.java
deleted file mode 100644
index 2380ddf8be90a..0000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityProperties.java
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.fluent.models;
-
-import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * Model that represents the Capability properties model.
- */
-@Immutable
-public final class CapabilityProperties {
- /*
- * String of the Publisher that this Capability extends.
- */
- @JsonProperty(value = "publisher", access = JsonProperty.Access.WRITE_ONLY)
- private String publisher;
-
- /*
- * String of the Target Type that this Capability extends.
- */
- @JsonProperty(value = "targetType", access = JsonProperty.Access.WRITE_ONLY)
- private String targetType;
-
- /*
- * Localized string of the description.
- */
- @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
- private String description;
-
- /*
- * URL to retrieve JSON schema of the Capability parameters.
- */
- @JsonProperty(value = "parametersSchema", access = JsonProperty.Access.WRITE_ONLY)
- private String parametersSchema;
-
- /*
- * String of the URN for this Capability Type.
- */
- @JsonProperty(value = "urn", access = JsonProperty.Access.WRITE_ONLY)
- private String urn;
-
- /**
- * Creates an instance of CapabilityProperties class.
- */
- public CapabilityProperties() {
- }
-
- /**
- * Get the publisher property: String of the Publisher that this Capability extends.
- *
- * @return the publisher value.
- */
- public String publisher() {
- return this.publisher;
- }
-
- /**
- * Get the targetType property: String of the Target Type that this Capability extends.
- *
- * @return the targetType value.
- */
- public String targetType() {
- return this.targetType;
- }
-
- /**
- * Get the description property: Localized string of the description.
- *
- * @return the description value.
- */
- public String description() {
- return this.description;
- }
-
- /**
- * Get the parametersSchema property: URL to retrieve JSON schema of the Capability parameters.
- *
- * @return the parametersSchema value.
- */
- public String parametersSchema() {
- return this.parametersSchema;
- }
-
- /**
- * Get the urn property: String of the URN for this Capability Type.
- *
- * @return the urn value.
- */
- public String urn() {
- return this.urn;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeInner.java
index ffea085d3935f..769a03ea7547e 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
@@ -7,9 +7,11 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
-import com.azure.resourcemanager.chaos.models.CapabilityTypePropertiesRuntimeProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.chaos.models.CapabilityTypeProperties;
+import java.io.IOException;
/**
* Model that represents a Capability Type resource.
@@ -17,207 +19,148 @@
@Fluent
public final class CapabilityTypeInner extends ProxyResource {
/*
- * The system metadata properties of the capability type resource.
+ * The properties of the capability type resource.
+ */
+ private CapabilityTypeProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
/*
- * Location of the Capability Type resource.
+ * The type of the resource.
*/
- @JsonProperty(value = "location")
- private String location;
+ private String type;
/*
- * The properties of the capability type resource.
+ * The name of the resource.
*/
- @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
- private CapabilityTypeProperties innerProperties;
+ private String name;
- /**
- * Creates an instance of CapabilityTypeInner class.
+ /*
+ * Fully qualified resource Id for the resource.
*/
- public CapabilityTypeInner() {
- }
+ private String id;
/**
- * Get the systemData property: The system metadata properties of the capability type resource.
- *
- * @return the systemData value.
+ * Creates an instance of CapabilityTypeInner class.
*/
- public SystemData systemData() {
- return this.systemData;
+ public CapabilityTypeInner() {
}
/**
- * Get the location property: Location of the Capability Type resource.
+ * Get the properties property: The properties of the capability type resource.
*
- * @return the location value.
+ * @return the properties value.
*/
- public String location() {
- return this.location;
+ public CapabilityTypeProperties properties() {
+ return this.properties;
}
/**
- * Set the location property: Location of the Capability Type resource.
+ * Set the properties property: The properties of the capability type resource.
*
- * @param location the location value to set.
+ * @param properties the properties value to set.
* @return the CapabilityTypeInner object itself.
*/
- public CapabilityTypeInner withLocation(String location) {
- this.location = location;
+ public CapabilityTypeInner withProperties(CapabilityTypeProperties properties) {
+ this.properties = properties;
return this;
}
/**
- * 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.
- */
- private CapabilityTypeProperties innerProperties() {
- return this.innerProperties;
- }
-
- /**
- * Get the publisher property: String of the Publisher that this Capability Type extends.
- *
- * @return the publisher value.
- */
- public String publisher() {
- return this.innerProperties() == null ? null : this.innerProperties().publisher();
- }
-
- /**
- * Get the targetType property: String of the Target Type that this Capability Type extends.
- *
- * @return the targetType value.
- */
- public String targetType() {
- return this.innerProperties() == null ? null : this.innerProperties().targetType();
- }
-
- /**
- * Get the displayName property: Localized string of the display name.
- *
- * @return the displayName value.
- */
- public String displayName() {
- return this.innerProperties() == null ? null : this.innerProperties().displayName();
- }
-
- /**
- * Get the description property: Localized string of the description.
- *
- * @return the description value.
- */
- public String description() {
- return this.innerProperties() == null ? null : this.innerProperties().description();
- }
-
- /**
- * Get the parametersSchema property: URL to retrieve JSON schema of the Capability Type parameters.
- *
- * @return the parametersSchema value.
+ * @return the systemData value.
*/
- public String parametersSchema() {
- return this.innerProperties() == null ? null : this.innerProperties().parametersSchema();
+ public SystemData systemData() {
+ return this.systemData;
}
/**
- * Get the urn property: String of the URN for this Capability Type.
+ * Get the type property: The type of the resource.
*
- * @return the urn value.
+ * @return the type value.
*/
- public String urn() {
- return this.innerProperties() == null ? null : this.innerProperties().urn();
+ @Override
+ public String type() {
+ return this.type;
}
/**
- * Get the kind property: String of the kind of this Capability Type.
+ * Get the name property: The name of the resource.
*
- * @return the kind value.
+ * @return the name value.
*/
- public String kind() {
- return this.innerProperties() == null ? null : this.innerProperties().kind();
+ @Override
+ public String name() {
+ return this.name;
}
/**
- * Get the azureRbacActions property: Control plane actions necessary to execute capability type.
+ * Get the id property: Fully qualified resource Id for the resource.
*
- * @return the azureRbacActions value.
+ * @return the id value.
*/
- public List azureRbacActions() {
- return this.innerProperties() == null ? null : this.innerProperties().azureRbacActions();
+ @Override
+ public String id() {
+ return this.id;
}
/**
- * Set the azureRbacActions property: Control plane actions necessary to execute capability type.
+ * Validates the instance.
*
- * @param azureRbacActions the azureRbacActions value to set.
- * @return the CapabilityTypeInner object itself.
+ * @throws IllegalArgumentException thrown if the instance is not valid.
*/
- public CapabilityTypeInner withAzureRbacActions(List azureRbacActions) {
- if (this.innerProperties() == null) {
- this.innerProperties = new CapabilityTypeProperties();
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
}
- this.innerProperties().withAzureRbacActions(azureRbacActions);
- return this;
}
/**
- * Get the azureRbacDataActions property: Data plane actions necessary to execute capability type.
- *
- * @return the azureRbacDataActions value.
- */
- public List azureRbacDataActions() {
- return this.innerProperties() == null ? null : this.innerProperties().azureRbacDataActions();
- }
-
- /**
- * Set the azureRbacDataActions property: Data plane actions necessary to execute capability type.
- *
- * @param azureRbacDataActions the azureRbacDataActions value to set.
- * @return the CapabilityTypeInner object itself.
+ * {@inheritDoc}
*/
- public CapabilityTypeInner withAzureRbacDataActions(List azureRbacDataActions) {
- if (this.innerProperties() == null) {
- this.innerProperties = new CapabilityTypeProperties();
- }
- this.innerProperties().withAzureRbacDataActions(azureRbacDataActions);
- return this;
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
}
/**
- * Get the runtimeProperties property: Runtime properties of this Capability Type.
+ * Reads an instance of CapabilityTypeInner from the JsonReader.
*
- * @return the runtimeProperties value.
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CapabilityTypeInner 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 CapabilityTypeInner.
*/
- public CapabilityTypePropertiesRuntimeProperties runtimeProperties() {
- return this.innerProperties() == null ? null : this.innerProperties().runtimeProperties();
- }
+ public static CapabilityTypeInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CapabilityTypeInner deserializedCapabilityTypeInner = new CapabilityTypeInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
- /**
- * 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;
- }
+ if ("id".equals(fieldName)) {
+ deserializedCapabilityTypeInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedCapabilityTypeInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedCapabilityTypeInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedCapabilityTypeInner.properties = CapabilityTypeProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedCapabilityTypeInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
+ return deserializedCapabilityTypeInner;
+ });
}
}
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 a9206b47ee9e4..a7f261d5c42db 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
@@ -5,38 +5,37 @@
package com.azure.resourcemanager.chaos.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.time.OffsetDateTime;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsProperties;
+import java.io.IOException;
/**
* Model that represents the execution details of an Experiment.
*/
@Immutable
-public final class ExperimentExecutionDetailsInner {
+public final class ExperimentExecutionDetailsInner implements JsonSerializable {
/*
* String of the resource type.
*/
- @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
private String type;
/*
* String of the fully qualified resource ID.
*/
- @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
private String id;
/*
* String of the resource name.
*/
- @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;
/*
* The properties of the experiment execution details.
*/
- @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
- private ExperimentExecutionDetailsProperties innerProperties;
+ private ExperimentExecutionDetailsProperties properties;
/**
* Creates an instance of ExperimentExecutionDetailsInner class.
@@ -72,76 +71,65 @@ public String name() {
}
/**
- * Get the innerProperties property: The properties of the experiment execution details.
+ * Get the properties property: The properties of the experiment execution details.
*
- * @return the innerProperties value.
+ * @return the properties value.
*/
- private ExperimentExecutionDetailsProperties innerProperties() {
- return this.innerProperties;
+ public ExperimentExecutionDetailsProperties properties() {
+ return this.properties;
}
/**
- * Get the failureReason property: The reason why the execution failed.
- *
- * @return the failureReason value.
- */
- public String failureReason() {
- return this.innerProperties() == null ? null : this.innerProperties().failureReason();
- }
-
- /**
- * Get the lastActionAt property: String that represents the last action date time.
- *
- * @return the lastActionAt value.
- */
- public OffsetDateTime lastActionAt() {
- return this.innerProperties() == null ? null : this.innerProperties().lastActionAt();
- }
-
- /**
- * Get the runInformation property: The information of the experiment run.
- *
- * @return the runInformation value.
- */
- public ExperimentExecutionDetailsPropertiesRunInformation runInformation() {
- return this.innerProperties() == null ? null : this.innerProperties().runInformation();
- }
-
- /**
- * Get the status property: The status of the execution.
- *
- * @return the status value.
- */
- public String status() {
- return this.innerProperties() == null ? null : this.innerProperties().status();
- }
-
- /**
- * Get the startedAt property: String that represents the start date time.
+ * Validates the instance.
*
- * @return the startedAt value.
+ * @throws IllegalArgumentException thrown if the instance is not valid.
*/
- public OffsetDateTime startedAt() {
- return this.innerProperties() == null ? null : this.innerProperties().startedAt();
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
}
/**
- * Get the stoppedAt property: String that represents the stop date time.
- *
- * @return the stoppedAt value.
+ * {@inheritDoc}
*/
- public OffsetDateTime stoppedAt() {
- return this.innerProperties() == null ? null : this.innerProperties().stoppedAt();
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
}
/**
- * Validates the instance.
+ * Reads an instance of ExperimentExecutionDetailsInner from the JsonReader.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ExperimentExecutionDetailsInner 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 ExperimentExecutionDetailsInner.
+ */
+ public static ExperimentExecutionDetailsInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ExperimentExecutionDetailsInner deserializedExperimentExecutionDetailsInner
+ = new ExperimentExecutionDetailsInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("type".equals(fieldName)) {
+ deserializedExperimentExecutionDetailsInner.type = reader.getString();
+ } else if ("id".equals(fieldName)) {
+ deserializedExperimentExecutionDetailsInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedExperimentExecutionDetailsInner.name = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedExperimentExecutionDetailsInner.properties
+ = ExperimentExecutionDetailsProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedExperimentExecutionDetailsInner;
+ });
}
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsProperties.java
deleted file mode 100644
index d8094e07050fb..0000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsProperties.java
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.fluent.models;
-
-import com.azure.core.annotation.Immutable;
-import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.time.OffsetDateTime;
-
-/**
- * Model that represents the extended properties of an experiment execution.
- */
-@Immutable
-public final class ExperimentExecutionDetailsProperties extends ExperimentExecutionProperties {
- /*
- * The reason why the execution failed.
- */
- @JsonProperty(value = "failureReason", access = JsonProperty.Access.WRITE_ONLY)
- private String failureReason;
-
- /*
- * String that represents the last action date time.
- */
- @JsonProperty(value = "lastActionAt", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime lastActionAt;
-
- /*
- * The information of the experiment run.
- */
- @JsonProperty(value = "runInformation", access = JsonProperty.Access.WRITE_ONLY)
- private ExperimentExecutionDetailsPropertiesRunInformation runInformation;
-
- /**
- * Creates an instance of ExperimentExecutionDetailsProperties class.
- */
- public ExperimentExecutionDetailsProperties() {
- }
-
- /**
- * Get the failureReason property: The reason why the execution failed.
- *
- * @return the failureReason value.
- */
- public String failureReason() {
- return this.failureReason;
- }
-
- /**
- * Get the lastActionAt property: String that represents the last action date time.
- *
- * @return the lastActionAt value.
- */
- public OffsetDateTime lastActionAt() {
- return this.lastActionAt;
- }
-
- /**
- * Get the runInformation property: The information of the experiment run.
- *
- * @return the runInformation value.
- */
- public ExperimentExecutionDetailsPropertiesRunInformation runInformation() {
- return this.runInformation;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- super.validate();
- if (runInformation() != null) {
- runInformation().validate();
- }
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionInner.java
index 420ffd70a2dfe..773f1cb4717b0 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionInner.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionInner.java
@@ -4,38 +4,44 @@
package com.azure.resourcemanager.chaos.fluent.models;
-import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.time.OffsetDateTime;
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.chaos.models.ExperimentExecutionProperties;
+import java.io.IOException;
/**
- * Model that represents the execution of a Experiment.
+ * Model that represents the execution of an Experiment.
*/
-@Immutable
-public final class ExperimentExecutionInner {
+@Fluent
+public final class ExperimentExecutionInner extends ProxyResource {
/*
- * String of the resource type.
+ * The properties of experiment execution status.
*/
- @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
- private String type;
+ private ExperimentExecutionProperties properties;
/*
- * String of the fully qualified resource ID.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
- private String id;
+ private SystemData systemData;
/*
- * String of the resource name.
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
*/
- @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;
/*
- * The properties of experiment execution status.
+ * Fully qualified resource Id for the resource.
*/
- @JsonProperty(value = "properties")
- private ExperimentExecutionProperties innerProperties;
+ private String id;
/**
* Creates an instance of ExperimentExecutionInner class.
@@ -44,76 +50,117 @@ public ExperimentExecutionInner() {
}
/**
- * Get the type property: String of the resource type.
+ * Get the properties property: The properties of experiment execution status.
*
- * @return the type value.
+ * @return the properties value.
*/
- public String type() {
- return this.type;
+ public ExperimentExecutionProperties properties() {
+ return this.properties;
}
/**
- * Get the id property: String of the fully qualified resource ID.
+ * Set the properties property: The properties of experiment execution status.
*
- * @return the id value.
+ * @param properties the properties value to set.
+ * @return the ExperimentExecutionInner object itself.
*/
- public String id() {
- return this.id;
+ public ExperimentExecutionInner withProperties(ExperimentExecutionProperties properties) {
+ this.properties = properties;
+ return this;
}
/**
- * Get the name property: String of the resource name.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @return the name value.
+ * @return the systemData value.
*/
- public String name() {
- return this.name;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
- * Get the innerProperties property: The properties of experiment execution status.
+ * Get the type property: The type of the resource.
*
- * @return the innerProperties value.
+ * @return the type value.
*/
- private ExperimentExecutionProperties innerProperties() {
- return this.innerProperties;
+ @Override
+ public String type() {
+ return this.type;
}
/**
- * Get the status property: The status of the execution.
+ * Get the name property: The name of the resource.
*
- * @return the status value.
+ * @return the name value.
*/
- public String status() {
- return this.innerProperties() == null ? null : this.innerProperties().status();
+ @Override
+ public String name() {
+ return this.name;
}
/**
- * Get the startedAt property: String that represents the start date time.
+ * Get the id property: Fully qualified resource Id for the resource.
*
- * @return the startedAt value.
+ * @return the id value.
*/
- public OffsetDateTime startedAt() {
- return this.innerProperties() == null ? null : this.innerProperties().startedAt();
+ @Override
+ public String id() {
+ return this.id;
}
/**
- * Get the stoppedAt property: String that represents the stop date time.
+ * Validates the instance.
*
- * @return the stoppedAt value.
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
*/
- public OffsetDateTime stoppedAt() {
- return this.innerProperties() == null ? null : this.innerProperties().stoppedAt();
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
}
/**
- * Validates the instance.
+ * Reads an instance of ExperimentExecutionInner from the JsonReader.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
+ * @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 void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
+ public static ExperimentExecutionInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ExperimentExecutionInner deserializedExperimentExecutionInner = new ExperimentExecutionInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ 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.properties = ExperimentExecutionProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedExperimentExecutionInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedExperimentExecutionInner;
+ });
}
}
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
deleted file mode 100644
index 0338e23a53bbf..0000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionProperties.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.fluent.models;
-
-import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.time.OffsetDateTime;
-
-/**
- * Model that represents the execution properties of an Experiment.
- */
-@Immutable
-public class ExperimentExecutionProperties {
- /*
- * The status of the execution.
- */
- @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
- private String status;
-
- /*
- * String that represents the start date time.
- */
- @JsonProperty(value = "startedAt", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime startedAt;
-
- /*
- * String that represents the stop date time.
- */
- @JsonProperty(value = "stoppedAt", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime stoppedAt;
-
- /**
- * Creates an instance of ExperimentExecutionProperties class.
- */
- public ExperimentExecutionProperties() {
- }
-
- /**
- * Get the status property: The status of the execution.
- *
- * @return the status value.
- */
- public String status() {
- return this.status;
- }
-
- /**
- * Get the startedAt property: String that represents the start date time.
- *
- * @return the startedAt value.
- */
- public OffsetDateTime startedAt() {
- return this.startedAt;
- }
-
- /**
- * Get the stoppedAt property: String that represents the stop date time.
- *
- * @return the stoppedAt value.
- */
- public OffsetDateTime stoppedAt() {
- return this.stoppedAt;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentInner.java
index 70656ef6bef37..c52f1e6f9318f 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
@@ -8,12 +8,12 @@
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.chaos.models.ChaosExperimentStep;
-import com.azure.resourcemanager.chaos.models.ChaosTargetSelector;
-import com.azure.resourcemanager.chaos.models.ProvisioningState;
-import com.azure.resourcemanager.chaos.models.ResourceIdentity;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.chaos.models.ExperimentProperties;
+import com.azure.resourcemanager.chaos.models.ManagedServiceIdentity;
+import java.io.IOException;
import java.util.Map;
/**
@@ -22,22 +22,34 @@
@Fluent
public final class ExperimentInner extends Resource {
/*
- * The system metadata of the experiment resource.
+ * The properties of the experiment resource.
+ */
+ private ExperimentProperties properties;
+
+ /*
+ * The managed service identities assigned to this resource.
+ */
+ private ManagedServiceIdentity identity;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
/*
- * The identity of the experiment resource.
+ * The type of the resource.
*/
- @JsonProperty(value = "identity")
- private ResourceIdentity identity;
+ private String type;
/*
- * The properties of the experiment resource.
+ * The name of the resource.
*/
- @JsonProperty(value = "properties", required = true)
- private ExperimentProperties innerProperties = new ExperimentProperties();
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
/**
* Creates an instance of ExperimentInner class.
@@ -46,113 +58,99 @@ public ExperimentInner() {
}
/**
- * Get the systemData property: The system metadata of the experiment resource.
+ * Get the properties property: The properties of the experiment resource.
*
- * @return the systemData value.
+ * @return the properties value.
*/
- public SystemData systemData() {
- return this.systemData;
+ public ExperimentProperties properties() {
+ return this.properties;
}
/**
- * Get the identity property: The identity of the experiment resource.
+ * Set the properties property: The properties of the experiment resource.
+ *
+ * @param properties the properties value to set.
+ * @return the ExperimentInner object itself.
+ */
+ public ExperimentInner withProperties(ExperimentProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * 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;
}
/**
- * Get the innerProperties property: The properties of the experiment resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @return the innerProperties value.
+ * @return the systemData value.
*/
- private ExperimentProperties innerProperties() {
- return this.innerProperties;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
- * {@inheritDoc}
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
*/
@Override
- public ExperimentInner withLocation(String location) {
- super.withLocation(location);
- return this;
+ public String type() {
+ return this.type;
}
/**
- * {@inheritDoc}
- */
- @Override
- public ExperimentInner withTags(Map tags) {
- super.withTags(tags);
- return this;
- }
-
- /**
- * Get the provisioningState property: Most recent provisioning state for the given experiment resource.
+ * Get the name property: The name of the resource.
*
- * @return the provisioningState value.
+ * @return the name value.
*/
- public ProvisioningState provisioningState() {
- return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ @Override
+ public String name() {
+ return this.name;
}
/**
- * Get the steps property: List of steps.
+ * Get the id property: Fully qualified resource Id for the resource.
*
- * @return the steps value.
+ * @return the id value.
*/
- public List steps() {
- return this.innerProperties() == null ? null : this.innerProperties().steps();
+ @Override
+ public String id() {
+ return this.id;
}
/**
- * Set the steps property: List of steps.
- *
- * @param steps the steps value to set.
- * @return the ExperimentInner object itself.
+ * {@inheritDoc}
*/
- public ExperimentInner withSteps(List steps) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ExperimentProperties();
- }
- this.innerProperties().withSteps(steps);
+ @Override
+ public ExperimentInner withLocation(String location) {
+ super.withLocation(location);
return this;
}
/**
- * Get the selectors property: List of selectors.
- *
- * @return the selectors value.
- */
- public List selectors() {
- return this.innerProperties() == null ? null : this.innerProperties().selectors();
- }
-
- /**
- * Set the selectors property: List of selectors.
- *
- * @param selectors the selectors value to set.
- * @return the ExperimentInner object itself.
+ * {@inheritDoc}
*/
- public ExperimentInner withSelectors(List selectors) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ExperimentProperties();
- }
- this.innerProperties().withSelectors(selectors);
+ @Override
+ public ExperimentInner withTags(Map tags) {
+ super.withTags(tags);
return this;
}
@@ -162,16 +160,71 @@ public ExperimentInner withSelectors(List selectors) {
* @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 ExperimentInner"));
+ } else {
+ properties().validate();
+ }
if (identity() != null) {
identity().validate();
}
- if (innerProperties() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property innerProperties in model ExperimentInner"));
- } else {
- innerProperties().validate();
- }
}
private static final ClientLogger LOGGER = new ClientLogger(ExperimentInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeJsonField("identity", this.identity);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ExperimentInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ExperimentInner 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 ExperimentInner.
+ */
+ public static ExperimentInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ExperimentInner deserializedExperimentInner = new ExperimentInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedExperimentInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedExperimentInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedExperimentInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedExperimentInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedExperimentInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedExperimentInner.properties = ExperimentProperties.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedExperimentInner.identity = ManagedServiceIdentity.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedExperimentInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedExperimentInner;
+ });
+ }
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentProperties.java
deleted file mode 100644
index bb1445fe5dc11..0000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentProperties.java
+++ /dev/null
@@ -1,114 +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.util.logging.ClientLogger;
-import com.azure.resourcemanager.chaos.models.ChaosExperimentStep;
-import com.azure.resourcemanager.chaos.models.ChaosTargetSelector;
-import com.azure.resourcemanager.chaos.models.ProvisioningState;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/**
- * Model that represents the Experiment properties model.
- */
-@Fluent
-public final class ExperimentProperties {
- /*
- * Most recent provisioning state for the given experiment resource.
- */
- @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private ProvisioningState provisioningState;
-
- /*
- * List of steps.
- */
- @JsonProperty(value = "steps", required = true)
- private List steps;
-
- /*
- * List of selectors.
- */
- @JsonProperty(value = "selectors", required = true)
- private List selectors;
-
- /**
- * Creates an instance of ExperimentProperties class.
- */
- public ExperimentProperties() {
- }
-
- /**
- * Get the provisioningState property: Most recent provisioning state for the given experiment resource.
- *
- * @return the provisioningState value.
- */
- public ProvisioningState provisioningState() {
- return this.provisioningState;
- }
-
- /**
- * Get the steps property: List of steps.
- *
- * @return the steps value.
- */
- public List steps() {
- return this.steps;
- }
-
- /**
- * Set the steps property: List of steps.
- *
- * @param steps the steps value to set.
- * @return the ExperimentProperties object itself.
- */
- public ExperimentProperties withSteps(List steps) {
- this.steps = steps;
- return this;
- }
-
- /**
- * Get the selectors property: List of selectors.
- *
- * @return the selectors value.
- */
- public List selectors() {
- return this.selectors;
- }
-
- /**
- * Set the selectors property: List of selectors.
- *
- * @param selectors the selectors value to set.
- * @return the ExperimentProperties object itself.
- */
- public ExperimentProperties withSelectors(List selectors) {
- this.selectors = selectors;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (steps() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property steps in model ExperimentProperties"));
- } else {
- steps().forEach(e -> e.validate());
- }
- if (selectors() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property selectors in model ExperimentProperties"));
- } else {
- selectors().forEach(e -> e.validate());
- }
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(ExperimentProperties.class);
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationInner.java
index d71cf2dbad10e..113129ee153dd 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationInner.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationInner.java
@@ -5,10 +5,14 @@
package com.azure.resourcemanager.chaos.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.chaos.models.ActionType;
import com.azure.resourcemanager.chaos.models.OperationDisplay;
import com.azure.resourcemanager.chaos.models.Origin;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* REST API Operation
@@ -16,38 +20,33 @@
* Details of a REST API operation, returned from the Resource Provider Operations API.
*/
@Fluent
-public final class OperationInner {
+public final class OperationInner implements JsonSerializable {
/*
* The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
* "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
*/
- @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;
/*
* Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
* ARM/control-plane operations.
*/
- @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
private Boolean isDataAction;
/*
* Localized display information for this particular operation.
*/
- @JsonProperty(value = "display")
private OperationDisplay display;
/*
* The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
* value is "user,system"
*/
- @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY)
private Origin origin;
/*
* Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
*/
- @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY)
private ActionType actionType;
/**
@@ -126,4 +125,48 @@ public void validate() {
display().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("display", this.display);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationInner 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 OperationInner.
+ */
+ public static OperationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationInner deserializedOperationInner = new OperationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedOperationInner.name = reader.getString();
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
+ } else if ("display".equals(fieldName)) {
+ deserializedOperationInner.display = OperationDisplay.fromJson(reader);
+ } else if ("origin".equals(fieldName)) {
+ deserializedOperationInner.origin = Origin.fromString(reader.getString());
+ } else if ("actionType".equals(fieldName)) {
+ deserializedOperationInner.actionType = ActionType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationInner;
+ });
+ }
}
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 24456ee1cf196..0000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationStatusInner.java
+++ /dev/null
@@ -1,185 +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.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * The status of operation.
- */
-@Fluent
-public final class OperationStatusInner {
- /*
- * The operation Id.
- */
- @JsonProperty(value = "id")
- private String id;
-
- /*
- * The operation name.
- */
- @JsonProperty(value = "name")
- private String name;
-
- /*
- * The start time of the operation.
- */
- @JsonProperty(value = "startTime")
- private String startTime;
-
- /*
- * The end time of the operation.
- */
- @JsonProperty(value = "endTime")
- private String endTime;
-
- /*
- * The status of the operation.
- */
- @JsonProperty(value = "status")
- private String status;
-
- /*
- * The error object.
- */
- @JsonProperty(value = "error")
- private ManagementError error;
-
- /**
- * Creates an instance of OperationStatusInner class.
- */
- public OperationStatusInner() {
- }
-
- /**
- * Get the id property: The operation Id.
- *
- * @return the id value.
- */
- public String id() {
- return this.id;
- }
-
- /**
- * Set the id property: The operation Id.
- *
- * @param id the id value to set.
- * @return the OperationStatusInner object itself.
- */
- public OperationStatusInner withId(String id) {
- this.id = id;
- return this;
- }
-
- /**
- * Get the name property: The operation name.
- *
- * @return the name value.
- */
- public String name() {
- return this.name;
- }
-
- /**
- * Set the name property: The operation name.
- *
- * @param name the name value to set.
- * @return the OperationStatusInner object itself.
- */
- public OperationStatusInner withName(String name) {
- this.name = name;
- return this;
- }
-
- /**
- * Get the startTime property: The start time of the operation.
- *
- * @return the startTime value.
- */
- public String startTime() {
- return this.startTime;
- }
-
- /**
- * Set the startTime property: The start time of the operation.
- *
- * @param startTime the startTime value to set.
- * @return the OperationStatusInner object itself.
- */
- public OperationStatusInner withStartTime(String startTime) {
- this.startTime = startTime;
- return this;
- }
-
- /**
- * Get the endTime property: The end time of the operation.
- *
- * @return the endTime value.
- */
- public String endTime() {
- return this.endTime;
- }
-
- /**
- * Set the endTime property: The end time of the operation.
- *
- * @param endTime the endTime value to set.
- * @return the OperationStatusInner object itself.
- */
- public OperationStatusInner withEndTime(String endTime) {
- this.endTime = endTime;
- return this;
- }
-
- /**
- * Get the status property: The status of the operation.
- *
- * @return the status value.
- */
- public String status() {
- return this.status;
- }
-
- /**
- * Set the status property: The status of the operation.
- *
- * @param status the status value to set.
- * @return the OperationStatusInner object itself.
- */
- public OperationStatusInner withStatus(String status) {
- this.status = status;
- return this;
- }
-
- /**
- * Get the error property: 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() {
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PostActionResponseInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PostActionResponseInner.java
new file mode 100644
index 0000000000000..49e2f2ae4a5e4
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PostActionResponseInner.java
@@ -0,0 +1,97 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Model that represents the post action response.
+ */
+@Immutable
+public final class PostActionResponseInner implements JsonSerializable {
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The statusUrl of the post action.
+ */
+ private String statusUrl;
+
+ /**
+ * Creates an instance of PostActionResponseInner class.
+ */
+ public PostActionResponseInner() {
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the statusUrl property: The statusUrl of the post action.
+ *
+ * @return the statusUrl value.
+ */
+ public String statusUrl() {
+ return this.statusUrl;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PostActionResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PostActionResponseInner 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 PostActionResponseInner.
+ */
+ public static PostActionResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PostActionResponseInner deserializedPostActionResponseInner = new PostActionResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedPostActionResponseInner.name = reader.getString();
+ } else if ("statusUrl".equals(fieldName)) {
+ deserializedPostActionResponseInner.statusUrl = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPostActionResponseInner;
+ });
+ }
+}
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 2700e264d225d..3fcfa41ec3d00 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,9 +7,10 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.Map;
/**
@@ -18,23 +19,34 @@
@Fluent
public final class TargetInner extends ProxyResource {
/*
- * The system metadata of the target resource.
+ * The properties of the target resource.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
+ private Map properties;
/*
- * Location of the target resource.
+ * Azure resource location.
*/
- @JsonProperty(value = "location")
private String location;
/*
- * The properties of the target resource.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "properties", required = true)
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
- private Map properties;
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
/**
* Creates an instance of TargetInner class.
@@ -43,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;
}
/**
- * Get the location property: Location of the target resource.
+ * 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: Azure resource location.
*
* @return the location value.
*/
@@ -61,34 +84,42 @@ public String location() {
}
/**
- * Set the location property: Location of the target resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @param location the location value to set.
- * @return the TargetInner object itself.
+ * @return the systemData value.
*/
- public TargetInner withLocation(String location) {
- this.location = location;
- return this;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
- * Get the properties property: The properties of the target resource.
+ * Get the type property: The type of the resource.
*
- * @return the properties value.
+ * @return the type value.
*/
- public Map properties() {
- return this.properties;
+ @Override
+ public String type() {
+ return this.type;
}
/**
- * Set the properties property: The properties of the target resource.
+ * Get the name property: The name of the resource.
*
- * @param properties the properties value to set.
- * @return the TargetInner object itself.
+ * @return the name value.
*/
- public TargetInner withProperties(Map properties) {
- this.properties = properties;
- return this;
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
}
/**
@@ -97,11 +128,53 @@ public TargetInner withProperties(Map properties) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (properties() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property properties in model TargetInner"));
- }
}
- private static final ClientLogger LOGGER = new ClientLogger(TargetInner.class);
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeUntyped(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of TargetInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of TargetInner 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 TargetInner.
+ */
+ public static TargetInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ TargetInner deserializedTargetInner = new TargetInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedTargetInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedTargetInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedTargetInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ Map properties = reader.readMap(reader1 -> reader1.readUntyped());
+ deserializedTargetInner.properties = properties;
+ } else if ("location".equals(fieldName)) {
+ deserializedTargetInner.location = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedTargetInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedTargetInner;
+ });
+ }
}
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 7977d4e0b5d8b..036a70b7bde10 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
@@ -8,8 +8,11 @@
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.chaos.models.TargetTypeProperties;
+import java.io.IOException;
/**
* Model that represents a Target Type resource.
@@ -17,101 +20,93 @@
@Fluent
public final class TargetTypeInner extends ProxyResource {
/*
- * The system metadata properties of the target type resource.
+ * The properties of the target type resource.
+ */
+ private TargetTypeProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
/*
- * Location of the Target Type resource.
+ * The type of the resource.
*/
- @JsonProperty(value = "location")
- private String location;
+ private String type;
/*
- * The properties of the target type resource.
+ * The name of the resource.
*/
- @JsonProperty(value = "properties", required = true)
- private TargetTypeProperties innerProperties = new TargetTypeProperties();
+ private String name;
- /**
- * Creates an instance of TargetTypeInner class.
+ /*
+ * Fully qualified resource Id for the resource.
*/
- public TargetTypeInner() {
- }
+ private String id;
/**
- * Get the systemData property: The system metadata properties of the target type resource.
- *
- * @return the systemData value.
+ * Creates an instance of TargetTypeInner class.
*/
- public SystemData systemData() {
- return this.systemData;
+ public TargetTypeInner() {
}
/**
- * Get the location property: Location of the Target Type resource.
+ * Get the properties property: The properties of the target type resource.
*
- * @return the location value.
+ * @return the properties value.
*/
- public String location() {
- return this.location;
+ public TargetTypeProperties properties() {
+ return this.properties;
}
/**
- * Set the location property: Location of the Target Type resource.
+ * Set the properties property: The properties of the target type resource.
*
- * @param location the location value to set.
+ * @param properties the properties value to set.
* @return the TargetTypeInner object itself.
*/
- public TargetTypeInner withLocation(String location) {
- this.location = location;
+ public TargetTypeInner withProperties(TargetTypeProperties properties) {
+ this.properties = properties;
return this;
}
/**
- * 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.
- */
- private TargetTypeProperties innerProperties() {
- return this.innerProperties;
- }
-
- /**
- * Get the displayName property: Localized string of the display name.
- *
- * @return the displayName value.
+ * @return the systemData value.
*/
- public String displayName() {
- return this.innerProperties() == null ? null : this.innerProperties().displayName();
+ public SystemData systemData() {
+ return this.systemData;
}
/**
- * Get the description property: Localized string of the description.
+ * Get the type property: The type of the resource.
*
- * @return the description value.
+ * @return the type value.
*/
- public String description() {
- return this.innerProperties() == null ? null : this.innerProperties().description();
+ @Override
+ public String type() {
+ return this.type;
}
/**
- * Get the propertiesSchema property: URL to retrieve JSON schema of the Target Type properties.
+ * Get the name property: The name of the resource.
*
- * @return the propertiesSchema value.
+ * @return the name value.
*/
- public String propertiesSchema() {
- return this.innerProperties() == null ? null : this.innerProperties().propertiesSchema();
+ @Override
+ public String name() {
+ return this.name;
}
/**
- * Get the resourceTypes property: List of resource types this Target Type can extend.
+ * Get the id property: Fully qualified resource Id for the resource.
*
- * @return the resourceTypes value.
+ * @return the id value.
*/
- public List resourceTypes() {
- return this.innerProperties() == null ? null : this.innerProperties().resourceTypes();
+ @Override
+ public String id() {
+ return this.id;
}
/**
@@ -120,13 +115,58 @@ public List resourceTypes() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (innerProperties() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property innerProperties in model TargetTypeInner"));
+ if (properties() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property properties in model TargetTypeInner"));
} else {
- innerProperties().validate();
+ properties().validate();
}
}
private static final ClientLogger LOGGER = new ClientLogger(TargetTypeInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of TargetTypeInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of TargetTypeInner 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 TargetTypeInner.
+ */
+ public static TargetTypeInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ TargetTypeInner deserializedTargetTypeInner = new TargetTypeInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedTargetTypeInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedTargetTypeInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedTargetTypeInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedTargetTypeInner.properties = TargetTypeProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedTargetTypeInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedTargetTypeInner;
+ });
+ }
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeProperties.java
deleted file mode 100644
index 56be5f6e63786..0000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeProperties.java
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.chaos.fluent.models;
-
-import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/**
- * Model that represents the base Target Type properties model.
- */
-@Immutable
-public final class TargetTypeProperties {
- /*
- * Localized string of the display name.
- */
- @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY)
- private String displayName;
-
- /*
- * Localized string of the description.
- */
- @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
- private String description;
-
- /*
- * URL to retrieve JSON schema of the Target Type properties.
- */
- @JsonProperty(value = "propertiesSchema", access = JsonProperty.Access.WRITE_ONLY)
- private String propertiesSchema;
-
- /*
- * List of resource types this Target Type can extend.
- */
- @JsonProperty(value = "resourceTypes", access = JsonProperty.Access.WRITE_ONLY)
- private List resourceTypes;
-
- /**
- * Creates an instance of TargetTypeProperties class.
- */
- public TargetTypeProperties() {
- }
-
- /**
- * Get the displayName property: Localized string of the display name.
- *
- * @return the displayName value.
- */
- public String displayName() {
- return this.displayName;
- }
-
- /**
- * Get the description property: Localized string of the description.
- *
- * @return the description value.
- */
- public String description() {
- return this.description;
- }
-
- /**
- * Get the propertiesSchema property: URL to retrieve JSON schema of the Target Type properties.
- *
- * @return the propertiesSchema value.
- */
- public String propertiesSchema() {
- return this.propertiesSchema;
- }
-
- /**
- * Get the resourceTypes property: List of resource types this Target Type can extend.
- *
- * @return the resourceTypes value.
- */
- public List resourceTypes() {
- return this.resourceTypes;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesClientImpl.java
index 40ab78721ad4f..0d650a67b2948 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
@@ -66,56 +66,43 @@ public final class CapabilitiesClientImpl implements CapabilitiesClient {
@ServiceInterface(name = "ChaosManagementClien")
public interface CapabilitiesService {
@Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities")
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> list(@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("parentProviderNamespace") String parentProviderNamespace,
- @PathParam("parentResourceType") String parentResourceType,
- @PathParam("parentResourceName") String parentResourceName, @PathParam("targetName") String targetName,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("targetName") String targetName,
@QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept,
Context context);
@Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}")
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> get(@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("parentProviderNamespace") String parentProviderNamespace,
- @PathParam("parentResourceType") String parentResourceType,
- @PathParam("parentResourceName") String parentResourceName, @PathParam("targetName") String targetName,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("targetName") String targetName,
@PathParam("capabilityName") String capabilityName, @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}")
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("targetName") String targetName,
+ @PathParam("capabilityName") String capabilityName, @BodyParam("application/json") CapabilityInner resource,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}")
@ExpectedResponses({ 200, 204 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("parentProviderNamespace") String parentProviderNamespace,
- @PathParam("parentResourceType") String parentResourceType,
- @PathParam("parentResourceName") String parentResourceName, @PathParam("targetName") String targetName,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("targetName") String targetName,
@PathParam("capabilityName") String capabilityName, @HeaderParam("Accept") String accept, Context context);
- @Headers({ "Content-Type: application/json" })
- @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> createOrUpdate(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("parentProviderNamespace") String parentProviderNamespace,
- @PathParam("parentResourceType") String parentResourceType,
- @PathParam("parentResourceName") String parentResourceName, @PathParam("targetName") String targetName,
- @PathParam("capabilityName") String capabilityName,
- @BodyParam("application/json") CapabilityInner capability, @HeaderParam("Accept") String accept,
- Context context);
-
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@@ -127,10 +114,7 @@ Mono> listNext(@PathParam(value = "nextLink", enc
/**
* 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 targetName String that represents a Target resource name.
* @param continuationToken String that sets the continuation token.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -140,8 +124,7 @@ Mono> listNext(@PathParam(value = "nextLink", enc
* successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String resourceGroupName,
- String parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName,
+ private Mono> listSinglePageAsync(String resourceGroupName, String targetName,
String continuationToken) {
if (this.client.getEndpoint() == null) {
return Mono.error(
@@ -155,26 +138,13 @@ private Mono> listSinglePageAsync(String resource
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- if (parentProviderNamespace == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null."));
- }
- if (parentResourceType == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter parentResourceType is required and cannot be null."));
- }
- if (parentResourceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter parentResourceName is required and cannot be null."));
- }
if (targetName == null) {
return Mono.error(new IllegalArgumentException("Parameter targetName is required and cannot be null."));
}
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, continuationToken, accept, context))
+ this.client.getSubscriptionId(), resourceGroupName, targetName, continuationToken, accept, context))
.>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -183,10 +153,7 @@ private Mono> listSinglePageAsync(String 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 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.
@@ -197,8 +164,7 @@ private Mono> listSinglePageAsync(String resource
* successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String resourceGroupName,
- String parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName,
+ private Mono> listSinglePageAsync(String resourceGroupName, String targetName,
String continuationToken, Context context) {
if (this.client.getEndpoint() == null) {
return Mono.error(
@@ -212,18 +178,6 @@ private Mono> listSinglePageAsync(String resource
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- if (parentProviderNamespace == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null."));
- }
- if (parentResourceType == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter parentResourceType is required and cannot be null."));
- }
- if (parentResourceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter parentResourceName is required and cannot be null."));
- }
if (targetName == null) {
return Mono.error(new IllegalArgumentException("Parameter targetName is required and cannot be null."));
}
@@ -231,8 +185,7 @@ 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, targetName, continuationToken, accept, context)
.map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
res.getValue().value(), res.getValue().nextLink(), null));
}
@@ -240,10 +193,7 @@ private Mono> listSinglePageAsync(String 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 targetName String that represents a Target resource name.
* @param continuationToken String that sets the continuation token.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -253,19 +203,16 @@ private Mono> listSinglePageAsync(String resource
* {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, String continuationToken) {
- return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, continuationToken), nextLink -> listNextSinglePageAsync(nextLink));
+ private PagedFlux listAsync(String resourceGroupName, String targetName,
+ String continuationToken) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, targetName, continuationToken),
+ nextLink -> listNextSinglePageAsync(nextLink));
}
/**
* Get a list of Capability resources that extend a Target resource..
*
- * @param resourceGroupName String that represents an Azure resource group.
- * @param parentProviderNamespace String that represents a resource provider namespace.
- * @param parentResourceType String that represents a resource type.
- * @param parentResourceName String that represents a resource name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -274,20 +221,16 @@ private PagedFlux listAsync(String resourceGroupName, String pa
* {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName) {
+ private PagedFlux listAsync(String resourceGroupName, String targetName) {
final String continuationToken = null;
- return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, continuationToken), nextLink -> listNextSinglePageAsync(nextLink));
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, targetName, continuationToken),
+ nextLink -> listNextSinglePageAsync(nextLink));
}
/**
* Get a list of Capability resources that extend a Target resource..
*
- * @param resourceGroupName String that represents an Azure resource group.
- * @param parentProviderNamespace String that represents a resource provider namespace.
- * @param parentResourceType String that represents a resource type.
- * @param parentResourceName String that represents a resource name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -298,22 +241,16 @@ private PagedFlux listAsync(String resourceGroupName, String pa
* {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, String continuationToken,
+ private PagedFlux listAsync(String resourceGroupName, String targetName, String continuationToken,
Context context) {
- return new PagedFlux<>(
- () -> listSinglePageAsync(resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, continuationToken, context),
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, targetName, continuationToken, context),
nextLink -> listNextSinglePageAsync(nextLink, context));
}
/**
* Get a list of Capability resources that extend a Target resource..
*
- * @param resourceGroupName String that represents an Azure resource group.
- * @param parentProviderNamespace String that represents a resource provider namespace.
- * @param parentResourceType String that represents a resource type.
- * @param parentResourceName String that represents a resource name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -322,20 +259,15 @@ private PagedFlux listAsync(String resourceGroupName, String pa
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName) {
+ public PagedIterable list(String resourceGroupName, String targetName) {
final String continuationToken = null;
- return new PagedIterable<>(listAsync(resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, continuationToken));
+ return new PagedIterable<>(listAsync(resourceGroupName, targetName, continuationToken));
}
/**
* Get a list of Capability resources that extend a Target resource..
*
- * @param resourceGroupName String that represents an Azure resource group.
- * @param parentProviderNamespace String that represents a resource provider namespace.
- * @param parentResourceType String that represents a resource type.
- * @param parentResourceName String that represents a resource name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -346,20 +278,15 @@ public PagedIterable list(String resourceGroupName, String pare
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, String continuationToken,
+ public PagedIterable list(String resourceGroupName, String targetName, String continuationToken,
Context context) {
- return new PagedIterable<>(listAsync(resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, continuationToken, context));
+ return new PagedIterable<>(listAsync(resourceGroupName, targetName, continuationToken, context));
}
/**
* Get a Capability resource that extends a Target resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
- * @param parentProviderNamespace String that represents a resource provider namespace.
- * @param parentResourceType String that represents a resource type.
- * @param parentResourceName String that represents a resource name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -369,8 +296,7 @@ public PagedIterable list(String resourceGroupName, String pare
* of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String resourceGroupName,
- String parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName,
+ private Mono> getWithResponseAsync(String resourceGroupName, String targetName,
String capabilityName) {
if (this.client.getEndpoint() == null) {
return Mono.error(
@@ -384,18 +310,6 @@ private Mono> getWithResponseAsync(String resourceGrou
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- if (parentProviderNamespace == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null."));
- }
- if (parentResourceType == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter parentResourceType is required and cannot be null."));
- }
- if (parentResourceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter parentResourceName is required and cannot be null."));
- }
if (targetName == null) {
return Mono.error(new IllegalArgumentException("Parameter targetName is required and cannot be null."));
}
@@ -405,18 +319,14 @@ private Mono> getWithResponseAsync(String resourceGrou
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, capabilityName, accept, context))
+ this.client.getSubscriptionId(), resourceGroupName, targetName, capabilityName, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Get a Capability resource that extends a Target resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
- * @param parentProviderNamespace String that represents a resource provider namespace.
- * @param parentResourceType String that represents a resource type.
- * @param parentResourceName String that represents a resource name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -427,8 +337,7 @@ private Mono> getWithResponseAsync(String resourceGrou
* of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String resourceGroupName,
- String parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName,
+ private Mono> getWithResponseAsync(String resourceGroupName, String targetName,
String capabilityName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono.error(
@@ -442,18 +351,6 @@ private Mono> getWithResponseAsync(String resourceGrou
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- if (parentProviderNamespace == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null."));
- }
- if (parentResourceType == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter parentResourceType is required and cannot be null."));
- }
- if (parentResourceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter parentResourceName is required and cannot be null."));
- }
if (targetName == null) {
return Mono.error(new IllegalArgumentException("Parameter targetName is required and cannot be null."));
}
@@ -463,17 +360,13 @@ private Mono> getWithResponseAsync(String resourceGrou
final String accept = "application/json";
context = this.client.mergeContext(context);
return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName,
- capabilityName, accept, context);
+ resourceGroupName, targetName, capabilityName, accept, context);
}
/**
* Get a Capability resource that extends a Target resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
- * @param parentProviderNamespace String that represents a resource provider namespace.
- * @param parentResourceType String that represents a resource type.
- * @param parentResourceName String that represents a resource name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -482,19 +375,15 @@ private Mono> getWithResponseAsync(String resourceGrou
* @return a Capability resource that extends a Target resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getAsync(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, String capabilityName) {
- return getWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName,
- targetName, capabilityName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ private Mono getAsync(String resourceGroupName, String targetName, String capabilityName) {
+ return getWithResponseAsync(resourceGroupName, targetName, capabilityName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
* Get a Capability resource that extends a Target resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
- * @param parentProviderNamespace String that represents a resource provider namespace.
- * @param parentResourceType String that represents a resource type.
- * @param parentResourceName String that represents a resource name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -504,20 +393,15 @@ private Mono getAsync(String resourceGroupName, String parentPr
* @return a Capability resource that extends a Target resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, String capabilityName,
+ public Response getWithResponse(String resourceGroupName, String targetName, String capabilityName,
Context context) {
- return getWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName,
- targetName, capabilityName, context).block();
+ return getWithResponseAsync(resourceGroupName, targetName, capabilityName, context).block();
}
/**
* Get a Capability resource that extends a Target resource.
*
- * @param resourceGroupName String that represents an Azure resource group.
- * @param parentProviderNamespace String that represents a resource provider namespace.
- * @param parentResourceType String that represents a resource type.
- * @param parentResourceName String that represents a resource name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -526,29 +410,26 @@ public Response getWithResponse(String resourceGroupName, Strin
* @return a Capability resource that extends a Target resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public CapabilityInner get(String resourceGroupName, String parentProviderNamespace, String parentResourceType,
- String parentResourceName, String targetName, String capabilityName) {
- return getWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName,
- targetName, capabilityName, Context.NONE).getValue();
+ public CapabilityInner get(String resourceGroupName, String targetName, String capabilityName) {
+ return getWithResponse(resourceGroupName, targetName, capabilityName, Context.NONE).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 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 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."));
@@ -561,51 +442,42 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- if (parentProviderNamespace == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null."));
- }
- if (parentResourceType == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter parentResourceType is required and cannot be null."));
- }
- if (parentResourceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter parentResourceName is required and cannot be null."));
- }
if (targetName == null) {
return Mono.error(new IllegalArgumentException("Parameter targetName is required and cannot be null."));
}
if (capabilityName == null) {
return Mono.error(new IllegalArgumentException("Parameter capabilityName is required and cannot be null."));
}
+ if (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(),
- this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, capabilityName, accept, context))
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, 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 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 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."));
@@ -618,115 +490,95 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- if (parentProviderNamespace == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null."));
- }
- if (parentResourceType == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter parentResourceType is required and cannot be null."));
- }
- if (parentResourceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter parentResourceName is required and cannot be null."));
- }
if (targetName == null) {
return Mono.error(new IllegalArgumentException("Parameter targetName is required and cannot be null."));
}
if (capabilityName == null) {
return Mono.error(new IllegalArgumentException("Parameter capabilityName is required and cannot be null."));
}
+ if (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, 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 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 targetName,
+ String capabilityName, CapabilityInner resource) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, 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 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 targetName,
+ String capabilityName, CapabilityInner resource, Context context) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, 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 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 targetName, String capabilityName,
+ CapabilityInner resource) {
+ return createOrUpdateWithResponse(resourceGroupName, 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 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 targetName,
+ String capabilityName) {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
@@ -739,58 +591,34 @@ private Mono> createOrUpdateWithResponseAsync(String r
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- if (parentProviderNamespace == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null."));
- }
- if (parentResourceType == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter parentResourceType is required and cannot be null."));
- }
- if (parentResourceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter parentResourceName is required and cannot be null."));
- }
if (targetName == null) {
return Mono.error(new IllegalArgumentException("Parameter targetName is required and cannot be null."));
}
if (capabilityName == null) {
return Mono.error(new IllegalArgumentException("Parameter capabilityName is required and cannot be null."));
}
- if (capability == null) {
- return Mono.error(new IllegalArgumentException("Parameter capability is required and cannot be null."));
- } else {
- capability.validate();
- }
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, capabilityName, capability, accept, context))
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, 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 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 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."));
@@ -803,113 +631,71 @@ private Mono> createOrUpdateWithResponseAsync(String r
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- if (parentProviderNamespace == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null."));
- }
- if (parentResourceType == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter parentResourceType is required and cannot be null."));
- }
- if (parentResourceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter parentResourceName is required and cannot be null."));
- }
if (targetName == null) {
return Mono.error(new IllegalArgumentException("Parameter targetName is required and cannot be null."));
}
if (capabilityName == null) {
return Mono.error(new IllegalArgumentException("Parameter capabilityName is required and cannot be null."));
}
- if (capability == null) {
- return Mono.error(new IllegalArgumentException("Parameter capability is required and cannot be null."));
- } else {
- capability.validate();
- }
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, capabilityName, capability, accept, context);
+ return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, 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 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 targetName, String capabilityName) {
+ return deleteWithResponseAsync(resourceGroupName, 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 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 targetName, String capabilityName,
+ Context context) {
+ return deleteWithResponseAsync(resourceGroupName, 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 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 targetName, String capabilityName) {
+ deleteWithResponse(resourceGroupName, targetName, capabilityName, Context.NONE);
}
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -935,9 +721,7 @@ private Mono> listNextSinglePageAsync(String next
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
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 b3eff31ef35e6..b4f25e0986070 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
@@ -27,28 +27,22 @@ public CapabilitiesImpl(CapabilitiesClient innerClient,
this.serviceManager = serviceManager;
}
- public PagedIterable list(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName) {
- PagedIterable inner = this.serviceClient()
- .list(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName);
+ public PagedIterable list(String resourceGroupName, String targetName) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, targetName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new CapabilityImpl(inner1, this.manager()));
}
- public PagedIterable list(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, String continuationToken,
+ public PagedIterable list(String resourceGroupName, String targetName, String continuationToken,
Context context) {
- PagedIterable inner = this.serviceClient()
- .list(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName,
- continuationToken, context);
+ PagedIterable inner
+ = this.serviceClient().list(resourceGroupName, targetName, continuationToken, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new CapabilityImpl(inner1, this.manager()));
}
- public Response getWithResponse(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, String capabilityName,
+ public Response getWithResponse(String resourceGroupName, String targetName, String capabilityName,
Context context) {
- Response inner = this.serviceClient()
- .getWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName,
- targetName, capabilityName, context);
+ Response inner
+ = this.serviceClient().getWithResponse(resourceGroupName, targetName, capabilityName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new CapabilityImpl(inner.getValue(), this.manager()));
@@ -57,11 +51,8 @@ public Response getWithResponse(String resourceGroupName, String par
}
}
- public Capability get(String resourceGroupName, String parentProviderNamespace, String parentResourceType,
- String parentResourceName, String targetName, String capabilityName) {
- CapabilityInner inner = this.serviceClient()
- .get(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName,
- capabilityName);
+ public Capability get(String resourceGroupName, String targetName, String capabilityName) {
+ CapabilityInner inner = this.serviceClient().get(resourceGroupName, targetName, capabilityName);
if (inner != null) {
return new CapabilityImpl(inner, this.manager());
} else {
@@ -69,46 +60,89 @@ public Capability get(String resourceGroupName, String parentProviderNamespace,
}
}
- public Response deleteWithResponse(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, String capabilityName,
+ public Response deleteWithResponse(String resourceGroupName, String targetName, String capabilityName,
Context context) {
- return this.serviceClient()
- .deleteWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName,
- targetName, capabilityName, context);
+ return this.serviceClient().deleteWithResponse(resourceGroupName, 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 void delete(String resourceGroupName, String targetName, String capabilityName) {
+ this.serviceClient().delete(resourceGroupName, targetName, capabilityName);
}
- public Response createOrUpdateWithResponse(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, String capabilityName,
- CapabilityInner capability, Context context) {
- Response inner = this.serviceClient()
- .createOrUpdateWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType,
- parentResourceName, targetName, capabilityName, capability, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new CapabilityImpl(inner.getValue(), this.manager()));
- } else {
- return null;
+ public Capability getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String targetName = ResourceManagerUtils.getValueFromIdByName(id, "targets");
+ if (targetName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'targets'.", id)));
+ }
+ String capabilityName = ResourceManagerUtils.getValueFromIdByName(id, "capabilities");
+ if (capabilityName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'capabilities'.", id)));
}
+ return this.getWithResponse(resourceGroupName, targetName, capabilityName, Context.NONE).getValue();
}
- public Capability createOrUpdate(String resourceGroupName, String parentProviderNamespace,
- String parentResourceType, String parentResourceName, String targetName, String capabilityName,
- CapabilityInner capability) {
- CapabilityInner inner = this.serviceClient()
- .createOrUpdate(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName,
- targetName, capabilityName, capability);
- if (inner != null) {
- return new CapabilityImpl(inner, this.manager());
- } else {
- return null;
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String targetName = ResourceManagerUtils.getValueFromIdByName(id, "targets");
+ if (targetName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'targets'.", id)));
+ }
+ String capabilityName = ResourceManagerUtils.getValueFromIdByName(id, "capabilities");
+ if (capabilityName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'capabilities'.", id)));
}
+ return this.getWithResponse(resourceGroupName, targetName, capabilityName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String targetName = ResourceManagerUtils.getValueFromIdByName(id, "targets");
+ if (targetName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'targets'.", id)));
+ }
+ String capabilityName = ResourceManagerUtils.getValueFromIdByName(id, "capabilities");
+ if (capabilityName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'capabilities'.", id)));
+ }
+ this.deleteWithResponse(resourceGroupName, targetName, capabilityName, Context.NONE);
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String targetName = ResourceManagerUtils.getValueFromIdByName(id, "targets");
+ if (targetName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'targets'.", id)));
+ }
+ String capabilityName = ResourceManagerUtils.getValueFromIdByName(id, "capabilities");
+ if (capabilityName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'capabilities'.", id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, targetName, capabilityName, context);
}
private CapabilitiesClient serviceClient() {
@@ -118,4 +152,8 @@ private CapabilitiesClient serviceClient() {
private com.azure.resourcemanager.chaos.ChaosManager manager() {
return this.serviceManager;
}
+
+ public CapabilityImpl define(String name) {
+ return new CapabilityImpl(name, this.manager());
+ }
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityImpl.java
index 1fae5a86f13a8..f1c92ff863817 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityImpl.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityImpl.java
@@ -5,19 +5,16 @@
package com.azure.resourcemanager.chaos.implementation;
import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner;
import com.azure.resourcemanager.chaos.models.Capability;
+import com.azure.resourcemanager.chaos.models.CapabilityProperties;
-public final class CapabilityImpl implements Capability {
+public final class CapabilityImpl implements Capability, Capability.Definition, Capability.Update {
private CapabilityInner innerObject;
private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
- CapabilityImpl(CapabilityInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- }
-
public String id() {
return this.innerModel().id();
}
@@ -30,35 +27,106 @@ public String type() {
return this.innerModel().type();
}
+ public CapabilityProperties properties() {
+ return this.innerModel().properties();
+ }
+
public SystemData systemData() {
return this.innerModel().systemData();
}
- public String publisher() {
- return this.innerModel().publisher();
+ public String resourceGroupName() {
+ return resourceGroupName;
}
- public String targetType() {
- return this.innerModel().targetType();
+ public CapabilityInner innerModel() {
+ return this.innerObject;
}
- public String description() {
- return this.innerModel().description();
+ private com.azure.resourcemanager.chaos.ChaosManager manager() {
+ return this.serviceManager;
}
- public String parametersSchema() {
- return this.innerModel().parametersSchema();
+ private String resourceGroupName;
+
+ private String targetName;
+
+ private String capabilityName;
+
+ public CapabilityImpl withExistingTarget(String resourceGroupName, String targetName) {
+ this.resourceGroupName = resourceGroupName;
+ this.targetName = targetName;
+ return this;
}
- public String urn() {
- return this.innerModel().urn();
+ public Capability create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getCapabilities()
+ .createOrUpdateWithResponse(resourceGroupName, targetName, capabilityName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
}
- public CapabilityInner innerModel() {
- return this.innerObject;
+ public Capability create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getCapabilities()
+ .createOrUpdateWithResponse(resourceGroupName, targetName, capabilityName, this.innerModel(), context)
+ .getValue();
+ return this;
}
- private com.azure.resourcemanager.chaos.ChaosManager manager() {
- return this.serviceManager;
+ CapabilityImpl(String name, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerObject = new CapabilityInner();
+ this.serviceManager = serviceManager;
+ this.capabilityName = name;
+ }
+
+ public CapabilityImpl update() {
+ return this;
+ }
+
+ public Capability apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getCapabilities()
+ .createOrUpdateWithResponse(resourceGroupName, targetName, capabilityName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Capability apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getCapabilities()
+ .createOrUpdateWithResponse(resourceGroupName, targetName, capabilityName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ CapabilityImpl(CapabilityInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.targetName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "targets");
+ this.capabilityName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "capabilities");
+ }
+
+ public Capability refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getCapabilities()
+ .getWithResponse(resourceGroupName, targetName, capabilityName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Capability refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getCapabilities()
+ .getWithResponse(resourceGroupName, targetName, capabilityName, context)
+ .getValue();
+ return this;
+ }
+
+ public CapabilityImpl withProperties(CapabilityProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
}
}
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 c6076205a25af..5d7924e20c621 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
@@ -7,9 +7,7 @@
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeInner;
import com.azure.resourcemanager.chaos.models.CapabilityType;
-import com.azure.resourcemanager.chaos.models.CapabilityTypePropertiesRuntimeProperties;
-import java.util.Collections;
-import java.util.List;
+import com.azure.resourcemanager.chaos.models.CapabilityTypeProperties;
public final class CapabilityTypeImpl implements CapabilityType {
private CapabilityTypeInner innerObject;
@@ -33,62 +31,12 @@ public String type() {
return this.innerModel().type();
}
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
- public String location() {
- return this.innerModel().location();
- }
-
- public String publisher() {
- return this.innerModel().publisher();
- }
-
- public String targetType() {
- return this.innerModel().targetType();
- }
-
- public String displayName() {
- return this.innerModel().displayName();
- }
-
- public String description() {
- return this.innerModel().description();
+ public CapabilityTypeProperties properties() {
+ return this.innerModel().properties();
}
- public String parametersSchema() {
- return this.innerModel().parametersSchema();
- }
-
- public String urn() {
- return this.innerModel().urn();
- }
-
- public String kind() {
- return this.innerModel().kind();
- }
-
- public List azureRbacActions() {
- List inner = this.innerModel().azureRbacActions();
- if (inner != null) {
- return Collections.unmodifiableList(inner);
- } else {
- return Collections.emptyList();
- }
- }
-
- public List azureRbacDataActions() {
- List inner = this.innerModel().azureRbacDataActions();
- if (inner != null) {
- return Collections.unmodifiableList(inner);
- } else {
- return Collections.emptyList();
- }
- }
-
- public CapabilityTypePropertiesRuntimeProperties runtimeProperties() {
- return this.innerModel().runtimeProperties();
+ public SystemData systemData() {
+ return this.innerModel().systemData();
}
public CapabilityTypeInner innerModel() {
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 b49dfa127debb..4c5c047b972ba 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