diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index c234badfbff9..d6ca286bdad2 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -436,7 +436,7 @@ com.azure.resourcemanager:azure-resourcemanager-managednetworkfabric;1.0.0;1.1.0 com.azure.resourcemanager:azure-resourcemanager-iotfirmwaredefense;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-quantum;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-sphere;1.0.0-beta.1;1.0.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-chaos;1.0.0;1.1.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-chaos;1.0.0;1.1.0 com.azure.resourcemanager:azure-resourcemanager-defendereasm;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-hdinsight-containers;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-apicenter;1.0.0;1.1.0-beta.1 diff --git a/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md b/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md index 9965d26918be..aa08b1608e7d 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md +++ b/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md @@ -1,14 +1,19 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0 (2024-03-15) + +- 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). ### Features Added -### Breaking Changes +#### `models.ExperimentUpdate` was modified + +* `tags()` was added +* `withTags(java.util.Map)` was added -### Bugs Fixed +#### `models.Experiment$Update` was modified -### Other Changes +* `withTags(java.util.Map)` was added ## 1.0.0 (2023-11-16) diff --git a/sdk/chaos/azure-resourcemanager-chaos/README.md b/sdk/chaos/azure-resourcemanager-chaos/README.md index ca6b629cdb0c..4aaf374a2027 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-2023-11. 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-2024-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.0.0 + 1.1.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md b/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md index d0e54ab142e3..fa5e6756ef17 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md +++ b/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md @@ -47,29 +47,24 @@ ```java import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner; -/** Samples for Capabilities CreateOrUpdate. */ +/** + * Samples for Capabilities CreateOrUpdate. + */ public final class CapabilitiesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateCapability.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateCapability.json */ /** * Sample code: Create/update a Capability that extends a virtual machine Target resource. - * + * * @param manager Entry point to ChaosManager. */ public static void createUpdateACapabilityThatExtendsAVirtualMachineTargetResource( com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .capabilities() - .createOrUpdateWithResponse( - "exampleRG", - "Microsoft.Compute", - "virtualMachines", - "exampleVM", - "Microsoft-VirtualMachine", - "Shutdown-1.0", - new CapabilityInner(), - com.azure.core.util.Context.NONE); + manager.capabilities().createOrUpdateWithResponse("exampleRG", "Microsoft.Compute", "virtualMachines", + "exampleVM", "Microsoft-VirtualMachine", "Shutdown-1.0", new CapabilityInner(), + com.azure.core.util.Context.NONE); } } ``` @@ -77,28 +72,23 @@ public final class CapabilitiesCreateOrUpdateSamples { ### Capabilities_Delete ```java -/** Samples for Capabilities Delete. */ +/** + * Samples for Capabilities Delete. + */ public final class CapabilitiesDeleteSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteCapability.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteCapability.json */ /** * Sample code: Delete a Capability that extends a virtual machine Target resource. - * + * * @param manager Entry point to ChaosManager. */ public static void deleteACapabilityThatExtendsAVirtualMachineTargetResource( com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .capabilities() - .deleteWithResponse( - "exampleRG", - "Microsoft.Compute", - "virtualMachines", - "exampleVM", - "Microsoft-VirtualMachine", - "Shutdown-1.0", - com.azure.core.util.Context.NONE); + manager.capabilities().deleteWithResponse("exampleRG", "Microsoft.Compute", "virtualMachines", "exampleVM", + "Microsoft-VirtualMachine", "Shutdown-1.0", com.azure.core.util.Context.NONE); } } ``` @@ -106,28 +96,23 @@ public final class CapabilitiesDeleteSamples { ### Capabilities_Get ```java -/** Samples for Capabilities Get. */ +/** + * Samples for Capabilities Get. + */ public final class CapabilitiesGetSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetCapability.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetCapability.json */ /** * Sample code: Get a Capability that extends a virtual machine Target resource. - * + * * @param manager Entry point to ChaosManager. */ - public static void getACapabilityThatExtendsAVirtualMachineTargetResource( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .capabilities() - .getWithResponse( - "exampleRG", - "Microsoft.Compute", - "virtualMachines", - "exampleVM", - "Microsoft-VirtualMachine", - "Shutdown-1.0", - com.azure.core.util.Context.NONE); + 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); } } ``` @@ -135,28 +120,23 @@ public final class CapabilitiesGetSamples { ### Capabilities_List ```java -/** Samples for Capabilities List. */ +/** + * Samples for Capabilities List. + */ public final class CapabilitiesListSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListCapabilities.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListCapabilities.json */ /** * Sample code: List all Capabilities that extend a virtual machine Target resource. - * + * * @param manager Entry point to ChaosManager. */ public static void listAllCapabilitiesThatExtendAVirtualMachineTargetResource( com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .capabilities() - .list( - "exampleRG", - "Microsoft.Compute", - "virtualMachines", - "exampleVM", - "Microsoft-VirtualMachine", - null, - com.azure.core.util.Context.NONE); + manager.capabilities().list("exampleRG", "Microsoft.Compute", "virtualMachines", "exampleVM", + "Microsoft-VirtualMachine", null, com.azure.core.util.Context.NONE); } } ``` @@ -164,21 +144,23 @@ public final class CapabilitiesListSamples { ### CapabilityTypes_Get ```java -/** Samples for CapabilityTypes Get. */ +/** + * Samples for CapabilityTypes Get. + */ public final class CapabilityTypesGetSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetCapabilityType.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetCapabilityType.json */ /** * Sample code: Get a Capability Type for a virtual machine Target resource on westus2 location. - * + * * @param manager Entry point to ChaosManager. */ public static void getACapabilityTypeForAVirtualMachineTargetResourceOnWestus2Location( com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .capabilityTypes() - .getWithResponse("westus2", "Microsoft-VirtualMachine", "Shutdown-1.0", com.azure.core.util.Context.NONE); + manager.capabilityTypes().getWithResponse("westus2", "Microsoft-VirtualMachine", "Shutdown-1.0", + com.azure.core.util.Context.NONE); } } ``` @@ -186,14 +168,17 @@ public final class CapabilityTypesGetSamples { ### CapabilityTypes_List ```java -/** Samples for CapabilityTypes List. */ +/** + * Samples for CapabilityTypes List. + */ public final class CapabilityTypesListSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListCapabilityTypes.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListCapabilityTypes.json */ /** * Sample code: List all Capability Types for a virtual machine Target resource on westus2 location. - * + * * @param manager Entry point to ChaosManager. */ public static void listAllCapabilityTypesForAVirtualMachineTargetResourceOnWestus2Location( @@ -206,14 +191,17 @@ public final class CapabilityTypesListSamples { ### Experiments_Cancel ```java -/** Samples for Experiments Cancel. */ +/** + * Samples for Experiments Cancel. + */ public final class ExperimentsCancelSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CancelExperiment.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CancelExperiment.json */ /** * Sample code: Cancel a running Experiment. - * + * * @param manager Entry point to ChaosManager. */ public static void cancelARunningExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) { @@ -237,59 +225,35 @@ import com.azure.resourcemanager.chaos.models.TargetReferenceType; import java.time.Duration; import java.util.Arrays; -/** Samples for Experiments CreateOrUpdate. */ +/** + * Samples for Experiments CreateOrUpdate. + */ public final class ExperimentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateExperiment.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateExperiment.json */ /** * Sample code: Create/update a Experiment in a resource group. - * + * * @param manager Entry point to ChaosManager. */ public static void createUpdateAExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .experiments() - .define("exampleExperiment") - .withRegion("eastus2euap") + 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(); + 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(); } } ``` @@ -297,14 +261,17 @@ public final class ExperimentsCreateOrUpdateSamples { ### Experiments_Delete ```java -/** Samples for Experiments Delete. */ +/** + * Samples for Experiments Delete. + */ public final class ExperimentsDeleteSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteExperiment.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteExperiment.json */ /** * Sample code: Delete a Experiment in a resource group. - * + * * @param manager Entry point to ChaosManager. */ public static void deleteAExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { @@ -316,24 +283,22 @@ public final class ExperimentsDeleteSamples { ### Experiments_ExecutionDetails ```java -/** Samples for Experiments ExecutionDetails. */ +/** + * Samples for Experiments ExecutionDetails. + */ public final class ExperimentsExecutionDetailsSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DetailsExperiment.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DetailsExperiment.json */ /** * Sample code: Get experiment execution details. - * + * * @param manager Entry point to ChaosManager. */ public static void getExperimentExecutionDetails(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .experiments() - .executionDetailsWithResponse( - "exampleRG", - "exampleExperiment", - "f24500ad-744e-4a26-864b-b76199eac333", - com.azure.core.util.Context.NONE); + manager.experiments().executionDetailsWithResponse("exampleRG", "exampleExperiment", + "f24500ad-744e-4a26-864b-b76199eac333", com.azure.core.util.Context.NONE); } } ``` @@ -341,20 +306,22 @@ public final class ExperimentsExecutionDetailsSamples { ### Experiments_GetByResourceGroup ```java -/** Samples for Experiments GetByResourceGroup. */ +/** + * Samples for Experiments GetByResourceGroup. + */ public final class ExperimentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetExperiment.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetExperiment.json */ /** * Sample code: Get a Experiment in a resource group. - * + * * @param manager Entry point to ChaosManager. */ public static void getAExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .experiments() - .getByResourceGroupWithResponse("exampleRG", "exampleExperiment", com.azure.core.util.Context.NONE); + manager.experiments().getByResourceGroupWithResponse("exampleRG", "exampleExperiment", + com.azure.core.util.Context.NONE); } } ``` @@ -362,24 +329,22 @@ public final class ExperimentsGetByResourceGroupSamples { ### Experiments_GetExecution ```java -/** Samples for Experiments GetExecution. */ +/** + * Samples for Experiments GetExecution. + */ public final class ExperimentsGetExecutionSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetExperimentExecution.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetExperimentExecution.json */ /** * Sample code: Get the execution of a Experiment. - * + * * @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); + manager.experiments().getExecutionWithResponse("exampleRG", "exampleExperiment", + "f24500ad-744e-4a26-864b-b76199eac333", com.azure.core.util.Context.NONE); } } ``` @@ -387,14 +352,18 @@ public final class ExperimentsGetExecutionSamples { ### Experiments_List ```java -/** Samples for Experiments List. */ +/** + * Samples for Experiments List. + */ public final class ExperimentsListSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentsInASubscription.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentsInASubscription. + * json */ /** * Sample code: List all Experiments in a subscription. - * + * * @param manager Entry point to ChaosManager. */ public static void listAllExperimentsInASubscription(com.azure.resourcemanager.chaos.ChaosManager manager) { @@ -406,14 +375,17 @@ public final class ExperimentsListSamples { ### Experiments_ListAllExecutions ```java -/** Samples for Experiments ListAllExecutions. */ +/** + * Samples for Experiments ListAllExecutions. + */ public final class ExperimentsListAllExecutionsSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentExecutions.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentExecutions.json */ /** * Sample code: List all executions of an Experiment. - * + * * @param manager Entry point to ChaosManager. */ public static void listAllExecutionsOfAnExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) { @@ -425,14 +397,18 @@ public final class ExperimentsListAllExecutionsSamples { ### Experiments_ListByResourceGroup ```java -/** Samples for Experiments ListByResourceGroup. */ +/** + * Samples for Experiments ListByResourceGroup. + */ public final class ExperimentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentsInAResourceGroup.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentsInAResourceGroup. + * json */ /** * Sample code: List all Experiments in a resource group. - * + * * @param manager Entry point to ChaosManager. */ public static void listAllExperimentsInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { @@ -444,14 +420,17 @@ public final class ExperimentsListByResourceGroupSamples { ### Experiments_Start ```java -/** Samples for Experiments Start. */ +/** + * Samples for Experiments Start. + */ public final class ExperimentsStartSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/StartExperiment.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/StartExperiment.json */ /** * Sample code: Start a Experiment. - * + * * @param manager Entry point to ChaosManager. */ public static void startAExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) { @@ -470,31 +449,27 @@ import com.azure.resourcemanager.chaos.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; -/** Samples for Experiments Update. */ +/** + * Samples for Experiments Update. + */ public final class ExperimentsUpdateSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/UpdateExperiment.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/UpdateExperiment.json */ /** * Sample code: Update an Experiment in a resource group. - * + * * @param manager Entry point to ChaosManager. */ public static void updateAnExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { - Experiment resource = - manager - .experiments() - .getByResourceGroupWithResponse("exampleRG", "exampleExperiment", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withIdentity( - new ResourceIdentity() - .withType(ResourceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentity/exampleUMI", - new UserAssignedIdentity()))) + 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(); } @@ -515,20 +490,22 @@ public final class ExperimentsUpdateSamples { ### OperationStatuses_Get ```java -/** Samples for OperationStatuses Get. */ +/** + * Samples for OperationStatuses Get. + */ public final class OperationStatusesGetSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetOperationStatus.json + * 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); + manager.operationStatuses().getWithResponse("West US", "713192d7-503f-477a-9cfe-4efc3ee2bd11", + com.azure.core.util.Context.NONE); } } ``` @@ -536,14 +513,17 @@ public final class OperationStatusesGetSamples { ### TargetTypes_Get ```java -/** Samples for TargetTypes Get. */ +/** + * Samples for TargetTypes Get. + */ public final class TargetTypesGetSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetTargetType.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetTargetType.json */ /** * Sample code: Get a Target Type for westus2 location. - * + * * @param manager Entry point to ChaosManager. */ public static void getATargetTypeForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { @@ -555,14 +535,17 @@ public final class TargetTypesGetSamples { ### TargetTypes_List ```java -/** Samples for TargetTypes List. */ +/** + * Samples for TargetTypes List. + */ public final class TargetTypesListSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListTargetTypes.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListTargetTypes.json */ /** * Sample code: List all Target Types for westus2 location. - * + * * @param manager Entry point to ChaosManager. */ public static void listAllTargetTypesForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { @@ -581,37 +564,28 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -/** Samples for Targets CreateOrUpdate. */ +/** + * Samples for Targets CreateOrUpdate. + */ public final class TargetsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateTarget.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateTarget.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); + 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 @@ -631,27 +605,23 @@ public final class TargetsCreateOrUpdateSamples { ### Targets_Delete ```java -/** Samples for Targets Delete. */ +/** + * Samples for Targets Delete. + */ public final class TargetsDeleteSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteTarget.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteTarget.json */ /** * Sample code: Delete a Target that extends a virtual machine resource. - * + * * @param manager Entry point to ChaosManager. */ - public static void deleteATargetThatExtendsAVirtualMachineResource( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .targets() - .deleteWithResponse( - "exampleRG", - "Microsoft.Compute", - "virtualMachines", - "exampleVM", - "Microsoft-Agent", - com.azure.core.util.Context.NONE); + 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); } } ``` @@ -659,27 +629,23 @@ public final class TargetsDeleteSamples { ### Targets_Get ```java -/** Samples for Targets Get. */ +/** + * Samples for Targets Get. + */ public final class TargetsGetSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetTarget.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetTarget.json */ /** * Sample code: Get a Target that extends a virtual machine resource. - * + * * @param manager Entry point to ChaosManager. */ - public static void getATargetThatExtendsAVirtualMachineResource( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .targets() - .getWithResponse( - "exampleRG", - "Microsoft.Compute", - "virtualMachines", - "exampleVM", - "Microsoft-Agent", - com.azure.core.util.Context.NONE); + 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); } } ``` @@ -687,27 +653,23 @@ public final class TargetsGetSamples { ### Targets_List ```java -/** Samples for Targets List. */ +/** + * Samples for Targets List. + */ public final class TargetsListSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListTargets.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListTargets.json */ /** * Sample code: List all Targets that extend a virtual machine resource. - * + * * @param manager Entry point to ChaosManager. */ - public static void listAllTargetsThatExtendAVirtualMachineResource( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .targets() - .list( - "exampleRG", - "Microsoft.Compute", - "virtualMachines", - "exampleVM", - null, - com.azure.core.util.Context.NONE); + 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); } } ``` diff --git a/sdk/chaos/azure-resourcemanager-chaos/pom.xml b/sdk/chaos/azure-resourcemanager-chaos/pom.xml index 2980d5b1e125..bbbd75893a23 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/pom.xml +++ b/sdk/chaos/azure-resourcemanager-chaos/pom.xml @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-chaos - 1.1.0-beta.1 + 1.1.0 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-2023-11. + 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. https://github.com/Azure/azure-sdk-for-java @@ -69,18 +69,6 @@ 1.11.4 test - - com.azure.resourcemanager - azure-resourcemanager-resources - 2.36.0 - test - - - com.azure.resourcemanager - azure-resourcemanager-keyvault - 2.36.0 - test - org.junit.jupiter junit-jupiter-api @@ -99,8 +87,6 @@ 4.11.0 test - - net.bytebuddy byte-buddy @@ -119,5 +105,17 @@ 1.7.36 test + + com.azure.resourcemanager + azure-resourcemanager-resources + 2.36.0 + test + + + com.azure.resourcemanager + azure-resourcemanager-keyvault + 2.36.0 + test + 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 753d6894f87d..07250547306c 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 @@ -46,7 +46,10 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to ChaosManager. Chaos Management Client. */ +/** + * Entry point to ChaosManager. + * Chaos Management Client. + */ public final class ChaosManager { private Capabilities capabilities; @@ -67,18 +70,14 @@ public final class ChaosManager { private ChaosManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new ChaosManagementClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new ChaosManagementClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval).buildClient(); } /** * Creates an instance of Chaos service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the Chaos service API instance. @@ -91,7 +90,7 @@ public static ChaosManager authenticate(TokenCredential credential, AzureProfile /** * Creates an instance of Chaos service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the Chaos service API instance. @@ -104,14 +103,16 @@ public static ChaosManager authenticate(HttpPipeline httpPipeline, AzureProfile /** * Gets a Configurable instance that can be used to create ChaosManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new ChaosManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -183,8 +184,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. * * @param retryOptions the retry options for the HTTP pipeline retry policy. * @return the configurable object itself. @@ -201,8 +202,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -222,21 +223,12 @@ public ChaosManager authenticate(TokenCredential credential, AzureProfile profil Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.chaos") - .append("/") - .append("1.0.0"); + userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.chaos").append("/") + .append("1.1.0"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); + userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); } else { userAgentBuilder.append(" (auto-generated)"); } @@ -255,38 +247,25 @@ public ChaosManager authenticate(TokenCredential credential, AzureProfile profil policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); return new ChaosManager(httpPipeline, profile, defaultPollInterval); } } /** * Gets the resource collection API of Capabilities. - * + * * @return Resource collection API of Capabilities. */ public Capabilities capabilities() { @@ -298,7 +277,7 @@ public Capabilities capabilities() { /** * Gets the resource collection API of CapabilityTypes. - * + * * @return Resource collection API of CapabilityTypes. */ public CapabilityTypes capabilityTypes() { @@ -310,7 +289,7 @@ public CapabilityTypes capabilityTypes() { /** * Gets the resource collection API of Experiments. It manages Experiment. - * + * * @return Resource collection API of Experiments. */ public Experiments experiments() { @@ -322,7 +301,7 @@ public Experiments experiments() { /** * Gets the resource collection API of OperationStatuses. - * + * * @return Resource collection API of OperationStatuses. */ public OperationStatuses operationStatuses() { @@ -334,7 +313,7 @@ public OperationStatuses operationStatuses() { /** * Gets the resource collection API of Operations. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -346,7 +325,7 @@ public Operations operations() { /** * Gets the resource collection API of TargetTypes. - * + * * @return Resource collection API of TargetTypes. */ public TargetTypes targetTypes() { @@ -358,7 +337,7 @@ public TargetTypes targetTypes() { /** * Gets the resource collection API of Targets. - * + * * @return Resource collection API of Targets. */ public Targets targets() { @@ -371,7 +350,7 @@ public Targets targets() { /** * Gets wrapped service client ChaosManagementClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. - * + * * @return Wrapped service client ChaosManagementClient. */ public ChaosManagementClient serviceClient() { 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 9de7900898ee..711876aab678 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 @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner; -/** An instance of this class provides access to all the operations defined in CapabilitiesClient. */ +/** + * An instance of this class provides access to all the operations defined in CapabilitiesClient. + */ public interface CapabilitiesClient { /** * Get a list of Capability resources that extend a Target resource.. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -24,20 +26,16 @@ public interface CapabilitiesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Capability resources that extend a Target resource. as paginated response with {@link - * PagedIterable}. + * @return a list of Capability resources that extend a Target resource. as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName); + PagedIterable list(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName); /** * Get a list of Capability resources that extend a Target resource.. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -48,22 +46,17 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Capability resources that extend a Target resource. as paginated response with {@link - * PagedIterable}. + * @return a list of Capability resources that extend a Target resource. as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String continuationToken, + PagedIterable list(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, String continuationToken, Context context); /** * Get a Capability resource that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -77,18 +70,13 @@ PagedIterable list( * @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 parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, String capabilityName, Context context); /** * Get a Capability resource that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -101,17 +89,12 @@ Response getWithResponse( * @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 parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName, String capabilityName); /** * Delete a Capability that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -125,18 +108,13 @@ CapabilityInner get( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName, + Response deleteWithResponse(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, String capabilityName, Context context); /** * Delete a Capability that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -148,17 +126,12 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName); + void delete(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName, String capabilityName); /** * Create or update a Capability resource that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -173,19 +146,13 @@ void delete( * @return model that represents a Capability resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName, - CapabilityInner capability, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, String capabilityName, + CapabilityInner capability, Context context); /** * Create or update a Capability resource that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -199,12 +166,6 @@ Response createOrUpdateWithResponse( * @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); + CapabilityInner createOrUpdate(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName, String capabilityName, CapabilityInner capability); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/CapabilityTypesClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/CapabilityTypesClient.java index 1bf7ffdeaf69..723d735439ac 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 @@ -11,25 +11,27 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeInner; -/** An instance of this class provides access to all the operations defined in CapabilityTypesClient. */ +/** + * An instance of this class provides access to all the operations defined in CapabilityTypesClient. + */ public interface CapabilityTypesClient { /** * Get a list of Capability Type resources for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Capability Type resources for given Target Type and location as paginated response with {@link - * PagedIterable}. + * @return a list of Capability Type resources for given Target Type and location as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String locationName, String targetTypeName); /** * Get a list of Capability Type resources for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param continuationToken String that sets the continuation token. @@ -37,16 +39,16 @@ public interface CapabilityTypesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Capability Type resources for given Target Type and location as paginated response with {@link - * PagedIterable}. + * @return a list of Capability Type resources for given Target Type and location as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String locationName, String targetTypeName, String continuationToken, Context context); + PagedIterable list(String locationName, String targetTypeName, String continuationToken, + Context context); /** * Get a Capability Type resource for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param capabilityTypeName String that represents a Capability Type resource name. @@ -57,12 +59,12 @@ PagedIterable list( * @return a Capability Type resource for given Target Type and location along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String locationName, String targetTypeName, String capabilityTypeName, Context context); + Response getWithResponse(String locationName, String targetTypeName, String capabilityTypeName, + Context context); /** * Get a Capability Type resource for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param capabilityTypeName String that represents a Capability Type resource name. 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 2aaac5167d49..0957af884ce8 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 @@ -7,88 +7,90 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for ChaosManagementClient class. */ +/** + * The interface for ChaosManagementClient class. + */ public interface ChaosManagementClient { /** * Gets GUID that represents an Azure subscription ID. - * + * * @return the subscriptionId value. */ String getSubscriptionId(); /** * Gets server parameter. - * + * * @return the endpoint value. */ String getEndpoint(); /** * Gets Api Version. - * + * * @return the apiVersion value. */ String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); /** * Gets the CapabilitiesClient object to access its operations. - * + * * @return the CapabilitiesClient object. */ CapabilitiesClient getCapabilities(); /** * Gets the CapabilityTypesClient object to access its operations. - * + * * @return the CapabilityTypesClient object. */ CapabilityTypesClient getCapabilityTypes(); /** * Gets the ExperimentsClient object to access its operations. - * + * * @return the ExperimentsClient object. */ ExperimentsClient getExperiments(); /** * Gets the OperationStatusesClient object to access its operations. - * + * * @return the OperationStatusesClient object. */ OperationStatusesClient getOperationStatuses(); /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ OperationsClient getOperations(); /** * Gets the TargetTypesClient object to access its operations. - * + * * @return the TargetTypesClient object. */ TargetTypesClient getTargetTypes(); /** * Gets the TargetsClient object to access its operations. - * + * * @return the TargetsClient object. */ TargetsClient getTargets(); diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ExperimentsClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ExperimentsClient.java index ba81f716b078..266e6c4ba7ea 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 @@ -16,11 +16,13 @@ import com.azure.resourcemanager.chaos.fluent.models.ExperimentInner; import com.azure.resourcemanager.chaos.models.ExperimentUpdate; -/** An instance of this class provides access to all the operations defined in ExperimentsClient. */ +/** + * An instance of this class provides access to all the operations defined in ExperimentsClient. + */ public interface ExperimentsClient { /** * Get a list of Experiment resources in a subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Experiment resources in a subscription as paginated response with {@link PagedIterable}. @@ -30,9 +32,9 @@ public interface ExperimentsClient { /** * Get a list of Experiment resources in a subscription. - * + * * @param running Optional value that indicates whether to filter results based on if the Experiment is currently - * running. If null, then the results will not be filtered. + * running. If null, then the results will not be filtered. * @param continuationToken String that sets the continuation token. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -45,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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -57,10 +59,10 @@ public interface ExperimentsClient { /** * Get a list of Experiment resources in a resource group. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param running Optional value that indicates whether to filter results based on if the Experiment is currently - * running. If null, then the results will not be filtered. + * running. If null, then the results will not be filtered. * @param continuationToken String that sets the continuation token. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -69,12 +71,12 @@ public interface ExperimentsClient { * @return a list of Experiment resources in a resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup( - String resourceGroupName, Boolean running, String continuationToken, Context context); + 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. @@ -87,7 +89,7 @@ PagedIterable listByResourceGroup( /** * 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. @@ -101,7 +103,7 @@ PagedIterable listByResourceGroup( /** * 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. @@ -113,7 +115,7 @@ PagedIterable listByResourceGroup( /** * 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. @@ -126,7 +128,7 @@ PagedIterable listByResourceGroup( /** * Get a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -136,12 +138,12 @@ PagedIterable listByResourceGroup( * @return a Experiment resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String experimentName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String experimentName, + Context context); /** * Get a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -154,7 +156,7 @@ Response getByResourceGroupWithResponse( /** * Create or update a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Experiment resource to be created or updated. @@ -164,12 +166,12 @@ Response getByResourceGroupWithResponse( * @return the {@link SyncPoller} for polling of model that represents a Experiment resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ExperimentInner> beginCreateOrUpdate( - String resourceGroupName, String experimentName, ExperimentInner experiment); + SyncPoller, ExperimentInner> beginCreateOrUpdate(String resourceGroupName, + String experimentName, ExperimentInner experiment); /** * Create or update a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Experiment resource to be created or updated. @@ -180,12 +182,12 @@ SyncPoller, ExperimentInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of model that represents a Experiment resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ExperimentInner> beginCreateOrUpdate( - String resourceGroupName, String experimentName, ExperimentInner experiment, Context context); + SyncPoller, ExperimentInner> beginCreateOrUpdate(String resourceGroupName, + String experimentName, ExperimentInner experiment, Context context); /** * Create or update a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Experiment resource to be created or updated. @@ -199,7 +201,7 @@ SyncPoller, ExperimentInner> beginCreateOrUpdate( /** * Create or update a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Experiment resource to be created or updated. @@ -210,12 +212,12 @@ SyncPoller, ExperimentInner> beginCreateOrUpdate( * @return model that represents a Experiment resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExperimentInner createOrUpdate( - String resourceGroupName, String experimentName, ExperimentInner experiment, Context context); + ExperimentInner createOrUpdate(String resourceGroupName, String experimentName, ExperimentInner experiment, + Context context); /** * The operation to update an experiment. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Parameters supplied to the Update experiment operation. @@ -225,12 +227,12 @@ ExperimentInner createOrUpdate( * @return the {@link SyncPoller} for polling of model that represents a Experiment resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ExperimentInner> beginUpdate( - String resourceGroupName, String experimentName, ExperimentUpdate experiment); + SyncPoller, ExperimentInner> beginUpdate(String resourceGroupName, + String experimentName, ExperimentUpdate experiment); /** * The operation to update an experiment. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Parameters supplied to the Update experiment operation. @@ -241,12 +243,12 @@ SyncPoller, ExperimentInner> beginUpdate( * @return the {@link SyncPoller} for polling of model that represents a Experiment resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ExperimentInner> beginUpdate( - String resourceGroupName, String experimentName, ExperimentUpdate experiment, Context context); + SyncPoller, ExperimentInner> beginUpdate(String resourceGroupName, + String experimentName, ExperimentUpdate experiment, Context context); /** * The operation to update an experiment. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Parameters supplied to the Update experiment operation. @@ -260,7 +262,7 @@ SyncPoller, ExperimentInner> beginUpdate( /** * The operation to update an experiment. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Parameters supplied to the Update experiment operation. @@ -271,12 +273,12 @@ SyncPoller, ExperimentInner> beginUpdate( * @return model that represents a Experiment resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExperimentInner update( - String resourceGroupName, String experimentName, ExperimentUpdate experiment, Context context); + ExperimentInner update(String resourceGroupName, String experimentName, ExperimentUpdate experiment, + Context context); /** * Cancel a running Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -289,7 +291,7 @@ ExperimentInner update( /** * Cancel a running Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -303,7 +305,7 @@ ExperimentInner update( /** * Cancel a running Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -315,7 +317,7 @@ ExperimentInner update( /** * Cancel a running Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -328,7 +330,7 @@ ExperimentInner update( /** * Start a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -341,7 +343,7 @@ ExperimentInner update( /** * Start a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -355,7 +357,7 @@ ExperimentInner update( /** * Start a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -367,7 +369,7 @@ ExperimentInner update( /** * Start a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -380,7 +382,7 @@ ExperimentInner update( /** * 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. @@ -393,7 +395,7 @@ ExperimentInner update( /** * 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. * @param context The context to associate with this operation. @@ -403,12 +405,12 @@ ExperimentInner update( * @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, Context context); + PagedIterable listAllExecutions(String resourceGroupName, String experimentName, + Context context); /** * Get an execution 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. @@ -419,12 +421,12 @@ PagedIterable listAllExecutions( * @return an execution of an Experiment resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getExecutionWithResponse( - String resourceGroupName, String experimentName, String executionId, Context context); + Response getExecutionWithResponse(String resourceGroupName, String experimentName, + String executionId, Context context); /** * Get an execution 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. @@ -438,7 +440,7 @@ Response getExecutionWithResponse( /** * 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. @@ -449,12 +451,12 @@ Response getExecutionWithResponse( * @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); + 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. @@ -464,6 +466,6 @@ Response executionDetailsWithResponse( * @return model that represents the execution details of an Experiment. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExperimentExecutionDetailsInner executionDetails( - String resourceGroupName, String experimentName, String executionId); + ExperimentExecutionDetailsInner executionDetails(String resourceGroupName, String experimentName, + String executionId); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/OperationStatusesClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/OperationStatusesClient.java index b50d0814f55f..87083b88e1ee 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/OperationStatusesClient.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/OperationStatusesClient.java @@ -10,12 +10,14 @@ 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. */ +/** + * 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 region name of 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. @@ -28,8 +30,8 @@ public interface OperationStatusesClient { /** * Get the status of a long running azure asynchronous operation. - * - * @param location The region name of 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. 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 fdd25c05ff15..6be2ec3d60b2 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 @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.chaos.fluent.models.OperationInner; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** * Get a list all available Operations. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list all available Operations as paginated response with {@link PagedIterable}. @@ -24,7 +26,7 @@ public interface OperationsClient { /** * Get a list all available Operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. 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 46f1a4177d1f..92e8fb223c8f 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 @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.chaos.fluent.models.TargetTypeInner; -/** An instance of this class provides access to all the operations defined in TargetTypesClient. */ +/** + * An instance of this class provides access to all the operations defined in TargetTypesClient. + */ public interface TargetTypesClient { /** * Get a list of Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -27,7 +29,7 @@ public interface TargetTypesClient { /** * Get a list of Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @param continuationToken String that sets the continuation token. * @param context The context to associate with this operation. @@ -41,7 +43,7 @@ public interface TargetTypesClient { /** * Get a Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param context The context to associate with this operation. @@ -55,7 +57,7 @@ public interface TargetTypesClient { /** * Get a Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 a3ec48e28f4b..0caf92afda5d 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 @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.chaos.fluent.models.TargetInner; -/** An instance of this class provides access to all the operations defined in TargetsClient. */ +/** + * An instance of this class provides access to all the operations defined in TargetsClient. + */ public interface TargetsClient { /** * Get a list of Target resources that extend a tracked regional resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -23,16 +25,16 @@ public interface TargetsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Target resources that extend a tracked regional resource as paginated response with {@link - * PagedIterable}. + * @return a list of Target resources that extend a tracked regional resource as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String parentProviderNamespace, String parentResourceType, String parentResourceName); + PagedIterable list(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName); /** * Get a list of Target resources that extend a tracked regional resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -42,21 +44,16 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Target resources that extend a tracked regional resource as paginated response with {@link - * PagedIterable}. + * @return a list of Target resources that extend a tracked regional resource as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String continuationToken, - Context context); + PagedIterable list(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String continuationToken, Context context); /** * Get a Target resource that extends a tracked regional resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -69,17 +66,12 @@ PagedIterable list( * @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 parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, Context context); /** * Get a Target resource that extends a tracked regional resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -91,16 +83,12 @@ Response getWithResponse( * @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 parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName); /** * Delete a Target resource that extends a tracked regional resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -113,17 +101,12 @@ TargetInner get( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - Context context); + Response deleteWithResponse(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, Context context); /** * Delete a Target resource that extends a tracked regional resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -134,16 +117,12 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName); + void delete(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName); /** * Create or update a Target resource that extends a tracked regional resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -157,18 +136,12 @@ void delete( * @return model that represents a Target resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - TargetInner target, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, TargetInner target, Context context); /** * Create or update a Target resource that extends a tracked regional resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -181,11 +154,6 @@ Response createOrUpdateWithResponse( * @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); + TargetInner createOrUpdate(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName, TargetInner target); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityInner.java index 32126fd4a072..77d0fabdd71f 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 @@ -9,7 +9,9 @@ import com.azure.core.management.SystemData; import com.fasterxml.jackson.annotation.JsonProperty; -/** Model that represents a Capability resource. */ +/** + * Model that represents a Capability resource. + */ @Immutable public final class CapabilityInner extends ProxyResource { /* @@ -24,13 +26,15 @@ public final class CapabilityInner extends ProxyResource { @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) private CapabilityProperties innerProperties; - /** Creates an instance of CapabilityInner class. */ + /** + * Creates an instance of CapabilityInner class. + */ public CapabilityInner() { } /** * Get the systemData property: The standard system metadata of a resource type. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -39,7 +43,7 @@ public SystemData systemData() { /** * Get the innerProperties property: The properties of a capability resource. - * + * * @return the innerProperties value. */ private CapabilityProperties innerProperties() { @@ -48,7 +52,7 @@ private CapabilityProperties innerProperties() { /** * Get the publisher property: String of the Publisher that this Capability extends. - * + * * @return the publisher value. */ public String publisher() { @@ -57,7 +61,7 @@ public String publisher() { /** * Get the targetType property: String of the Target Type that this Capability extends. - * + * * @return the targetType value. */ public String targetType() { @@ -66,7 +70,7 @@ public String targetType() { /** * Get the description property: Localized string of the description. - * + * * @return the description value. */ public String description() { @@ -75,7 +79,7 @@ public String description() { /** * Get the parametersSchema property: URL to retrieve JSON schema of the Capability parameters. - * + * * @return the parametersSchema value. */ public String parametersSchema() { @@ -84,7 +88,7 @@ public String parametersSchema() { /** * Get the urn property: String of the URN for this Capability Type. - * + * * @return the urn value. */ public String urn() { @@ -93,7 +97,7 @@ public String 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/CapabilityProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityProperties.java index 4970fe21a6ca..2380ddf8be90 100644 --- 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Model that represents the Capability properties model. */ +/** + * Model that represents the Capability properties model. + */ @Immutable public final class CapabilityProperties { /* @@ -40,13 +42,15 @@ public final class CapabilityProperties { @JsonProperty(value = "urn", access = JsonProperty.Access.WRITE_ONLY) private String urn; - /** Creates an instance of CapabilityProperties class. */ + /** + * 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() { @@ -55,7 +59,7 @@ public String publisher() { /** * Get the targetType property: String of the Target Type that this Capability extends. - * + * * @return the targetType value. */ public String targetType() { @@ -64,7 +68,7 @@ public String targetType() { /** * Get the description property: Localized string of the description. - * + * * @return the description value. */ public String description() { @@ -73,7 +77,7 @@ public String description() { /** * Get the parametersSchema property: URL to retrieve JSON schema of the Capability parameters. - * + * * @return the parametersSchema value. */ public String parametersSchema() { @@ -82,7 +86,7 @@ public String parametersSchema() { /** * Get the urn property: String of the URN for this Capability Type. - * + * * @return the urn value. */ public String urn() { @@ -91,7 +95,7 @@ public String 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 5fa57575bc57..ffea085d3935 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 @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Model that represents a Capability Type resource. */ +/** + * Model that represents a Capability Type resource. + */ @Fluent public final class CapabilityTypeInner extends ProxyResource { /* @@ -32,13 +34,15 @@ public final class CapabilityTypeInner extends ProxyResource { @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) private CapabilityTypeProperties innerProperties; - /** Creates an instance of CapabilityTypeInner class. */ + /** + * Creates an instance of CapabilityTypeInner class. + */ public CapabilityTypeInner() { } /** * Get the systemData property: The system metadata properties of the capability type resource. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -47,7 +51,7 @@ public SystemData systemData() { /** * Get the location property: Location of the Capability Type resource. - * + * * @return the location value. */ public String location() { @@ -56,7 +60,7 @@ public String location() { /** * Set the location property: Location of the Capability Type resource. - * + * * @param location the location value to set. * @return the CapabilityTypeInner object itself. */ @@ -67,7 +71,7 @@ public CapabilityTypeInner withLocation(String location) { /** * Get the innerProperties property: The properties of the capability type resource. - * + * * @return the innerProperties value. */ private CapabilityTypeProperties innerProperties() { @@ -76,7 +80,7 @@ private CapabilityTypeProperties innerProperties() { /** * Get the publisher property: String of the Publisher that this Capability Type extends. - * + * * @return the publisher value. */ public String publisher() { @@ -85,7 +89,7 @@ public String publisher() { /** * Get the targetType property: String of the Target Type that this Capability Type extends. - * + * * @return the targetType value. */ public String targetType() { @@ -94,7 +98,7 @@ public String targetType() { /** * Get the displayName property: Localized string of the display name. - * + * * @return the displayName value. */ public String displayName() { @@ -103,7 +107,7 @@ public String displayName() { /** * Get the description property: Localized string of the description. - * + * * @return the description value. */ public String description() { @@ -112,7 +116,7 @@ public String description() { /** * Get the parametersSchema property: URL to retrieve JSON schema of the Capability Type parameters. - * + * * @return the parametersSchema value. */ public String parametersSchema() { @@ -121,7 +125,7 @@ public String parametersSchema() { /** * Get the urn property: String of the URN for this Capability Type. - * + * * @return the urn value. */ public String urn() { @@ -130,7 +134,7 @@ public String urn() { /** * Get the kind property: String of the kind of this Capability Type. - * + * * @return the kind value. */ public String kind() { @@ -139,7 +143,7 @@ public String kind() { /** * Get the azureRbacActions property: Control plane actions necessary to execute capability type. - * + * * @return the azureRbacActions value. */ public List azureRbacActions() { @@ -148,7 +152,7 @@ public List azureRbacActions() { /** * Set the azureRbacActions property: Control plane actions necessary to execute capability type. - * + * * @param azureRbacActions the azureRbacActions value to set. * @return the CapabilityTypeInner object itself. */ @@ -162,7 +166,7 @@ public CapabilityTypeInner withAzureRbacActions(List azureRbacActions) { /** * Get the azureRbacDataActions property: Data plane actions necessary to execute capability type. - * + * * @return the azureRbacDataActions value. */ public List azureRbacDataActions() { @@ -171,7 +175,7 @@ public List 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. */ @@ -185,7 +189,7 @@ public CapabilityTypeInner withAzureRbacDataActions(List azureRbacDataAc /** * Get the runtimeProperties property: Runtime properties of this Capability Type. - * + * * @return the runtimeProperties value. */ public CapabilityTypePropertiesRuntimeProperties runtimeProperties() { @@ -194,7 +198,7 @@ public CapabilityTypePropertiesRuntimeProperties runtimeProperties() { /** * Set the runtimeProperties property: Runtime properties of this Capability Type. - * + * * @param runtimeProperties the runtimeProperties value to set. * @return the CapabilityTypeInner object itself. */ @@ -208,7 +212,7 @@ public CapabilityTypeInner withRuntimeProperties(CapabilityTypePropertiesRuntime /** * 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/CapabilityTypeProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeProperties.java index 5767a0f53322..823c0f6fffdc 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeProperties.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeProperties.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Model that represents the Capability Type properties model. */ +/** + * Model that represents the Capability Type properties model. + */ @Fluent public final class CapabilityTypeProperties { /* @@ -72,13 +74,15 @@ public final class CapabilityTypeProperties { @JsonProperty(value = "runtimeProperties") private CapabilityTypePropertiesRuntimeProperties runtimeProperties; - /** Creates an instance of CapabilityTypeProperties class. */ + /** + * Creates an instance of CapabilityTypeProperties class. + */ public CapabilityTypeProperties() { } /** * Get the publisher property: String of the Publisher that this Capability Type extends. - * + * * @return the publisher value. */ public String publisher() { @@ -87,7 +91,7 @@ public String publisher() { /** * Get the targetType property: String of the Target Type that this Capability Type extends. - * + * * @return the targetType value. */ public String targetType() { @@ -96,7 +100,7 @@ public String targetType() { /** * Get the displayName property: Localized string of the display name. - * + * * @return the displayName value. */ public String displayName() { @@ -105,7 +109,7 @@ public String displayName() { /** * Get the description property: Localized string of the description. - * + * * @return the description value. */ public String description() { @@ -114,7 +118,7 @@ public String description() { /** * Get the parametersSchema property: URL to retrieve JSON schema of the Capability Type parameters. - * + * * @return the parametersSchema value. */ public String parametersSchema() { @@ -123,7 +127,7 @@ public String parametersSchema() { /** * Get the urn property: String of the URN for this Capability Type. - * + * * @return the urn value. */ public String urn() { @@ -132,7 +136,7 @@ public String urn() { /** * Get the kind property: String of the kind of this Capability Type. - * + * * @return the kind value. */ public String kind() { @@ -141,7 +145,7 @@ public String kind() { /** * Get the azureRbacActions property: Control plane actions necessary to execute capability type. - * + * * @return the azureRbacActions value. */ public List azureRbacActions() { @@ -150,7 +154,7 @@ public List azureRbacActions() { /** * Set the azureRbacActions property: Control plane actions necessary to execute capability type. - * + * * @param azureRbacActions the azureRbacActions value to set. * @return the CapabilityTypeProperties object itself. */ @@ -161,7 +165,7 @@ public CapabilityTypeProperties withAzureRbacActions(List azureRbacActio /** * Get the azureRbacDataActions property: Data plane actions necessary to execute capability type. - * + * * @return the azureRbacDataActions value. */ public List azureRbacDataActions() { @@ -170,7 +174,7 @@ public List azureRbacDataActions() { /** * Set the azureRbacDataActions property: Data plane actions necessary to execute capability type. - * + * * @param azureRbacDataActions the azureRbacDataActions value to set. * @return the CapabilityTypeProperties object itself. */ @@ -181,7 +185,7 @@ public CapabilityTypeProperties withAzureRbacDataActions(List azureRbacD /** * Get the runtimeProperties property: Runtime properties of this Capability Type. - * + * * @return the runtimeProperties value. */ public CapabilityTypePropertiesRuntimeProperties runtimeProperties() { @@ -190,7 +194,7 @@ public CapabilityTypePropertiesRuntimeProperties runtimeProperties() { /** * Set the runtimeProperties property: Runtime properties of this Capability Type. - * + * * @param runtimeProperties the runtimeProperties value to set. * @return the CapabilityTypeProperties object itself. */ @@ -201,7 +205,7 @@ public CapabilityTypeProperties withRuntimeProperties(CapabilityTypePropertiesRu /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsInner.java index c8b4c2738e16..a9206b47ee9e 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsInner.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsInner.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Model that represents the execution details of an Experiment. */ +/** + * Model that represents the execution details of an Experiment. + */ @Immutable public final class ExperimentExecutionDetailsInner { /* @@ -36,13 +38,15 @@ public final class ExperimentExecutionDetailsInner { @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) private ExperimentExecutionDetailsProperties innerProperties; - /** Creates an instance of ExperimentExecutionDetailsInner class. */ + /** + * Creates an instance of ExperimentExecutionDetailsInner class. + */ public ExperimentExecutionDetailsInner() { } /** * Get the type property: String of the resource type. - * + * * @return the type value. */ public String type() { @@ -51,7 +55,7 @@ public String type() { /** * Get the id property: String of the fully qualified resource ID. - * + * * @return the id value. */ public String id() { @@ -60,7 +64,7 @@ public String id() { /** * Get the name property: String of the resource name. - * + * * @return the name value. */ public String name() { @@ -69,7 +73,7 @@ public String name() { /** * Get the innerProperties property: The properties of the experiment execution details. - * + * * @return the innerProperties value. */ private ExperimentExecutionDetailsProperties innerProperties() { @@ -78,7 +82,7 @@ private ExperimentExecutionDetailsProperties innerProperties() { /** * Get the failureReason property: The reason why the execution failed. - * + * * @return the failureReason value. */ public String failureReason() { @@ -87,7 +91,7 @@ public String failureReason() { /** * Get the lastActionAt property: String that represents the last action date time. - * + * * @return the lastActionAt value. */ public OffsetDateTime lastActionAt() { @@ -96,7 +100,7 @@ public OffsetDateTime lastActionAt() { /** * Get the runInformation property: The information of the experiment run. - * + * * @return the runInformation value. */ public ExperimentExecutionDetailsPropertiesRunInformation runInformation() { @@ -105,7 +109,7 @@ public ExperimentExecutionDetailsPropertiesRunInformation runInformation() { /** * Get the status property: The status of the execution. - * + * * @return the status value. */ public String status() { @@ -114,7 +118,7 @@ public String status() { /** * Get the startedAt property: String that represents the start date time. - * + * * @return the startedAt value. */ public OffsetDateTime startedAt() { @@ -123,7 +127,7 @@ public OffsetDateTime startedAt() { /** * Get the stoppedAt property: String that represents the stop date time. - * + * * @return the stoppedAt value. */ public OffsetDateTime stoppedAt() { @@ -132,7 +136,7 @@ public OffsetDateTime 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/ExperimentExecutionDetailsProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsProperties.java index 785f78ecb743..d8094e07050f 100644 --- 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Model that represents the extended properties of an experiment execution. */ +/** + * Model that represents the extended properties of an experiment execution. + */ @Immutable public final class ExperimentExecutionDetailsProperties extends ExperimentExecutionProperties { /* @@ -30,13 +32,15 @@ public final class ExperimentExecutionDetailsProperties extends ExperimentExecut @JsonProperty(value = "runInformation", access = JsonProperty.Access.WRITE_ONLY) private ExperimentExecutionDetailsPropertiesRunInformation runInformation; - /** Creates an instance of ExperimentExecutionDetailsProperties class. */ + /** + * 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() { @@ -45,7 +49,7 @@ public String failureReason() { /** * Get the lastActionAt property: String that represents the last action date time. - * + * * @return the lastActionAt value. */ public OffsetDateTime lastActionAt() { @@ -54,7 +58,7 @@ public OffsetDateTime lastActionAt() { /** * Get the runInformation property: The information of the experiment run. - * + * * @return the runInformation value. */ public ExperimentExecutionDetailsPropertiesRunInformation runInformation() { @@ -63,7 +67,7 @@ public ExperimentExecutionDetailsPropertiesRunInformation runInformation() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 59ad9f95d129..420ffd70a2df 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Model that represents the execution of a Experiment. */ +/** + * Model that represents the execution of a Experiment. + */ @Immutable public final class ExperimentExecutionInner { /* @@ -35,13 +37,15 @@ public final class ExperimentExecutionInner { @JsonProperty(value = "properties") private ExperimentExecutionProperties innerProperties; - /** Creates an instance of ExperimentExecutionInner class. */ + /** + * Creates an instance of ExperimentExecutionInner class. + */ public ExperimentExecutionInner() { } /** * Get the type property: String of the resource type. - * + * * @return the type value. */ public String type() { @@ -50,7 +54,7 @@ public String type() { /** * Get the id property: String of the fully qualified resource ID. - * + * * @return the id value. */ public String id() { @@ -59,7 +63,7 @@ public String id() { /** * Get the name property: String of the resource name. - * + * * @return the name value. */ public String name() { @@ -68,7 +72,7 @@ public String name() { /** * Get the innerProperties property: The properties of experiment execution status. - * + * * @return the innerProperties value. */ private ExperimentExecutionProperties innerProperties() { @@ -77,7 +81,7 @@ private ExperimentExecutionProperties innerProperties() { /** * Get the status property: The status of the execution. - * + * * @return the status value. */ public String status() { @@ -86,7 +90,7 @@ public String status() { /** * Get the startedAt property: String that represents the start date time. - * + * * @return the startedAt value. */ public OffsetDateTime startedAt() { @@ -95,7 +99,7 @@ public OffsetDateTime startedAt() { /** * Get the stoppedAt property: String that represents the stop date time. - * + * * @return the stoppedAt value. */ public OffsetDateTime stoppedAt() { @@ -104,7 +108,7 @@ public OffsetDateTime 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/ExperimentExecutionProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionProperties.java index 2a71fd31e341..0338e23a53bb 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionProperties.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionProperties.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Model that represents the execution properties of an Experiment. */ +/** + * Model that represents the execution properties of an Experiment. + */ @Immutable public class ExperimentExecutionProperties { /* @@ -29,13 +31,15 @@ public class ExperimentExecutionProperties { @JsonProperty(value = "stoppedAt", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime stoppedAt; - /** Creates an instance of ExperimentExecutionProperties class. */ + /** + * Creates an instance of ExperimentExecutionProperties class. + */ public ExperimentExecutionProperties() { } /** * Get the status property: The status of the execution. - * + * * @return the status value. */ public String status() { @@ -44,7 +48,7 @@ public String status() { /** * Get the startedAt property: String that represents the start date time. - * + * * @return the startedAt value. */ public OffsetDateTime startedAt() { @@ -53,7 +57,7 @@ public OffsetDateTime startedAt() { /** * Get the stoppedAt property: String that represents the stop date time. - * + * * @return the stoppedAt value. */ public OffsetDateTime stoppedAt() { @@ -62,7 +66,7 @@ public OffsetDateTime 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 e2fc79886449..70656ef6bef3 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 @@ -16,7 +16,9 @@ import java.util.List; import java.util.Map; -/** Model that represents a Experiment resource. */ +/** + * Model that represents a Experiment resource. + */ @Fluent public final class ExperimentInner extends Resource { /* @@ -37,13 +39,15 @@ public final class ExperimentInner extends Resource { @JsonProperty(value = "properties", required = true) private ExperimentProperties innerProperties = new ExperimentProperties(); - /** Creates an instance of ExperimentInner class. */ + /** + * Creates an instance of ExperimentInner class. + */ public ExperimentInner() { } /** * Get the systemData property: The system metadata of the experiment resource. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -52,7 +56,7 @@ public SystemData systemData() { /** * Get the identity property: The identity of the experiment resource. - * + * * @return the identity value. */ public ResourceIdentity identity() { @@ -61,7 +65,7 @@ public ResourceIdentity identity() { /** * Set the identity property: The identity of the experiment resource. - * + * * @param identity the identity value to set. * @return the ExperimentInner object itself. */ @@ -72,21 +76,25 @@ public ExperimentInner withIdentity(ResourceIdentity identity) { /** * Get the innerProperties property: The properties of the experiment resource. - * + * * @return the innerProperties value. */ private ExperimentProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ExperimentInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ExperimentInner withTags(Map tags) { super.withTags(tags); @@ -95,7 +103,7 @@ public ExperimentInner withTags(Map tags) { /** * Get the provisioningState property: Most recent provisioning state for the given experiment resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -104,7 +112,7 @@ public ProvisioningState provisioningState() { /** * Get the steps property: List of steps. - * + * * @return the steps value. */ public List steps() { @@ -113,7 +121,7 @@ public List steps() { /** * Set the steps property: List of steps. - * + * * @param steps the steps value to set. * @return the ExperimentInner object itself. */ @@ -127,7 +135,7 @@ public ExperimentInner withSteps(List steps) { /** * Get the selectors property: List of selectors. - * + * * @return the selectors value. */ public List selectors() { @@ -136,7 +144,7 @@ public List selectors() { /** * Set the selectors property: List of selectors. - * + * * @param selectors the selectors value to set. * @return the ExperimentInner object itself. */ @@ -150,7 +158,7 @@ public ExperimentInner withSelectors(List selectors) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -158,9 +166,8 @@ public void validate() { identity().validate(); } if (innerProperties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property innerProperties in model ExperimentInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property innerProperties in model ExperimentInner")); } else { innerProperties().validate(); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentProperties.java index ddcd07937796..bb1445fe5dc1 100644 --- 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 @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Model that represents the Experiment properties model. */ +/** + * Model that represents the Experiment properties model. + */ @Fluent public final class ExperimentProperties { /* @@ -33,13 +35,15 @@ public final class ExperimentProperties { @JsonProperty(value = "selectors", required = true) private List selectors; - /** Creates an instance of ExperimentProperties class. */ + /** + * 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() { @@ -48,7 +52,7 @@ public ProvisioningState provisioningState() { /** * Get the steps property: List of steps. - * + * * @return the steps value. */ public List steps() { @@ -57,7 +61,7 @@ public List steps() { /** * Set the steps property: List of steps. - * + * * @param steps the steps value to set. * @return the ExperimentProperties object itself. */ @@ -68,7 +72,7 @@ public ExperimentProperties withSteps(List steps) { /** * Get the selectors property: List of selectors. - * + * * @return the selectors value. */ public List selectors() { @@ -77,7 +81,7 @@ public List selectors() { /** * Set the selectors property: List of selectors. - * + * * @param selectors the selectors value to set. * @return the ExperimentProperties object itself. */ @@ -88,21 +92,19 @@ public ExperimentProperties withSelectors(List selectors) { /** * 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")); + 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")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property selectors in model ExperimentProperties")); } else { selectors().forEach(e -> e.validate()); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationInner.java index e710daaf81ae..d71cf2dbad10 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 @@ -12,8 +12,8 @@ /** * REST API Operation - * - *

Details of a REST API operation, returned from the Resource Provider Operations API. + * + * Details of a REST API operation, returned from the Resource Provider Operations API. */ @Fluent public final class OperationInner { @@ -50,14 +50,16 @@ public final class OperationInner { @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) private ActionType actionType; - /** Creates an instance of OperationInner class. */ + /** + * Creates an instance of OperationInner class. + */ public OperationInner() { } /** * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * + * * @return the name value. */ public String name() { @@ -67,7 +69,7 @@ public String name() { /** * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane * operations and "false" for ARM/control-plane operations. - * + * * @return the isDataAction value. */ public Boolean isDataAction() { @@ -76,7 +78,7 @@ public Boolean isDataAction() { /** * Get the display property: Localized display information for this particular operation. - * + * * @return the display value. */ public OperationDisplay display() { @@ -85,7 +87,7 @@ public OperationDisplay display() { /** * Set the display property: Localized display information for this particular operation. - * + * * @param display the display value to set. * @return the OperationInner object itself. */ @@ -97,7 +99,7 @@ public OperationInner withDisplay(OperationDisplay display) { /** * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". - * + * * @return the origin value. */ public Origin origin() { @@ -107,7 +109,7 @@ public Origin origin() { /** * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal * only APIs. - * + * * @return the actionType value. */ public ActionType actionType() { @@ -116,7 +118,7 @@ public ActionType actionType() { /** * 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/OperationStatusInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationStatusInner.java index c6be5e917a60..24456ee1cf19 100644 --- 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 @@ -8,7 +8,9 @@ import com.azure.core.management.exception.ManagementError; import com.fasterxml.jackson.annotation.JsonProperty; -/** The status of operation. */ +/** + * The status of operation. + */ @Fluent public final class OperationStatusInner { /* @@ -47,13 +49,15 @@ public final class OperationStatusInner { @JsonProperty(value = "error") private ManagementError error; - /** Creates an instance of OperationStatusInner class. */ + /** + * Creates an instance of OperationStatusInner class. + */ public OperationStatusInner() { } /** * Get the id property: The operation Id. - * + * * @return the id value. */ public String id() { @@ -62,7 +66,7 @@ public String id() { /** * Set the id property: The operation Id. - * + * * @param id the id value to set. * @return the OperationStatusInner object itself. */ @@ -73,7 +77,7 @@ public OperationStatusInner withId(String id) { /** * Get the name property: The operation name. - * + * * @return the name value. */ public String name() { @@ -82,7 +86,7 @@ public String name() { /** * Set the name property: The operation name. - * + * * @param name the name value to set. * @return the OperationStatusInner object itself. */ @@ -93,7 +97,7 @@ public OperationStatusInner withName(String name) { /** * Get the startTime property: The start time of the operation. - * + * * @return the startTime value. */ public String startTime() { @@ -102,7 +106,7 @@ public String startTime() { /** * Set the startTime property: The start time of the operation. - * + * * @param startTime the startTime value to set. * @return the OperationStatusInner object itself. */ @@ -113,7 +117,7 @@ public OperationStatusInner withStartTime(String startTime) { /** * Get the endTime property: The end time of the operation. - * + * * @return the endTime value. */ public String endTime() { @@ -122,7 +126,7 @@ public String endTime() { /** * Set the endTime property: The end time of the operation. - * + * * @param endTime the endTime value to set. * @return the OperationStatusInner object itself. */ @@ -133,7 +137,7 @@ public OperationStatusInner withEndTime(String endTime) { /** * Get the status property: The status of the operation. - * + * * @return the status value. */ public String status() { @@ -142,7 +146,7 @@ public String status() { /** * Set the status property: The status of the operation. - * + * * @param status the status value to set. * @return the OperationStatusInner object itself. */ @@ -153,7 +157,7 @@ public OperationStatusInner withStatus(String status) { /** * Get the error property: The error object. - * + * * @return the error value. */ public ManagementError error() { @@ -162,7 +166,7 @@ public ManagementError error() { /** * Set the error property: The error object. - * + * * @param error the error value to set. * @return the OperationStatusInner object itself. */ @@ -173,7 +177,7 @@ public OperationStatusInner withError(ManagementError error) { /** * 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/TargetInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetInner.java index 7145cd04d068..2700e264d225 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 @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Model that represents a Target resource. */ +/** + * Model that represents a Target resource. + */ @Fluent public final class TargetInner extends ProxyResource { /* @@ -34,13 +36,15 @@ public final class TargetInner extends ProxyResource { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map properties; - /** Creates an instance of TargetInner class. */ + /** + * Creates an instance of TargetInner class. + */ public TargetInner() { } /** * Get the systemData property: The system metadata of the target resource. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -49,7 +53,7 @@ public SystemData systemData() { /** * Get the location property: Location of the target resource. - * + * * @return the location value. */ public String location() { @@ -58,7 +62,7 @@ public String location() { /** * Set the location property: Location of the target resource. - * + * * @param location the location value to set. * @return the TargetInner object itself. */ @@ -69,7 +73,7 @@ public TargetInner withLocation(String location) { /** * Get the properties property: The properties of the target resource. - * + * * @return the properties value. */ public Map properties() { @@ -78,7 +82,7 @@ public Map properties() { /** * Set the properties property: The properties of the target resource. - * + * * @param properties the properties value to set. * @return the TargetInner object itself. */ @@ -89,14 +93,13 @@ public TargetInner withProperties(Map properties) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property properties in model TargetInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model TargetInner")); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeInner.java index d96b2afce917..7977d4e0b5d8 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 @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Model that represents a Target Type resource. */ +/** + * Model that represents a Target Type resource. + */ @Fluent public final class TargetTypeInner extends ProxyResource { /* @@ -32,13 +34,15 @@ public final class TargetTypeInner extends ProxyResource { @JsonProperty(value = "properties", required = true) private TargetTypeProperties innerProperties = new TargetTypeProperties(); - /** Creates an instance of TargetTypeInner class. */ + /** + * Creates an instance of TargetTypeInner class. + */ public TargetTypeInner() { } /** * Get the systemData property: The system metadata properties of the target type resource. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -47,7 +51,7 @@ public SystemData systemData() { /** * Get the location property: Location of the Target Type resource. - * + * * @return the location value. */ public String location() { @@ -56,7 +60,7 @@ public String location() { /** * Set the location property: Location of the Target Type resource. - * + * * @param location the location value to set. * @return the TargetTypeInner object itself. */ @@ -67,7 +71,7 @@ public TargetTypeInner withLocation(String location) { /** * Get the innerProperties property: The properties of the target type resource. - * + * * @return the innerProperties value. */ private TargetTypeProperties innerProperties() { @@ -76,7 +80,7 @@ private TargetTypeProperties innerProperties() { /** * Get the displayName property: Localized string of the display name. - * + * * @return the displayName value. */ public String displayName() { @@ -85,7 +89,7 @@ public String displayName() { /** * Get the description property: Localized string of the description. - * + * * @return the description value. */ public String description() { @@ -94,7 +98,7 @@ public String description() { /** * Get the propertiesSchema property: URL to retrieve JSON schema of the Target Type properties. - * + * * @return the propertiesSchema value. */ public String propertiesSchema() { @@ -103,7 +107,7 @@ public String propertiesSchema() { /** * Get the resourceTypes property: List of resource types this Target Type can extend. - * + * * @return the resourceTypes value. */ public List resourceTypes() { @@ -112,14 +116,13 @@ public List resourceTypes() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (innerProperties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property innerProperties in model TargetTypeInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property innerProperties in model TargetTypeInner")); } else { innerProperties().validate(); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeProperties.java index 9bc624dedb5c..56be5f6e6378 100644 --- 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Model that represents the base Target Type properties model. */ +/** + * Model that represents the base Target Type properties model. + */ @Immutable public final class TargetTypeProperties { /* @@ -35,13 +37,15 @@ public final class TargetTypeProperties { @JsonProperty(value = "resourceTypes", access = JsonProperty.Access.WRITE_ONLY) private List resourceTypes; - /** Creates an instance of TargetTypeProperties class. */ + /** + * 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() { @@ -50,7 +54,7 @@ public String displayName() { /** * Get the description property: Localized string of the description. - * + * * @return the description value. */ public String description() { @@ -59,7 +63,7 @@ public String description() { /** * Get the propertiesSchema property: URL to retrieve JSON schema of the Target Type properties. - * + * * @return the propertiesSchema value. */ public String propertiesSchema() { @@ -68,7 +72,7 @@ public String propertiesSchema() { /** * Get the resourceTypes property: List of resource types this Target Type can extend. - * + * * @return the resourceTypes value. */ public List resourceTypes() { @@ -77,7 +81,7 @@ public List resourceTypes() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/package-info.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/package-info.java index 528b3b0bc960..197d8d2de364 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/package-info.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the inner data models for ChaosManagementClient. Chaos Management Client. */ +/** + * Package containing the inner data models for ChaosManagementClient. + * Chaos Management Client. + */ package com.azure.resourcemanager.chaos.fluent.models; diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/package-info.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/package-info.java index 80b2eb1aca61..28b65cdb4482 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/package-info.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the service clients for ChaosManagementClient. Chaos Management Client. */ +/** + * Package containing the service clients for ChaosManagementClient. + * Chaos Management Client. + */ package com.azure.resourcemanager.chaos.fluent; diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesClientImpl.java index d9f1e9571315..0c362fb7a885 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 @@ -33,22 +33,28 @@ import com.azure.resourcemanager.chaos.models.CapabilityListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in CapabilitiesClient. */ +/** + * An instance of this class provides access to all the operations defined in CapabilitiesClient. + */ public final class CapabilitiesClientImpl implements CapabilitiesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final CapabilitiesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ChaosManagementClientImpl client; /** * Initializes an instance of CapabilitiesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ CapabilitiesClientImpl(ChaosManagementClientImpl client) { - this.service = - RestProxy.create(CapabilitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(CapabilitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -59,93 +65,68 @@ public final class CapabilitiesClientImpl implements CapabilitiesClient { @Host("{$host}") @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") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parentProviderNamespace") String parentProviderNamespace, @PathParam("parentResourceType") String parentResourceType, - @PathParam("parentResourceName") String parentResourceName, - @PathParam("targetName") String targetName, - @QueryParam("continuationToken") String continuationToken, - @HeaderParam("Accept") String accept, + @PathParam("parentResourceName") String parentResourceName, @PathParam("targetName") String targetName, + @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parentProviderNamespace") String parentProviderNamespace, @PathParam("parentResourceType") String parentResourceType, - @PathParam("parentResourceName") String parentResourceName, - @PathParam("targetName") String targetName, - @PathParam("capabilityName") String capabilityName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("parentResourceName") String parentResourceName, @PathParam("targetName") String targetName, + @PathParam("capabilityName") String capabilityName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parentProviderNamespace") String parentProviderNamespace, @PathParam("parentResourceType") String parentResourceType, - @PathParam("parentResourceName") String parentResourceName, - @PathParam("targetName") String targetName, - @PathParam("capabilityName") String capabilityName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("parentResourceName") String parentResourceName, @PathParam("targetName") String targetName, + @PathParam("capabilityName") String capabilityName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}") - @ExpectedResponses({200}) + @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, + 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("parentResourceName") String parentResourceName, @PathParam("targetName") String targetName, @PathParam("capabilityName") String capabilityName, - @BodyParam("application/json") CapabilityInner capability, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") CapabilityInner capability, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Get a list of Capability resources that extend a Target resource.. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -156,36 +137,27 @@ Mono> listNext( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Capability resources that extend a Target resource. along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * 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 parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName, String continuationToken) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (parentProviderNamespace == null) { - return Mono - .error( - new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); } if (parentResourceType == null) { return Mono @@ -200,36 +172,17 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - continuationToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, continuationToken, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a list of Capability resources that extend a Target resource.. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -241,37 +194,27 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Capability resources that extend a Target resource. along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String continuationToken, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName, + String continuationToken, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (parentProviderNamespace == null) { - return Mono - .error( - new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); } if (parentResourceType == null) { return Mono @@ -287,32 +230,16 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - continuationToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, + continuationToken, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get a list of Capability resources that extend a Target resource.. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -322,32 +249,19 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Capability resources that extend a Target resource. as paginated response with {@link - * PagedFlux}. + * @return a list of Capability resources that extend a Target resource. as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String continuationToken) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - continuationToken), - nextLink -> listNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, String continuationToken) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, continuationToken), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get a list of Capability resources that extend a Target resource.. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -356,32 +270,20 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Capability resources that extend a Target resource. as paginated response with {@link - * PagedFlux}. + * @return a list of Capability resources that extend a Target resource. as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName) { + private PagedFlux listAsync(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName) { final String continuationToken = null; - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - continuationToken), - nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, continuationToken), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get a list of Capability resources that extend a Target resource.. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -392,34 +294,22 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Capability resources that extend a Target resource. as paginated response with {@link - * PagedFlux}. + * @return a list of Capability resources that extend a Target resource. as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String continuationToken, + private PagedFlux listAsync(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, String continuationToken, Context context) { return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - continuationToken, - context), + () -> listSinglePageAsync(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, continuationToken, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get a list of Capability resources that extend a Target resource.. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -428,30 +318,20 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Capability resources that extend a Target resource. as paginated response with {@link - * PagedIterable}. + * @return a list of Capability resources that extend a Target resource. as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName) { + public PagedIterable list(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName) { final String continuationToken = null; - return new PagedIterable<>( - listAsync( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - continuationToken)); + return new PagedIterable<>(listAsync(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, continuationToken)); } /** * Get a list of Capability resources that extend a Target resource.. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -462,32 +342,20 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Capability resources that extend a Target resource. as paginated response with {@link - * PagedIterable}. + * @return a list of Capability resources that extend a Target resource. as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String continuationToken, + public PagedIterable list(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, String continuationToken, Context context) { - return new PagedIterable<>( - listAsync( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - continuationToken, - context)); + return new PagedIterable<>(listAsync(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, continuationToken, context)); } /** * Get a Capability resource that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -498,36 +366,27 @@ public PagedIterable list( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Capability resource that extends a Target resource along with {@link Response} on successful completion - * of {@link Mono}. + * 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 parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName, String capabilityName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (parentProviderNamespace == null) { - return Mono - .error( - new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); } if (parentResourceType == null) { return Mono @@ -545,27 +404,15 @@ private Mono> getWithResponseAsync( } 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)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, capabilityName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a Capability resource that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -577,37 +424,27 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Capability resource that extends a Target resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName, + String capabilityName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (parentProviderNamespace == null) { - return Mono - .error( - new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); } if (parentResourceType == null) { return Mono @@ -625,24 +462,14 @@ private Mono> getWithResponseAsync( } 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); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, + capabilityName, accept, context); } /** * Get a Capability resource that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -655,26 +482,15 @@ private Mono> getWithResponseAsync( * @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 parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, String capabilityName) { + return getWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, + targetName, capabilityName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a Capability resource that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -688,28 +504,16 @@ private Mono getAsync( * @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 parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, String capabilityName, Context context) { - return getWithResponseAsync( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - capabilityName, - context) - .block(); + return getWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, + targetName, capabilityName, context).block(); } /** * Get a Capability resource that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -722,27 +526,15 @@ public Response getWithResponse( * @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 parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName, String capabilityName) { + return getWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, + targetName, capabilityName, Context.NONE).getValue(); } /** * Delete a Capability that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -755,33 +547,23 @@ public CapabilityInner get( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, String capabilityName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (parentProviderNamespace == null) { - return Mono - .error( - new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); } if (parentResourceType == null) { return Mono @@ -799,27 +581,15 @@ private Mono> deleteWithResponseAsync( } 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.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, capabilityName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a Capability that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -833,34 +603,24 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName, + private Mono> deleteWithResponseAsync(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, String capabilityName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (parentProviderNamespace == null) { - return Mono - .error( - new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); } if (parentResourceType == null) { return Mono @@ -878,24 +638,14 @@ private Mono> deleteWithResponseAsync( } 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.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, + capabilityName, accept, context); } /** * Delete a Capability that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -908,26 +658,15 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName) { - return deleteWithResponseAsync( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - capabilityName) - .flatMap(ignored -> Mono.empty()); + private Mono deleteAsync(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName, String capabilityName) { + return deleteWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, capabilityName).flatMap(ignored -> Mono.empty()); } /** * Delete a Capability that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -941,28 +680,16 @@ private Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName, + 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(); + return deleteWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, capabilityName, context).block(); } /** * Delete a Capability that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -974,26 +701,15 @@ public Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName) { - deleteWithResponse( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - capabilityName, - Context.NONE); + public void delete(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName, String capabilityName) { + deleteWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, + targetName, capabilityName, Context.NONE); } /** * Create or update a Capability resource that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -1005,37 +721,27 @@ public void delete( * @throws 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}. + * {@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> createOrUpdateWithResponseAsync(String resourceGroupName, + String parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName, + String capabilityName, CapabilityInner capability) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (parentProviderNamespace == null) { - return Mono - .error( - new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); } if (parentResourceType == null) { return Mono @@ -1058,28 +764,15 @@ private Mono> createOrUpdateWithResponseAsync( } 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.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, capabilityName, capability, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update a Capability resource that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -1092,38 +785,27 @@ private Mono> createOrUpdateWithResponseAsync( * @throws 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}. + * {@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> createOrUpdateWithResponseAsync(String resourceGroupName, + String parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName, + String capabilityName, CapabilityInner capability, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (parentProviderNamespace == null) { - return Mono - .error( - new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); } if (parentResourceType == null) { return Mono @@ -1146,25 +828,14 @@ private Mono> createOrUpdateWithResponseAsync( } 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.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, capabilityName, capability, accept, context); } /** * Create or update a Capability resource that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -1178,28 +849,17 @@ private Mono> createOrUpdateWithResponseAsync( * @return model that represents a Capability resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName, + 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) + return createOrUpdateWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, capabilityName, capability) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Create or update a Capability resource that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -1214,30 +874,16 @@ private Mono createOrUpdateAsync( * @return model that represents a Capability resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName, - CapabilityInner capability, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - capabilityName, - capability, - context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, + String parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName, + String capabilityName, CapabilityInner capability, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, capabilityName, capability, context).block(); } /** * Create or update a Capability resource that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -1251,36 +897,24 @@ public Response createOrUpdateWithResponse( * @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, + 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(); + return createOrUpdateWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, capabilityName, capability, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a list of Capability resources and a link for pagination along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return model that represents a list of Capability resources and a link for pagination along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1288,37 +922,28 @@ private Mono> listNextSinglePageAsync(String next return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a list of Capability resources and a link for pagination along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return model that represents a list of Capability resources and a link for pagination along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1326,23 +951,13 @@ private Mono> listNextSinglePageAsync(String next return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesImpl.java index 524e853d9a4c..c21aa6590ca6 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 @@ -21,94 +21,44 @@ public final class CapabilitiesImpl implements Capabilities { private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - public CapabilitiesImpl( - CapabilitiesClient innerClient, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + public CapabilitiesImpl(CapabilitiesClient innerClient, + com.azure.resourcemanager.chaos.ChaosManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable list( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName) { - PagedIterable inner = - this - .serviceClient() - .list(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName); - return Utils.mapPage(inner, inner1 -> new CapabilityImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, parentProviderNamespace, + parentResourceType, parentResourceName, 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 parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, String continuationToken, Context context) { - PagedIterable inner = - this - .serviceClient() - .list( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - continuationToken, - context); - return Utils.mapPage(inner, inner1 -> new CapabilityImpl(inner1, this.manager())); + PagedIterable inner = this.serviceClient().list(resourceGroupName, parentProviderNamespace, + parentResourceType, parentResourceName, 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 parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, String capabilityName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - capabilityName, - context); + Response inner = this.serviceClient().getWithResponse(resourceGroupName, + parentProviderNamespace, parentResourceType, parentResourceName, targetName, capabilityName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CapabilityImpl(inner.getValue(), this.manager())); } else { return null; } } - public Capability get( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName) { - CapabilityInner inner = - this - .serviceClient() - .get( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - capabilityName); + public Capability get(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName, String capabilityName) { + CapabilityInner inner = this.serviceClient().get(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, capabilityName); if (inner != null) { return new CapabilityImpl(inner, this.manager()); } else { @@ -116,95 +66,38 @@ public Capability get( } } - public Response deleteWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName, + public Response deleteWithResponse(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, String capabilityName, Context context) { - return this - .serviceClient() - .deleteWithResponse( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - capabilityName, - context); + return this.serviceClient().deleteWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, capabilityName, context); } - public void delete( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName) { - this - .serviceClient() - .delete( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - capabilityName); + public void delete(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName, String capabilityName) { + this.serviceClient().delete(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, + targetName, capabilityName); } - public Response createOrUpdateWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName, - CapabilityInner capability, - Context context) { - Response inner = - this - .serviceClient() - .createOrUpdateWithResponse( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - capabilityName, - capability, - context); + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CapabilityImpl(inner.getValue(), this.manager())); } else { return null; } } - public Capability createOrUpdate( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName, + 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); + CapabilityInner inner = this.serviceClient().createOrUpdate(resourceGroupName, parentProviderNamespace, + parentResourceType, parentResourceName, targetName, capabilityName, capability); if (inner != null) { return new CapabilityImpl(inner, this.manager()); } else { 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 fb5359984b2c..b49dfa127deb 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 @@ -30,22 +30,28 @@ import com.azure.resourcemanager.chaos.models.CapabilityTypeListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in CapabilityTypesClient. */ +/** + * An instance of this class provides access to all the operations defined in CapabilityTypesClient. + */ public final class CapabilityTypesClientImpl implements CapabilityTypesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final CapabilityTypesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ChaosManagementClientImpl client; /** * Initializes an instance of CapabilityTypesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ CapabilityTypesClientImpl(ChaosManagementClientImpl client) { - this.service = - RestProxy.create(CapabilityTypesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(CapabilityTypesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,50 +62,38 @@ public final class CapabilityTypesClientImpl implements CapabilityTypesClient { @Host("{$host}") @ServiceInterface(name = "ChaosManagementClien") public interface CapabilityTypesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}/capabilityTypes") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}/capabilityTypes") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, - @PathParam("targetTypeName") String targetTypeName, - @QueryParam("continuationToken") String continuationToken, - @HeaderParam("Accept") String accept, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, @PathParam("targetTypeName") String targetTypeName, + @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}/capabilityTypes/{capabilityTypeName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}/capabilityTypes/{capabilityTypeName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, - @PathParam("targetTypeName") String targetTypeName, - @PathParam("capabilityTypeName") String capabilityTypeName, - @HeaderParam("Accept") String accept, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, @PathParam("targetTypeName") String targetTypeName, + @PathParam("capabilityTypeName") String capabilityTypeName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get a list of Capability Type resources for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param continuationToken String that sets the continuation token. @@ -107,22 +101,18 @@ Mono> listNext( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Capability Type resources for given Target Type and location along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String locationName, String targetTypeName, String continuationToken) { + private Mono> listSinglePageAsync(String locationName, String targetTypeName, + String continuationToken) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + 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.")); @@ -132,33 +122,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - locationName, - targetTypeName, - continuationToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationName, targetTypeName, continuationToken, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a list of Capability Type resources for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param continuationToken String that sets the continuation token. @@ -167,22 +140,18 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Capability Type resources for given Target Type and location along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String locationName, String targetTypeName, String continuationToken, Context context) { + private Mono> listSinglePageAsync(String locationName, String targetTypeName, + String continuationToken, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + 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.")); @@ -193,68 +162,52 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - locationName, - targetTypeName, - continuationToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, + targetTypeName, continuationToken, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get a list of Capability Type resources for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param continuationToken String that sets the continuation token. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Capability Type resources for given Target Type and location as paginated response with {@link - * PagedFlux}. + * @return a list of Capability Type resources for given Target Type and location as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String locationName, String targetTypeName, String continuationToken) { - return new PagedFlux<>( - () -> listSinglePageAsync(locationName, targetTypeName, continuationToken), + private PagedFlux listAsync(String locationName, String targetTypeName, + String continuationToken) { + return new PagedFlux<>(() -> listSinglePageAsync(locationName, targetTypeName, continuationToken), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get a list of Capability Type resources for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Capability Type resources for given Target Type and location as paginated response with {@link - * PagedFlux}. + * @return a list of Capability Type resources for given Target Type and location as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String locationName, String targetTypeName) { final String continuationToken = null; - return new PagedFlux<>( - () -> listSinglePageAsync(locationName, targetTypeName, continuationToken), + return new PagedFlux<>(() -> listSinglePageAsync(locationName, targetTypeName, continuationToken), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get a list of Capability Type resources for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param continuationToken String that sets the continuation token. @@ -262,27 +215,26 @@ private PagedFlux listAsync(String locationName, String tar * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Capability Type resources for given Target Type and location as paginated response with {@link - * PagedFlux}. + * @return a list of Capability Type resources for given Target Type and location as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String locationName, String targetTypeName, String continuationToken, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(locationName, targetTypeName, continuationToken, context), + private PagedFlux listAsync(String locationName, String targetTypeName, + String continuationToken, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(locationName, targetTypeName, continuationToken, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get a list of Capability Type resources for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Capability Type resources for given Target Type and location as paginated response with {@link - * PagedIterable}. + * @return a list of Capability Type resources for given Target Type and location as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String locationName, String targetTypeName) { @@ -292,7 +244,7 @@ public PagedIterable list(String locationName, String targe /** * Get a list of Capability Type resources for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param continuationToken String that sets the continuation token. @@ -300,18 +252,18 @@ public PagedIterable list(String locationName, String targe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Capability Type resources for given Target Type and location as paginated response with {@link - * PagedIterable}. + * @return a list of Capability Type resources for given Target Type and location as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String locationName, String targetTypeName, String continuationToken, Context context) { + public PagedIterable list(String locationName, String targetTypeName, String continuationToken, + Context context) { return new PagedIterable<>(listAsync(locationName, targetTypeName, continuationToken, context)); } /** * Get a Capability Type resource for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param capabilityTypeName String that represents a Capability Type resource name. @@ -319,22 +271,18 @@ public PagedIterable list( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Capability Type resource for given Target Type and location along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String locationName, String targetTypeName, String capabilityTypeName) { + private Mono> getWithResponseAsync(String locationName, String targetTypeName, + String capabilityTypeName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + 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.")); @@ -348,24 +296,14 @@ private Mono> getWithResponseAsync( } 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)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationName, targetTypeName, capabilityTypeName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a Capability Type resource for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param capabilityTypeName String that represents a Capability Type resource name. @@ -374,22 +312,18 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Capability Type resource for given Target Type and location along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String locationName, String targetTypeName, String capabilityTypeName, Context context) { + private Mono> getWithResponseAsync(String locationName, String targetTypeName, + String capabilityTypeName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + 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.")); @@ -403,21 +337,13 @@ private Mono> getWithResponseAsync( } 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); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + locationName, targetTypeName, capabilityTypeName, accept, context); } /** * Get a Capability Type resource for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param capabilityTypeName String that represents a Capability Type resource name. @@ -434,7 +360,7 @@ private Mono getAsync(String locationName, String targetTyp /** * Get a Capability Type resource for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param capabilityTypeName String that represents a Capability Type resource name. @@ -445,14 +371,14 @@ private Mono getAsync(String locationName, String targetTyp * @return a Capability Type resource for given Target Type and location along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String locationName, String targetTypeName, String capabilityTypeName, Context context) { + public Response getWithResponse(String locationName, String targetTypeName, + String capabilityTypeName, Context context) { return getWithResponseAsync(locationName, targetTypeName, capabilityTypeName, context).block(); } /** * Get a Capability Type resource for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param capabilityTypeName String that represents a Capability Type resource name. @@ -468,14 +394,15 @@ public CapabilityTypeInner get(String locationName, String targetTypeName, Strin /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a list of Capability Type resources and a link for pagination along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return model that represents a list of Capability Type resources and a link for pagination along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -483,37 +410,28 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a list of Capability Type resources and a link for pagination along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return model that represents a list of Capability Type resources and a link for pagination along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -521,23 +439,13 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesImpl.java index d846aab402ea..6a206147b558 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesImpl.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesImpl.java @@ -21,33 +21,30 @@ public final class CapabilityTypesImpl implements CapabilityTypes { private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - public CapabilityTypesImpl( - CapabilityTypesClient innerClient, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + public CapabilityTypesImpl(CapabilityTypesClient innerClient, + com.azure.resourcemanager.chaos.ChaosManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String locationName, String targetTypeName) { PagedIterable inner = this.serviceClient().list(locationName, targetTypeName); - return Utils.mapPage(inner, inner1 -> new CapabilityTypeImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapabilityTypeImpl(inner1, this.manager())); } - public PagedIterable list( - String locationName, String targetTypeName, String continuationToken, Context context) { - PagedIterable inner = - this.serviceClient().list(locationName, targetTypeName, continuationToken, context); - return Utils.mapPage(inner, inner1 -> new CapabilityTypeImpl(inner1, this.manager())); + public PagedIterable list(String locationName, String targetTypeName, String continuationToken, + Context context) { + PagedIterable inner + = this.serviceClient().list(locationName, targetTypeName, continuationToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapabilityTypeImpl(inner1, this.manager())); } - public Response getWithResponse( - String locationName, String targetTypeName, String capabilityTypeName, Context context) { - Response inner = - this.serviceClient().getWithResponse(locationName, targetTypeName, capabilityTypeName, context); + public Response getWithResponse(String locationName, String targetTypeName, + String capabilityTypeName, Context context) { + Response inner + = this.serviceClient().getWithResponse(locationName, targetTypeName, capabilityTypeName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CapabilityTypeImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java index 866e2f6186ac..0fe0b181ab68 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java @@ -14,8 +14,10 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the ChaosManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = {ChaosManagementClientImpl.class}) +/** + * A builder for creating a new instance of the ChaosManagementClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { ChaosManagementClientImpl.class }) public final class ChaosManagementClientBuilder { /* * GUID that represents an Azure subscription ID. @@ -24,7 +26,7 @@ public final class ChaosManagementClientBuilder { /** * Sets GUID that represents an Azure subscription ID. - * + * * @param subscriptionId the subscriptionId value. * @return the ChaosManagementClientBuilder. */ @@ -40,7 +42,7 @@ public ChaosManagementClientBuilder subscriptionId(String subscriptionId) { /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the ChaosManagementClientBuilder. */ @@ -56,7 +58,7 @@ public ChaosManagementClientBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the ChaosManagementClientBuilder. */ @@ -72,7 +74,7 @@ public ChaosManagementClientBuilder environment(AzureEnvironment environment) { /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the ChaosManagementClientBuilder. */ @@ -88,7 +90,7 @@ public ChaosManagementClientBuilder pipeline(HttpPipeline pipeline) { /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the ChaosManagementClientBuilder. */ @@ -104,7 +106,7 @@ public ChaosManagementClientBuilder defaultPollInterval(Duration defaultPollInte /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the ChaosManagementClientBuilder. */ @@ -115,30 +117,20 @@ public ChaosManagementClientBuilder serializerAdapter(SerializerAdapter serializ /** * Builds an instance of ChaosManagementClientImpl with the provided parameters. - * + * * @return an instance of ChaosManagementClientImpl. */ public ChaosManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - ChaosManagementClientImpl client = - new ChaosManagementClientImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - this.subscriptionId, - localEndpoint); + HttpPipeline localPipeline = (pipeline != null) ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + ChaosManagementClientImpl client = new ChaosManagementClientImpl(localPipeline, localSerializerAdapter, + localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java index cffdad3b6579..d975b8c1dac0 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java @@ -39,159 +39,187 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the ChaosManagementClientImpl type. */ +/** + * Initializes a new instance of the ChaosManagementClientImpl type. + */ @ServiceClient(builder = ChaosManagementClientBuilder.class) public final class ChaosManagementClientImpl implements ChaosManagementClient { - /** GUID that represents an Azure subscription ID. */ + /** + * GUID that represents an Azure subscription ID. + */ private final String subscriptionId; /** * Gets GUID that represents an Azure subscription ID. - * + * * @return the subscriptionId value. */ public String getSubscriptionId() { return this.subscriptionId; } - /** server parameter. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Api Version. + */ private final String apiVersion; /** * Gets Api Version. - * + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The CapabilitiesClient object to access its operations. */ + /** + * The CapabilitiesClient object to access its operations. + */ private final CapabilitiesClient capabilities; /** * Gets the CapabilitiesClient object to access its operations. - * + * * @return the CapabilitiesClient object. */ public CapabilitiesClient getCapabilities() { return this.capabilities; } - /** The CapabilityTypesClient object to access its operations. */ + /** + * The CapabilityTypesClient object to access its operations. + */ private final CapabilityTypesClient capabilityTypes; /** * Gets the CapabilityTypesClient object to access its operations. - * + * * @return the CapabilityTypesClient object. */ public CapabilityTypesClient getCapabilityTypes() { return this.capabilityTypes; } - /** The ExperimentsClient object to access its operations. */ + /** + * The ExperimentsClient object to access its operations. + */ private final ExperimentsClient experiments; /** * Gets the ExperimentsClient object to access its operations. - * + * * @return the ExperimentsClient object. */ public ExperimentsClient getExperiments() { return this.experiments; } - /** The OperationStatusesClient object to access its operations. */ + /** + * The OperationStatusesClient object to access its operations. + */ private final OperationStatusesClient operationStatuses; /** * Gets the OperationStatusesClient object to access its operations. - * + * * @return the OperationStatusesClient object. */ public OperationStatusesClient getOperationStatuses() { return this.operationStatuses; } - /** The OperationsClient object to access its operations. */ + /** + * The OperationsClient object to access its operations. + */ private final OperationsClient operations; /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ public OperationsClient getOperations() { return this.operations; } - /** The TargetTypesClient object to access its operations. */ + /** + * The TargetTypesClient object to access its operations. + */ private final TargetTypesClient targetTypes; /** * Gets the TargetTypesClient object to access its operations. - * + * * @return the TargetTypesClient object. */ public TargetTypesClient getTargetTypes() { return this.targetTypes; } - /** The TargetsClient object to access its operations. */ + /** + * The TargetsClient object to access its operations. + */ private final TargetsClient targets; /** * Gets the TargetsClient object to access its operations. - * + * * @return the TargetsClient object. */ public TargetsClient getTargets() { @@ -200,7 +228,7 @@ public TargetsClient getTargets() { /** * Initializes an instance of ChaosManagementClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. @@ -208,19 +236,14 @@ public TargetsClient getTargets() { * @param subscriptionId GUID that represents an Azure subscription ID. * @param endpoint server parameter. */ - ChaosManagementClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + ChaosManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-11-01"; + this.apiVersion = "2024-01-01"; this.capabilities = new CapabilitiesClientImpl(this); this.capabilityTypes = new CapabilityTypesClientImpl(this); this.experiments = new ExperimentsClientImpl(this); @@ -232,7 +255,7 @@ public TargetsClient getTargets() { /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -241,7 +264,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -251,7 +274,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -261,26 +284,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -293,19 +305,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, + SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionDetailsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionDetailsImpl.java index 9e53868c1402..f8574189f064 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionDetailsImpl.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionDetailsImpl.java @@ -14,8 +14,8 @@ public final class ExperimentExecutionDetailsImpl implements ExperimentExecution private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - ExperimentExecutionDetailsImpl( - ExperimentExecutionDetailsInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + ExperimentExecutionDetailsImpl(ExperimentExecutionDetailsInner innerObject, + com.azure.resourcemanager.chaos.ChaosManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionImpl.java index 6b494ead16fa..5e188019d810 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionImpl.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionImpl.java @@ -13,8 +13,8 @@ public final class ExperimentExecutionImpl implements ExperimentExecution { private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - ExperimentExecutionImpl( - ExperimentExecutionInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + ExperimentExecutionImpl(ExperimentExecutionInner innerObject, + com.azure.resourcemanager.chaos.ChaosManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java index 6681415751dd..6960c54c54c2 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java @@ -110,20 +110,14 @@ public ExperimentImpl withExistingResourceGroup(String resourceGroupName) { } public Experiment create() { - this.innerObject = - serviceManager - .serviceClient() - .getExperiments() - .createOrUpdate(resourceGroupName, experimentName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getExperiments().createOrUpdate(resourceGroupName, + experimentName, this.innerModel(), Context.NONE); return this; } public Experiment create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getExperiments() - .createOrUpdate(resourceGroupName, experimentName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getExperiments().createOrUpdate(resourceGroupName, + experimentName, this.innerModel(), context); return this; } @@ -139,47 +133,33 @@ public ExperimentImpl update() { } public Experiment apply() { - this.innerObject = - serviceManager - .serviceClient() - .getExperiments() - .update(resourceGroupName, experimentName, updateExperiment, Context.NONE); + this.innerObject = serviceManager.serviceClient().getExperiments().update(resourceGroupName, experimentName, + updateExperiment, Context.NONE); return this; } public Experiment apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getExperiments() - .update(resourceGroupName, experimentName, updateExperiment, context); + this.innerObject = serviceManager.serviceClient().getExperiments().update(resourceGroupName, experimentName, + updateExperiment, context); return this; } ExperimentImpl(ExperimentInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.experimentName = Utils.getValueFromIdByName(innerObject.id(), "experiments"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.experimentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "experiments"); } public Experiment refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getExperiments() - .getByResourceGroupWithResponse(resourceGroupName, experimentName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getExperiments() + .getByResourceGroupWithResponse(resourceGroupName, experimentName, Context.NONE).getValue(); return this; } public Experiment refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getExperiments() - .getByResourceGroupWithResponse(resourceGroupName, experimentName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getExperiments() + .getByResourceGroupWithResponse(resourceGroupName, experimentName, context).getValue(); return this; } @@ -220,8 +200,13 @@ public ExperimentImpl withSelectors(List selectors) { } public ExperimentImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateExperiment.withTags(tags); + return this; + } } public ExperimentImpl withIdentity(ResourceIdentity identity) { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java index 467c951c9313..91bb52115690 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java @@ -44,22 +44,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ExperimentsClient. */ +/** + * An instance of this class provides access to all the operations defined in ExperimentsClient. + */ public final class ExperimentsClientImpl implements ExperimentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ExperimentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ChaosManagementClientImpl client; /** * Initializes an instance of ExperimentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ExperimentsClientImpl(ChaosManagementClientImpl client) { - this.service = - RestProxy.create(ExperimentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ExperimentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -70,300 +76,204 @@ public final class ExperimentsClientImpl implements ExperimentsClient { @Host("{$host}") @ServiceInterface(name = "ChaosManagementClien") public interface ExperimentsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/experiments") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("running") Boolean running, - @QueryParam("continuationToken") String continuationToken, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("running") Boolean running, @QueryParam("continuationToken") String continuationToken, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("running") Boolean running, - @QueryParam("continuationToken") String continuationToken, - @HeaderParam("Accept") String accept, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("running") Boolean running, + @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}") - @ExpectedResponses({202}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("experimentName") String experimentName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("experimentName") String experimentName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("experimentName") String experimentName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("experimentName") String experimentName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("experimentName") String experimentName, - @BodyParam("application/json") ExperimentInner experiment, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExperimentInner experiment, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}") - @ExpectedResponses({202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("experimentName") String experimentName, - @BodyParam("application/json") ExperimentUpdate experiment, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExperimentUpdate experiment, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/cancel") - @ExpectedResponses({202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/cancel") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> cancel( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono>> cancel(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("experimentName") String experimentName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("experimentName") String experimentName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/start") - @ExpectedResponses({202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/start") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono>> start(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("experimentName") String experimentName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("experimentName") String experimentName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAllExecutions( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> listAllExecutions(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("experimentName") String experimentName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("experimentName") String experimentName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executions/{executionId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executions/{executionId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getExecution( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> getExecution(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("experimentName") String experimentName, - @PathParam("executionId") String executionId, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("experimentName") String experimentName, @PathParam("executionId") String executionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executions/{executionId}/getExecutionDetails") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executions/{executionId}/getExecutionDetails") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> executionDetails( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> executionDetails(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("experimentName") String experimentName, - @PathParam("executionId") String executionId, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("experimentName") String experimentName, @PathParam("executionId") String executionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAllNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listAllNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listAllExecutionsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get a list of Experiment resources in a subscription. - * + * * @param running Optional value that indicates whether to filter results based on if the Experiment is currently - * running. If null, then the results will not be filtered. + * running. If null, then the results will not be filtered. * @param continuationToken String that sets the continuation token. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Experiment resources in a subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Boolean running, String continuationToken) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - running, - continuationToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), running, continuationToken, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a list of Experiment resources in a subscription. - * + * * @param running Optional value that indicates whether to filter results based on if the Experiment is currently - * running. If null, then the results will not be filtered. + * running. If null, then the results will not be filtered. * @param continuationToken String that sets the continuation token. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Experiment resources in a subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - Boolean running, String continuationToken, Context context) { + private Mono> listSinglePageAsync(Boolean running, String continuationToken, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - running, - continuationToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), running, + continuationToken, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get a list of Experiment resources in a subscription. - * + * * @param running Optional value that indicates whether to filter results based on if the Experiment is currently - * running. If null, then the results will not be filtered. + * running. If null, then the results will not be filtered. * @param continuationToken String that sets the continuation token. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -372,13 +282,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Boolean running, String continuationToken) { - return new PagedFlux<>( - () -> listSinglePageAsync(running, continuationToken), nextLink -> listAllNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(running, continuationToken), + nextLink -> listAllNextSinglePageAsync(nextLink)); } /** * Get a list of Experiment resources in a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Experiment resources in a subscription as paginated response with {@link PagedFlux}. @@ -387,15 +297,15 @@ private PagedFlux listAsync(Boolean running, String continuatio private PagedFlux listAsync() { final Boolean running = null; final String continuationToken = null; - return new PagedFlux<>( - () -> listSinglePageAsync(running, continuationToken), nextLink -> listAllNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(running, continuationToken), + nextLink -> listAllNextSinglePageAsync(nextLink)); } /** * Get a list of Experiment resources in a subscription. - * + * * @param running Optional value that indicates whether to filter results based on if the Experiment is currently - * running. If null, then the results will not be filtered. + * running. If null, then the results will not be filtered. * @param continuationToken String that sets the continuation token. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -405,14 +315,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Boolean running, String continuationToken, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(running, continuationToken, context), + return new PagedFlux<>(() -> listSinglePageAsync(running, continuationToken, context), nextLink -> listAllNextSinglePageAsync(nextLink, context)); } /** * Get a list of Experiment resources in a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Experiment resources in a subscription as paginated response with {@link PagedIterable}. @@ -426,9 +335,9 @@ public PagedIterable list() { /** * Get a list of Experiment resources in a subscription. - * + * * @param running Optional value that indicates whether to filter results based on if the Experiment is currently - * running. If null, then the results will not be filtered. + * running. If null, then the results will not be filtered. * @param continuationToken String that sets the continuation token. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -443,31 +352,27 @@ public PagedIterable list(Boolean running, String continuationT /** * Get a list of Experiment resources in a resource group. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param 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. + * running. If null, then the results will not be filtered. * @param continuationToken String that sets the continuation token. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Experiment resources in a resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Boolean running, String continuationToken) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Boolean running, String continuationToken) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -475,58 +380,37 @@ private Mono> listByResourceGroupSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - running, - continuationToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, running, continuationToken, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a list of Experiment resources in a resource group. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param running Optional value that indicates whether to filter results based on if the Experiment is currently - * running. If null, then the results will not be filtered. + * running. If null, then the results will not be filtered. * @param continuationToken String that sets the continuation token. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Experiment resources in a resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Boolean running, String continuationToken, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Boolean running, String continuationToken, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -535,32 +419,18 @@ private Mono> listByResourceGroupSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - running, - continuationToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, running, continuationToken, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get a list of Experiment resources in a resource group. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param running Optional value that indicates whether to filter results based on if the Experiment is currently - * running. If null, then the results will not be filtered. + * running. If null, then the results will not be filtered. * @param continuationToken String that sets the continuation token. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -568,16 +438,15 @@ private Mono> listByResourceGroupSinglePageAsync( * @return a list of Experiment resources in a resource group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, Boolean running, String continuationToken) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, running, continuationToken), + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Boolean running, + String continuationToken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, running, continuationToken), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get a list of Experiment resources in a resource group. - * + * * @param resourceGroupName String that represents an Azure resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -588,17 +457,16 @@ private PagedFlux listByResourceGroupAsync( private PagedFlux listByResourceGroupAsync(String resourceGroupName) { final Boolean running = null; final String continuationToken = null; - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, running, continuationToken), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, running, continuationToken), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get a list of Experiment resources in a resource group. - * + * * @param resourceGroupName String that represents an Azure resource group. * @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. + * running. If null, then the results will not be filtered. * @param continuationToken String that sets the continuation token. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -607,8 +475,8 @@ private PagedFlux listByResourceGroupAsync(String resourceGroup * @return a list of Experiment resources in a resource group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, Boolean running, String continuationToken, Context context) { + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Boolean running, + String continuationToken, Context context) { return new PagedFlux<>( () -> listByResourceGroupSinglePageAsync(resourceGroupName, running, continuationToken, context), nextLink -> listNextSinglePageAsync(nextLink, context)); @@ -616,7 +484,7 @@ private PagedFlux listByResourceGroupAsync( /** * Get a list of Experiment resources in a resource group. - * + * * @param resourceGroupName String that represents an Azure resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -632,10 +500,10 @@ public PagedIterable listByResourceGroup(String resourceGroupNa /** * Get a list of Experiment resources in a resource group. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param 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. + * running. If null, then the results will not be filtered. * @param continuationToken String that sets the continuation token. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -644,14 +512,14 @@ public PagedIterable listByResourceGroup(String resourceGroupNa * @return a list of Experiment resources in a resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup( - String resourceGroupName, Boolean running, String continuationToken, Context context) { + public PagedIterable listByResourceGroup(String resourceGroupName, Boolean running, + String continuationToken, Context context) { return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, running, continuationToken, context)); } /** * Delete a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -662,16 +530,12 @@ public PagedIterable listByResourceGroup( @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String experimentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -682,23 +546,14 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - experimentName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, experimentName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -708,19 +563,15 @@ private Mono>> deleteWithResponseAsync(String resource * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String experimentName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String experimentName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -731,20 +582,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - experimentName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, experimentName, accept, context); } /** * Delete a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -755,15 +599,13 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String experimentName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, experimentName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -773,18 +615,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String experimentName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String experimentName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, experimentName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -799,7 +640,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * 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. @@ -809,14 +650,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String experimentName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String experimentName, + Context context) { return this.beginDeleteAsync(resourceGroupName, experimentName, context).getSyncPoller(); } /** * Delete a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -826,14 +667,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String experimentName) { - return beginDeleteAsync(resourceGroupName, experimentName) - .last() + return beginDeleteAsync(resourceGroupName, experimentName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -844,14 +684,13 @@ private Mono deleteAsync(String resourceGroupName, String experimentName) */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String experimentName, Context context) { - return beginDeleteAsync(resourceGroupName, experimentName, context) - .last() + return beginDeleteAsync(resourceGroupName, experimentName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -865,7 +704,7 @@ public 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. @@ -880,7 +719,7 @@ public void delete(String resourceGroupName, String experimentName, Context cont /** * Get a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -889,19 +728,15 @@ public void delete(String resourceGroupName, String experimentName, Context cont * @return a Experiment resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String experimentName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String experimentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -912,23 +747,14 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - experimentName, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, experimentName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -938,19 +764,15 @@ private Mono> getByResourceGroupWithResponseAsync( * @return a Experiment resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String experimentName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String experimentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -961,20 +783,13 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - experimentName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, experimentName, accept, context); } /** * Get a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -990,7 +805,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, /** * Get a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -1000,14 +815,14 @@ private Mono getByResourceGroupAsync(String resourceGroupName, * @return a Experiment resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String experimentName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String experimentName, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, experimentName, context).block(); } /** * Get a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1022,7 +837,7 @@ public ExperimentInner getByResourceGroup(String resourceGroupName, String exper /** * Create or update a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Experiment resource to be created or updated. @@ -1030,22 +845,18 @@ public ExperimentInner getByResourceGroup(String resourceGroupName, String exper * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return model that represents a Experiment resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String experimentName, ExperimentInner experiment) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String experimentName, ExperimentInner experiment) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1061,24 +872,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - experimentName, - experiment, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, experimentName, experiment, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Experiment resource to be created or updated. @@ -1087,22 +888,18 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return model that represents a Experiment resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String experimentName, ExperimentInner experiment, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1118,21 +915,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - experimentName, - experiment, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, experimentName, experiment, accept, context); } /** * Create or update a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Experiment resource to be created or updated. @@ -1142,23 +931,17 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of model that represents a Experiment resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ExperimentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String experimentName, ExperimentInner experiment) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, experimentName, experiment); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ExperimentInner.class, - ExperimentInner.class, - this.client.getContext()); + private PollerFlux, ExperimentInner> beginCreateOrUpdateAsync(String resourceGroupName, + String experimentName, ExperimentInner experiment) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, experimentName, experiment); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExperimentInner.class, ExperimentInner.class, this.client.getContext()); } /** * Create or update a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Experiment resource to be created or updated. @@ -1169,20 +952,18 @@ private PollerFlux, ExperimentInner> beginCreateOrUp * @return the {@link PollerFlux} for polling of model that represents a Experiment resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ExperimentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) { + private PollerFlux, ExperimentInner> beginCreateOrUpdateAsync(String resourceGroupName, + String experimentName, ExperimentInner experiment, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, experimentName, experiment, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ExperimentInner.class, ExperimentInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, experimentName, experiment, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExperimentInner.class, ExperimentInner.class, context); } /** * Create or update a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Experiment resource to be created or updated. @@ -1192,14 +973,14 @@ private PollerFlux, ExperimentInner> beginCreateOrUp * @return the {@link SyncPoller} for polling of model that represents a Experiment resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ExperimentInner> beginCreateOrUpdate( - String resourceGroupName, String experimentName, ExperimentInner experiment) { + public SyncPoller, ExperimentInner> beginCreateOrUpdate(String resourceGroupName, + String experimentName, ExperimentInner experiment) { return this.beginCreateOrUpdateAsync(resourceGroupName, experimentName, experiment).getSyncPoller(); } /** * Create or update a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Experiment resource to be created or updated. @@ -1210,14 +991,14 @@ public SyncPoller, ExperimentInner> beginCreateOrUpd * @return the {@link SyncPoller} for polling of model that represents a Experiment resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ExperimentInner> beginCreateOrUpdate( - String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) { + public SyncPoller, ExperimentInner> beginCreateOrUpdate(String resourceGroupName, + String experimentName, ExperimentInner experiment, Context context) { return this.beginCreateOrUpdateAsync(resourceGroupName, experimentName, experiment, context).getSyncPoller(); } /** * Create or update a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Experiment resource to be created or updated. @@ -1227,16 +1008,15 @@ public SyncPoller, ExperimentInner> beginCreateOrUpd * @return model that represents a Experiment resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String experimentName, ExperimentInner experiment) { - return beginCreateOrUpdateAsync(resourceGroupName, experimentName, experiment) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String experimentName, + ExperimentInner experiment) { + return beginCreateOrUpdateAsync(resourceGroupName, experimentName, experiment).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Experiment resource to be created or updated. @@ -1247,16 +1027,15 @@ private Mono createOrUpdateAsync( * @return model that represents a Experiment resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, experimentName, experiment, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String experimentName, + ExperimentInner experiment, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, experimentName, experiment, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Experiment resource to be created or updated. @@ -1272,7 +1051,7 @@ public ExperimentInner createOrUpdate(String resourceGroupName, String experimen /** * Create or update a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Experiment resource to be created or updated. @@ -1283,14 +1062,14 @@ public ExperimentInner createOrUpdate(String resourceGroupName, String experimen * @return model that represents a Experiment resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExperimentInner createOrUpdate( - String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) { + public ExperimentInner createOrUpdate(String resourceGroupName, String experimentName, ExperimentInner experiment, + Context context) { return createOrUpdateAsync(resourceGroupName, experimentName, experiment, context).block(); } /** * The operation to update an experiment. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Parameters supplied to the Update experiment operation. @@ -1298,22 +1077,18 @@ public ExperimentInner createOrUpdate( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return model that represents a Experiment resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String experimentName, ExperimentUpdate experiment) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String experimentName, + ExperimentUpdate experiment) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1329,24 +1104,14 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - experimentName, - experiment, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, experimentName, experiment, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to update an experiment. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Parameters supplied to the Update experiment operation. @@ -1355,22 +1120,18 @@ private Mono>> updateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return model that represents a Experiment resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String experimentName, ExperimentUpdate experiment, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String experimentName, + ExperimentUpdate experiment, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1386,21 +1147,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - experimentName, - experiment, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, experimentName, experiment, accept, context); } /** * The operation to update an experiment. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Parameters supplied to the Update experiment operation. @@ -1410,22 +1163,16 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of model that represents a Experiment resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ExperimentInner> beginUpdateAsync( - String resourceGroupName, String experimentName, ExperimentUpdate experiment) { + private PollerFlux, ExperimentInner> beginUpdateAsync(String resourceGroupName, + String experimentName, ExperimentUpdate experiment) { Mono>> mono = updateWithResponseAsync(resourceGroupName, experimentName, experiment); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ExperimentInner.class, - ExperimentInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExperimentInner.class, ExperimentInner.class, this.client.getContext()); } /** * The operation to update an experiment. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Parameters supplied to the Update experiment operation. @@ -1436,20 +1183,18 @@ private PollerFlux, ExperimentInner> beginUpdateAsyn * @return the {@link PollerFlux} for polling of model that represents a Experiment resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ExperimentInner> beginUpdateAsync( - String resourceGroupName, String experimentName, ExperimentUpdate experiment, Context context) { + private PollerFlux, ExperimentInner> beginUpdateAsync(String resourceGroupName, + String experimentName, ExperimentUpdate experiment, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, experimentName, experiment, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ExperimentInner.class, ExperimentInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, experimentName, experiment, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExperimentInner.class, ExperimentInner.class, context); } /** * The operation to update an experiment. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Parameters supplied to the Update experiment operation. @@ -1459,14 +1204,14 @@ private PollerFlux, ExperimentInner> beginUpdateAsyn * @return the {@link SyncPoller} for polling of model that represents a Experiment resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ExperimentInner> beginUpdate( - String resourceGroupName, String experimentName, ExperimentUpdate experiment) { + public SyncPoller, ExperimentInner> beginUpdate(String resourceGroupName, + String experimentName, ExperimentUpdate experiment) { return this.beginUpdateAsync(resourceGroupName, experimentName, experiment).getSyncPoller(); } /** * The operation to update an experiment. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Parameters supplied to the Update experiment operation. @@ -1477,14 +1222,14 @@ public SyncPoller, ExperimentInner> beginUpdate( * @return the {@link SyncPoller} for polling of model that represents a Experiment resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ExperimentInner> beginUpdate( - String resourceGroupName, String experimentName, ExperimentUpdate experiment, Context context) { + public SyncPoller, ExperimentInner> beginUpdate(String resourceGroupName, + String experimentName, ExperimentUpdate experiment, Context context) { return this.beginUpdateAsync(resourceGroupName, experimentName, experiment, context).getSyncPoller(); } /** * The operation to update an experiment. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Parameters supplied to the Update experiment operation. @@ -1494,16 +1239,15 @@ public SyncPoller, ExperimentInner> beginUpdate( * @return model that represents a Experiment resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String experimentName, ExperimentUpdate experiment) { - return beginUpdateAsync(resourceGroupName, experimentName, experiment) - .last() + private Mono updateAsync(String resourceGroupName, String experimentName, + ExperimentUpdate experiment) { + return beginUpdateAsync(resourceGroupName, experimentName, experiment).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to update an experiment. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Parameters supplied to the Update experiment operation. @@ -1514,16 +1258,15 @@ private Mono updateAsync( * @return model that represents a Experiment resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String experimentName, ExperimentUpdate experiment, Context context) { - return beginUpdateAsync(resourceGroupName, experimentName, experiment, context) - .last() + private Mono updateAsync(String resourceGroupName, String experimentName, + ExperimentUpdate experiment, Context context) { + return beginUpdateAsync(resourceGroupName, experimentName, experiment, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to update an experiment. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Parameters supplied to the Update experiment operation. @@ -1539,7 +1282,7 @@ public ExperimentInner update(String resourceGroupName, String experimentName, E /** * The operation to update an experiment. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param experiment Parameters supplied to the Update experiment operation. @@ -1550,14 +1293,14 @@ public ExperimentInner update(String resourceGroupName, String experimentName, E * @return model that represents a Experiment resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExperimentInner update( - String resourceGroupName, String experimentName, ExperimentUpdate experiment, Context context) { + public ExperimentInner update(String resourceGroupName, String experimentName, ExperimentUpdate experiment, + Context context) { return updateAsync(resourceGroupName, experimentName, experiment, context).block(); } /** * Cancel a running Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1568,16 +1311,12 @@ public ExperimentInner update( @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> cancelWithResponseAsync(String resourceGroupName, String experimentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1588,23 +1327,14 @@ private Mono>> cancelWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .cancel( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - experimentName, - accept, - context)) + .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, experimentName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Cancel a running Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -1614,19 +1344,15 @@ private Mono>> cancelWithResponseAsync(String resource * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> cancelWithResponseAsync( - String resourceGroupName, String experimentName, Context context) { + private Mono>> cancelWithResponseAsync(String resourceGroupName, String experimentName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1637,20 +1363,13 @@ private Mono>> cancelWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .cancel( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - experimentName, - accept, - context); + return service.cancel(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, experimentName, accept, context); } /** * Cancel a running Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1661,15 +1380,13 @@ private Mono>> cancelWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginCancelAsync(String resourceGroupName, String experimentName) { Mono>> mono = cancelWithResponseAsync(resourceGroupName, experimentName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Cancel a running Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -1679,18 +1396,17 @@ private PollerFlux, Void> beginCancelAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginCancelAsync( - String resourceGroupName, String experimentName, Context context) { + private PollerFlux, Void> beginCancelAsync(String resourceGroupName, String experimentName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = cancelWithResponseAsync(resourceGroupName, experimentName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Cancel a running Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1705,7 +1421,7 @@ public SyncPoller, Void> beginCancel(String resourceGroupName, /** * Cancel a running Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -1715,14 +1431,14 @@ public SyncPoller, Void> beginCancel(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCancel( - String resourceGroupName, String experimentName, Context context) { + public SyncPoller, Void> beginCancel(String resourceGroupName, String experimentName, + Context context) { return this.beginCancelAsync(resourceGroupName, experimentName, context).getSyncPoller(); } /** * Cancel a running Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1732,14 +1448,13 @@ public SyncPoller, Void> beginCancel( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono cancelAsync(String resourceGroupName, String experimentName) { - return beginCancelAsync(resourceGroupName, experimentName) - .last() + return beginCancelAsync(resourceGroupName, experimentName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Cancel a running Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -1750,14 +1465,13 @@ private Mono cancelAsync(String resourceGroupName, String experimentName) */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono cancelAsync(String resourceGroupName, String experimentName, Context context) { - return beginCancelAsync(resourceGroupName, experimentName, context) - .last() + return beginCancelAsync(resourceGroupName, experimentName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Cancel a running Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1771,7 +1485,7 @@ public void cancel(String resourceGroupName, String experimentName) { /** * Cancel a running Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -1786,7 +1500,7 @@ public void cancel(String resourceGroupName, String experimentName, Context cont /** * Start a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1797,16 +1511,12 @@ public void cancel(String resourceGroupName, String experimentName, Context cont @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync(String resourceGroupName, String experimentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1817,23 +1527,14 @@ private Mono>> startWithResponseAsync(String resourceG } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .start( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - experimentName, - accept, - context)) + .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, experimentName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Start a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -1843,19 +1544,15 @@ private Mono>> startWithResponseAsync(String resourceG * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync( - String resourceGroupName, String experimentName, Context context) { + private Mono>> startWithResponseAsync(String resourceGroupName, String experimentName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1866,20 +1563,13 @@ private Mono>> startWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .start( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - experimentName, - accept, - context); + return service.start(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, experimentName, accept, context); } /** * Start a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1890,15 +1580,13 @@ private Mono>> startWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync(String resourceGroupName, String experimentName) { Mono>> mono = startWithResponseAsync(resourceGroupName, experimentName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Start a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -1908,18 +1596,17 @@ private PollerFlux, Void> beginStartAsync(String resourceGroupN * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStartAsync( - String resourceGroupName, String experimentName, Context context) { + private PollerFlux, Void> beginStartAsync(String resourceGroupName, String experimentName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = startWithResponseAsync(resourceGroupName, experimentName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Start a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1934,7 +1621,7 @@ public SyncPoller, Void> beginStart(String resourceGroupName, S /** * Start a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -1944,14 +1631,14 @@ public SyncPoller, Void> beginStart(String resourceGroupName, S * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStart( - String resourceGroupName, String experimentName, Context context) { + public SyncPoller, Void> beginStart(String resourceGroupName, String experimentName, + Context context) { return this.beginStartAsync(resourceGroupName, experimentName, context).getSyncPoller(); } /** * Start a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1966,7 +1653,7 @@ private Mono startAsync(String resourceGroupName, String experimentName) { /** * Start a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -1977,14 +1664,13 @@ private Mono startAsync(String resourceGroupName, String experimentName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String experimentName, Context context) { - return beginStartAsync(resourceGroupName, experimentName, context) - .last() + return beginStartAsync(resourceGroupName, experimentName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Start a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1998,7 +1684,7 @@ public void start(String resourceGroupName, String experimentName) { /** * Start a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -2013,29 +1699,25 @@ public void start(String resourceGroupName, String experimentName, Context conte /** * 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 ManagementException 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 along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAllExecutionsSinglePageAsync( - String resourceGroupName, String experimentName) { + private Mono> listAllExecutionsSinglePageAsync(String resourceGroupName, + String experimentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2046,32 +1728,16 @@ private Mono> listAllExecutionsSinglePag } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listAllExecutions( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - experimentName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listAllExecutions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, experimentName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a list of executions of an 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. @@ -2079,22 +1745,18 @@ private Mono> listAllExecutionsSinglePag * @throws ManagementException 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 along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAllExecutionsSinglePageAsync( - String resourceGroupName, String experimentName, Context context) { + private Mono> listAllExecutionsSinglePageAsync(String resourceGroupName, + String experimentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2106,28 +1768,15 @@ private Mono> listAllExecutionsSinglePag final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listAllExecutions( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - experimentName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listAllExecutions(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, experimentName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get a list of 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. @@ -2136,16 +1785,15 @@ private Mono> listAllExecutionsSinglePag * @return a list of executions of an Experiment resource as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAllExecutionsAsync( - String resourceGroupName, String experimentName) { - return new PagedFlux<>( - () -> listAllExecutionsSinglePageAsync(resourceGroupName, experimentName), + private PagedFlux listAllExecutionsAsync(String resourceGroupName, + String experimentName) { + return new PagedFlux<>(() -> listAllExecutionsSinglePageAsync(resourceGroupName, experimentName), nextLink -> listAllExecutionsNextSinglePageAsync(nextLink)); } /** * 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. * @param context The context to associate with this operation. @@ -2155,16 +1803,15 @@ private PagedFlux listAllExecutionsAsync( * @return a list of executions of an Experiment resource as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAllExecutionsAsync( - String resourceGroupName, String experimentName, Context context) { - return new PagedFlux<>( - () -> listAllExecutionsSinglePageAsync(resourceGroupName, experimentName, context), + private PagedFlux listAllExecutionsAsync(String resourceGroupName, String experimentName, + Context context) { + return new PagedFlux<>(() -> listAllExecutionsSinglePageAsync(resourceGroupName, experimentName, context), nextLink -> listAllExecutionsNextSinglePageAsync(nextLink, 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. @@ -2179,7 +1826,7 @@ public PagedIterable listAllExecutions(String resource /** * 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. * @param context The context to associate with this operation. @@ -2189,37 +1836,33 @@ public PagedIterable listAllExecutions(String resource * @return a list of executions of an Experiment resource as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAllExecutions( - String resourceGroupName, String experimentName, Context context) { + public PagedIterable listAllExecutions(String resourceGroupName, String experimentName, + Context context) { return new PagedIterable<>(listAllExecutionsAsync(resourceGroupName, experimentName, context)); } /** * Get an execution 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 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} on successful completion of {@link - * Mono}. + * @return an execution of an Experiment resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getExecutionWithResponseAsync( - String resourceGroupName, String experimentName, String executionId) { + private Mono> getExecutionWithResponseAsync(String resourceGroupName, + String experimentName, String executionId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2233,24 +1876,14 @@ private Mono> getExecutionWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getExecution( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - experimentName, - executionId, - accept, - context)) + .withContext(context -> service.getExecution(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, experimentName, executionId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get an execution 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. @@ -2258,23 +1891,19 @@ private Mono> getExecutionWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link - * Mono}. + * @return an execution of an Experiment resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getExecutionWithResponseAsync( - String resourceGroupName, String experimentName, String executionId, Context context) { + private Mono> getExecutionWithResponseAsync(String resourceGroupName, + String experimentName, String executionId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2288,21 +1917,13 @@ private Mono> getExecutionWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getExecution( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - experimentName, - executionId, - accept, - context); + return service.getExecution(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, experimentName, executionId, accept, context); } /** * Get an execution 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. @@ -2312,15 +1933,15 @@ private Mono> getExecutionWithResponseAsync( * @return an execution of an Experiment resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getExecutionAsync( - String resourceGroupName, String experimentName, String executionId) { + private Mono getExecutionAsync(String resourceGroupName, String experimentName, + String executionId) { return getExecutionWithResponseAsync(resourceGroupName, experimentName, executionId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get an execution 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. @@ -2331,14 +1952,14 @@ private Mono getExecutionAsync( * @return an execution of an Experiment resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getExecutionWithResponse( - String resourceGroupName, String experimentName, String executionId, Context context) { + public Response getExecutionWithResponse(String resourceGroupName, String experimentName, + String executionId, Context context) { return getExecutionWithResponseAsync(resourceGroupName, experimentName, executionId, context).block(); } /** * Get an execution 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. @@ -2354,7 +1975,7 @@ public ExperimentExecutionInner getExecution(String resourceGroupName, String ex /** * 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. @@ -2362,22 +1983,18 @@ public ExperimentExecutionInner getExecution(String resourceGroupName, String ex * @throws 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} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> executionDetailsWithResponseAsync( - String resourceGroupName, String experimentName, String executionId) { + private Mono> executionDetailsWithResponseAsync(String resourceGroupName, + String experimentName, String executionId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2391,24 +2008,14 @@ private Mono> executionDetailsWithResp } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .executionDetails( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - experimentName, - executionId, - accept, - context)) + .withContext(context -> service.executionDetails(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, experimentName, executionId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -2417,22 +2024,18 @@ private Mono> executionDetailsWithResp * @throws 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} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> executionDetailsWithResponseAsync( - String resourceGroupName, String experimentName, String executionId, Context context) { + private Mono> executionDetailsWithResponseAsync(String resourceGroupName, + String experimentName, String executionId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2446,21 +2049,13 @@ private Mono> executionDetailsWithResp } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .executionDetails( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - experimentName, - executionId, - accept, - context); + return service.executionDetails(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, experimentName, executionId, accept, 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. @@ -2470,15 +2065,15 @@ private Mono> executionDetailsWithResp * @return model that represents the execution details of an Experiment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono executionDetailsAsync( - String resourceGroupName, String experimentName, String executionId) { + private Mono executionDetailsAsync(String resourceGroupName, String experimentName, + String executionId) { return executionDetailsWithResponseAsync(resourceGroupName, experimentName, executionId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -2489,14 +2084,14 @@ private Mono executionDetailsAsync( * @return model that represents the execution details of an Experiment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response executionDetailsWithResponse( - String resourceGroupName, String experimentName, String executionId, Context context) { + public Response executionDetailsWithResponse(String resourceGroupName, + String experimentName, String executionId, Context context) { return executionDetailsWithResponseAsync(resourceGroupName, experimentName, executionId, context).block(); } /** * 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. @@ -2506,21 +2101,22 @@ public Response executionDetailsWithResponse( * @return model that represents the execution details of an Experiment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExperimentExecutionDetailsInner executionDetails( - String resourceGroupName, String experimentName, String executionId) { + public ExperimentExecutionDetailsInner executionDetails(String resourceGroupName, String experimentName, + String executionId) { return executionDetailsWithResponse(resourceGroupName, experimentName, executionId, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a list of Experiment resources and a link for pagination along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return model that represents a list of Experiment resources and a link for pagination along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAllNextSinglePageAsync(String nextLink) { @@ -2528,37 +2124,29 @@ private Mono> listAllNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a list of Experiment resources and a link for pagination along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return model that represents a list of Experiment resources and a link for pagination along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAllNextSinglePageAsync(String nextLink, Context context) { @@ -2566,36 +2154,27 @@ private Mono> listAllNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listAllNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listAllNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a list of Experiment resources and a link for pagination along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return model that represents a list of Experiment resources and a link for pagination along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -2603,37 +2182,28 @@ private Mono> listNextSinglePageAsync(String next return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a list of Experiment resources and a link for pagination along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return model that represents a list of Experiment resources and a link for pagination along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -2641,36 +2211,27 @@ private Mono> listNextSinglePageAsync(String next return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a list of Experiment executions and a link for pagination along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return model that represents a list of Experiment executions and a link for pagination along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAllExecutionsNextSinglePageAsync(String nextLink) { @@ -2678,62 +2239,44 @@ private Mono> listAllExecutionsNextSingl return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAllExecutionsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a list of Experiment executions and a link for pagination along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return model that represents a list of Experiment executions and a link for pagination along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAllExecutionsNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listAllExecutionsNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listAllExecutionsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listAllExecutionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java index cc81637e23b1..86e0c55e9caf 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java @@ -32,24 +32,24 @@ public ExperimentsImpl(ExperimentsClient innerClient, com.azure.resourcemanager. public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager())); } public PagedIterable list(Boolean running, String continuationToken, Context context) { PagedIterable inner = this.serviceClient().list(running, continuationToken, context); - return Utils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager())); } - public PagedIterable listByResourceGroup( - String resourceGroupName, Boolean running, String continuationToken, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, running, continuationToken, context); - return Utils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager())); + public PagedIterable listByResourceGroup(String resourceGroupName, Boolean running, + String continuationToken, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, running, continuationToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager())); } public void deleteByResourceGroup(String resourceGroupName, String experimentName) { @@ -60,15 +60,12 @@ public void delete(String resourceGroupName, String experimentName, Context cont this.serviceClient().delete(resourceGroupName, experimentName, context); } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String experimentName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, experimentName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, String experimentName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, experimentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ExperimentImpl(inner.getValue(), this.manager())); } else { return null; @@ -101,27 +98,24 @@ public void start(String resourceGroupName, String experimentName, Context conte } public PagedIterable listAllExecutions(String resourceGroupName, String experimentName) { - PagedIterable inner = - this.serviceClient().listAllExecutions(resourceGroupName, experimentName); - return Utils.mapPage(inner, inner1 -> new ExperimentExecutionImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listAllExecutions(resourceGroupName, experimentName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExperimentExecutionImpl(inner1, this.manager())); } - public PagedIterable listAllExecutions( - String resourceGroupName, String experimentName, Context context) { - PagedIterable inner = - this.serviceClient().listAllExecutions(resourceGroupName, experimentName, context); - return Utils.mapPage(inner, inner1 -> new ExperimentExecutionImpl(inner1, this.manager())); + public PagedIterable listAllExecutions(String resourceGroupName, String experimentName, + Context context) { + PagedIterable inner + = this.serviceClient().listAllExecutions(resourceGroupName, experimentName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExperimentExecutionImpl(inner1, this.manager())); } - public Response getExecutionWithResponse( - String resourceGroupName, String experimentName, String executionId, Context context) { - Response inner = - this.serviceClient().getExecutionWithResponse(resourceGroupName, experimentName, executionId, context); + public Response getExecutionWithResponse(String resourceGroupName, String experimentName, + String executionId, Context context) { + Response inner + = this.serviceClient().getExecutionWithResponse(resourceGroupName, experimentName, executionId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ExperimentExecutionImpl(inner.getValue(), this.manager())); } else { return null; @@ -129,8 +123,8 @@ public Response getExecutionWithResponse( } public ExperimentExecution getExecution(String resourceGroupName, String experimentName, String executionId) { - ExperimentExecutionInner inner = - this.serviceClient().getExecution(resourceGroupName, experimentName, executionId); + ExperimentExecutionInner inner + = this.serviceClient().getExecution(resourceGroupName, experimentName, executionId); if (inner != null) { return new ExperimentExecutionImpl(inner, this.manager()); } else { @@ -138,25 +132,22 @@ public ExperimentExecution getExecution(String resourceGroupName, String experim } } - public Response executionDetailsWithResponse( - String resourceGroupName, String experimentName, String executionId, Context context) { - Response inner = - this.serviceClient().executionDetailsWithResponse(resourceGroupName, experimentName, executionId, context); + public Response executionDetailsWithResponse(String resourceGroupName, + String experimentName, String executionId, Context context) { + Response inner = this.serviceClient() + .executionDetailsWithResponse(resourceGroupName, experimentName, executionId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ExperimentExecutionDetailsImpl(inner.getValue(), this.manager())); } else { return null; } } - public ExperimentExecutionDetails executionDetails( - String resourceGroupName, String experimentName, String executionId) { - ExperimentExecutionDetailsInner inner = - this.serviceClient().executionDetails(resourceGroupName, experimentName, executionId); + public ExperimentExecutionDetails executionDetails(String resourceGroupName, String experimentName, + String executionId) { + ExperimentExecutionDetailsInner inner + = this.serviceClient().executionDetails(resourceGroupName, experimentName, executionId); if (inner != null) { return new ExperimentExecutionDetailsImpl(inner, this.manager()); } else { @@ -165,77 +156,57 @@ public ExperimentExecutionDetails executionDetails( } public Experiment getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String experimentName = Utils.getValueFromIdByName(id, "experiments"); + String experimentName = ResourceManagerUtils.getValueFromIdByName(id, "experiments"); if (experimentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'experiments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'experiments'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, experimentName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String experimentName = Utils.getValueFromIdByName(id, "experiments"); + String experimentName = ResourceManagerUtils.getValueFromIdByName(id, "experiments"); if (experimentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'experiments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'experiments'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, experimentName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String experimentName = Utils.getValueFromIdByName(id, "experiments"); + String experimentName = ResourceManagerUtils.getValueFromIdByName(id, "experiments"); if (experimentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'experiments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'experiments'.", id))); } this.delete(resourceGroupName, experimentName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String experimentName = Utils.getValueFromIdByName(id, "experiments"); + String experimentName = ResourceManagerUtils.getValueFromIdByName(id, "experiments"); if (experimentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'experiments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'experiments'.", id))); } this.delete(resourceGroupName, experimentName, context); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesClientImpl.java index 9fd0d252fbaa..a163e34ece0f 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesClientImpl.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesClientImpl.java @@ -25,22 +25,28 @@ import com.azure.resourcemanager.chaos.fluent.models.OperationStatusInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationStatusesClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationStatusesClient. + */ public final class OperationStatusesClientImpl implements OperationStatusesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationStatusesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ChaosManagementClientImpl client; /** * Initializes an instance of OperationStatusesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationStatusesClientImpl(ChaosManagementClientImpl client) { - this.service = - RestProxy.create(OperationStatusesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationStatusesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -51,39 +57,32 @@ public final class OperationStatusesClientImpl implements OperationStatusesClien @Host("{$host}") @ServiceInterface(name = "ChaosManagementClien") public interface OperationStatusesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/operationsStatuses/{asyncOperationId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/operationStatuses/{asyncOperationId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("location") String location, - @PathParam("asyncOperationId") String asyncOperationId, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("location") String location, @PathParam("asyncOperationId") String asyncOperationId, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); } /** * Get the status of a long running azure asynchronous operation. - * - * @param location The region name of operation. + * + * @param location The name of the Azure region. * @param asyncOperationId The operation Id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String location, String asyncOperationId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); @@ -93,47 +92,34 @@ private Mono> getWithResponseAsync(String locatio .error(new IllegalArgumentException("Parameter asyncOperationId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - location, - asyncOperationId, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), location, asyncOperationId, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the status of a long running azure asynchronous operation. - * - * @param location The region name of 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 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} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String location, String asyncOperationId, Context context) { + private Mono> getWithResponseAsync(String location, String asyncOperationId, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); @@ -143,28 +129,19 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter asyncOperationId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - location, - asyncOperationId, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context); + return service.get(this.client.getEndpoint(), location, asyncOperationId, this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); } /** * Get the status of a long running azure asynchronous operation. - * - * @param location The region name of operation. + * + * @param location The name of the Azure region. * @param asyncOperationId The operation Id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -178,8 +155,8 @@ private Mono getAsync(String location, String asyncOperati /** * Get the status of a long running azure asynchronous operation. - * - * @param location The region name of 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. @@ -194,8 +171,8 @@ public Response getWithResponse(String location, String as /** * Get the status of a long running azure asynchronous operation. - * - * @param location The region name of operation. + * + * @param location The name of the Azure region. * @param asyncOperationId The operation Id. * @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/OperationStatusesImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesImpl.java index 8ae63088b7b0..af94c1a0556e 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesImpl.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesImpl.java @@ -20,20 +20,17 @@ public final class OperationStatusesImpl implements OperationStatuses { private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - public OperationStatusesImpl( - OperationStatusesClient innerClient, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + public OperationStatusesImpl(OperationStatusesClient innerClient, + com.azure.resourcemanager.chaos.ChaosManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public Response getWithResponse(String location, String asyncOperationId, Context context) { - Response inner = - this.serviceClient().getWithResponse(location, asyncOperationId, context); + Response inner + = this.serviceClient().getWithResponse(location, asyncOperationId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new OperationStatusImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationsClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationsClientImpl.java index 886c955a9fcc..3f14079d2aab 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationsClientImpl.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationsClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.chaos.models.OperationListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ChaosManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationsClientImpl(ChaosManagementClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,95 +62,70 @@ public final class OperationsClientImpl implements OperationsClient { @Host("{$host}") @ServiceInterface(name = "ChaosManagementClien") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Chaos/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAll( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listAll(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAllNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listAllNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Get a list all available Operations. - * + * * @throws ManagementException 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 along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list all available Operations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAllSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listAll(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a list all available Operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list all available Operations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list all available Operations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAllSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listAll(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listAll(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get a list all available Operations. - * + * * @throws ManagementException 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 PagedFlux}. @@ -156,7 +137,7 @@ private PagedFlux listAllAsync() { /** * Get a list all available Operations. - * + * * @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. @@ -165,13 +146,13 @@ private PagedFlux listAllAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAllAsync(Context context) { - return new PagedFlux<>( - () -> listAllSinglePageAsync(context), nextLink -> listAllNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listAllSinglePageAsync(context), + nextLink -> listAllNextSinglePageAsync(nextLink, context)); } /** * Get a list all available Operations. - * + * * @throws ManagementException 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}. @@ -183,7 +164,7 @@ public PagedIterable listAll() { /** * Get a list all available Operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -197,14 +178,15 @@ public PagedIterable listAll(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAllNextSinglePageAsync(String nextLink) { @@ -212,37 +194,29 @@ private Mono> listAllNextSinglePageAsync(String ne return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAllNextSinglePageAsync(String nextLink, Context context) { @@ -250,23 +224,13 @@ private Mono> listAllNextSinglePageAsync(String ne return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listAllNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listAllNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationsImpl.java index 25e707525598..39da64444c05 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationsImpl.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationsImpl.java @@ -26,12 +26,12 @@ public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.ch public PagedIterable listAll() { PagedIterable inner = this.serviceClient().listAll(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } public PagedIterable listAll(Context context) { PagedIterable inner = this.serviceClient().listAll(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/Utils.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ResourceManagerUtils.java similarity index 90% rename from sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/Utils.java rename to sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ResourceManagerUtils.java index 2ea1ef1f8be7..04312bfa9260 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/Utils.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ResourceManagerUtils.java @@ -19,8 +19,8 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { - private Utils() { +final class ResourceManagerUtils { + private ResourceManagerUtils() { } static String getValueFromIdByName(String id, String name) { @@ -41,6 +41,7 @@ static String getValueFromIdByName(String id, String name) { } } return null; + } static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { @@ -74,6 +75,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } } return null; + } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { @@ -87,26 +89,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypesClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypesClientImpl.java index ce7407df6a7c..1611957b7d98 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypesClientImpl.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypesClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.chaos.models.TargetTypeListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in TargetTypesClient. */ +/** + * An instance of this class provides access to all the operations defined in TargetTypesClient. + */ public final class TargetTypesClientImpl implements TargetTypesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final TargetTypesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ChaosManagementClientImpl client; /** * Initializes an instance of TargetTypesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ TargetTypesClientImpl(ChaosManagementClientImpl client) { - this.service = - RestProxy.create(TargetTypesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(TargetTypesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,100 +62,68 @@ public final class TargetTypesClientImpl implements TargetTypesClient { @Host("{$host}") @ServiceInterface(name = "ChaosManagementClien") public interface TargetTypesService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, - @QueryParam("continuationToken") String continuationToken, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, @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}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}") + @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, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, @PathParam("targetTypeName") String targetTypeName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Get a list of Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @param continuationToken String that sets the continuation token. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String locationName, String continuationToken) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + 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.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - locationName, - continuationToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationName, continuationToken, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a list of Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @param continuationToken String that sets the continuation token. * @param context The context to associate with this operation. @@ -157,22 +131,18 @@ private Mono> listSinglePageAsync(String location * @throws ManagementException 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 along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String locationName, String continuationToken, Context context) { + private Mono> listSinglePageAsync(String locationName, String continuationToken, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + 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.")); @@ -180,28 +150,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - locationName, - continuationToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, + continuationToken, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get a list of Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @param continuationToken String that sets the continuation token. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -211,13 +168,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String locationName, String continuationToken) { - return new PagedFlux<>( - () -> listSinglePageAsync(locationName, continuationToken), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(locationName, continuationToken), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get a list of Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -227,13 +184,13 @@ private PagedFlux listAsync(String locationName, String continu @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String locationName) { final String continuationToken = null; - return new PagedFlux<>( - () -> listSinglePageAsync(locationName, continuationToken), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(locationName, continuationToken), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get a list of Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @param continuationToken String that sets the continuation token. * @param context The context to associate with this operation. @@ -244,14 +201,13 @@ private PagedFlux listAsync(String locationName) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String locationName, String continuationToken, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(locationName, continuationToken, context), + return new PagedFlux<>(() -> listSinglePageAsync(locationName, continuationToken, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get a list of Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -266,7 +222,7 @@ public PagedIterable list(String locationName) { /** * Get a list of Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @param continuationToken String that sets the continuation token. * @param context The context to associate with this operation. @@ -282,28 +238,24 @@ public PagedIterable list(String locationName, String continuat /** * Get a Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Target Type resources for given location along with {@link Response} on successful completion of {@link - * Mono}. + * @return a Target Type resources for given location along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String locationName, String targetTypeName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + 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.")); @@ -313,46 +265,33 @@ private Mono> getWithResponseAsync(String locationName } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - locationName, - targetTypeName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationName, targetTypeName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Target Type resources for given location along with {@link Response} on successful completion of {@link - * Mono}. + * @return a Target Type resources for given location along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String locationName, String targetTypeName, Context context) { + private Mono> getWithResponseAsync(String locationName, String targetTypeName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + 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.")); @@ -362,20 +301,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - locationName, - targetTypeName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + locationName, targetTypeName, accept, context); } /** * Get a Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -390,7 +322,7 @@ private Mono getAsync(String locationName, String targetTypeNam /** * Get a Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param context The context to associate with this operation. @@ -406,7 +338,7 @@ public Response getWithResponse(String locationName, String tar /** * Get a Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -421,14 +353,15 @@ public TargetTypeInner get(String locationName, String targetTypeName) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a list of Target Type resources and a link for pagination along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return model that represents a list of Target Type resources and a link for pagination along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -436,37 +369,28 @@ private Mono> listNextSinglePageAsync(String next return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a list of Target Type resources and a link for pagination along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return model that represents a list of Target Type resources and a link for pagination along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -474,23 +398,13 @@ private Mono> listNextSinglePageAsync(String next return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypesImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypesImpl.java index f3b78d87c6c6..81dc5edb1906 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypesImpl.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypesImpl.java @@ -28,21 +28,18 @@ public TargetTypesImpl(TargetTypesClient innerClient, com.azure.resourcemanager. public PagedIterable list(String locationName) { PagedIterable inner = this.serviceClient().list(locationName); - return Utils.mapPage(inner, inner1 -> new TargetTypeImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TargetTypeImpl(inner1, this.manager())); } public PagedIterable list(String locationName, String continuationToken, Context context) { PagedIterable inner = this.serviceClient().list(locationName, continuationToken, context); - return Utils.mapPage(inner, inner1 -> new TargetTypeImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TargetTypeImpl(inner1, this.manager())); } public Response getWithResponse(String locationName, String targetTypeName, Context context) { Response inner = this.serviceClient().getWithResponse(locationName, targetTypeName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new TargetTypeImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/TargetsClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/TargetsClientImpl.java index 316f3813e73a..f3de7fe94baf 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/TargetsClientImpl.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/TargetsClientImpl.java @@ -33,17 +33,23 @@ import com.azure.resourcemanager.chaos.models.TargetListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in TargetsClient. */ +/** + * An instance of this class provides access to all the operations defined in TargetsClient. + */ public final class TargetsClientImpl implements TargetsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final TargetsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ChaosManagementClientImpl client; /** * Initializes an instance of TargetsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ TargetsClientImpl(ChaosManagementClientImpl client) { @@ -58,89 +64,66 @@ public final class TargetsClientImpl implements TargetsClient { @Host("{$host}") @ServiceInterface(name = "ChaosManagementClien") public interface TargetsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + 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, - @QueryParam("continuationToken") String continuationToken, - @HeaderParam("Accept") String accept, + @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}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + 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, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("parentResourceName") String parentResourceName, @PathParam("targetName") String targetName, + @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}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + 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, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("parentResourceName") String parentResourceName, @PathParam("targetName") String targetName, + @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}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parentProviderNamespace") String parentProviderNamespace, @PathParam("parentResourceType") String parentResourceType, - @PathParam("parentResourceName") String parentResourceName, - @PathParam("targetName") String targetName, - @BodyParam("application/json") TargetInner target, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("parentResourceName") String parentResourceName, @PathParam("targetName") String targetName, + @BodyParam("application/json") TargetInner target, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * 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. @@ -150,35 +133,27 @@ Mono> listNext( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Target resources that extend a tracked regional resource along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, + private Mono> listSinglePageAsync(String resourceGroupName, + String parentProviderNamespace, String parentResourceType, String parentResourceName, String continuationToken) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (parentProviderNamespace == null) { - return Mono - .error( - new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); } if (parentResourceType == null) { return Mono @@ -190,35 +165,17 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - continuationToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, continuationToken, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a list of 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. @@ -229,36 +186,27 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Target resources that extend a tracked regional resource along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String continuationToken, + private Mono> listSinglePageAsync(String resourceGroupName, + String parentProviderNamespace, String parentResourceType, String parentResourceName, String continuationToken, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (parentProviderNamespace == null) { - return Mono - .error( - new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); } if (parentResourceType == null) { return Mono @@ -271,31 +219,16 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - continuationToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, continuationToken, + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * 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. @@ -304,30 +237,19 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Target resources that extend a tracked regional resource as paginated response with {@link - * PagedFlux}. + * @return a list of Target resources that extend a tracked regional resource as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String continuationToken) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - continuationToken), - nextLink -> listNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String continuationToken) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, continuationToken), nextLink -> listNextSinglePageAsync(nextLink)); } /** * 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. @@ -335,30 +257,20 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Target resources that extend a tracked regional resource as paginated response with {@link - * PagedFlux}. + * @return a list of Target resources that extend a tracked regional resource as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName) { + private PagedFlux listAsync(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName) { final String continuationToken = null; - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - continuationToken), - nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, continuationToken), nextLink -> listNextSinglePageAsync(nextLink)); } /** * 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. @@ -368,32 +280,21 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Target resources that extend a tracked regional resource as paginated response with {@link - * PagedFlux}. + * @return a list of Target resources that extend a tracked regional resource as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String continuationToken, - Context context) { + private PagedFlux listAsync(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String continuationToken, Context context) { return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - continuationToken, - context), + () -> listSinglePageAsync(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, continuationToken, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * 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. @@ -401,24 +302,20 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Target resources that extend a tracked regional resource as paginated response with {@link - * PagedIterable}. + * @return a list of Target resources that extend a tracked regional resource as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName) { + public PagedIterable list(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName) { final String continuationToken = null; - return new PagedIterable<>( - listAsync( - resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, continuationToken)); + return new PagedIterable<>(listAsync(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, continuationToken)); } /** * 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. @@ -428,30 +325,19 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Target resources that extend a tracked regional resource as paginated response with {@link - * PagedIterable}. + * @return a list of Target resources that extend a tracked regional resource as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String continuationToken, - Context context) { - return new PagedIterable<>( - listAsync( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - continuationToken, - context)); + public PagedIterable list(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String continuationToken, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, continuationToken, 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. @@ -461,35 +347,26 @@ public PagedIterable list( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Target resource that extends a tracked regional resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion 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 parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (parentProviderNamespace == null) { - return Mono - .error( - new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); } if (parentResourceType == null) { return Mono @@ -504,26 +381,15 @@ private Mono> getWithResponseAsync( } 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, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -534,36 +400,26 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Target resource that extends a tracked regional resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (parentProviderNamespace == null) { - return Mono - .error( - new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); } if (parentResourceType == null) { return Mono @@ -578,23 +434,14 @@ private Mono> getWithResponseAsync( } 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, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, accept, + 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. @@ -606,20 +453,15 @@ private Mono> getWithResponseAsync( * @return a Target resource that extends a tracked regional resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName) { - return getWithResponseAsync( - resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono getAsync(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName) { + return getWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, + targetName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -632,21 +474,15 @@ private Mono getAsync( * @return a Target resource that extends a tracked regional resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - Context context) { - return getWithResponseAsync( - resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, context) - .block(); + public Response getWithResponse(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, Context context) { + return getWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, + targetName, context).block(); } /** * 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. @@ -658,25 +494,15 @@ public Response getWithResponse( * @return a Target resource that extends a tracked regional resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public TargetInner get( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName) { - return getWithResponse( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - Context.NONE) - .getValue(); + public TargetInner get(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName) { + return getWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, + targetName, Context.NONE).getValue(); } /** * 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. @@ -688,32 +514,23 @@ public TargetInner get( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (parentProviderNamespace == null) { - return Mono - .error( - new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); } if (parentResourceType == null) { return Mono @@ -728,26 +545,15 @@ private Mono> deleteWithResponseAsync( } 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, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -760,33 +566,23 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (parentProviderNamespace == null) { - return Mono - .error( - new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); } if (parentResourceType == null) { return Mono @@ -801,23 +597,14 @@ private Mono> deleteWithResponseAsync( } 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, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, accept, + context); } /** * Delete a Target resource that extends a tracked regional resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -829,20 +616,15 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName) { - return deleteWithResponseAsync( - resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName) - .flatMap(ignored -> Mono.empty()); + private Mono deleteAsync(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName) { + return deleteWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName).flatMap(ignored -> Mono.empty()); } /** * 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. @@ -855,21 +637,15 @@ private Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - Context context) { - return deleteWithResponseAsync( - resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, context) - .block(); + public Response deleteWithResponse(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, Context context) { + return deleteWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, context).block(); } /** * 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. @@ -880,24 +656,15 @@ public Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName) { - deleteWithResponse( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - Context.NONE); + public void delete(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName) { + deleteWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, + targetName, Context.NONE); } /** * 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. @@ -907,37 +674,28 @@ public void delete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link - * Mono}. + * @return model that represents a Target resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName, TargetInner target) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (parentProviderNamespace == null) { - return Mono - .error( - new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); } if (parentResourceType == null) { return Mono @@ -957,27 +715,15 @@ private Mono> createOrUpdateWithResponseAsync( } 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, - target, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, target, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -988,38 +734,28 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link - * Mono}. + * @return model that represents a Target resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - TargetInner target, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String parentProviderNamespace, String parentResourceType, String parentResourceName, String targetName, + TargetInner target, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (parentProviderNamespace == null) { - return Mono - .error( - new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter parentProviderNamespace is required and cannot be null.")); } if (parentResourceType == null) { return Mono @@ -1039,24 +775,14 @@ private Mono> createOrUpdateWithResponseAsync( } 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, - target, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, target, accept, context); } /** * Create or update a Target resource that extends a tracked regional resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -1069,21 +795,15 @@ private Mono> createOrUpdateWithResponseAsync( * @return model that represents a Target resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - TargetInner target) { - return createOrUpdateWithResponseAsync( - resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, target) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, TargetInner target) { + return createOrUpdateWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, target).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -1097,28 +817,15 @@ private Mono createOrUpdateAsync( * @return model that represents a Target resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - TargetInner target, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - target, - context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, TargetInner target, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, target, context).block(); } /** * 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. @@ -1131,34 +838,23 @@ public Response createOrUpdateWithResponse( * @return model that represents a Target resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public TargetInner createOrUpdate( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - TargetInner target) { - return createOrUpdateWithResponse( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - target, - Context.NONE) - .getValue(); + public TargetInner createOrUpdate(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, TargetInner target) { + return createOrUpdateWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, target, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a list of Target resources and a link for pagination along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return model that represents a list of Target resources and a link for pagination along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1166,37 +862,28 @@ private Mono> listNextSinglePageAsync(String nextLink return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a list of Target resources and a link for pagination along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return model that represents a list of Target resources and a link for pagination along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1204,23 +891,13 @@ private Mono> listNextSinglePageAsync(String nextLink return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/TargetsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/TargetsImpl.java index 7bcbde028239..1fa90685eea4 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/TargetsImpl.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/TargetsImpl.java @@ -26,76 +26,36 @@ public TargetsImpl(TargetsClient innerClient, com.azure.resourcemanager.chaos.Ch this.serviceManager = serviceManager; } - public PagedIterable list( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName) { - PagedIterable inner = - this - .serviceClient() - .list(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName); - return Utils.mapPage(inner, inner1 -> new TargetImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, parentProviderNamespace, + parentResourceType, parentResourceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TargetImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String continuationToken, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - continuationToken, - context); - return Utils.mapPage(inner, inner1 -> new TargetImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String continuationToken, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, parentProviderNamespace, + parentResourceType, parentResourceName, continuationToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TargetImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - Context context) { - Response inner = - this - .serviceClient() - .getWithResponse( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - context); + public Response getWithResponse(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, parentProviderNamespace, + parentResourceType, parentResourceName, targetName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new TargetImpl(inner.getValue(), this.manager())); } else { return null; } } - public Target get( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName) { - TargetInner inner = - this - .serviceClient() - .get(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName); + public Target get(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName) { + TargetInner inner = this.serviceClient().get(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName); if (inner != null) { return new TargetImpl(inner, this.manager()); } else { @@ -103,82 +63,34 @@ public Target get( } } - public Response deleteWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - Context context) { - return this - .serviceClient() - .deleteWithResponse( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - context); + public Response deleteWithResponse(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, parentProviderNamespace, parentResourceType, + parentResourceName, targetName, context); } - public void delete( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName) { - this - .serviceClient() - .delete(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName); + public void delete(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName) { + this.serviceClient().delete(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, + targetName); } - public Response createOrUpdateWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - TargetInner target, - Context context) { - Response inner = - this - .serviceClient() - .createOrUpdateWithResponse( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - target, - context); + public Response createOrUpdateWithResponse(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, TargetInner target, Context context) { + Response inner = this.serviceClient().createOrUpdateWithResponse(resourceGroupName, + parentProviderNamespace, parentResourceType, parentResourceName, targetName, target, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new TargetImpl(inner.getValue(), this.manager())); } else { return null; } } - public Target createOrUpdate( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - TargetInner target) { - TargetInner inner = - this - .serviceClient() - .createOrUpdate( - resourceGroupName, - parentProviderNamespace, - parentResourceType, - parentResourceName, - targetName, - target); + public Target createOrUpdate(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName, TargetInner target) { + TargetInner inner = this.serviceClient().createOrUpdate(resourceGroupName, parentProviderNamespace, + parentResourceType, parentResourceName, targetName, target); if (inner != null) { return new TargetImpl(inner, this.manager()); } else { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/package-info.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/package-info.java index a6fc0cab942d..49f8284e0865 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/package-info.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the implementations for ChaosManagementClient. Chaos Management Client. */ +/** + * Package containing the implementations for ChaosManagementClient. + * Chaos Management Client. + */ package com.azure.resourcemanager.chaos.implementation; diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionStatus.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionStatus.java index 4307ffdb739a..758773bc359f 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionStatus.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionStatus.java @@ -9,7 +9,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** Model that represents the an action and its status. */ +/** + * Model that represents the an action and its status. + */ @Immutable public final class ActionStatus { /* @@ -48,13 +50,15 @@ public final class ActionStatus { @JsonProperty(value = "targets", access = JsonProperty.Access.WRITE_ONLY) private List targets; - /** Creates an instance of ActionStatus class. */ + /** + * Creates an instance of ActionStatus class. + */ public ActionStatus() { } /** * Get the actionName property: The name of the action status. - * + * * @return the actionName value. */ public String actionName() { @@ -63,7 +67,7 @@ public String actionName() { /** * Get the actionId property: The id of the action status. - * + * * @return the actionId value. */ public String actionId() { @@ -72,7 +76,7 @@ public String actionId() { /** * Get the status property: The status of the action. - * + * * @return the status value. */ public String status() { @@ -81,7 +85,7 @@ public String status() { /** * Get the startTime property: String that represents the start time of the action. - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -90,7 +94,7 @@ public OffsetDateTime startTime() { /** * Get the endTime property: String that represents the end time of the action. - * + * * @return the endTime value. */ public OffsetDateTime endTime() { @@ -99,7 +103,7 @@ public OffsetDateTime endTime() { /** * Get the targets property: The array of targets. - * + * * @return the targets value. */ public List targets() { @@ -108,7 +112,7 @@ public List targets() { /** * 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/models/ActionType.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionType.java index 83a87be8eca4..b0e71ff86b99 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionType.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionType.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ +/** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ public final class ActionType extends ExpandableStringEnum { - /** Static value Internal for ActionType. */ + /** + * Static value Internal for ActionType. + */ public static final ActionType INTERNAL = fromString("Internal"); /** * Creates a new instance of ActionType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public ActionType() { /** * Creates or finds a ActionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ActionType. */ @@ -35,7 +39,7 @@ public static ActionType fromString(String name) { /** * Gets known ActionType values. - * + * * @return known ActionType values. */ public static Collection values() { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/BranchStatus.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/BranchStatus.java index af57124c7081..46752e6e415b 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/BranchStatus.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/BranchStatus.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Model that represents the a list of actions and action statuses. */ +/** + * Model that represents the a list of actions and action statuses. + */ @Immutable public final class BranchStatus { /* @@ -35,13 +37,15 @@ public final class BranchStatus { @JsonProperty(value = "actions", access = JsonProperty.Access.WRITE_ONLY) private List actions; - /** Creates an instance of BranchStatus class. */ + /** + * Creates an instance of BranchStatus class. + */ public BranchStatus() { } /** * Get the branchName property: The name of the branch status. - * + * * @return the branchName value. */ public String branchName() { @@ -50,7 +54,7 @@ public String branchName() { /** * Get the branchId property: The id of the branch status. - * + * * @return the branchId value. */ public String branchId() { @@ -59,7 +63,7 @@ public String branchId() { /** * Get the status property: The status of the branch. - * + * * @return the status value. */ public String status() { @@ -68,7 +72,7 @@ public String status() { /** * Get the actions property: The array of actions. - * + * * @return the actions value. */ public List actions() { @@ -77,7 +81,7 @@ public List actions() { /** * 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/models/Capabilities.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Capabilities.java index e071ff39ef61..86ae2c843c9e 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Capabilities.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Capabilities.java @@ -9,11 +9,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner; -/** Resource collection API of Capabilities. */ +/** + * Resource collection API of Capabilities. + */ public interface Capabilities { /** * 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. @@ -22,19 +24,15 @@ public interface Capabilities { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Capability resources that extend a Target resource. as paginated response with {@link - * PagedIterable}. + * @return a list of Capability resources that extend a Target resource. as paginated response with + * {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName); + PagedIterable list(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName); /** * Get a list of Capability resources that extend a Target resource.. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -45,21 +43,15 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Capability resources that extend a Target resource. as paginated response with {@link - * PagedIterable}. + * @return a list of Capability resources that extend a Target resource. as paginated response with + * {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String continuationToken, - Context context); + PagedIterable list(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName, String continuationToken, Context context); /** * Get a Capability resource that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -72,18 +64,13 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Capability resource that extends a Target resource along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName, + Response getWithResponse(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, String capabilityName, Context context); /** * Get a Capability resource that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -95,17 +82,12 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Capability resource that extends a Target resource. */ - Capability get( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName); + Capability get(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName, String capabilityName); /** * Delete a Capability that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -118,18 +100,13 @@ Capability get( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName, + Response deleteWithResponse(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, String capabilityName, Context context); /** * Delete a Capability that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -140,17 +117,12 @@ Response deleteWithResponse( * @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. */ - void delete( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName); + void delete(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName, String capabilityName); /** * Create or update a Capability resource that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -164,19 +136,13 @@ void delete( * @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}. */ - Response createOrUpdateWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName, - CapabilityInner capability, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, String capabilityName, + CapabilityInner capability, Context context); /** * Create or update a Capability resource that extends a Target resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -189,12 +155,6 @@ Response createOrUpdateWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return model that represents a Capability resource. */ - Capability createOrUpdate( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - String capabilityName, - CapabilityInner capability); + Capability createOrUpdate(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName, String capabilityName, CapabilityInner capability); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Capability.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Capability.java index 26837dec35b4..c5e258f3cbdb 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Capability.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Capability.java @@ -7,74 +7,76 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner; -/** An immutable client-side representation of Capability. */ +/** + * An immutable client-side representation of Capability. + */ public interface Capability { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: The standard system metadata of a resource type. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the publisher property: String of the Publisher that this Capability extends. - * + * * @return the publisher value. */ String publisher(); /** * Gets the targetType property: String of the Target Type that this Capability extends. - * + * * @return the targetType value. */ String targetType(); /** * Gets the description property: Localized string of the description. - * + * * @return the description value. */ String description(); /** * Gets the parametersSchema property: URL to retrieve JSON schema of the Capability parameters. - * + * * @return the parametersSchema value. */ String parametersSchema(); /** * Gets the urn property: String of the URN for this Capability Type. - * + * * @return the urn value. */ String urn(); /** * Gets the inner com.azure.resourcemanager.chaos.fluent.models.CapabilityInner object. - * + * * @return the inner object. */ CapabilityInner innerModel(); diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CapabilityListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CapabilityListResult.java index e1fd74729bef..5a8f1a78f705 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CapabilityListResult.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CapabilityListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Model that represents a list of Capability resources and a link for pagination. */ +/** + * Model that represents a list of Capability resources and a link for pagination. + */ @Immutable public final class CapabilityListResult { /* @@ -24,13 +26,15 @@ public final class CapabilityListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of CapabilityListResult class. */ + /** + * Creates an instance of CapabilityListResult class. + */ public CapabilityListResult() { } /** * Get the value property: List of Capability resources. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Get the nextLink property: URL to retrieve the next page of Capability resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +52,7 @@ public String nextLink() { /** * 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/models/CapabilityType.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CapabilityType.java index a06b99e80baa..cc8626daf529 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CapabilityType.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CapabilityType.java @@ -8,116 +8,118 @@ import com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeInner; import java.util.List; -/** An immutable client-side representation of CapabilityType. */ +/** + * An immutable client-side representation of CapabilityType. + */ public interface CapabilityType { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: The system metadata properties of the capability type resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the location property: Location of the Capability Type resource. - * + * * @return the location value. */ String location(); /** * Gets the publisher property: String of the Publisher that this Capability Type extends. - * + * * @return the publisher value. */ String publisher(); /** * Gets the targetType property: String of the Target Type that this Capability Type extends. - * + * * @return the targetType value. */ String targetType(); /** * Gets the displayName property: Localized string of the display name. - * + * * @return the displayName value. */ String displayName(); /** * Gets the description property: Localized string of the description. - * + * * @return the description value. */ String description(); /** * Gets the parametersSchema property: URL to retrieve JSON schema of the Capability Type parameters. - * + * * @return the parametersSchema value. */ String parametersSchema(); /** * Gets the urn property: String of the URN for this Capability Type. - * + * * @return the urn value. */ String urn(); /** * Gets the kind property: String of the kind of this Capability Type. - * + * * @return the kind value. */ String kind(); /** * Gets the azureRbacActions property: Control plane actions necessary to execute capability type. - * + * * @return the azureRbacActions value. */ List azureRbacActions(); /** * Gets the azureRbacDataActions property: Data plane actions necessary to execute capability type. - * + * * @return the azureRbacDataActions value. */ List azureRbacDataActions(); /** * Gets the runtimeProperties property: Runtime properties of this Capability Type. - * + * * @return the runtimeProperties value. */ CapabilityTypePropertiesRuntimeProperties runtimeProperties(); /** * Gets the inner com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeInner object. - * + * * @return the inner object. */ CapabilityTypeInner innerModel(); diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CapabilityTypeListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CapabilityTypeListResult.java index 103292b6fa7c..39627dcd7535 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CapabilityTypeListResult.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CapabilityTypeListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Model that represents a list of Capability Type resources and a link for pagination. */ +/** + * Model that represents a list of Capability Type resources and a link for pagination. + */ @Immutable public final class CapabilityTypeListResult { /* @@ -24,13 +26,15 @@ public final class CapabilityTypeListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of CapabilityTypeListResult class. */ + /** + * Creates an instance of CapabilityTypeListResult class. + */ public CapabilityTypeListResult() { } /** * Get the value property: List of Capability Type resources. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Get the nextLink property: URL to retrieve the next page of Capability Type resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +52,7 @@ public String nextLink() { /** * 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/models/CapabilityTypePropertiesRuntimeProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CapabilityTypePropertiesRuntimeProperties.java index 4aea503b42c3..75b79cfeff2e 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CapabilityTypePropertiesRuntimeProperties.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CapabilityTypePropertiesRuntimeProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Runtime properties of this Capability Type. */ +/** + * Runtime properties of this Capability Type. + */ @Immutable public final class CapabilityTypePropertiesRuntimeProperties { /* @@ -16,13 +18,15 @@ public final class CapabilityTypePropertiesRuntimeProperties { @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) private String kind; - /** Creates an instance of CapabilityTypePropertiesRuntimeProperties class. */ + /** + * Creates an instance of CapabilityTypePropertiesRuntimeProperties class. + */ public CapabilityTypePropertiesRuntimeProperties() { } /** * Get the kind property: String of the kind of the resource's action type (continuous or discrete). - * + * * @return the kind value. */ public String kind() { @@ -31,7 +35,7 @@ public String kind() { /** * 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/models/CapabilityTypes.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CapabilityTypes.java index b04d648c21f5..f6625900b008 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CapabilityTypes.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CapabilityTypes.java @@ -8,24 +8,26 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of CapabilityTypes. */ +/** + * Resource collection API of CapabilityTypes. + */ public interface CapabilityTypes { /** * Get a list of Capability Type resources for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Capability Type resources for given Target Type and location as paginated response with {@link - * PagedIterable}. + * @return a list of Capability Type resources for given Target Type and location as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String locationName, String targetTypeName); /** * Get a list of Capability Type resources for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param continuationToken String that sets the continuation token. @@ -33,15 +35,15 @@ public interface CapabilityTypes { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Capability Type resources for given Target Type and location as paginated response with {@link - * PagedIterable}. + * @return a list of Capability Type resources for given Target Type and location as paginated response with + * {@link PagedIterable}. */ - PagedIterable list( - String locationName, String targetTypeName, String continuationToken, Context context); + PagedIterable list(String locationName, String targetTypeName, String continuationToken, + Context context); /** * Get a Capability Type resource for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param capabilityTypeName String that represents a Capability Type resource name. @@ -51,12 +53,12 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Capability Type resource for given Target Type and location along with {@link Response}. */ - Response getWithResponse( - String locationName, String targetTypeName, String capabilityTypeName, Context context); + Response getWithResponse(String locationName, String targetTypeName, String capabilityTypeName, + Context context); /** * Get a Capability Type resource for given Target Type and location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param capabilityTypeName String that represents a Capability Type resource name. diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentAction.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentAction.java index f550e46428c6..ca8fb8ed777b 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentAction.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentAction.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Model that represents the base action model. 9 total per experiment. */ +/** + * Model that represents the base action model. 9 total per experiment. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -21,8 +23,7 @@ @JsonSubTypes({ @JsonSubTypes.Type(name = "delay", value = DelayAction.class), @JsonSubTypes.Type(name = "discrete", value = DiscreteAction.class), - @JsonSubTypes.Type(name = "continuous", value = ContinuousAction.class) -}) + @JsonSubTypes.Type(name = "continuous", value = ContinuousAction.class) }) @Fluent public class ChaosExperimentAction { /* @@ -31,13 +32,15 @@ public class ChaosExperimentAction { @JsonProperty(value = "name", required = true) private String name; - /** Creates an instance of ChaosExperimentAction class. */ + /** + * Creates an instance of ChaosExperimentAction class. + */ public ChaosExperimentAction() { } /** * Get the name property: String that represents a Capability URN. - * + * * @return the name value. */ public String name() { @@ -46,7 +49,7 @@ public String name() { /** * Set the name property: String that represents a Capability URN. - * + * * @param name the name value to set. * @return the ChaosExperimentAction object itself. */ @@ -57,14 +60,13 @@ public ChaosExperimentAction withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model ChaosExperimentAction")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model ChaosExperimentAction")); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentBranch.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentBranch.java index 72f28884f9e2..03176b9cee2d 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentBranch.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentBranch.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Model that represents a branch in the step. 9 total per experiment. */ +/** + * Model that represents a branch in the step. 9 total per experiment. + */ @Fluent public final class ChaosExperimentBranch { /* @@ -24,13 +26,15 @@ public final class ChaosExperimentBranch { @JsonProperty(value = "actions", required = true) private List actions; - /** Creates an instance of ChaosExperimentBranch class. */ + /** + * Creates an instance of ChaosExperimentBranch class. + */ public ChaosExperimentBranch() { } /** * Get the name property: String of the branch name. - * + * * @return the name value. */ public String name() { @@ -39,7 +43,7 @@ public String name() { /** * Set the name property: String of the branch name. - * + * * @param name the name value to set. * @return the ChaosExperimentBranch object itself. */ @@ -50,7 +54,7 @@ public ChaosExperimentBranch withName(String name) { /** * Get the actions property: List of actions. - * + * * @return the actions value. */ public List actions() { @@ -59,7 +63,7 @@ public List actions() { /** * Set the actions property: List of actions. - * + * * @param actions the actions value to set. * @return the ChaosExperimentBranch object itself. */ @@ -70,19 +74,17 @@ public ChaosExperimentBranch withActions(List actions) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model ChaosExperimentBranch")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model ChaosExperimentBranch")); } if (actions() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property actions in model ChaosExperimentBranch")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property actions in model ChaosExperimentBranch")); } else { actions().forEach(e -> e.validate()); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentStep.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentStep.java index f8b09bda8fc6..a217c09c74cd 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentStep.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentStep.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Model that represents a step in the Experiment resource. */ +/** + * Model that represents a step in the Experiment resource. + */ @Fluent public final class ChaosExperimentStep { /* @@ -24,13 +26,15 @@ public final class ChaosExperimentStep { @JsonProperty(value = "branches", required = true) private List branches; - /** Creates an instance of ChaosExperimentStep class. */ + /** + * Creates an instance of ChaosExperimentStep class. + */ public ChaosExperimentStep() { } /** * Get the name property: String of the step name. - * + * * @return the name value. */ public String name() { @@ -39,7 +43,7 @@ public String name() { /** * Set the name property: String of the step name. - * + * * @param name the name value to set. * @return the ChaosExperimentStep object itself. */ @@ -50,7 +54,7 @@ public ChaosExperimentStep withName(String name) { /** * Get the branches property: List of branches. - * + * * @return the branches value. */ public List branches() { @@ -59,7 +63,7 @@ public List branches() { /** * Set the branches property: List of branches. - * + * * @param branches the branches value to set. * @return the ChaosExperimentStep object itself. */ @@ -70,19 +74,17 @@ public ChaosExperimentStep withBranches(List branches) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model ChaosExperimentStep")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model ChaosExperimentStep")); } if (branches() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property branches in model ChaosExperimentStep")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property branches in model ChaosExperimentStep")); } else { branches().forEach(e -> e.validate()); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetFilter.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetFilter.java index 725dd624f89d..e40af79c5093 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetFilter.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetFilter.java @@ -9,23 +9,27 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Model that represents available filter types that can be applied to a targets list. */ +/** + * Model that represents available filter types that can be applied to a targets list. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = ChaosTargetFilter.class) @JsonTypeName("ChaosTargetFilter") -@JsonSubTypes({@JsonSubTypes.Type(name = "Simple", value = ChaosTargetSimpleFilter.class)}) +@JsonSubTypes({ @JsonSubTypes.Type(name = "Simple", value = ChaosTargetSimpleFilter.class) }) @Immutable public class ChaosTargetFilter { - /** Creates an instance of ChaosTargetFilter class. */ + /** + * Creates an instance of ChaosTargetFilter class. + */ public ChaosTargetFilter() { } /** * 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/models/ChaosTargetListSelector.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetListSelector.java index 86d992203dfc..9a724295ecfc 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetListSelector.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetListSelector.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** Model that represents a list selector. */ +/** + * Model that represents a list selector. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("List") @Fluent @@ -22,13 +24,15 @@ public final class ChaosTargetListSelector extends ChaosTargetSelector { @JsonProperty(value = "targets", required = true) private List targets; - /** Creates an instance of ChaosTargetListSelector class. */ + /** + * Creates an instance of ChaosTargetListSelector class. + */ public ChaosTargetListSelector() { } /** * Get the targets property: List of Target references. - * + * * @return the targets value. */ public List targets() { @@ -37,7 +41,7 @@ public List targets() { /** * Set the targets property: List of Target references. - * + * * @param targets the targets value to set. * @return the ChaosTargetListSelector object itself. */ @@ -46,14 +50,18 @@ public ChaosTargetListSelector withTargets(List targets) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChaosTargetListSelector withId(String id) { super.withId(id); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChaosTargetListSelector withFilter(ChaosTargetFilter filter) { super.withFilter(filter); @@ -62,16 +70,15 @@ public ChaosTargetListSelector withFilter(ChaosTargetFilter filter) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (targets() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property targets in model ChaosTargetListSelector")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property targets in model ChaosTargetListSelector")); } else { targets().forEach(e -> e.validate()); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetQuerySelector.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetQuerySelector.java index be471aaf91b9..5e0aa3765518 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetQuerySelector.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetQuerySelector.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** Model that represents a query selector. */ +/** + * Model that represents a query selector. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("Query") @Fluent @@ -28,13 +30,15 @@ public final class ChaosTargetQuerySelector extends ChaosTargetSelector { @JsonProperty(value = "subscriptionIds", required = true) private List subscriptionIds; - /** Creates an instance of ChaosTargetQuerySelector class. */ + /** + * Creates an instance of ChaosTargetQuerySelector class. + */ public ChaosTargetQuerySelector() { } /** * Get the queryString property: Azure Resource Graph (ARG) Query Language query for target resources. - * + * * @return the queryString value. */ public String queryString() { @@ -43,7 +47,7 @@ public String queryString() { /** * Set the queryString property: Azure Resource Graph (ARG) Query Language query for target resources. - * + * * @param queryString the queryString value to set. * @return the ChaosTargetQuerySelector object itself. */ @@ -54,7 +58,7 @@ public ChaosTargetQuerySelector withQueryString(String queryString) { /** * Get the subscriptionIds property: Subscription id list to scope resource query. - * + * * @return the subscriptionIds value. */ public List subscriptionIds() { @@ -63,7 +67,7 @@ public List subscriptionIds() { /** * Set the subscriptionIds property: Subscription id list to scope resource query. - * + * * @param subscriptionIds the subscriptionIds value to set. * @return the ChaosTargetQuerySelector object itself. */ @@ -72,14 +76,18 @@ public ChaosTargetQuerySelector withSubscriptionIds(List subscriptionIds return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChaosTargetQuerySelector withId(String id) { super.withId(id); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChaosTargetQuerySelector withFilter(ChaosTargetFilter filter) { super.withFilter(filter); @@ -88,23 +96,19 @@ public ChaosTargetQuerySelector withFilter(ChaosTargetFilter filter) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (queryString() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property queryString in model ChaosTargetQuerySelector")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property queryString in model ChaosTargetQuerySelector")); } if (subscriptionIds() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property subscriptionIds in model ChaosTargetQuerySelector")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property subscriptionIds in model ChaosTargetQuerySelector")); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSelector.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSelector.java index 422350c2e38a..4d30f8cc29ad 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSelector.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSelector.java @@ -16,7 +16,9 @@ import java.util.HashMap; import java.util.Map; -/** Model that represents a selector in the Experiment resource. */ +/** + * Model that represents a selector in the Experiment resource. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -25,8 +27,7 @@ @JsonTypeName("ChaosTargetSelector") @JsonSubTypes({ @JsonSubTypes.Type(name = "List", value = ChaosTargetListSelector.class), - @JsonSubTypes.Type(name = "Query", value = ChaosTargetQuerySelector.class) -}) + @JsonSubTypes.Type(name = "Query", value = ChaosTargetQuerySelector.class) }) @Fluent public class ChaosTargetSelector { /* @@ -44,15 +45,18 @@ public class ChaosTargetSelector { /* * Model that represents a selector in the Experiment resource. */ - @JsonIgnore private Map additionalProperties; + @JsonIgnore + private Map additionalProperties; - /** Creates an instance of ChaosTargetSelector class. */ + /** + * Creates an instance of ChaosTargetSelector class. + */ public ChaosTargetSelector() { } /** * Get the id property: String of the selector ID. - * + * * @return the id value. */ public String id() { @@ -61,7 +65,7 @@ public String id() { /** * Set the id property: String of the selector ID. - * + * * @param id the id value to set. * @return the ChaosTargetSelector object itself. */ @@ -72,7 +76,7 @@ public ChaosTargetSelector withId(String id) { /** * Get the filter property: Model that represents available filter types that can be applied to a targets list. - * + * * @return the filter value. */ public ChaosTargetFilter filter() { @@ -81,7 +85,7 @@ public ChaosTargetFilter filter() { /** * Set the filter property: Model that represents available filter types that can be applied to a targets list. - * + * * @param filter the filter value to set. * @return the ChaosTargetSelector object itself. */ @@ -92,7 +96,7 @@ public ChaosTargetSelector withFilter(ChaosTargetFilter filter) { /** * Get the additionalProperties property: Model that represents a selector in the Experiment resource. - * + * * @return the additionalProperties value. */ @JsonAnyGetter @@ -102,7 +106,7 @@ public Map additionalProperties() { /** * Set the additionalProperties property: Model that represents a selector in the Experiment resource. - * + * * @param additionalProperties the additionalProperties value to set. * @return the ChaosTargetSelector object itself. */ @@ -121,14 +125,13 @@ void withAdditionalProperties(String key, Object value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (id() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property id in model ChaosTargetSelector")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property id in model ChaosTargetSelector")); } if (filter() != null) { filter().validate(); diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSimpleFilter.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSimpleFilter.java index 6f122cddcad7..d2a3e18b37d5 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSimpleFilter.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSimpleFilter.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Model that represents a simple target filter. */ +/** + * Model that represents a simple target filter. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("Simple") @Fluent @@ -20,13 +22,15 @@ public final class ChaosTargetSimpleFilter extends ChaosTargetFilter { @JsonProperty(value = "parameters") private ChaosTargetSimpleFilterParameters parameters; - /** Creates an instance of ChaosTargetSimpleFilter class. */ + /** + * Creates an instance of ChaosTargetSimpleFilter class. + */ public ChaosTargetSimpleFilter() { } /** * Get the parameters property: Model that represents the Simple filter parameters. - * + * * @return the parameters value. */ public ChaosTargetSimpleFilterParameters parameters() { @@ -35,7 +39,7 @@ public ChaosTargetSimpleFilterParameters parameters() { /** * Set the parameters property: Model that represents the Simple filter parameters. - * + * * @param parameters the parameters value to set. * @return the ChaosTargetSimpleFilter object itself. */ @@ -46,7 +50,7 @@ public ChaosTargetSimpleFilter withParameters(ChaosTargetSimpleFilterParameters /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSimpleFilterParameters.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSimpleFilterParameters.java index 73e4ed26ad56..d0725941ad41 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSimpleFilterParameters.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSimpleFilterParameters.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Model that represents the Simple filter parameters. */ +/** + * Model that represents the Simple filter parameters. + */ @Fluent public final class ChaosTargetSimpleFilterParameters { /* @@ -17,13 +19,15 @@ public final class ChaosTargetSimpleFilterParameters { @JsonProperty(value = "zones") private List zones; - /** Creates an instance of ChaosTargetSimpleFilterParameters class. */ + /** + * Creates an instance of ChaosTargetSimpleFilterParameters class. + */ public ChaosTargetSimpleFilterParameters() { } /** * Get the zones property: List of Azure availability zones to filter targets by. - * + * * @return the zones value. */ public List zones() { @@ -32,7 +36,7 @@ public List zones() { /** * Set the zones property: List of Azure availability zones to filter targets by. - * + * * @param zones the zones value to set. * @return the ChaosTargetSimpleFilterParameters object itself. */ @@ -43,7 +47,7 @@ public ChaosTargetSimpleFilterParameters withZones(List zones) { /** * 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/models/ContinuousAction.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ContinuousAction.java index a8abd196a3ae..3a2d7ed30beb 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ContinuousAction.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ContinuousAction.java @@ -12,7 +12,9 @@ import java.time.Duration; import java.util.List; -/** Model that represents a continuous action. */ +/** + * Model that represents a continuous action. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("continuous") @Fluent @@ -35,13 +37,15 @@ public final class ContinuousAction extends ChaosExperimentAction { @JsonProperty(value = "selectorId", required = true) private String selectorId; - /** Creates an instance of ContinuousAction class. */ + /** + * Creates an instance of ContinuousAction class. + */ public ContinuousAction() { } /** * Get the duration property: ISO8601 formatted string that represents a duration. - * + * * @return the duration value. */ public Duration duration() { @@ -50,7 +54,7 @@ public Duration duration() { /** * Set the duration property: ISO8601 formatted string that represents a duration. - * + * * @param duration the duration value to set. * @return the ContinuousAction object itself. */ @@ -61,7 +65,7 @@ public ContinuousAction withDuration(Duration duration) { /** * Get the parameters property: List of key value pairs. - * + * * @return the parameters value. */ public List parameters() { @@ -70,7 +74,7 @@ public List parameters() { /** * Set the parameters property: List of key value pairs. - * + * * @param parameters the parameters value to set. * @return the ContinuousAction object itself. */ @@ -81,7 +85,7 @@ public ContinuousAction withParameters(List parameters) { /** * Get the selectorId property: String that represents a selector. - * + * * @return the selectorId value. */ public String selectorId() { @@ -90,7 +94,7 @@ public String selectorId() { /** * Set the selectorId property: String that represents a selector. - * + * * @param selectorId the selectorId value to set. * @return the ContinuousAction object itself. */ @@ -99,7 +103,9 @@ public ContinuousAction withSelectorId(String selectorId) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ContinuousAction withName(String name) { super.withName(name); @@ -108,28 +114,25 @@ public ContinuousAction withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (duration() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property duration in model ContinuousAction")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property duration in model ContinuousAction")); } if (parameters() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property parameters in model ContinuousAction")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property parameters in model ContinuousAction")); } else { parameters().forEach(e -> e.validate()); } if (selectorId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property selectorId in model ContinuousAction")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property selectorId in model ContinuousAction")); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DelayAction.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DelayAction.java index 5a6ac12c212b..93a670931b6d 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DelayAction.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DelayAction.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.time.Duration; -/** Model that represents a delay action. */ +/** + * Model that represents a delay action. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("delay") @Fluent @@ -22,13 +24,15 @@ public final class DelayAction extends ChaosExperimentAction { @JsonProperty(value = "duration", required = true) private Duration duration; - /** Creates an instance of DelayAction class. */ + /** + * Creates an instance of DelayAction class. + */ public DelayAction() { } /** * Get the duration property: ISO8601 formatted string that represents a duration. - * + * * @return the duration value. */ public Duration duration() { @@ -37,7 +41,7 @@ public Duration duration() { /** * Set the duration property: ISO8601 formatted string that represents a duration. - * + * * @param duration the duration value to set. * @return the DelayAction object itself. */ @@ -46,7 +50,9 @@ public DelayAction withDuration(Duration duration) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DelayAction withName(String name) { super.withName(name); @@ -55,16 +61,15 @@ public DelayAction withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (duration() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property duration in model DelayAction")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property duration in model DelayAction")); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscreteAction.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscreteAction.java index 6eda3392ddab..ba456679176d 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscreteAction.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscreteAction.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** Model that represents a discrete action. */ +/** + * Model that represents a discrete action. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("discrete") @Fluent @@ -28,13 +30,15 @@ public final class DiscreteAction extends ChaosExperimentAction { @JsonProperty(value = "selectorId", required = true) private String selectorId; - /** Creates an instance of DiscreteAction class. */ + /** + * Creates an instance of DiscreteAction class. + */ public DiscreteAction() { } /** * Get the parameters property: List of key value pairs. - * + * * @return the parameters value. */ public List parameters() { @@ -43,7 +47,7 @@ public List parameters() { /** * Set the parameters property: List of key value pairs. - * + * * @param parameters the parameters value to set. * @return the DiscreteAction object itself. */ @@ -54,7 +58,7 @@ public DiscreteAction withParameters(List parameters) { /** * Get the selectorId property: String that represents a selector. - * + * * @return the selectorId value. */ public String selectorId() { @@ -63,7 +67,7 @@ public String selectorId() { /** * Set the selectorId property: String that represents a selector. - * + * * @param selectorId the selectorId value to set. * @return the DiscreteAction object itself. */ @@ -72,7 +76,9 @@ public DiscreteAction withSelectorId(String selectorId) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DiscreteAction withName(String name) { super.withName(name); @@ -81,23 +87,21 @@ public DiscreteAction withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (parameters() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property parameters in model DiscreteAction")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property parameters in model DiscreteAction")); } else { parameters().forEach(e -> e.validate()); } if (selectorId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property selectorId in model DiscreteAction")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property selectorId in model DiscreteAction")); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Experiment.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Experiment.java index 13394954bf23..31e719c87678 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Experiment.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Experiment.java @@ -11,127 +11,133 @@ import java.util.List; import java.util.Map; -/** An immutable client-side representation of Experiment. */ +/** + * An immutable client-side representation of Experiment. + */ public interface Experiment { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the systemData property: The system metadata of the experiment resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the identity property: The identity of the experiment resource. - * + * * @return the identity value. */ ResourceIdentity identity(); /** * Gets the provisioningState property: Most recent provisioning state for the given experiment resource. - * + * * @return the provisioningState value. */ ProvisioningState provisioningState(); /** * Gets the steps property: List of steps. - * + * * @return the steps value. */ List steps(); /** * Gets the selectors property: List of selectors. - * + * * @return the selectors value. */ List selectors(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.chaos.fluent.models.ExperimentInner object. - * + * * @return the inner object. */ ExperimentInner innerModel(); - /** The entirety of the Experiment definition. */ + /** + * The entirety of the Experiment definition. + */ interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithSteps, - DefinitionStages.WithSelectors, - DefinitionStages.WithCreate { + extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, + DefinitionStages.WithSteps, DefinitionStages.WithSelectors, DefinitionStages.WithCreate { } - /** The Experiment definition stages. */ + /** + * The Experiment definition stages. + */ interface DefinitionStages { - /** The first stage of the Experiment definition. */ + /** + * The first stage of the Experiment definition. + */ interface Blank extends WithLocation { } - /** The stage of the Experiment definition allowing to specify location. */ + /** + * The stage of the Experiment definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -139,40 +145,46 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the Experiment definition allowing to specify parent resource. */ + /** + * The stage of the Experiment definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName String that represents an Azure resource group. * @return the next definition stage. */ WithSteps withExistingResourceGroup(String resourceGroupName); } - /** The stage of the Experiment definition allowing to specify steps. */ + /** + * The stage of the Experiment definition allowing to specify steps. + */ interface WithSteps { /** * Specifies the steps property: List of steps.. - * + * * @param steps List of steps. * @return the next definition stage. */ WithSelectors withSteps(List steps); } - /** The stage of the Experiment definition allowing to specify selectors. */ + /** + * The stage of the Experiment definition allowing to specify selectors. + */ interface WithSelectors { /** * Specifies the selectors property: List of selectors.. - * + * * @param selectors List of selectors. * @return the next definition stage. */ @@ -186,36 +198,40 @@ interface WithSelectors { interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity { /** * Executes the create request. - * + * * @return the created resource. */ Experiment create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Experiment create(Context context); } - /** The stage of the Experiment definition allowing to specify tags. */ + /** + * The stage of the Experiment definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the Experiment definition allowing to specify identity. */ + /** + * The stage of the Experiment definition allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: The identity of the experiment resource.. - * + * * @param identity The identity of the experiment resource. * @return the next definition stage. */ @@ -225,36 +241,55 @@ interface WithIdentity { /** * Begins update for the Experiment resource. - * + * * @return the stage of resource update. */ Experiment.Update update(); - /** The template for Experiment update. */ - interface Update extends UpdateStages.WithIdentity { + /** + * The template for Experiment update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { /** * Executes the update request. - * + * * @return the updated resource. */ Experiment apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Experiment apply(Context context); } - /** The Experiment update stages. */ + /** + * The Experiment update stages. + */ interface UpdateStages { - /** The stage of the Experiment update allowing to specify identity. */ + /** + * The stage of the Experiment update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: The tags of the experiment resource.. + * + * @param tags The tags of the experiment resource. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the Experiment update allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: The identity of the experiment resource.. - * + * * @param identity The identity of the experiment resource. * @return the next definition stage. */ @@ -264,14 +299,14 @@ interface WithIdentity { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Experiment refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -279,7 +314,7 @@ interface WithIdentity { /** * Cancel a running Experiment resource. - * + * * @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. */ @@ -287,7 +322,7 @@ interface WithIdentity { /** * Cancel a running Experiment resource. - * + * * @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. @@ -297,7 +332,7 @@ interface WithIdentity { /** * Start a Experiment resource. - * + * * @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. */ @@ -305,7 +340,7 @@ interface WithIdentity { /** * Start a Experiment resource. - * + * * @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. diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecution.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecution.java index 4ddba48804ac..84c51ef155c6 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecution.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecution.java @@ -7,53 +7,55 @@ import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionInner; import java.time.OffsetDateTime; -/** An immutable client-side representation of ExperimentExecution. */ +/** + * An immutable client-side representation of ExperimentExecution. + */ public interface ExperimentExecution { /** * Gets the type property: String of the resource type. - * + * * @return the type value. */ String type(); /** * Gets the id property: String of the fully qualified resource ID. - * + * * @return the id value. */ String id(); /** * Gets the name property: String of the resource name. - * + * * @return the name value. */ String name(); /** * Gets the status property: The status of the execution. - * + * * @return the status value. */ String status(); /** * Gets the startedAt property: String that represents the start date time. - * + * * @return the startedAt value. */ OffsetDateTime startedAt(); /** * Gets the stoppedAt property: String that represents the stop date time. - * + * * @return the stoppedAt value. */ OffsetDateTime stoppedAt(); /** * Gets the inner com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionInner object. - * + * * @return the inner object. */ ExperimentExecutionInner innerModel(); diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionActionTargetDetailsError.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionActionTargetDetailsError.java index 39adeaad1e03..7dbf1ab4fd96 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionActionTargetDetailsError.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionActionTargetDetailsError.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Model that represents the Experiment action target details error model. */ +/** + * Model that represents the Experiment action target details error model. + */ @Immutable public final class ExperimentExecutionActionTargetDetailsError { /* @@ -22,13 +24,15 @@ public final class ExperimentExecutionActionTargetDetailsError { @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) private String message; - /** Creates an instance of ExperimentExecutionActionTargetDetailsError class. */ + /** + * Creates an instance of ExperimentExecutionActionTargetDetailsError class. + */ public ExperimentExecutionActionTargetDetailsError() { } /** * Get the code property: The error code. - * + * * @return the code value. */ public String code() { @@ -37,7 +41,7 @@ public String code() { /** * Get the message property: The error message. - * + * * @return the message value. */ public String message() { @@ -46,7 +50,7 @@ public String message() { /** * 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/models/ExperimentExecutionActionTargetDetailsProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionActionTargetDetailsProperties.java index b238ea3c146e..9d46d9bd9c4e 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionActionTargetDetailsProperties.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionActionTargetDetailsProperties.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Model that represents the Experiment action target details properties model. */ +/** + * Model that represents the Experiment action target details properties model. + */ @Immutable public final class ExperimentExecutionActionTargetDetailsProperties { /* @@ -41,13 +43,15 @@ public final class ExperimentExecutionActionTargetDetailsProperties { @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) private ExperimentExecutionActionTargetDetailsError error; - /** Creates an instance of ExperimentExecutionActionTargetDetailsProperties class. */ + /** + * Creates an instance of ExperimentExecutionActionTargetDetailsProperties class. + */ public ExperimentExecutionActionTargetDetailsProperties() { } /** * Get the status property: The status of the execution. - * + * * @return the status value. */ public String status() { @@ -56,7 +60,7 @@ public String status() { /** * Get the target property: The target for the action. - * + * * @return the target value. */ public String target() { @@ -65,7 +69,7 @@ public String target() { /** * Get the targetFailedTime property: String that represents the failed date time. - * + * * @return the targetFailedTime value. */ public OffsetDateTime targetFailedTime() { @@ -74,7 +78,7 @@ public OffsetDateTime targetFailedTime() { /** * Get the targetCompletedTime property: String that represents the completed date time. - * + * * @return the targetCompletedTime value. */ public OffsetDateTime targetCompletedTime() { @@ -83,7 +87,7 @@ public OffsetDateTime targetCompletedTime() { /** * Get the error property: The error of the action. - * + * * @return the error value. */ public ExperimentExecutionActionTargetDetailsError error() { @@ -92,7 +96,7 @@ public ExperimentExecutionActionTargetDetailsError error() { /** * 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/models/ExperimentExecutionDetails.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionDetails.java index 67895a8e836d..a3389a3da090 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionDetails.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionDetails.java @@ -7,74 +7,76 @@ import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsInner; import java.time.OffsetDateTime; -/** An immutable client-side representation of ExperimentExecutionDetails. */ +/** + * An immutable client-side representation of ExperimentExecutionDetails. + */ public interface ExperimentExecutionDetails { /** * Gets the type property: String of the resource type. - * + * * @return the type value. */ String type(); /** * Gets the id property: String of the fully qualified resource ID. - * + * * @return the id value. */ String id(); /** * Gets the name property: String of the resource name. - * + * * @return the name value. */ String name(); /** * Gets the failureReason property: The reason why the execution failed. - * + * * @return the failureReason value. */ String failureReason(); /** * Gets the lastActionAt property: String that represents the last action date time. - * + * * @return the lastActionAt value. */ OffsetDateTime lastActionAt(); /** * Gets the runInformation property: The information of the experiment run. - * + * * @return the runInformation value. */ ExperimentExecutionDetailsPropertiesRunInformation runInformation(); /** * Gets the status property: The status of the execution. - * + * * @return the status value. */ String status(); /** * Gets the startedAt property: String that represents the start date time. - * + * * @return the startedAt value. */ OffsetDateTime startedAt(); /** * Gets the stoppedAt property: String that represents the stop date time. - * + * * @return the stoppedAt value. */ OffsetDateTime stoppedAt(); /** * Gets the inner com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsInner object. - * + * * @return the inner object. */ ExperimentExecutionDetailsInner innerModel(); diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionDetailsPropertiesRunInformation.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionDetailsPropertiesRunInformation.java index 11f4e69ec52c..9dea24cb514f 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionDetailsPropertiesRunInformation.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionDetailsPropertiesRunInformation.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The information of the experiment run. */ +/** + * The information of the experiment run. + */ @Immutable public final class ExperimentExecutionDetailsPropertiesRunInformation { /* @@ -17,13 +19,15 @@ public final class ExperimentExecutionDetailsPropertiesRunInformation { @JsonProperty(value = "steps", access = JsonProperty.Access.WRITE_ONLY) private List steps; - /** Creates an instance of ExperimentExecutionDetailsPropertiesRunInformation class. */ + /** + * Creates an instance of ExperimentExecutionDetailsPropertiesRunInformation class. + */ public ExperimentExecutionDetailsPropertiesRunInformation() { } /** * Get the steps property: The steps of the experiment run. - * + * * @return the steps value. */ public List steps() { @@ -32,7 +36,7 @@ public List steps() { /** * 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/models/ExperimentExecutionListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionListResult.java index 69997a14cbb4..d5a187706a50 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionListResult.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Model that represents a list of Experiment executions and a link for pagination. */ +/** + * Model that represents a list of Experiment executions and a link for pagination. + */ @Immutable public final class ExperimentExecutionListResult { /* @@ -24,13 +26,15 @@ public final class ExperimentExecutionListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ExperimentExecutionListResult class. */ + /** + * Creates an instance of ExperimentExecutionListResult class. + */ public ExperimentExecutionListResult() { } /** * Get the value property: List of Experiment executions. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Get the nextLink property: URL to retrieve the next page of Experiment executions. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +52,7 @@ public String nextLink() { /** * 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/models/ExperimentListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentListResult.java index 3c55db51087b..4865337f2948 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentListResult.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Model that represents a list of Experiment resources and a link for pagination. */ +/** + * Model that represents a list of Experiment resources and a link for pagination. + */ @Immutable public final class ExperimentListResult { /* @@ -24,13 +26,15 @@ public final class ExperimentListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ExperimentListResult class. */ + /** + * Creates an instance of ExperimentListResult class. + */ public ExperimentListResult() { } /** * Get the value property: List of Experiment resources. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Get the nextLink property: URL to retrieve the next page of Experiment resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +52,7 @@ public String nextLink() { /** * 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/models/ExperimentUpdate.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentUpdate.java index 9f36b57da548..a58e28623665 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentUpdate.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExperimentUpdate.java @@ -5,9 +5,13 @@ package com.azure.resourcemanager.chaos.models; import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; -/** Describes an experiment update. */ +/** + * Describes an experiment update. + */ @Fluent public final class ExperimentUpdate { /* @@ -16,13 +20,22 @@ public final class ExperimentUpdate { @JsonProperty(value = "identity") private ResourceIdentity identity; - /** Creates an instance of ExperimentUpdate class. */ + /* + * The tags of the experiment resource. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Creates an instance of ExperimentUpdate class. + */ public ExperimentUpdate() { } /** * Get the identity property: The identity of the experiment resource. - * + * * @return the identity value. */ public ResourceIdentity identity() { @@ -31,7 +44,7 @@ public ResourceIdentity identity() { /** * Set the identity property: The identity of the experiment resource. - * + * * @param identity the identity value to set. * @return the ExperimentUpdate object itself. */ @@ -40,9 +53,29 @@ public ExperimentUpdate withIdentity(ResourceIdentity identity) { return this; } + /** + * Get the tags property: The tags of the experiment resource. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: The tags of the experiment resource. + * + * @param tags the tags value to set. + * @return the ExperimentUpdate object itself. + */ + public ExperimentUpdate withTags(Map tags) { + this.tags = tags; + 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/models/Experiments.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Experiments.java index 8505040f5fbd..60f1f3768861 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Experiments.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Experiments.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Experiments. */ +/** + * Resource collection API of Experiments. + */ public interface Experiments { /** * Get a list of Experiment resources in a subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Experiment resources in a subscription as paginated response with {@link PagedIterable}. @@ -21,9 +23,9 @@ public interface Experiments { /** * Get a list of Experiment resources in a subscription. - * + * * @param running Optional value that indicates whether to filter results based on if the Experiment is currently - * running. If null, then the results will not be filtered. + * running. If null, then the results will not be filtered. * @param continuationToken String that sets the continuation token. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -35,7 +37,7 @@ public interface Experiments { /** * Get a list of Experiment resources in a resource group. - * + * * @param resourceGroupName String that represents an Azure resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -46,10 +48,10 @@ public interface Experiments { /** * Get a list of Experiment resources in a resource group. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param running Optional value that indicates whether to filter results based on if the Experiment is currently - * running. If null, then the results will not be filtered. + * running. If null, then the results will not be filtered. * @param continuationToken String that sets the continuation token. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,12 +59,12 @@ public interface Experiments { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Experiment resources in a resource group as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup( - String resourceGroupName, Boolean running, String continuationToken, Context context); + 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. @@ -73,7 +75,7 @@ PagedIterable listByResourceGroup( /** * 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. @@ -85,7 +87,7 @@ PagedIterable listByResourceGroup( /** * Get a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -94,12 +96,12 @@ PagedIterable listByResourceGroup( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Experiment resource along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String experimentName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String experimentName, + Context context); /** * Get a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -111,7 +113,7 @@ Response getByResourceGroupWithResponse( /** * Cancel a running Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -122,7 +124,7 @@ Response getByResourceGroupWithResponse( /** * Cancel a running Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -134,7 +136,7 @@ Response getByResourceGroupWithResponse( /** * Start a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -145,7 +147,7 @@ Response getByResourceGroupWithResponse( /** * Start a Experiment resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param experimentName String that represents a Experiment resource name. * @param context The context to associate with this operation. @@ -157,7 +159,7 @@ Response getByResourceGroupWithResponse( /** * 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. @@ -169,7 +171,7 @@ Response getByResourceGroupWithResponse( /** * 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. * @param context The context to associate with this operation. @@ -178,12 +180,12 @@ Response getByResourceGroupWithResponse( * @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}. */ - PagedIterable listAllExecutions( - String resourceGroupName, String experimentName, Context context); + PagedIterable listAllExecutions(String resourceGroupName, String experimentName, + Context context); /** * Get an execution 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. @@ -193,12 +195,12 @@ PagedIterable listAllExecutions( * @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}. */ - Response getExecutionWithResponse( - String resourceGroupName, String experimentName, String executionId, Context context); + Response getExecutionWithResponse(String resourceGroupName, String experimentName, + String executionId, Context context); /** * Get an execution 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. @@ -211,7 +213,7 @@ Response getExecutionWithResponse( /** * 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. @@ -221,12 +223,12 @@ Response getExecutionWithResponse( * @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}. */ - Response executionDetailsWithResponse( - String resourceGroupName, String experimentName, String executionId, Context context); + 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. @@ -239,7 +241,7 @@ Response executionDetailsWithResponse( /** * Get a Experiment resource. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -250,7 +252,7 @@ Response executionDetailsWithResponse( /** * Get a Experiment resource. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -262,7 +264,7 @@ Response executionDetailsWithResponse( /** * Delete a Experiment resource. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -272,7 +274,7 @@ Response executionDetailsWithResponse( /** * Delete a Experiment resource. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -283,7 +285,7 @@ Response executionDetailsWithResponse( /** * Begins definition for a new Experiment resource. - * + * * @param name resource name. * @return the first stage of the new Experiment definition. */ diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/FilterType.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/FilterType.java index 53ee9caa8191..403376e73537 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/FilterType.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/FilterType.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum that discriminates between filter types. Currently only `Simple` type is supported. */ +/** + * Enum that discriminates between filter types. Currently only `Simple` type is supported. + */ public final class FilterType extends ExpandableStringEnum { - /** Static value Simple for FilterType. */ + /** + * Static value Simple for FilterType. + */ public static final FilterType SIMPLE = fromString("Simple"); /** * Creates a new instance of FilterType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public FilterType() { /** * Creates or finds a FilterType from its string representation. - * + * * @param name a name to look for. * @return the corresponding FilterType. */ @@ -35,7 +39,7 @@ public static FilterType fromString(String name) { /** * Gets known FilterType values. - * + * * @return known FilterType values. */ public static Collection values() { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/KeyValuePair.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/KeyValuePair.java index 8b63f9050d98..2f235f21b6a6 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/KeyValuePair.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/KeyValuePair.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** A map to describe the settings of an action. */ +/** + * A map to describe the settings of an action. + */ @Fluent public final class KeyValuePair { /* @@ -23,13 +25,15 @@ public final class KeyValuePair { @JsonProperty(value = "value", required = true) private String value; - /** Creates an instance of KeyValuePair class. */ + /** + * Creates an instance of KeyValuePair class. + */ public KeyValuePair() { } /** * Get the key property: The name of the setting for the action. - * + * * @return the key value. */ public String key() { @@ -38,7 +42,7 @@ public String key() { /** * Set the key property: The name of the setting for the action. - * + * * @param key the key value to set. * @return the KeyValuePair object itself. */ @@ -49,7 +53,7 @@ public KeyValuePair withKey(String key) { /** * Get the value property: The value of the setting for the action. - * + * * @return the value value. */ public String value() { @@ -58,7 +62,7 @@ public String value() { /** * Set the value property: The value of the setting for the action. - * + * * @param value the value value to set. * @return the KeyValuePair object itself. */ @@ -69,19 +73,17 @@ public KeyValuePair withValue(String value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (key() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property key in model KeyValuePair")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property key in model KeyValuePair")); } if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model KeyValuePair")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model KeyValuePair")); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Operation.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Operation.java index b5c9d7060c9d..c1f125396971 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Operation.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Operation.java @@ -6,12 +6,14 @@ import com.azure.resourcemanager.chaos.fluent.models.OperationInner; -/** An immutable client-side representation of Operation. */ +/** + * An immutable client-side representation of Operation. + */ public interface Operation { /** * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * + * * @return the name value. */ String name(); @@ -19,14 +21,14 @@ public interface Operation { /** * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane * operations and "false" for ARM/control-plane operations. - * + * * @return the isDataAction value. */ Boolean isDataAction(); /** * Gets the display property: Localized display information for this particular operation. - * + * * @return the display value. */ OperationDisplay display(); @@ -34,7 +36,7 @@ public interface Operation { /** * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". - * + * * @return the origin value. */ Origin origin(); @@ -42,14 +44,14 @@ public interface Operation { /** * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal * only APIs. - * + * * @return the actionType value. */ ActionType actionType(); /** * Gets the inner com.azure.resourcemanager.chaos.fluent.models.OperationInner object. - * + * * @return the inner object. */ OperationInner innerModel(); diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationDisplay.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationDisplay.java index c94f5b20ac74..fb7918a6873a 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationDisplay.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationDisplay.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Localized display information for this particular operation. */ +/** + * Localized display information for this particular operation. + */ @Immutable public final class OperationDisplay { /* @@ -37,14 +39,16 @@ public final class OperationDisplay { @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; - /** Creates an instance of OperationDisplay class. */ + /** + * Creates an instance of OperationDisplay class. + */ public OperationDisplay() { } /** * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring * Insights" or "Microsoft Compute". - * + * * @return the provider value. */ public String provider() { @@ -54,7 +58,7 @@ public String provider() { /** * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. * "Virtual Machines" or "Job Schedule Collections". - * + * * @return the resource value. */ public String resource() { @@ -64,7 +68,7 @@ public String resource() { /** * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. * "Create or Update Virtual Machine", "Restart Virtual Machine". - * + * * @return the operation value. */ public String operation() { @@ -74,7 +78,7 @@ public String operation() { /** * Get the description property: The short, localized friendly description of the operation; suitable for tool tips * and detailed views. - * + * * @return the description value. */ public String description() { @@ -83,7 +87,7 @@ public String description() { /** * 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/models/OperationListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationListResult.java index 62f3cb4b30bf..098f1446216e 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationListResult.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationListResult.java @@ -10,8 +10,8 @@ import java.util.List; /** - * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - * results. + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set + * of results. */ @Immutable public final class OperationListResult { @@ -27,13 +27,15 @@ public final class OperationListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of OperationListResult class. */ + /** + * Creates an instance of OperationListResult class. + */ public OperationListResult() { } /** * Get the value property: List of operations supported by the resource provider. - * + * * @return the value value. */ public List value() { @@ -42,7 +44,7 @@ public List value() { /** * Get the nextLink property: URL to get the next set of operation list results (if there are any). - * + * * @return the nextLink value. */ public String nextLink() { @@ -51,7 +53,7 @@ public String nextLink() { /** * 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/models/OperationStatus.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationStatus.java index 471fff86a4e1..b1e094af9f5e 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationStatus.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationStatus.java @@ -7,53 +7,55 @@ import com.azure.core.management.exception.ManagementError; import com.azure.resourcemanager.chaos.fluent.models.OperationStatusInner; -/** An immutable client-side representation of OperationStatus. */ +/** + * An immutable client-side representation of OperationStatus. + */ public interface OperationStatus { /** * Gets the id property: The operation Id. - * + * * @return the id value. */ String id(); /** * Gets the name property: The operation name. - * + * * @return the name value. */ String name(); /** * Gets the startTime property: The start time of the operation. - * + * * @return the startTime value. */ String startTime(); /** * Gets the endTime property: The end time of the operation. - * + * * @return the endTime value. */ String endTime(); /** * Gets the status property: The status of the operation. - * + * * @return the status value. */ String status(); /** * Gets the error property: The error object. - * + * * @return the error value. */ ManagementError error(); /** * Gets the inner com.azure.resourcemanager.chaos.fluent.models.OperationStatusInner object. - * + * * @return the inner object. */ OperationStatusInner innerModel(); diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationStatuses.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationStatuses.java index 3858ebd24b3c..54ddb12e295a 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationStatuses.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationStatuses.java @@ -7,12 +7,14 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of OperationStatuses. */ +/** + * Resource collection API of OperationStatuses. + */ public interface OperationStatuses { /** * Get the status of a long running azure asynchronous operation. - * - * @param location The region name of 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. @@ -24,8 +26,8 @@ public interface OperationStatuses { /** * Get the status of a long running azure asynchronous operation. - * - * @param location The region name of 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. diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Operations.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Operations.java index a0fb76ffe394..31ed96d56468 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Operations.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Operations.java @@ -7,11 +7,13 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** * Get a list all available Operations. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list all available Operations as paginated response with {@link PagedIterable}. @@ -20,7 +22,7 @@ public interface Operations { /** * Get a list all available Operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Origin.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Origin.java index daccb78e7d02..41a6ec69321b 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Origin.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Origin.java @@ -13,18 +13,24 @@ * is "user,system". */ public final class Origin extends ExpandableStringEnum { - /** Static value user for Origin. */ + /** + * Static value user for Origin. + */ public static final Origin USER = fromString("user"); - /** Static value system for Origin. */ + /** + * Static value system for Origin. + */ public static final Origin SYSTEM = fromString("system"); - /** Static value user,system for Origin. */ + /** + * Static value user,system for Origin. + */ public static final Origin USER_SYSTEM = fromString("user,system"); /** * Creates a new instance of Origin value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +39,7 @@ public Origin() { /** * Creates or finds a Origin from its string representation. - * + * * @param name a name to look for. * @return the corresponding Origin. */ @@ -44,7 +50,7 @@ public static Origin fromString(String name) { /** * Gets known Origin values. - * + * * @return known Origin values. */ public static Collection values() { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ProvisioningState.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ProvisioningState.java index 845d724d149a..bd11aa2f6ec4 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ProvisioningState.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ProvisioningState.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Current provisioning state for a given Azure Chaos resource. */ +/** + * Current provisioning state for a given Azure Chaos resource. + */ public final class ProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for ProvisioningState. */ + /** + * Static value Succeeded for ProvisioningState. + */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ProvisioningState. */ + /** + * Static value Failed for ProvisioningState. + */ public static final ProvisioningState FAILED = fromString("Failed"); - /** Static value Canceled for ProvisioningState. */ + /** + * Static value Canceled for ProvisioningState. + */ public static final ProvisioningState CANCELED = fromString("Canceled"); - /** Static value Creating for ProvisioningState. */ + /** + * Static value Creating for ProvisioningState. + */ public static final ProvisioningState CREATING = fromString("Creating"); - /** Static value Updating for ProvisioningState. */ + /** + * Static value Updating for ProvisioningState. + */ public static final ProvisioningState UPDATING = fromString("Updating"); - /** Static value Deleting for ProvisioningState. */ + /** + * Static value Deleting for ProvisioningState. + */ public static final ProvisioningState DELETING = fromString("Deleting"); /** * Creates a new instance of ProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public ProvisioningState() { /** * Creates or finds a ProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ProvisioningState. */ @@ -50,7 +64,7 @@ public static ProvisioningState fromString(String name) { /** * Gets known ProvisioningState values. - * + * * @return known ProvisioningState values. */ public static Collection values() { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ResourceIdentity.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ResourceIdentity.java index 7dcd66abfac3..4a2268f6a8cd 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ResourceIdentity.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ResourceIdentity.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The identity of a resource. */ +/** + * The identity of a resource. + */ @Fluent public final class ResourceIdentity { /* @@ -22,7 +24,8 @@ public final class ResourceIdentity { /* * The list of user identities associated with the Experiment. The user identity dictionary key references will be * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ + * userAssignedIdentities/{identityName}'. */ @JsonProperty(value = "userAssignedIdentities") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) @@ -40,13 +43,15 @@ public final class ResourceIdentity { @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private String tenantId; - /** Creates an instance of ResourceIdentity class. */ + /** + * Creates an instance of ResourceIdentity class. + */ public ResourceIdentity() { } /** * Get the type property: String of the resource identity type. - * + * * @return the type value. */ public ResourceIdentityType type() { @@ -55,7 +60,7 @@ public ResourceIdentityType type() { /** * Set the type property: String of the resource identity type. - * + * * @param type the type value to set. * @return the ResourceIdentity object itself. */ @@ -68,7 +73,7 @@ public ResourceIdentity withType(ResourceIdentityType type) { * Get the userAssignedIdentities property: The list of user identities associated with the Experiment. The user * identity dictionary key references will be ARM resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - * + * * @return the userAssignedIdentities value. */ public Map userAssignedIdentities() { @@ -79,7 +84,7 @@ public Map userAssignedIdentities() { * Set the userAssignedIdentities property: The list of user identities associated with the Experiment. The user * identity dictionary key references will be ARM resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - * + * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the ResourceIdentity object itself. */ @@ -90,7 +95,7 @@ public ResourceIdentity withUserAssignedIdentities(Map { - if (e != null) { - e.validate(); - } - }); + userAssignedIdentities().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ResourceIdentityType.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ResourceIdentityType.java index 682743cc2136..f8f9bb37b4c2 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ResourceIdentityType.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ResourceIdentityType.java @@ -7,18 +7,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** String of the resource identity type. */ +/** + * String of the resource identity type. + */ public enum ResourceIdentityType { - /** Enum value None. */ + /** + * Enum value None. + */ NONE("None"), - /** Enum value SystemAssigned. */ + /** + * Enum value SystemAssigned. + */ SYSTEM_ASSIGNED("SystemAssigned"), - /** Enum value UserAssigned. */ + /** + * Enum value UserAssigned. + */ USER_ASSIGNED("UserAssigned"); - /** The actual serialized value for a ResourceIdentityType instance. */ + /** + * The actual serialized value for a ResourceIdentityType instance. + */ private final String value; ResourceIdentityType(String value) { @@ -27,7 +37,7 @@ public enum ResourceIdentityType { /** * Parses a serialized value to a ResourceIdentityType instance. - * + * * @param value the serialized value to parse. * @return the parsed ResourceIdentityType object, or null if unable to parse. */ @@ -45,7 +55,9 @@ public static ResourceIdentityType fromString(String value) { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @JsonValue @Override public String toString() { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/SelectorType.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/SelectorType.java index 1ea697825d76..1776fa6c7b61 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/SelectorType.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/SelectorType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum of the selector type. */ +/** + * Enum of the selector type. + */ public final class SelectorType extends ExpandableStringEnum { - /** Static value List for SelectorType. */ + /** + * Static value List for SelectorType. + */ public static final SelectorType LIST = fromString("List"); - /** Static value Query for SelectorType. */ + /** + * Static value Query for SelectorType. + */ public static final SelectorType QUERY = fromString("Query"); /** * Creates a new instance of SelectorType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public SelectorType() { /** * Creates or finds a SelectorType from its string representation. - * + * * @param name a name to look for. * @return the corresponding SelectorType. */ @@ -38,7 +44,7 @@ public static SelectorType fromString(String name) { /** * Gets known SelectorType values. - * + * * @return known SelectorType values. */ public static Collection values() { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/StepStatus.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/StepStatus.java index c4670d561f38..e615c194ceda 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/StepStatus.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/StepStatus.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Model that represents the a list of branches and branch statuses. */ +/** + * Model that represents the a list of branches and branch statuses. + */ @Immutable public final class StepStatus { /* @@ -35,13 +37,15 @@ public final class StepStatus { @JsonProperty(value = "branches", access = JsonProperty.Access.WRITE_ONLY) private List branches; - /** Creates an instance of StepStatus class. */ + /** + * Creates an instance of StepStatus class. + */ public StepStatus() { } /** * Get the stepName property: The name of the step. - * + * * @return the stepName value. */ public String stepName() { @@ -50,7 +54,7 @@ public String stepName() { /** * Get the stepId property: The id of the step. - * + * * @return the stepId value. */ public String stepId() { @@ -59,7 +63,7 @@ public String stepId() { /** * Get the status property: The value of the status of the step. - * + * * @return the status value. */ public String status() { @@ -68,7 +72,7 @@ public String status() { /** * Get the branches property: The array of branches. - * + * * @return the branches value. */ public List branches() { @@ -77,7 +81,7 @@ public List branches() { /** * 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/models/Target.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Target.java index 064f0d74239b..a4ada3a72e4c 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Target.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Target.java @@ -8,53 +8,55 @@ import com.azure.resourcemanager.chaos.fluent.models.TargetInner; import java.util.Map; -/** An immutable client-side representation of Target. */ +/** + * An immutable client-side representation of Target. + */ public interface Target { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: The system metadata of the target resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the location property: Location of the target resource. - * + * * @return the location value. */ String location(); /** * Gets the properties property: The properties of the target resource. - * + * * @return the properties value. */ Map properties(); /** * Gets the inner com.azure.resourcemanager.chaos.fluent.models.TargetInner object. - * + * * @return the inner object. */ TargetInner innerModel(); diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetListResult.java index de6d488fdf68..6fe46f644dd7 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetListResult.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Model that represents a list of Target resources and a link for pagination. */ +/** + * Model that represents a list of Target resources and a link for pagination. + */ @Immutable public final class TargetListResult { /* @@ -24,13 +26,15 @@ public final class TargetListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of TargetListResult class. */ + /** + * Creates an instance of TargetListResult class. + */ public TargetListResult() { } /** * Get the value property: List of Target resources. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Get the nextLink property: URL to retrieve the next page of Target resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +52,7 @@ public String nextLink() { /** * 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/models/TargetReference.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetReference.java index d6d40028cf07..dfda7e9f1491 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetReference.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetReference.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Model that represents a reference to a Target in the selector. */ +/** + * Model that represents a reference to a Target in the selector. + */ @Fluent public final class TargetReference { /* @@ -23,13 +25,15 @@ public final class TargetReference { @JsonProperty(value = "id", required = true) private String id; - /** Creates an instance of TargetReference class. */ + /** + * Creates an instance of TargetReference class. + */ public TargetReference() { } /** * Get the type property: Enum of the Target reference type. - * + * * @return the type value. */ public TargetReferenceType type() { @@ -38,7 +42,7 @@ public TargetReferenceType type() { /** * Set the type property: Enum of the Target reference type. - * + * * @param type the type value to set. * @return the TargetReference object itself. */ @@ -49,7 +53,7 @@ public TargetReference withType(TargetReferenceType type) { /** * Get the id property: String of the resource ID of a Target resource. - * + * * @return the id value. */ public String id() { @@ -58,7 +62,7 @@ public String id() { /** * Set the id property: String of the resource ID of a Target resource. - * + * * @param id the id value to set. * @return the TargetReference object itself. */ @@ -69,19 +73,17 @@ public TargetReference withId(String id) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (type() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property type in model TargetReference")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property type in model TargetReference")); } if (id() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property id in model TargetReference")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property id in model TargetReference")); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetReferenceType.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetReferenceType.java index 81ed19e0d123..6e196ebcd7f1 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetReferenceType.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetReferenceType.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum of the Target reference type. */ +/** + * Enum of the Target reference type. + */ public final class TargetReferenceType extends ExpandableStringEnum { - /** Static value ChaosTarget for TargetReferenceType. */ + /** + * Static value ChaosTarget for TargetReferenceType. + */ public static final TargetReferenceType CHAOS_TARGET = fromString("ChaosTarget"); /** * Creates a new instance of TargetReferenceType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public TargetReferenceType() { /** * Creates or finds a TargetReferenceType from its string representation. - * + * * @param name a name to look for. * @return the corresponding TargetReferenceType. */ @@ -35,7 +39,7 @@ public static TargetReferenceType fromString(String name) { /** * Gets known TargetReferenceType values. - * + * * @return known TargetReferenceType values. */ public static Collection values() { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetType.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetType.java index ebc7a5164cf0..f464af6c8f3c 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetType.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetType.java @@ -8,74 +8,76 @@ import com.azure.resourcemanager.chaos.fluent.models.TargetTypeInner; import java.util.List; -/** An immutable client-side representation of TargetType. */ +/** + * An immutable client-side representation of TargetType. + */ public interface TargetType { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: The system metadata properties of the target type resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the location property: Location of the Target Type resource. - * + * * @return the location value. */ String location(); /** * Gets the displayName property: Localized string of the display name. - * + * * @return the displayName value. */ String displayName(); /** * Gets the description property: Localized string of the description. - * + * * @return the description value. */ String description(); /** * Gets the propertiesSchema property: URL to retrieve JSON schema of the Target Type properties. - * + * * @return the propertiesSchema value. */ String propertiesSchema(); /** * Gets the resourceTypes property: List of resource types this Target Type can extend. - * + * * @return the resourceTypes value. */ List resourceTypes(); /** * Gets the inner com.azure.resourcemanager.chaos.fluent.models.TargetTypeInner object. - * + * * @return the inner object. */ TargetTypeInner innerModel(); diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetTypeListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetTypeListResult.java index ffb021af968c..1eca9e022851 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetTypeListResult.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetTypeListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Model that represents a list of Target Type resources and a link for pagination. */ +/** + * Model that represents a list of Target Type resources and a link for pagination. + */ @Immutable public final class TargetTypeListResult { /* @@ -24,13 +26,15 @@ public final class TargetTypeListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of TargetTypeListResult class. */ + /** + * Creates an instance of TargetTypeListResult class. + */ public TargetTypeListResult() { } /** * Get the value property: List of Target Type resources. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Get the nextLink property: URL to retrieve the next page of Target Type resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +52,7 @@ public String nextLink() { /** * 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/models/TargetTypes.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetTypes.java index 8ff793a6ccfa..15b8a3960242 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetTypes.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/TargetTypes.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of TargetTypes. */ +/** + * Resource collection API of TargetTypes. + */ public interface TargetTypes { /** * Get a list of Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -23,7 +25,7 @@ public interface TargetTypes { /** * Get a list of Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @param continuationToken String that sets the continuation token. * @param context The context to associate with this operation. @@ -36,7 +38,7 @@ public interface TargetTypes { /** * Get a Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @param context The context to associate with this operation. @@ -49,7 +51,7 @@ public interface TargetTypes { /** * Get a Target Type resources for given location. - * + * * @param locationName String that represents a Location resource name. * @param targetTypeName String that represents a Target Type resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Targets.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Targets.java index 6187753e7327..12dc0dcad5a5 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Targets.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Targets.java @@ -9,11 +9,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.chaos.fluent.models.TargetInner; -/** Resource collection API of Targets. */ +/** + * Resource collection API of Targets. + */ public interface Targets { /** * 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. @@ -21,15 +23,15 @@ public interface Targets { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Target resources that extend a tracked regional resource as paginated response with {@link - * PagedIterable}. + * @return a list of Target resources that extend a tracked regional resource as paginated response with + * {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, String parentProviderNamespace, String parentResourceType, String parentResourceName); + PagedIterable list(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName); /** * Get a list of Target resources that extend a tracked regional resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -39,20 +41,15 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Target resources that extend a tracked regional resource as paginated response with {@link - * PagedIterable}. + * @return a list of Target resources that extend a tracked regional resource as paginated response with + * {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String continuationToken, - Context context); + PagedIterable list(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String continuationToken, Context context); /** * Get a Target resource that extends a tracked regional resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -64,17 +61,12 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Target resource that extends a tracked regional resource along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - Context context); + Response getWithResponse(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, Context context); /** * Get a Target resource that extends a tracked regional resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -85,16 +77,12 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Target resource that extends a tracked regional resource. */ - Target get( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName); + Target get(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName); /** * Delete a Target resource that extends a tracked regional resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -106,17 +94,12 @@ Target get( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - Context context); + Response deleteWithResponse(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, Context context); /** * Delete a Target resource that extends a tracked regional resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -126,16 +109,12 @@ Response deleteWithResponse( * @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. */ - void delete( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName); + void delete(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName); /** * Create or update a Target resource that extends a tracked regional resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -148,18 +127,12 @@ void delete( * @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}. */ - Response createOrUpdateWithResponse( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - TargetInner target, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String parentProviderNamespace, + String parentResourceType, String parentResourceName, String targetName, TargetInner target, Context context); /** * Create or update a Target resource that extends a tracked regional resource. - * + * * @param resourceGroupName String that represents an Azure resource group. * @param parentProviderNamespace String that represents a resource provider namespace. * @param parentResourceType String that represents a resource type. @@ -171,11 +144,6 @@ Response createOrUpdateWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return model that represents a Target resource. */ - Target createOrUpdate( - String resourceGroupName, - String parentProviderNamespace, - String parentResourceType, - String parentResourceName, - String targetName, - TargetInner target); + Target createOrUpdate(String resourceGroupName, String parentProviderNamespace, String parentResourceType, + String parentResourceName, String targetName, TargetInner target); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/UserAssignedIdentity.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/UserAssignedIdentity.java index e83eda8f0bcb..7f8c9eba71ef 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/UserAssignedIdentity.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/UserAssignedIdentity.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; -/** User assigned identity properties. */ +/** + * User assigned identity properties. + */ @Immutable public final class UserAssignedIdentity { /* @@ -23,13 +25,15 @@ public final class UserAssignedIdentity { @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private UUID clientId; - /** Creates an instance of UserAssignedIdentity class. */ + /** + * Creates an instance of UserAssignedIdentity class. + */ public UserAssignedIdentity() { } /** * Get the principalId property: The principal ID of the assigned identity. - * + * * @return the principalId value. */ public UUID principalId() { @@ -38,7 +42,7 @@ public UUID principalId() { /** * Get the clientId property: The client ID of the assigned identity. - * + * * @return the clientId value. */ public UUID clientId() { @@ -47,7 +51,7 @@ public UUID clientId() { /** * 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/models/package-info.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/package-info.java index 081adb707661..1c102fc54e04 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/package-info.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the data models for ChaosManagementClient. Chaos Management Client. */ +/** + * Package containing the data models for ChaosManagementClient. + * Chaos Management Client. + */ package com.azure.resourcemanager.chaos.models; diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/package-info.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/package-info.java index 9da2e994a2c7..e51a56207ae2 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/package-info.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the classes for ChaosManagementClient. Chaos Management Client. */ +/** + * Package containing the classes for ChaosManagementClient. + * Chaos Management Client. + */ package com.azure.resourcemanager.chaos; diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/module-info.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/module-info.java index 0a9080fade2a..ec75a9114c7d 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/module-info.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/module-info.java @@ -4,16 +4,10 @@ module com.azure.resourcemanager.chaos { requires transitive com.azure.core.management; - exports com.azure.resourcemanager.chaos; exports com.azure.resourcemanager.chaos.fluent; exports com.azure.resourcemanager.chaos.fluent.models; exports com.azure.resourcemanager.chaos.models; - - opens com.azure.resourcemanager.chaos.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.chaos.models to - com.azure.core, - com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.chaos.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.chaos.models to com.azure.core, com.fasterxml.jackson.databind; } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesCreateOrUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesCreateOrUpdateSamples.java index bff7d610edc1..a1e390fbe238 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesCreateOrUpdateSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesCreateOrUpdateSamples.java @@ -6,28 +6,23 @@ import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner; -/** Samples for Capabilities CreateOrUpdate. */ +/** + * Samples for Capabilities CreateOrUpdate. + */ public final class CapabilitiesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateCapability.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateCapability.json */ /** * Sample code: Create/update a Capability that extends a virtual machine Target resource. - * + * * @param manager Entry point to ChaosManager. */ public static void createUpdateACapabilityThatExtendsAVirtualMachineTargetResource( com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .capabilities() - .createOrUpdateWithResponse( - "exampleRG", - "Microsoft.Compute", - "virtualMachines", - "exampleVM", - "Microsoft-VirtualMachine", - "Shutdown-1.0", - new CapabilityInner(), - com.azure.core.util.Context.NONE); + manager.capabilities().createOrUpdateWithResponse("exampleRG", "Microsoft.Compute", "virtualMachines", + "exampleVM", "Microsoft-VirtualMachine", "Shutdown-1.0", new CapabilityInner(), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesDeleteSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesDeleteSamples.java index c0711247e778..e50d25508504 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesDeleteSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesDeleteSamples.java @@ -4,27 +4,22 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for Capabilities Delete. */ +/** + * Samples for Capabilities Delete. + */ public final class CapabilitiesDeleteSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteCapability.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteCapability.json */ /** * Sample code: Delete a Capability that extends a virtual machine Target resource. - * + * * @param manager Entry point to ChaosManager. */ public static void deleteACapabilityThatExtendsAVirtualMachineTargetResource( com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .capabilities() - .deleteWithResponse( - "exampleRG", - "Microsoft.Compute", - "virtualMachines", - "exampleVM", - "Microsoft-VirtualMachine", - "Shutdown-1.0", - com.azure.core.util.Context.NONE); + manager.capabilities().deleteWithResponse("exampleRG", "Microsoft.Compute", "virtualMachines", "exampleVM", + "Microsoft-VirtualMachine", "Shutdown-1.0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesGetSamples.java index c9fcb72d1c84..f551931ddaf0 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesGetSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesGetSamples.java @@ -4,27 +4,22 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for Capabilities Get. */ +/** + * Samples for Capabilities Get. + */ public final class CapabilitiesGetSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetCapability.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetCapability.json */ /** * Sample code: Get a Capability that extends a virtual machine Target resource. - * + * * @param manager Entry point to ChaosManager. */ - public static void getACapabilityThatExtendsAVirtualMachineTargetResource( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .capabilities() - .getWithResponse( - "exampleRG", - "Microsoft.Compute", - "virtualMachines", - "exampleVM", - "Microsoft-VirtualMachine", - "Shutdown-1.0", - com.azure.core.util.Context.NONE); + 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); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesListSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesListSamples.java index e9877ec3e950..8df30c20895f 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesListSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilitiesListSamples.java @@ -4,27 +4,22 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for Capabilities List. */ +/** + * Samples for Capabilities List. + */ public final class CapabilitiesListSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListCapabilities.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListCapabilities.json */ /** * Sample code: List all Capabilities that extend a virtual machine Target resource. - * + * * @param manager Entry point to ChaosManager. */ public static void listAllCapabilitiesThatExtendAVirtualMachineTargetResource( com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .capabilities() - .list( - "exampleRG", - "Microsoft.Compute", - "virtualMachines", - "exampleVM", - "Microsoft-VirtualMachine", - null, - com.azure.core.util.Context.NONE); + manager.capabilities().list("exampleRG", "Microsoft.Compute", "virtualMachines", "exampleVM", + "Microsoft-VirtualMachine", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesGetSamples.java index f6ccf64f5fe3..2dfe563f27d7 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesGetSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesGetSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for CapabilityTypes Get. */ +/** + * Samples for CapabilityTypes Get. + */ public final class CapabilityTypesGetSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetCapabilityType.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetCapabilityType.json */ /** * Sample code: Get a Capability Type for a virtual machine Target resource on westus2 location. - * + * * @param manager Entry point to ChaosManager. */ public static void getACapabilityTypeForAVirtualMachineTargetResourceOnWestus2Location( com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .capabilityTypes() - .getWithResponse("westus2", "Microsoft-VirtualMachine", "Shutdown-1.0", com.azure.core.util.Context.NONE); + manager.capabilityTypes().getWithResponse("westus2", "Microsoft-VirtualMachine", "Shutdown-1.0", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesListSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesListSamples.java index 3d6fb9271308..41d3af07ff14 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesListSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for CapabilityTypes List. */ +/** + * Samples for CapabilityTypes List. + */ public final class CapabilityTypesListSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListCapabilityTypes.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListCapabilityTypes.json */ /** * Sample code: List all Capability Types for a virtual machine Target resource on westus2 location. - * + * * @param manager Entry point to ChaosManager. */ public static void listAllCapabilityTypesForAVirtualMachineTargetResourceOnWestus2Location( diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsCancelSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsCancelSamples.java index 11882ad7b002..990b2f16fdb8 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsCancelSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsCancelSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for Experiments Cancel. */ +/** + * Samples for Experiments Cancel. + */ public final class ExperimentsCancelSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CancelExperiment.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CancelExperiment.json */ /** * Sample code: Cancel a running Experiment. - * + * * @param manager Entry point to ChaosManager. */ public static void cancelARunningExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsCreateOrUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsCreateOrUpdateSamples.java index 7dd384185243..a1e01b8f4864 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsCreateOrUpdateSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsCreateOrUpdateSamples.java @@ -16,58 +16,34 @@ import java.time.Duration; import java.util.Arrays; -/** Samples for Experiments CreateOrUpdate. */ +/** + * Samples for Experiments CreateOrUpdate. + */ public final class ExperimentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateExperiment.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateExperiment.json */ /** * Sample code: Create/update a Experiment in a resource group. - * + * * @param manager Entry point to ChaosManager. */ public static void createUpdateAExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .experiments() - .define("exampleExperiment") - .withRegion("eastus2euap") + 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(); + 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(); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsDeleteSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsDeleteSamples.java index bfc219fab7b0..d71ed6f1c2f9 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsDeleteSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for Experiments Delete. */ +/** + * Samples for Experiments Delete. + */ public final class ExperimentsDeleteSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteExperiment.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteExperiment.json */ /** * Sample code: Delete a Experiment in a resource group. - * + * * @param manager Entry point to ChaosManager. */ public static void deleteAExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsExecutionDetailsSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsExecutionDetailsSamples.java index 5fef1f0dba90..b4b1018aeeda 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsExecutionDetailsSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsExecutionDetailsSamples.java @@ -4,23 +4,21 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for Experiments ExecutionDetails. */ +/** + * Samples for Experiments ExecutionDetails. + */ public final class ExperimentsExecutionDetailsSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DetailsExperiment.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DetailsExperiment.json */ /** * Sample code: Get experiment execution details. - * + * * @param manager Entry point to ChaosManager. */ public static void getExperimentExecutionDetails(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .experiments() - .executionDetailsWithResponse( - "exampleRG", - "exampleExperiment", - "f24500ad-744e-4a26-864b-b76199eac333", - com.azure.core.util.Context.NONE); + manager.experiments().executionDetailsWithResponse("exampleRG", "exampleExperiment", + "f24500ad-744e-4a26-864b-b76199eac333", com.azure.core.util.Context.NONE); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetByResourceGroupSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetByResourceGroupSamples.java index 890dfb7f8d88..bcff08a197cb 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetByResourceGroupSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetByResourceGroupSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for Experiments GetByResourceGroup. */ +/** + * Samples for Experiments GetByResourceGroup. + */ public final class ExperimentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetExperiment.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetExperiment.json */ /** * Sample code: Get a Experiment in a resource group. - * + * * @param manager Entry point to ChaosManager. */ public static void getAExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .experiments() - .getByResourceGroupWithResponse("exampleRG", "exampleExperiment", com.azure.core.util.Context.NONE); + manager.experiments().getByResourceGroupWithResponse("exampleRG", "exampleExperiment", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetExecutionSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetExecutionSamples.java index 28f28dd3c4e9..6c17f0dddf12 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetExecutionSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetExecutionSamples.java @@ -4,23 +4,21 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for Experiments GetExecution. */ +/** + * Samples for Experiments GetExecution. + */ public final class ExperimentsGetExecutionSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetExperimentExecution.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetExperimentExecution.json */ /** * Sample code: Get the execution of a Experiment. - * + * * @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); + manager.experiments().getExecutionWithResponse("exampleRG", "exampleExperiment", + "f24500ad-744e-4a26-864b-b76199eac333", com.azure.core.util.Context.NONE); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListAllExecutionsSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListAllExecutionsSamples.java index e7f7cb140fcf..27038b5ac78d 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListAllExecutionsSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListAllExecutionsSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for Experiments ListAllExecutions. */ +/** + * Samples for Experiments ListAllExecutions. + */ public final class ExperimentsListAllExecutionsSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentExecutions.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentExecutions.json */ /** * Sample code: List all executions of an Experiment. - * + * * @param manager Entry point to ChaosManager. */ public static void listAllExecutionsOfAnExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListByResourceGroupSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListByResourceGroupSamples.java index 2f36631b04eb..15eebd7e5b8c 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListByResourceGroupSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListByResourceGroupSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for Experiments ListByResourceGroup. */ +/** + * Samples for Experiments ListByResourceGroup. + */ public final class ExperimentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentsInAResourceGroup.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentsInAResourceGroup. + * json */ /** * Sample code: List all Experiments in a resource group. - * + * * @param manager Entry point to ChaosManager. */ public static void listAllExperimentsInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListSamples.java index 46c0dd24b7cf..d9367565bfb4 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsListSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for Experiments List. */ +/** + * Samples for Experiments List. + */ public final class ExperimentsListSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentsInASubscription.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentsInASubscription. + * json */ /** * Sample code: List all Experiments in a subscription. - * + * * @param manager Entry point to ChaosManager. */ public static void listAllExperimentsInASubscription(com.azure.resourcemanager.chaos.ChaosManager manager) { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsStartSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsStartSamples.java index f1624202c0f8..e032207008d2 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsStartSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsStartSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for Experiments Start. */ +/** + * Samples for Experiments Start. + */ public final class ExperimentsStartSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/StartExperiment.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/StartExperiment.json */ /** * Sample code: Start a Experiment. - * + * * @param manager Entry point to ChaosManager. */ public static void startAExperiment(com.azure.resourcemanager.chaos.ChaosManager manager) { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsUpdateSamples.java index f5127f1918eb..f53dce2d1c8e 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsUpdateSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ExperimentsUpdateSamples.java @@ -11,31 +11,27 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Experiments Update. */ +/** + * Samples for Experiments Update. + */ public final class ExperimentsUpdateSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/UpdateExperiment.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/UpdateExperiment.json */ /** * Sample code: Update an Experiment in a resource group. - * + * * @param manager Entry point to ChaosManager. */ public static void updateAnExperimentInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { - Experiment resource = - manager - .experiments() - .getByResourceGroupWithResponse("exampleRG", "exampleExperiment", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withIdentity( - new ResourceIdentity() - .withType(ResourceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentity/exampleUMI", - new UserAssignedIdentity()))) + 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(); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/OperationStatusesGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/OperationStatusesGetSamples.java index a9b80b0a2167..29c02fa4fa08 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/OperationStatusesGetSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/OperationStatusesGetSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for OperationStatuses Get. */ +/** + * Samples for OperationStatuses Get. + */ public final class OperationStatusesGetSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetOperationStatus.json + * 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); + manager.operationStatuses().getWithResponse("West US", "713192d7-503f-477a-9cfe-4efc3ee2bd11", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetTypesGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetTypesGetSamples.java index 6486c6f7d0e7..8dcf3c0cc1d2 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetTypesGetSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetTypesGetSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for TargetTypes Get. */ +/** + * Samples for TargetTypes Get. + */ public final class TargetTypesGetSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetTargetType.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetTargetType.json */ /** * Sample code: Get a Target Type for westus2 location. - * + * * @param manager Entry point to ChaosManager. */ public static void getATargetTypeForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetTypesListSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetTypesListSamples.java index 4a09189e47ec..206536f875f7 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetTypesListSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetTypesListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for TargetTypes List. */ +/** + * Samples for TargetTypes List. + */ public final class TargetTypesListSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListTargetTypes.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListTargetTypes.json */ /** * Sample code: List all Target Types for westus2 location. - * + * * @param manager Entry point to ChaosManager. */ public static void listAllTargetTypesForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsCreateOrUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsCreateOrUpdateSamples.java index afc02f4e79eb..8dd1ca5cff4c 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsCreateOrUpdateSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsCreateOrUpdateSamples.java @@ -11,37 +11,28 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Targets CreateOrUpdate. */ +/** + * Samples for Targets CreateOrUpdate. + */ public final class TargetsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateTarget.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateTarget.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); + 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 diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsDeleteSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsDeleteSamples.java index 27de7a2fc06b..ebce9379ebfc 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsDeleteSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsDeleteSamples.java @@ -4,26 +4,22 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for Targets Delete. */ +/** + * Samples for Targets Delete. + */ public final class TargetsDeleteSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteTarget.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteTarget.json */ /** * Sample code: Delete a Target that extends a virtual machine resource. - * + * * @param manager Entry point to ChaosManager. */ - public static void deleteATargetThatExtendsAVirtualMachineResource( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .targets() - .deleteWithResponse( - "exampleRG", - "Microsoft.Compute", - "virtualMachines", - "exampleVM", - "Microsoft-Agent", - com.azure.core.util.Context.NONE); + 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); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsGetSamples.java index 1866fd629296..2a2a0ec5e3f5 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsGetSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsGetSamples.java @@ -4,26 +4,22 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for Targets Get. */ +/** + * Samples for Targets Get. + */ public final class TargetsGetSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetTarget.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetTarget.json */ /** * Sample code: Get a Target that extends a virtual machine resource. - * + * * @param manager Entry point to ChaosManager. */ - public static void getATargetThatExtendsAVirtualMachineResource( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .targets() - .getWithResponse( - "exampleRG", - "Microsoft.Compute", - "virtualMachines", - "exampleVM", - "Microsoft-Agent", - com.azure.core.util.Context.NONE); + 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); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsListSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsListSamples.java index 464c96b1aa65..0bc677e2566e 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsListSamples.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/TargetsListSamples.java @@ -4,26 +4,22 @@ package com.azure.resourcemanager.chaos.generated; -/** Samples for Targets List. */ +/** + * Samples for Targets List. + */ public final class TargetsListSamples { /* - * x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListTargets.json + * x-ms-original-file: + * specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListTargets.json */ /** * Sample code: List all Targets that extend a virtual machine resource. - * + * * @param manager Entry point to ChaosManager. */ - public static void listAllTargetsThatExtendAVirtualMachineResource( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager - .targets() - .list( - "exampleRG", - "Microsoft.Compute", - "virtualMachines", - "exampleVM", - null, - com.azure.core.util.Context.NONE); + 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); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesCreateOrUpdateWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesCreateOrUpdateWithResponseMockTests.java index 85b971cbe5d7..7329296999f0 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesCreateOrUpdateWithResponseMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesCreateOrUpdateWithResponseMockTests.java @@ -30,47 +30,26 @@ public void testCreateOrUpdateWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"properties\":{\"publisher\":\"fxzsjabibsyst\",\"targetType\":\"fsdjpvkvp\",\"description\":\"xbkzbzkdvncj\",\"parametersSchema\":\"udurgkakmokz\",\"urn\":\"jk\"},\"id\":\"ffhmouwqlgzr\",\"name\":\"zeeyebi\",\"type\":\"ikayuhqlbjbsybb\"}"; + String responseStr + = "{\"properties\":{\"publisher\":\"kpzi\",\"targetType\":\"j\",\"description\":\"nlfzxiavrmbz\",\"parametersSchema\":\"okixrjqcir\",\"urn\":\"pfrlazsz\"},\"id\":\"nwoiind\",\"name\":\"pwp\",\"type\":\"ylwbtlhflsjcdhsz\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + Capability response = manager.capabilities().createOrUpdateWithResponse("sjabibs", "stawfsdjpvkv", "bjxbkzbzk", + "vncjabudurgk", "kmokz", "jjklff", new CapabilityInner(), com.azure.core.util.Context.NONE).getValue(); - Capability response = - manager - .capabilities() - .createOrUpdateWithResponse( - "h", - "hfwpracstwit", - "khevxccedc", - "nmdyodnwzxl", - "jc", - "nhltiugcxn", - new CapabilityInner(), - com.azure.core.util.Context.NONE) - .getValue(); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesDeleteWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesDeleteWithResponseMockTests.java index adee4ba2841a..7bad4cd3df7d 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesDeleteWithResponseMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesDeleteWithResponseMockTests.java @@ -32,32 +32,21 @@ public void testDeleteWithResponse() throws Exception { Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .capabilities() - .deleteWithResponse("lolp", "vk", "r", "qvujzraehtwdwrf", "swibyr", "dl", com.azure.core.util.Context.NONE); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.capabilities().deleteWithResponse("vfvpdbodaciz", "j", "lhkrribdeibqipqk", "hvxndzwmkrefajpj", "rwkq", + "yhgbijtjivfx", com.azure.core.util.Context.NONE); + } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesGetWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesGetWithResponseMockTests.java index 780efbe470cc..2e02342c21b5 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesGetWithResponseMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesGetWithResponseMockTests.java @@ -29,46 +29,27 @@ public void testGetWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"properties\":{\"publisher\":\"mhairsbrgzdwmsw\",\"targetType\":\"pqwd\",\"description\":\"gicccnxqhuex\",\"parametersSchema\":\"ttlstvlzywemhz\",\"urn\":\"csdtclusiypbs\"},\"id\":\"gytguslfead\",\"name\":\"ygqukyhejh\",\"type\":\"isxgfp\"}"; + String responseStr + = "{\"properties\":{\"publisher\":\"fwpracstwi\",\"targetType\":\"khevxccedc\",\"description\":\"md\",\"parametersSchema\":\"dnwzxltjcvnhltiu\",\"urn\":\"xnavvwxq\"},\"id\":\"byqunyow\",\"name\":\"wlmdjrkv\",\"type\":\"g\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + Capability response = manager.capabilities() + .getWithResponse("lolp", "vk", "r", "qvujzraehtwdwrf", "swibyr", "dl", com.azure.core.util.Context.NONE) + .getValue(); - Capability response = - manager - .capabilities() - .getWithResponse( - "rmaequ", - "ah", - "icslfaoq", - "piyylhalnswhccsp", - "kaivwit", - "scywuggwoluhc", - com.azure.core.util.Context.NONE) - .getValue(); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesListMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesListMockTests.java index e696394b2d83..8d4b60f080e8 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesListMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilitiesListMockTests.java @@ -30,45 +30,26 @@ public void testList() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"properties\":{\"publisher\":\"ttwvogvbbe\",\"targetType\":\"cngqqmoakufgmjz\",\"description\":\"rdgrtw\",\"parametersSchema\":\"nuuzkopbm\",\"urn\":\"rfdwoyu\"},\"id\":\"hziuiefozbhdms\",\"name\":\"l\",\"type\":\"zqhof\"}]}"; + String responseStr + = "{\"value\":[{\"properties\":{\"publisher\":\"ggicccnxqhue\",\"targetType\":\"ktt\",\"description\":\"tvlz\",\"parametersSchema\":\"emhzrncsdtc\",\"urn\":\"siypbs\"},\"id\":\"gytguslfead\",\"name\":\"ygqukyhejh\",\"type\":\"isxgfp\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response = manager.capabilities().list("hxicslfaoqz", "iyylhalnswhccsp", "kaivwit", + "scywuggwoluhc", "bwemhairs", "rgzdwmsweyp", com.azure.core.util.Context.NONE); - PagedIterable response = - manager - .capabilities() - .list( - "uximerqfobw", - "znkbykutwpfhpagm", - "r", - "kdsnfdsdoakgtdl", - "kkze", - "dlhewp", - com.azure.core.util.Context.NONE); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityInnerTests.java index 46b73882dea5..70b8bc2b67fb 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityInnerTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityInnerTests.java @@ -10,11 +10,9 @@ public final class CapabilityInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CapabilityInner model = - BinaryData - .fromString( - "{\"properties\":{\"publisher\":\"mparcryuanzw\",\"targetType\":\"zdxtayrlhmwhf\",\"description\":\"rqobmtuk\",\"parametersSchema\":\"ryrtihfxtijbpzv\",\"urn\":\"wzsymglzufcy\"},\"id\":\"kohdbiha\",\"name\":\"ufhfcbjysa\",\"type\":\"ithxqhabifpi\"}") - .toObject(CapabilityInner.class); + CapabilityInner model = BinaryData.fromString( + "{\"properties\":{\"publisher\":\"mparcryuanzw\",\"targetType\":\"zdxtayrlhmwhf\",\"description\":\"rqobmtuk\",\"parametersSchema\":\"ryrtihfxtijbpzv\",\"urn\":\"wzsymglzufcy\"},\"id\":\"kohdbiha\",\"name\":\"ufhfcbjysa\",\"type\":\"ithxqhabifpi\"}") + .toObject(CapabilityInner.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityListResultTests.java index c81a42399e57..67964f884b7e 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityListResultTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityListResultTests.java @@ -10,11 +10,9 @@ public final class CapabilityListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CapabilityListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"publisher\":\"vgjxpybczm\",\"targetType\":\"mtz\",\"description\":\"bsphrupidgsybbe\",\"parametersSchema\":\"ph\",\"urn\":\"cmsxaobhdxbm\"},\"id\":\"qioqjzehtbmu\",\"name\":\"p\",\"type\":\"wnoi\"},{\"properties\":{\"publisher\":\"rxybqsoq\",\"targetType\":\"gkdmb\",\"description\":\"zlobcufpd\",\"parametersSchema\":\"rbt\",\"urn\":\"qjnqglhqgnufoooj\"},\"id\":\"wifsq\",\"name\":\"saagdf\",\"type\":\"glzlhjxrifkwmrv\"},{\"properties\":{\"publisher\":\"zntocipaouajps\",\"targetType\":\"cmpoyfdkfogkny\",\"description\":\"ofjdde\",\"parametersSchema\":\"rd\",\"urn\":\"pewnw\"},\"id\":\"eitjz\",\"name\":\"flusarhmof\",\"type\":\"qhsmyurkdtml\"}],\"nextLink\":\"ekuksjtx\"}") - .toObject(CapabilityListResult.class); + CapabilityListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"publisher\":\"vgjxpybczm\",\"targetType\":\"mtz\",\"description\":\"bsphrupidgsybbe\",\"parametersSchema\":\"ph\",\"urn\":\"cmsxaobhdxbm\"},\"id\":\"qioqjzehtbmu\",\"name\":\"p\",\"type\":\"wnoi\"},{\"properties\":{\"publisher\":\"rxybqsoq\",\"targetType\":\"gkdmb\",\"description\":\"zlobcufpd\",\"parametersSchema\":\"rbt\",\"urn\":\"qjnqglhqgnufoooj\"},\"id\":\"wifsq\",\"name\":\"saagdf\",\"type\":\"glzlhjxrifkwmrv\"},{\"properties\":{\"publisher\":\"zntocipaouajps\",\"targetType\":\"cmpoyfdkfogkny\",\"description\":\"ofjdde\",\"parametersSchema\":\"rd\",\"urn\":\"pewnw\"},\"id\":\"eitjz\",\"name\":\"flusarhmof\",\"type\":\"qhsmyurkdtml\"}],\"nextLink\":\"ekuksjtx\"}") + .toObject(CapabilityListResult.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityPropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityPropertiesTests.java index a40c0f86e689..0fcdc6236f37 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityPropertiesTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityPropertiesTests.java @@ -10,11 +10,9 @@ public final class CapabilityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CapabilityProperties model = - BinaryData - .fromString( - "{\"publisher\":\"wczbys\",\"targetType\":\"pqxu\",\"description\":\"vyq\",\"parametersSchema\":\"wby\",\"urn\":\"k\"}") - .toObject(CapabilityProperties.class); + CapabilityProperties model = BinaryData.fromString( + "{\"publisher\":\"wczbys\",\"targetType\":\"pqxu\",\"description\":\"vyq\",\"parametersSchema\":\"wby\",\"urn\":\"k\"}") + .toObject(CapabilityProperties.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypeInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypeInnerTests.java index 35b9529de72b..86ef79b9b254 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypeInnerTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypeInnerTests.java @@ -11,11 +11,9 @@ public final class CapabilityTypeInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CapabilityTypeInner model = - BinaryData - .fromString( - "{\"location\":\"huticndvkao\",\"properties\":{\"publisher\":\"i\",\"targetType\":\"yhxhu\",\"displayName\":\"k\",\"description\":\"yxolniwp\",\"parametersSchema\":\"ukjfkgiawxklr\",\"urn\":\"lwckbasyypnddhs\",\"kind\":\"bacphejko\",\"azureRbacActions\":[\"qgoulznd\",\"i\",\"wyqkgfgibm\"],\"azureRbacDataActions\":[\"akeqs\",\"xybz\"],\"runtimeProperties\":{\"kind\":\"dqytbciqfouflmm\"}},\"id\":\"kzsmodm\",\"name\":\"lougpbkw\",\"type\":\"mutduqktaps\"}") - .toObject(CapabilityTypeInner.class); + CapabilityTypeInner model = BinaryData.fromString( + "{\"location\":\"huticndvkao\",\"properties\":{\"publisher\":\"i\",\"targetType\":\"yhxhu\",\"displayName\":\"k\",\"description\":\"yxolniwp\",\"parametersSchema\":\"ukjfkgiawxklr\",\"urn\":\"lwckbasyypnddhs\",\"kind\":\"bacphejko\",\"azureRbacActions\":[\"qgoulznd\",\"i\",\"wyqkgfgibm\"],\"azureRbacDataActions\":[\"akeqs\",\"xybz\"],\"runtimeProperties\":{\"kind\":\"dqytbciqfouflmm\"}},\"id\":\"kzsmodm\",\"name\":\"lougpbkw\",\"type\":\"mutduqktaps\"}") + .toObject(CapabilityTypeInner.class); Assertions.assertEquals("huticndvkao", model.location()); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypeListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypeListResultTests.java index e5e3f3b7faf8..f217bc572f4c 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypeListResultTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypeListResultTests.java @@ -10,11 +10,9 @@ public final class CapabilityTypeListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CapabilityTypeListResult model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"jgrtfwvukxga\",\"properties\":{\"publisher\":\"cs\",\"targetType\":\"s\",\"displayName\":\"nyejhkryhtnap\",\"description\":\"wlokjyem\",\"parametersSchema\":\"vnipjox\",\"urn\":\"nchgej\",\"kind\":\"odmailzyd\",\"azureRbacActions\":[\"jwyahuxinpmqnja\"],\"azureRbacDataActions\":[\"xj\",\"prozvcputegjvwmf\",\"atscmd\",\"pjhulsuuvmkj\"],\"runtimeProperties\":{\"kind\":\"rwfndiod\"}},\"id\":\"pslwejdpvw\",\"name\":\"yoqpsoaccta\",\"type\":\"akl\"},{\"location\":\"hbcryffdfdosyge\",\"properties\":{\"publisher\":\"ojakhmsbzjhcrze\",\"targetType\":\"phlxa\",\"displayName\":\"thqt\",\"description\":\"qjbpfzfsin\",\"parametersSchema\":\"v\",\"urn\":\"jrwzox\",\"kind\":\"tfell\",\"azureRbacActions\":[\"zitonpeqfpjkjl\",\"ofpdvh\"],\"azureRbacDataActions\":[\"xypininmayhuybbk\",\"odepoogin\",\"vamih\"],\"runtimeProperties\":{\"kind\":\"narxzxtheotus\"}},\"id\":\"vyevcciqi\",\"name\":\"nhungbw\",\"type\":\"zrnf\"},{\"location\":\"gispemvtzfkufubl\",\"properties\":{\"publisher\":\"xqeofjaeqjhqjba\",\"targetType\":\"msmjqulngsntn\",\"displayName\":\"bkzgcwrwclx\",\"description\":\"rljdouskcqv\",\"parametersSchema\":\"cr\",\"urn\":\"dkwt\",\"kind\":\"xbnjbiksq\",\"azureRbacActions\":[\"ssainqpjwnzll\",\"fmppe\"],\"azureRbacDataActions\":[\"mgxsab\",\"yqduujit\"],\"runtimeProperties\":{\"kind\":\"zdzevndh\"}},\"id\":\"rwpdappdsbdkvwrw\",\"name\":\"feusnhut\",\"type\":\"eltmrldhugjzzdat\"}],\"nextLink\":\"hocdgeab\"}") - .toObject(CapabilityTypeListResult.class); + CapabilityTypeListResult model = BinaryData.fromString( + "{\"value\":[{\"location\":\"jgrtfwvukxga\",\"properties\":{\"publisher\":\"cs\",\"targetType\":\"s\",\"displayName\":\"nyejhkryhtnap\",\"description\":\"wlokjyem\",\"parametersSchema\":\"vnipjox\",\"urn\":\"nchgej\",\"kind\":\"odmailzyd\",\"azureRbacActions\":[\"jwyahuxinpmqnja\"],\"azureRbacDataActions\":[\"xj\",\"prozvcputegjvwmf\",\"atscmd\",\"pjhulsuuvmkj\"],\"runtimeProperties\":{\"kind\":\"rwfndiod\"}},\"id\":\"pslwejdpvw\",\"name\":\"yoqpsoaccta\",\"type\":\"akl\"},{\"location\":\"hbcryffdfdosyge\",\"properties\":{\"publisher\":\"ojakhmsbzjhcrze\",\"targetType\":\"phlxa\",\"displayName\":\"thqt\",\"description\":\"qjbpfzfsin\",\"parametersSchema\":\"v\",\"urn\":\"jrwzox\",\"kind\":\"tfell\",\"azureRbacActions\":[\"zitonpeqfpjkjl\",\"ofpdvh\"],\"azureRbacDataActions\":[\"xypininmayhuybbk\",\"odepoogin\",\"vamih\"],\"runtimeProperties\":{\"kind\":\"narxzxtheotus\"}},\"id\":\"vyevcciqi\",\"name\":\"nhungbw\",\"type\":\"zrnf\"},{\"location\":\"gispemvtzfkufubl\",\"properties\":{\"publisher\":\"xqeofjaeqjhqjba\",\"targetType\":\"msmjqulngsntn\",\"displayName\":\"bkzgcwrwclx\",\"description\":\"rljdouskcqv\",\"parametersSchema\":\"cr\",\"urn\":\"dkwt\",\"kind\":\"xbnjbiksq\",\"azureRbacActions\":[\"ssainqpjwnzll\",\"fmppe\"],\"azureRbacDataActions\":[\"mgxsab\",\"yqduujit\"],\"runtimeProperties\":{\"kind\":\"zdzevndh\"}},\"id\":\"rwpdappdsbdkvwrw\",\"name\":\"feusnhut\",\"type\":\"eltmrldhugjzzdat\"}],\"nextLink\":\"hocdgeab\"}") + .toObject(CapabilityTypeListResult.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypePropertiesRuntimePropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypePropertiesRuntimePropertiesTests.java index eea6de579339..4d7aa0103811 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypePropertiesRuntimePropertiesTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypePropertiesRuntimePropertiesTests.java @@ -10,10 +10,8 @@ public final class CapabilityTypePropertiesRuntimePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CapabilityTypePropertiesRuntimeProperties model = - BinaryData - .fromString("{\"kind\":\"uhmuouqfprwzwbn\"}") - .toObject(CapabilityTypePropertiesRuntimeProperties.class); + CapabilityTypePropertiesRuntimeProperties model = BinaryData.fromString("{\"kind\":\"uhmuouqfprwzwbn\"}") + .toObject(CapabilityTypePropertiesRuntimeProperties.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypePropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypePropertiesTests.java index b71a9ea9af7f..5d7b16915c7b 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypePropertiesTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypePropertiesTests.java @@ -13,20 +13,17 @@ public final class CapabilityTypePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CapabilityTypeProperties model = - BinaryData - .fromString( - "{\"publisher\":\"gcue\",\"targetType\":\"umkdosvqwhbmd\",\"displayName\":\"bjf\",\"description\":\"gmbmbexppbh\",\"parametersSchema\":\"qrolfpf\",\"urn\":\"algbquxigjyjg\",\"kind\":\"aoyfhrtxilnerkuj\",\"azureRbacActions\":[\"l\",\"juvf\",\"awrlyx\"],\"azureRbacDataActions\":[\"cpr\",\"nwbxgjvtbvpyssz\"],\"runtimeProperties\":{\"kind\":\"uj\"}}") - .toObject(CapabilityTypeProperties.class); + CapabilityTypeProperties model = BinaryData.fromString( + "{\"publisher\":\"gcue\",\"targetType\":\"umkdosvqwhbmd\",\"displayName\":\"bjf\",\"description\":\"gmbmbexppbh\",\"parametersSchema\":\"qrolfpf\",\"urn\":\"algbquxigjyjg\",\"kind\":\"aoyfhrtxilnerkuj\",\"azureRbacActions\":[\"l\",\"juvf\",\"awrlyx\"],\"azureRbacDataActions\":[\"cpr\",\"nwbxgjvtbvpyssz\"],\"runtimeProperties\":{\"kind\":\"uj\"}}") + .toObject(CapabilityTypeProperties.class); Assertions.assertEquals("l", model.azureRbacActions().get(0)); Assertions.assertEquals("cpr", model.azureRbacDataActions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CapabilityTypeProperties model = - new CapabilityTypeProperties() - .withAzureRbacActions(Arrays.asList("l", "juvf", "awrlyx")) + CapabilityTypeProperties model + = new CapabilityTypeProperties().withAzureRbacActions(Arrays.asList("l", "juvf", "awrlyx")) .withAzureRbacDataActions(Arrays.asList("cpr", "nwbxgjvtbvpyssz")) .withRuntimeProperties(new CapabilityTypePropertiesRuntimeProperties()); model = BinaryData.fromObject(model).toObject(CapabilityTypeProperties.class); diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesGetWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesGetWithResponseMockTests.java index a6097005c5ab..d5e7a7184b75 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesGetWithResponseMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesGetWithResponseMockTests.java @@ -30,41 +30,28 @@ public void testGetWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"location\":\"hftqsxhqxujxukn\",\"properties\":{\"publisher\":\"igrjguufzdm\",\"targetType\":\"qtfihwhbotzinga\",\"displayName\":\"pph\",\"description\":\"zqzudph\",\"parametersSchema\":\"mvdk\",\"urn\":\"ynwcvtbv\",\"kind\":\"yhmtnvyqiat\",\"azureRbacActions\":[\"pcnp\"],\"azureRbacDataActions\":[\"jaesgvvsccya\",\"g\",\"qfhwyg\"],\"runtimeProperties\":{\"kind\":\"dnkfx\"}},\"id\":\"semdwzrmu\",\"name\":\"apfcqdpsq\",\"type\":\"qvpsvuoymg\"}"; + String responseStr + = "{\"location\":\"csnjvcdwxlpqekft\",\"properties\":{\"publisher\":\"tjsyin\",\"targetType\":\"fq\",\"displayName\":\"mtdh\",\"description\":\"dvypgikdgsz\",\"parametersSchema\":\"kbir\",\"urn\":\"uzhlhkjoqrv\",\"kind\":\"aatjinrvgoupmfi\",\"azureRbacActions\":[\"ggjioolvr\",\"x\",\"v\"],\"azureRbacDataActions\":[\"gllqwjy\"],\"runtimeProperties\":{\"kind\":\"ayvblmhvkzuhbx\"}},\"id\":\"vyhgs\",\"name\":\"pbyrqufegxu\",\"type\":\"wz\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - CapabilityType response = - manager - .capabilityTypes() - .getWithResponse("hfkvtvsexsowuel", "qhhahhxvrhmzkwpj", "wws", com.azure.core.util.Context.NONE) - .getValue(); + CapabilityType response = manager.capabilityTypes() + .getWithResponse("vezrypqlmfeo", "erqwkyhkobopg", "edkowepbqpcrfk", com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals("hftqsxhqxujxukn", response.location()); + Assertions.assertEquals("csnjvcdwxlpqekft", response.location()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesListMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesListMockTests.java index 46f910742c57..44f7ccf5e705 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesListMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CapabilityTypesListMockTests.java @@ -31,38 +31,27 @@ public void testList() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"location\":\"smwutwbdsrezpd\",\"properties\":{\"publisher\":\"euyowqkd\",\"targetType\":\"t\",\"displayName\":\"ib\",\"description\":\"cgpik\",\"parametersSchema\":\"imejzanl\",\"urn\":\"xi\",\"kind\":\"rmbzo\",\"azureRbacActions\":[\"i\",\"rjqc\"],\"azureRbacDataActions\":[\"zpfrla\",\"szrnwo\"],\"runtimeProperties\":{\"kind\":\"dfpwpjylwbtlhfls\"}},\"id\":\"cdhszf\",\"name\":\"vfbgofeljagrqmqh\",\"type\":\"dvriiiojnal\"}]}"; + String responseStr + = "{\"value\":[{\"location\":\"sexso\",\"properties\":{\"publisher\":\"luqhhahhxv\",\"targetType\":\"mzkwpjg\",\"displayName\":\"spughftqsxhq\",\"description\":\"j\",\"parametersSchema\":\"kndxdigrjgu\",\"urn\":\"zdmsyqtfi\",\"kind\":\"hbotzingamvppho\",\"azureRbacActions\":[\"zudphqamvdkfw\",\"nwcvtbvkayhmtnv\"],\"azureRbacDataActions\":[\"atkzwpcnpw\",\"cjaesgvvs\",\"cyajguqf\"],\"runtimeProperties\":{\"kind\":\"gzlvdnkfxu\"}},\"id\":\"emdwzrmuhapfc\",\"name\":\"dpsqx\",\"type\":\"vpsvuoymgcce\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = - manager.capabilityTypes().list("wrv", "ldgmfpgvmpip", "slthaq", com.azure.core.util.Context.NONE); + PagedIterable response = manager.capabilityTypes().list("jvfbgofelja", "rqmq", + "ldvriiiojnalghfk", com.azure.core.util.Context.NONE); - Assertions.assertEquals("smwutwbdsrezpd", response.iterator().next().location()); + Assertions.assertEquals("sexso", response.iterator().next().location()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosExperimentActionTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosExperimentActionTests.java index f9a3e0c713c1..b68fefea7b58 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosExperimentActionTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosExperimentActionTests.java @@ -11,9 +11,8 @@ public final class ChaosExperimentActionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ChaosExperimentAction model = - BinaryData - .fromString("{\"type\":\"ChaosExperimentAction\",\"name\":\"nrjawgqwg\"}") + ChaosExperimentAction model + = BinaryData.fromString("{\"type\":\"ChaosExperimentAction\",\"name\":\"nrjawgqwg\"}") .toObject(ChaosExperimentAction.class); Assertions.assertEquals("nrjawgqwg", model.name()); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosExperimentBranchTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosExperimentBranchTests.java index d45e9d95d3fa..5cfee040ba42 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosExperimentBranchTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosExperimentBranchTests.java @@ -13,27 +13,19 @@ public final class ChaosExperimentBranchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ChaosExperimentBranch model = - BinaryData - .fromString( - "{\"name\":\"ovbvmeueciv\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"zceuojgjrw\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"ueiotwmcdyt\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"x\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"it\"}]}") - .toObject(ChaosExperimentBranch.class); + ChaosExperimentBranch model = BinaryData.fromString( + "{\"name\":\"ovbvmeueciv\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"zceuojgjrw\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"ueiotwmcdyt\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"x\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"it\"}]}") + .toObject(ChaosExperimentBranch.class); Assertions.assertEquals("ovbvmeueciv", model.name()); Assertions.assertEquals("zceuojgjrw", model.actions().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChaosExperimentBranch model = - new ChaosExperimentBranch() - .withName("ovbvmeueciv") - .withActions( - Arrays - .asList( - new ChaosExperimentAction().withName("zceuojgjrw"), - new ChaosExperimentAction().withName("ueiotwmcdyt"), - new ChaosExperimentAction().withName("x"), - new ChaosExperimentAction().withName("it"))); + ChaosExperimentBranch model = new ChaosExperimentBranch().withName("ovbvmeueciv") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("zceuojgjrw"), + new ChaosExperimentAction().withName("ueiotwmcdyt"), new ChaosExperimentAction().withName("x"), + new ChaosExperimentAction().withName("it"))); model = BinaryData.fromObject(model).toObject(ChaosExperimentBranch.class); Assertions.assertEquals("ovbvmeueciv", model.name()); Assertions.assertEquals("zceuojgjrw", model.actions().get(0).name()); diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosExperimentStepTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosExperimentStepTests.java index fad7bd762833..d90372a6000f 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosExperimentStepTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosExperimentStepTests.java @@ -14,11 +14,9 @@ public final class ChaosExperimentStepTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ChaosExperimentStep model = - BinaryData - .fromString( - "{\"name\":\"bnbbeldawkz\",\"branches\":[{\"name\":\"liourqhak\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"hashsfwxosow\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"xcug\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"cjooxdjebwpucwwf\"}]}]}") - .toObject(ChaosExperimentStep.class); + ChaosExperimentStep model = BinaryData.fromString( + "{\"name\":\"bnbbeldawkz\",\"branches\":[{\"name\":\"liourqhak\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"hashsfwxosow\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"xcug\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"cjooxdjebwpucwwf\"}]}]}") + .toObject(ChaosExperimentStep.class); Assertions.assertEquals("bnbbeldawkz", model.name()); Assertions.assertEquals("liourqhak", model.branches().get(0).name()); Assertions.assertEquals("hashsfwxosow", model.branches().get(0).actions().get(0).name()); @@ -26,20 +24,11 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChaosExperimentStep model = - new ChaosExperimentStep() - .withName("bnbbeldawkz") - .withBranches( - Arrays - .asList( - new ChaosExperimentBranch() - .withName("liourqhak") - .withActions( - Arrays - .asList( - new ChaosExperimentAction().withName("hashsfwxosow"), - new ChaosExperimentAction().withName("xcug"), - new ChaosExperimentAction().withName("cjooxdjebwpucwwf"))))); + ChaosExperimentStep model = new ChaosExperimentStep().withName("bnbbeldawkz") + .withBranches(Arrays.asList(new ChaosExperimentBranch().withName("liourqhak") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("hashsfwxosow"), + new ChaosExperimentAction().withName("xcug"), + new ChaosExperimentAction().withName("cjooxdjebwpucwwf"))))); model = BinaryData.fromObject(model).toObject(ChaosExperimentStep.class); Assertions.assertEquals("bnbbeldawkz", model.name()); Assertions.assertEquals("liourqhak", model.branches().get(0).name()); diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetFilterTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetFilterTests.java index 8a16b9eaa2be..38099d620262 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetFilterTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetFilterTests.java @@ -10,8 +10,8 @@ public final class ChaosTargetFilterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ChaosTargetFilter model = - BinaryData.fromString("{\"type\":\"ChaosTargetFilter\"}").toObject(ChaosTargetFilter.class); + ChaosTargetFilter model + = BinaryData.fromString("{\"type\":\"ChaosTargetFilter\"}").toObject(ChaosTargetFilter.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetListSelectorTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetListSelectorTests.java index afb7463345bf..586faac4cc5f 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetListSelectorTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetListSelectorTests.java @@ -15,29 +15,25 @@ public final class ChaosTargetListSelectorTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ChaosTargetListSelector model = - BinaryData - .fromString( - "{\"type\":\"List\",\"targets\":[{\"type\":\"ChaosTarget\",\"id\":\"grauwjuetaebur\"}],\"id\":\"vdmovsmzlxwabm\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"vtpuqujmqlgk\":\"datakif\",\"ongbjcnt\":\"databtndo\"}}") - .toObject(ChaosTargetListSelector.class); - Assertions.assertEquals("vdmovsmzlxwabm", model.id()); + ChaosTargetListSelector model = BinaryData.fromString( + "{\"type\":\"List\",\"targets\":[{\"type\":\"ChaosTarget\",\"id\":\"puqujmqlgkfbtn\"},{\"type\":\"ChaosTarget\",\"id\":\"aongbj\"},{\"type\":\"ChaosTarget\",\"id\":\"tujitcjedft\"}],\"id\":\"waezkojvd\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"oxciqopidoamcio\":\"dataoqouicybxarzgszu\",\"zxkhnzbonlwnto\":\"datahkh\",\"zcmrvexztvb\":\"datagokdwbwhks\"}}") + .toObject(ChaosTargetListSelector.class); + Assertions.assertEquals("waezkojvd", model.id()); Assertions.assertEquals(TargetReferenceType.CHAOS_TARGET, model.targets().get(0).type()); - Assertions.assertEquals("grauwjuetaebur", model.targets().get(0).id()); + Assertions.assertEquals("puqujmqlgkfbtn", model.targets().get(0).id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChaosTargetListSelector model = - new ChaosTargetListSelector() - .withId("vdmovsmzlxwabm") - .withFilter(new ChaosTargetFilter()) - .withTargets( - Arrays - .asList( - new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("grauwjuetaebur"))); + ChaosTargetListSelector model + = new ChaosTargetListSelector().withId("waezkojvd").withFilter(new ChaosTargetFilter()) + .withTargets(Arrays.asList( + new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("puqujmqlgkfbtn"), + new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("aongbj"), + new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("tujitcjedft"))); model = BinaryData.fromObject(model).toObject(ChaosTargetListSelector.class); - Assertions.assertEquals("vdmovsmzlxwabm", model.id()); + Assertions.assertEquals("waezkojvd", model.id()); Assertions.assertEquals(TargetReferenceType.CHAOS_TARGET, model.targets().get(0).type()); - Assertions.assertEquals("grauwjuetaebur", model.targets().get(0).id()); + Assertions.assertEquals("puqujmqlgkfbtn", model.targets().get(0).id()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetQuerySelectorTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetQuerySelectorTests.java index ba178421b226..f16e0d69e92f 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetQuerySelectorTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetQuerySelectorTests.java @@ -13,27 +13,22 @@ public final class ChaosTargetQuerySelectorTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ChaosTargetQuerySelector model = - BinaryData - .fromString( - "{\"type\":\"Query\",\"queryString\":\"c\",\"subscriptionIds\":[\"df\"],\"id\":\"wwa\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"bxarzgszufoxci\":\"datajvdcpzfoqouic\",\"haz\":\"dataopidoamciodh\",\"toego\":\"datakhnzbonlw\"}}") - .toObject(ChaosTargetQuerySelector.class); - Assertions.assertEquals("wwa", model.id()); - Assertions.assertEquals("c", model.queryString()); - Assertions.assertEquals("df", model.subscriptionIds().get(0)); + ChaosTargetQuerySelector model = BinaryData.fromString( + "{\"type\":\"Query\",\"queryString\":\"lmnguxaw\",\"subscriptionIds\":[\"ldsyuuximerqfob\",\"yznkby\"],\"id\":\"utwpfhp\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"kdsnfdsdoakgtdl\":\"datar\",\"dlhewp\":\"datakkze\",\"bbejdcngqqm\":\"datasdsttwvog\"}}") + .toObject(ChaosTargetQuerySelector.class); + Assertions.assertEquals("utwpfhp", model.id()); + Assertions.assertEquals("lmnguxaw", model.queryString()); + Assertions.assertEquals("ldsyuuximerqfob", model.subscriptionIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChaosTargetQuerySelector model = - new ChaosTargetQuerySelector() - .withId("wwa") - .withFilter(new ChaosTargetFilter()) - .withQueryString("c") - .withSubscriptionIds(Arrays.asList("df")); + ChaosTargetQuerySelector model + = new ChaosTargetQuerySelector().withId("utwpfhp").withFilter(new ChaosTargetFilter()) + .withQueryString("lmnguxaw").withSubscriptionIds(Arrays.asList("ldsyuuximerqfob", "yznkby")); model = BinaryData.fromObject(model).toObject(ChaosTargetQuerySelector.class); - Assertions.assertEquals("wwa", model.id()); - Assertions.assertEquals("c", model.queryString()); - Assertions.assertEquals("df", model.subscriptionIds().get(0)); + Assertions.assertEquals("utwpfhp", model.id()); + Assertions.assertEquals("lmnguxaw", model.queryString()); + Assertions.assertEquals("ldsyuuximerqfob", model.subscriptionIds().get(0)); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetSelectorTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetSelectorTests.java index f366ad1f40cd..b8422912999c 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetSelectorTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetSelectorTests.java @@ -14,21 +14,16 @@ public final class ChaosTargetSelectorTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ChaosTargetSelector model = - BinaryData - .fromString( - "{\"type\":\"ChaosTargetSelector\",\"id\":\"hniskxfbkpyc\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"auwhvylwzbtdhx\":\"datandnhj\",\"pow\":\"datajznb\"}}") - .toObject(ChaosTargetSelector.class); + ChaosTargetSelector model = BinaryData.fromString( + "{\"type\":\"ChaosTargetSelector\",\"id\":\"hniskxfbkpyc\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"auwhvylwzbtdhx\":\"datandnhj\",\"pow\":\"datajznb\"}}") + .toObject(ChaosTargetSelector.class); Assertions.assertEquals("hniskxfbkpyc", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChaosTargetSelector model = - new ChaosTargetSelector() - .withId("hniskxfbkpyc") - .withFilter(new ChaosTargetFilter()) - .withAdditionalProperties(mapOf("type", "ChaosTargetSelector")); + ChaosTargetSelector model = new ChaosTargetSelector().withId("hniskxfbkpyc").withFilter(new ChaosTargetFilter()) + .withAdditionalProperties(mapOf("type", "ChaosTargetSelector")); model = BinaryData.fromObject(model).toObject(ChaosTargetSelector.class); Assertions.assertEquals("hniskxfbkpyc", model.id()); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetSimpleFilterParametersTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetSimpleFilterParametersTests.java index 9312f6aceb55..4b83faaefc24 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetSimpleFilterParametersTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetSimpleFilterParametersTests.java @@ -12,18 +12,17 @@ public final class ChaosTargetSimpleFilterParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ChaosTargetSimpleFilterParameters model = - BinaryData - .fromString("{\"zones\":[\"sfraoyzko\",\"wtl\",\"nguxawqaldsy\"]}") + ChaosTargetSimpleFilterParameters model + = BinaryData.fromString("{\"zones\":[\"hhziuief\",\"zbhd\",\"smlmzqhoftrm\",\"equi\"]}") .toObject(ChaosTargetSimpleFilterParameters.class); - Assertions.assertEquals("sfraoyzko", model.zones().get(0)); + Assertions.assertEquals("hhziuief", model.zones().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChaosTargetSimpleFilterParameters model = - new ChaosTargetSimpleFilterParameters().withZones(Arrays.asList("sfraoyzko", "wtl", "nguxawqaldsy")); + ChaosTargetSimpleFilterParameters model = new ChaosTargetSimpleFilterParameters() + .withZones(Arrays.asList("hhziuief", "zbhd", "smlmzqhoftrm", "equi")); model = BinaryData.fromObject(model).toObject(ChaosTargetSimpleFilterParameters.class); - Assertions.assertEquals("sfraoyzko", model.zones().get(0)); + Assertions.assertEquals("hhziuief", model.zones().get(0)); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetSimpleFilterTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetSimpleFilterTests.java index 064067fa0242..2362ff719dd6 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetSimpleFilterTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ChaosTargetSimpleFilterTests.java @@ -13,19 +13,17 @@ public final class ChaosTargetSimpleFilterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ChaosTargetSimpleFilter model = - BinaryData - .fromString("{\"type\":\"Simple\",\"parameters\":{\"zones\":[\"whkszzcmrvexztvb\"]}}") - .toObject(ChaosTargetSimpleFilter.class); - Assertions.assertEquals("whkszzcmrvexztvb", model.parameters().zones().get(0)); + ChaosTargetSimpleFilter model = BinaryData + .fromString("{\"type\":\"Simple\",\"parameters\":{\"zones\":[\"fgmjzrwrdgrt\",\"aenuuz\",\"opbminrfdw\"]}}") + .toObject(ChaosTargetSimpleFilter.class); + Assertions.assertEquals("fgmjzrwrdgrt", model.parameters().zones().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChaosTargetSimpleFilter model = - new ChaosTargetSimpleFilter() - .withParameters(new ChaosTargetSimpleFilterParameters().withZones(Arrays.asList("whkszzcmrvexztvb"))); + ChaosTargetSimpleFilter model = new ChaosTargetSimpleFilter().withParameters( + new ChaosTargetSimpleFilterParameters().withZones(Arrays.asList("fgmjzrwrdgrt", "aenuuz", "opbminrfdw"))); model = BinaryData.fromObject(model).toObject(ChaosTargetSimpleFilter.class); - Assertions.assertEquals("whkszzcmrvexztvb", model.parameters().zones().get(0)); + Assertions.assertEquals("fgmjzrwrdgrt", model.parameters().zones().get(0)); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DelayActionTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DelayActionTests.java index 7744e7062441..f2a274939e8a 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DelayActionTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DelayActionTests.java @@ -12,19 +12,17 @@ public final class DelayActionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DelayAction model = - BinaryData - .fromString("{\"type\":\"delay\",\"duration\":\"PT221H14M7S\",\"name\":\"ormrlxqtvcofudfl\"}") - .toObject(DelayAction.class); - Assertions.assertEquals("ormrlxqtvcofudfl", model.name()); - Assertions.assertEquals(Duration.parse("PT221H14M7S"), model.duration()); + DelayAction model = BinaryData.fromString("{\"type\":\"delay\",\"duration\":\"PT185H37M50S\",\"name\":\"l\"}") + .toObject(DelayAction.class); + Assertions.assertEquals("l", model.name()); + Assertions.assertEquals(Duration.parse("PT185H37M50S"), model.duration()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DelayAction model = new DelayAction().withName("ormrlxqtvcofudfl").withDuration(Duration.parse("PT221H14M7S")); + DelayAction model = new DelayAction().withName("l").withDuration(Duration.parse("PT185H37M50S")); model = BinaryData.fromObject(model).toObject(DelayAction.class); - Assertions.assertEquals("ormrlxqtvcofudfl", model.name()); - Assertions.assertEquals(Duration.parse("PT221H14M7S"), model.duration()); + Assertions.assertEquals("l", model.name()); + Assertions.assertEquals(Duration.parse("PT185H37M50S"), model.duration()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsInnerTests.java index 5db8e88ce721..670c59416742 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsInnerTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsInnerTests.java @@ -10,11 +10,9 @@ public final class ExperimentExecutionDetailsInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExperimentExecutionDetailsInner model = - BinaryData - .fromString( - "{\"type\":\"xznelixhnrztf\",\"id\":\"hb\",\"name\":\"knalaulppg\",\"properties\":{\"failureReason\":\"pnapnyiropuh\",\"lastActionAt\":\"2020-12-20T18:46:56Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"lgqg\",\"stepId\":\"xmedjvcsly\",\"status\":\"wwncwzzhxgk\",\"branches\":[{},{}]},{\"stepName\":\"ucnapkteoellwp\",\"stepId\":\"d\",\"status\":\"pfqbuaceopzf\",\"branches\":[{},{}]},{\"stepName\":\"uaopppcqeq\",\"stepId\":\"lzdahzxctobgbkdm\",\"status\":\"zpostmgrcfbu\",\"branches\":[{},{},{}]},{\"stepName\":\"qjhhkxbpv\",\"stepId\":\"mjh\",\"status\":\"j\",\"branches\":[{},{},{},{}]}]},\"status\":\"divkrt\",\"startedAt\":\"2021-11-23T03:43:54Z\",\"stoppedAt\":\"2021-05-30T10:12:47Z\"}}") - .toObject(ExperimentExecutionDetailsInner.class); + ExperimentExecutionDetailsInner model = BinaryData.fromString( + "{\"type\":\"tfdygpfqb\",\"id\":\"ceopzfqrhhuaopp\",\"name\":\"qeqxo\",\"properties\":{\"failureReason\":\"ahzxctobgbk\",\"lastActionAt\":\"2021-03-02T22:54:24Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"stmgrcfbunrmfqjh\",\"stepId\":\"xbpvjymjhx\",\"status\":\"yngudivk\",\"branches\":[{},{}]},{\"stepName\":\"bxqz\",\"stepId\":\"zjf\",\"status\":\"vjfdx\",\"branches\":[{},{}]},{\"stepName\":\"tvtc\",\"stepId\":\"qtdo\",\"status\":\"cbxvwvxyslqbh\",\"branches\":[{},{},{}]},{\"stepName\":\"blytk\",\"stepId\":\"mpew\",\"status\":\"fbkrvrnsvs\",\"branches\":[{},{}]}]},\"status\":\"hxcr\",\"startedAt\":\"2020-12-28T12:25:09Z\",\"stoppedAt\":\"2021-11-28T02:47:56Z\"}}") + .toObject(ExperimentExecutionDetailsInner.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsPropertiesRunInformationTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsPropertiesRunInformationTests.java index 2b2ea3580c89..f87544138491 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsPropertiesRunInformationTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsPropertiesRunInformationTests.java @@ -10,17 +10,15 @@ public final class ExperimentExecutionDetailsPropertiesRunInformationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExperimentExecutionDetailsPropertiesRunInformation model = - BinaryData - .fromString( - "{\"steps\":[{\"stepName\":\"tdss\",\"stepId\":\"wtmwerio\",\"status\":\"pyqs\",\"branches\":[{\"branchName\":\"bnetshh\",\"branchId\":\"h\",\"status\":\"plvwiwubmwmbes\",\"actions\":[{}]}]},{\"stepName\":\"wwtppj\",\"stepId\":\"cxogaokonzm\",\"status\":\"ikvmkqzeqqk\",\"branches\":[{\"branchName\":\"zxmhhvhgu\",\"branchId\":\"odkwobd\",\"status\":\"xtibqdxbxwakbog\",\"actions\":[{},{},{}]}]},{\"stepName\":\"lkzgxhuriplbp\",\"stepId\":\"xunkbebxmubyynt\",\"status\":\"rbqtkoie\",\"branches\":[{\"branchName\":\"tgqr\",\"branchId\":\"tmuwlauwzi\",\"status\":\"bm\",\"actions\":[{},{}]}]}]}") - .toObject(ExperimentExecutionDetailsPropertiesRunInformation.class); + ExperimentExecutionDetailsPropertiesRunInformation model = BinaryData.fromString( + "{\"steps\":[{\"stepName\":\"efuzmuvpbttd\",\"stepId\":\"orppxebmnzbtb\",\"status\":\"pglkf\",\"branches\":[{\"branchName\":\"neuelfphsdyhtoz\",\"branchId\":\"kd\",\"status\":\"wq\",\"actions\":[{}]},{\"branchName\":\"zx\",\"branchId\":\"vithh\",\"status\":\"o\",\"actions\":[{}]},{\"branchName\":\"gbhcohfwdsj\",\"branchId\":\"aljutiiswac\",\"status\":\"gdkz\",\"actions\":[{},{},{},{}]}]},{\"stepName\":\"fvhqc\",\"stepId\":\"ilvpnppfuflrwd\",\"status\":\"dlxyjrxs\",\"branches\":[{\"branchName\":\"cnihgwqapnedgfbc\",\"branchId\":\"cvqvpkeqdcv\",\"status\":\"hvoodsotbobzd\",\"actions\":[{},{}]},{\"branchName\":\"wvnhdldwmgx\",\"branchId\":\"rslpmutwuoeg\",\"status\":\"khjwn\",\"actions\":[{},{}]}]}]}") + .toObject(ExperimentExecutionDetailsPropertiesRunInformation.class); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExperimentExecutionDetailsPropertiesRunInformation model = - new ExperimentExecutionDetailsPropertiesRunInformation(); + ExperimentExecutionDetailsPropertiesRunInformation model + = new ExperimentExecutionDetailsPropertiesRunInformation(); model = BinaryData.fromObject(model).toObject(ExperimentExecutionDetailsPropertiesRunInformation.class); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsPropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsPropertiesTests.java index 0aad76abe627..a4e513fabb73 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsPropertiesTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionDetailsPropertiesTests.java @@ -10,11 +10,9 @@ public final class ExperimentExecutionDetailsPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExperimentExecutionDetailsProperties model = - BinaryData - .fromString( - "{\"failureReason\":\"vszjfauvjfdxxi\",\"lastActionAt\":\"2021-01-09T05:59Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"aqtdoqmcbx\",\"stepId\":\"vxysl\",\"status\":\"hsfxoblytkb\",\"branches\":[{\"branchName\":\"wwwfbkr\",\"branchId\":\"nsvs\",\"status\":\"johxcrsb\",\"actions\":[{},{},{}]}]},{\"stepName\":\"srruvwbhsqfsubcg\",\"stepId\":\"irx\",\"status\":\"ybsrfbjfdtwss\",\"branches\":[{\"branchName\":\"pvjzbe\",\"branchId\":\"l\",\"status\":\"nfqqnvwp\",\"actions\":[{},{},{}]},{\"branchName\":\"ruoujmk\",\"branchId\":\"hwqytj\",\"status\":\"bnw\",\"actions\":[{},{},{},{}]},{\"branchName\":\"drjervnaenqpehin\",\"branchId\":\"ygmi\",\"status\":\"hnzdndslgnayqi\",\"actions\":[{},{},{},{}]}]},{\"stepName\":\"uhavhql\",\"stepId\":\"humaqolbgyc\",\"status\":\"iertgccymvaolp\",\"branches\":[{\"branchName\":\"lfmmdnbbglzpswi\",\"branchId\":\"mcwyhzdxssadb\",\"status\":\"nvdfznuda\",\"actions\":[{},{}]},{\"branchName\":\"zbn\",\"branchId\":\"lylpstdb\",\"status\":\"xsrz\",\"actions\":[{},{},{},{}]}]}]},\"status\":\"erscdntne\",\"startedAt\":\"2021-04-19T04:18:41Z\",\"stoppedAt\":\"2021-05-10T05:26:40Z\"}") - .toObject(ExperimentExecutionDetailsProperties.class); + ExperimentExecutionDetailsProperties model = BinaryData.fromString( + "{\"failureReason\":\"srruvwbhsqfsubcg\",\"lastActionAt\":\"2021-02-04T22:06:27Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"ybsrfbjfdtwss\",\"stepId\":\"ftpvjzbexil\",\"status\":\"nfqqnvwp\",\"branches\":[{\"branchName\":\"ruoujmk\",\"branchId\":\"hwqytj\",\"status\":\"bnw\",\"actions\":[{},{},{},{}]},{\"branchName\":\"drjervnaenqpehin\",\"branchId\":\"ygmi\",\"status\":\"hnzdndslgnayqi\",\"actions\":[{},{},{},{}]},{\"branchName\":\"uhavhql\",\"branchId\":\"humaqolbgyc\",\"status\":\"iertgccymvaolp\",\"actions\":[{},{}]}]},{\"stepName\":\"lfmmdnbbglzpswi\",\"stepId\":\"mcwyhzdxssadb\",\"status\":\"nvdfznuda\",\"branches\":[{\"branchName\":\"zbn\",\"branchId\":\"lylpstdb\",\"status\":\"xsrz\",\"actions\":[{},{},{},{}]},{\"branchName\":\"erscdntne\",\"branchId\":\"iwjmygtdssls\",\"status\":\"mweriofzpy\",\"actions\":[{},{}]}]},{\"stepName\":\"wab\",\"stepId\":\"tshhszhedp\",\"status\":\"wiwubm\",\"branches\":[{\"branchName\":\"sldnkwwtppjflcxo\",\"branchId\":\"okonzmnsikvmkqz\",\"status\":\"qkdltfz\",\"actions\":[{}]},{\"branchName\":\"v\",\"branchId\":\"ur\",\"status\":\"dkwobdagx\",\"actions\":[{},{}]},{\"branchName\":\"dxbx\",\"branchId\":\"kbogqxndlkzgx\",\"status\":\"ripl\",\"actions\":[{},{}]},{\"branchName\":\"xunkbebxmubyynt\",\"branchId\":\"rbqtkoie\",\"status\":\"eotg\",\"actions\":[{}]}]}]},\"status\":\"tmuwlauwzi\",\"startedAt\":\"2021-01-24T11:46:23Z\",\"stoppedAt\":\"2021-03-14T00:48:06Z\"}") + .toObject(ExperimentExecutionDetailsProperties.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionInnerTests.java index 6188858cc8c9..bf0ce793e286 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionInnerTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionInnerTests.java @@ -10,11 +10,9 @@ public final class ExperimentExecutionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExperimentExecutionInner model = - BinaryData - .fromString( - "{\"type\":\"ttouwaboekqvkel\",\"id\":\"mvb\",\"name\":\"yjsflhhcaalnji\",\"properties\":{\"status\":\"xyawj\",\"startedAt\":\"2021-08-07T05:01:18Z\",\"stoppedAt\":\"2021-10-05T03:46:28Z\"}}") - .toObject(ExperimentExecutionInner.class); + ExperimentExecutionInner model = BinaryData.fromString( + "{\"type\":\"tpnapnyiropuhpig\",\"id\":\"gylgqgitxmedjvcs\",\"name\":\"n\",\"properties\":{\"status\":\"ncw\",\"startedAt\":\"2021-09-15T03:16:23Z\",\"stoppedAt\":\"2021-03-30T03:40:31Z\"}}") + .toObject(ExperimentExecutionInner.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionListResultTests.java index ae27b76dd691..beee7877c53c 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionListResultTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionListResultTests.java @@ -10,11 +10,9 @@ public final class ExperimentExecutionListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExperimentExecutionListResult model = - BinaryData - .fromString( - "{\"value\":[{\"type\":\"xiebwwaloayqcg\",\"id\":\"tzjuzgwyzmhtxo\",\"name\":\"mtsavjcbpwxqp\",\"properties\":{\"status\":\"nftguvriuhpr\",\"startedAt\":\"2021-02-04T08:02:16Z\",\"stoppedAt\":\"2021-06-28T04:39:12Z\"}},{\"type\":\"qtayri\",\"id\":\"ro\",\"name\":\"bexrmcq\",\"properties\":{\"status\":\"cnojvknmefqsg\",\"startedAt\":\"2021-11-18T15:54:51Z\",\"stoppedAt\":\"2021-11-22T14:09:07Z\"}},{\"type\":\"jyzhpvgq\",\"id\":\"j\",\"name\":\"xdjzlmwlxk\",\"properties\":{\"status\":\"fhzovawjvzunluth\",\"startedAt\":\"2021-01-21T11:08:17Z\",\"stoppedAt\":\"2021-03-11T05:06:45Z\"}},{\"type\":\"i\",\"id\":\"ilpjzuaejxdult\",\"name\":\"zbbtdzumveek\",\"properties\":{\"status\":\"ozuhkfp\",\"startedAt\":\"2021-02-19T22:50:40Z\",\"stoppedAt\":\"2021-08-24T12:02:24Z\"}}],\"nextLink\":\"dxluu\"}") - .toObject(ExperimentExecutionListResult.class); + ExperimentExecutionListResult model = BinaryData.fromString( + "{\"value\":[{\"type\":\"nojvknmefqsg\",\"id\":\"ah\",\"name\":\"jyzhpvgq\",\"properties\":{\"status\":\"rvxdjzlmw\",\"startedAt\":\"2021-07-11T22:18:52Z\",\"stoppedAt\":\"2021-11-03T14:53:04Z\"}},{\"type\":\"hzovawjvzunlut\",\"id\":\"n\",\"name\":\"nxipeil\",\"properties\":{\"status\":\"uaejxdultsk\",\"startedAt\":\"2021-11-26T08:31:17Z\",\"stoppedAt\":\"2021-05-16T15:29:03Z\"}},{\"type\":\"umveekgpwozuhkf\",\"id\":\"sjyofdx\",\"name\":\"us\",\"properties\":{\"status\":\"ouwaboekqvkeln\",\"startedAt\":\"2021-02-02T03:25:54Z\",\"stoppedAt\":\"2020-12-28T23:28:21Z\"}},{\"type\":\"yjsflhhcaalnji\",\"id\":\"sxyawjoyaqcs\",\"name\":\"jpkiidzyexznelix\",\"properties\":{\"status\":\"ztfolhbnxk\",\"startedAt\":\"2021-03-24T05:03:40Z\",\"stoppedAt\":\"2021-09-05T19:55:42Z\"}}],\"nextLink\":\"ppg\"}") + .toObject(ExperimentExecutionListResult.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionPropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionPropertiesTests.java index ce4b3e0d82ca..437ca93c39f9 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionPropertiesTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentExecutionPropertiesTests.java @@ -10,11 +10,9 @@ public final class ExperimentExecutionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExperimentExecutionProperties model = - BinaryData - .fromString( - "{\"status\":\"lyjpk\",\"startedAt\":\"2021-04-24T14:25:44Z\",\"stoppedAt\":\"2021-12-04T03:35:31Z\"}") - .toObject(ExperimentExecutionProperties.class); + ExperimentExecutionProperties model = BinaryData.fromString( + "{\"status\":\"trmgucnapkte\",\"startedAt\":\"2021-08-31T01:54:16Z\",\"stoppedAt\":\"2021-11-12T01:15:19Z\"}") + .toObject(ExperimentExecutionProperties.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentInnerTests.java index e7ac877f7376..775cafcd68fd 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentInnerTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentInnerTests.java @@ -22,11 +22,9 @@ public final class ExperimentInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExperimentInner model = - BinaryData - .fromString( - "{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"hagalpbuxwgipwh\":{\"principalId\":\"9b0db9d2-9556-4d54-973c-006d52ba9b4e\",\"clientId\":\"37bbce60-3515-4461-9385-a696b18becec\"}},\"principalId\":\"ow\",\"tenantId\":\"shwankixzbinje\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"steps\":[{\"name\":\"mryw\",\"branches\":[{\"name\":\"zoqftiyqzrnkcqvy\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"whzlsicohoq\"}]},{\"name\":\"nwvlryavwhheunmm\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"gyxzk\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"noc\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"koklya\"}]}]},{\"name\":\"uconuqszfkbey\",\"branches\":[{\"name\":\"wrmjmwvvjektc\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"enhwlrs\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"frzpwvlqdqgb\"}]},{\"name\":\"qylihkaetckt\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"civfsnkymuctq\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"jf\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"ebrjcxe\"}]},{\"name\":\"fuwutttxf\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"rbirphxe\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"c\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"vahfn\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"jky\"}]},{\"name\":\"xjvuujqgidokg\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"jyoxgvclt\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"gsncghkjeszz\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"bijhtxfvgxbf\"}]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"xnehmpvec\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"ukgri\":\"dataebfqkkrbm\",\"fbxzpuzycisp\":\"dataflz\",\"y\":\"dataqzahmgkbrp\",\"rgvtqag\":\"datahibnuqqkpika\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"buynhijggm\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"zmhjrunmp\":\"dataiarbutrcvpna\",\"nkxmyskpbhenbtk\":\"datattdbhrbnl\",\"yxczfclh\":\"dataxywnytnrsynlqidy\"}}]},\"location\":\"axdbabph\",\"tags\":{\"cocmnyyaztt\":\"qlfktsths\",\"edckzywbiexzfey\":\"twwrqp\",\"ujwb\":\"eaxib\",\"zjancuxr\":\"qwalmuzyoxaepd\"},\"id\":\"d\",\"name\":\"bavxbniwdjswzt\",\"type\":\"dbpgnxytxhp\"}") - .toObject(ExperimentInner.class); + ExperimentInner model = BinaryData.fromString( + "{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"hagalpbuxwgipwh\":{\"principalId\":\"ab062eec-ed37-4f5c-aaa7-69e1f3d4edf6\",\"clientId\":\"6597e0c3-0aaa-46e2-a4cb-b9c75f83f580\"}},\"principalId\":\"ow\",\"tenantId\":\"shwankixzbinje\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"steps\":[{\"name\":\"mryw\",\"branches\":[{\"name\":\"zoqftiyqzrnkcqvy\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"whzlsicohoq\"}]},{\"name\":\"nwvlryavwhheunmm\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"gyxzk\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"noc\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"koklya\"}]}]},{\"name\":\"uconuqszfkbey\",\"branches\":[{\"name\":\"wrmjmwvvjektc\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"enhwlrs\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"frzpwvlqdqgb\"}]},{\"name\":\"qylihkaetckt\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"civfsnkymuctq\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"jf\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"ebrjcxe\"}]},{\"name\":\"fuwutttxf\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"rbirphxe\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"c\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"vahfn\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"jky\"}]},{\"name\":\"xjvuujqgidokg\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"jyoxgvclt\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"gsncghkjeszz\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"bijhtxfvgxbf\"}]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"xnehmpvec\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"ukgri\":\"dataebfqkkrbm\",\"fbxzpuzycisp\":\"dataflz\",\"y\":\"dataqzahmgkbrp\",\"rgvtqag\":\"datahibnuqqkpika\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"buynhijggm\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"zmhjrunmp\":\"dataiarbutrcvpna\",\"nkxmyskpbhenbtk\":\"datattdbhrbnl\",\"yxczfclh\":\"dataxywnytnrsynlqidy\"}}]},\"location\":\"axdbabph\",\"tags\":{\"cocmnyyaztt\":\"qlfktsths\",\"edckzywbiexzfey\":\"twwrqp\",\"ujwb\":\"eaxib\",\"zjancuxr\":\"qwalmuzyoxaepd\"},\"id\":\"d\",\"name\":\"bavxbniwdjswzt\",\"type\":\"dbpgnxytxhp\"}") + .toObject(ExperimentInner.class); Assertions.assertEquals("axdbabph", model.location()); Assertions.assertEquals("qlfktsths", model.tags().get("cocmnyyaztt")); Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.identity().type()); @@ -38,91 +36,45 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExperimentInner model = - new ExperimentInner() - .withLocation("axdbabph") + ExperimentInner model + = new ExperimentInner().withLocation("axdbabph") .withTags( - mapOf( - "cocmnyyaztt", - "qlfktsths", - "edckzywbiexzfey", - "twwrqp", - "ujwb", - "eaxib", - "zjancuxr", + mapOf("cocmnyyaztt", "qlfktsths", "edckzywbiexzfey", "twwrqp", "ujwb", "eaxib", "zjancuxr", "qwalmuzyoxaepd")) .withIdentity( new ResourceIdentity() - .withType(ResourceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("hagalpbuxwgipwh", new UserAssignedIdentity()))) - .withSteps( - Arrays - .asList( - new ChaosExperimentStep() - .withName("mryw") - .withBranches( - Arrays - .asList( - new ChaosExperimentBranch() - .withName("zoqftiyqzrnkcqvy") - .withActions( - Arrays.asList(new ChaosExperimentAction().withName("whzlsicohoq"))), - new ChaosExperimentBranch() - .withName("nwvlryavwhheunmm") - .withActions( - Arrays - .asList( - new ChaosExperimentAction().withName("gyxzk"), - new ChaosExperimentAction().withName("noc"), - new ChaosExperimentAction().withName("koklya"))))), - new ChaosExperimentStep() - .withName("uconuqszfkbey") - .withBranches( - Arrays - .asList( - new ChaosExperimentBranch() - .withName("wrmjmwvvjektc") - .withActions( - Arrays - .asList( - new ChaosExperimentAction().withName("enhwlrs"), - new ChaosExperimentAction().withName("frzpwvlqdqgb"))), - new ChaosExperimentBranch() - .withName("qylihkaetckt") - .withActions( - Arrays - .asList( - new ChaosExperimentAction().withName("civfsnkymuctq"), - new ChaosExperimentAction().withName("jf"), - new ChaosExperimentAction().withName("ebrjcxe"))), - new ChaosExperimentBranch() - .withName("fuwutttxf") - .withActions( - Arrays - .asList( - new ChaosExperimentAction().withName("rbirphxe"), - new ChaosExperimentAction().withName("c"), - new ChaosExperimentAction().withName("vahfn"), - new ChaosExperimentAction().withName("jky"))), - new ChaosExperimentBranch() - .withName("xjvuujqgidokg") - .withActions( - Arrays - .asList( - new ChaosExperimentAction().withName("jyoxgvclt"), - new ChaosExperimentAction().withName("gsncghkjeszz"), - new ChaosExperimentAction().withName("bijhtxfvgxbf"))))))) - .withSelectors( - Arrays - .asList( - new ChaosTargetSelector() - .withId("xnehmpvec") - .withFilter(new ChaosTargetFilter()) - .withAdditionalProperties(mapOf("type", "ChaosTargetSelector")), - new ChaosTargetSelector() - .withId("buynhijggm") - .withFilter(new ChaosTargetFilter()) - .withAdditionalProperties(mapOf("type", "ChaosTargetSelector")))); + .withType(ResourceIdentityType.USER_ASSIGNED).withUserAssignedIdentities( + mapOf("hagalpbuxwgipwh", new UserAssignedIdentity()))) + .withSteps(Arrays.asList( + new ChaosExperimentStep().withName("mryw").withBranches(Arrays.asList( + new ChaosExperimentBranch().withName("zoqftiyqzrnkcqvy") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("whzlsicohoq"))), + new ChaosExperimentBranch().withName("nwvlryavwhheunmm") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("gyxzk"), + new ChaosExperimentAction().withName("noc"), + new ChaosExperimentAction().withName("koklya"))))), + new ChaosExperimentStep().withName("uconuqszfkbey").withBranches(Arrays.asList( + new ChaosExperimentBranch().withName("wrmjmwvvjektc") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("enhwlrs"), + new ChaosExperimentAction().withName("frzpwvlqdqgb"))), + new ChaosExperimentBranch().withName("qylihkaetckt") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("civfsnkymuctq"), + new ChaosExperimentAction().withName("jf"), + new ChaosExperimentAction().withName("ebrjcxe"))), + new ChaosExperimentBranch().withName("fuwutttxf") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("rbirphxe"), + new ChaosExperimentAction().withName("c"), + new ChaosExperimentAction().withName("vahfn"), + new ChaosExperimentAction().withName("jky"))), + new ChaosExperimentBranch().withName("xjvuujqgidokg") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("jyoxgvclt"), + new ChaosExperimentAction().withName("gsncghkjeszz"), + new ChaosExperimentAction().withName("bijhtxfvgxbf"))))))) + .withSelectors(Arrays.asList( + new ChaosTargetSelector().withId("xnehmpvec").withFilter(new ChaosTargetFilter()) + .withAdditionalProperties(mapOf("type", "ChaosTargetSelector")), + new ChaosTargetSelector().withId("buynhijggm").withFilter(new ChaosTargetFilter()) + .withAdditionalProperties(mapOf("type", "ChaosTargetSelector")))); model = BinaryData.fromObject(model).toObject(ExperimentInner.class); Assertions.assertEquals("axdbabph", model.location()); Assertions.assertEquals("qlfktsths", model.tags().get("cocmnyyaztt")); diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentListResultTests.java index 71973cdd0f77..0b4a18d4d4ec 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentListResultTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentListResultTests.java @@ -10,11 +10,9 @@ public final class ExperimentListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExperimentListResult model = - BinaryData - .fromString( - "{\"value\":[{\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"a\":{\"principalId\":\"cd1ba453-abce-4337-8cd6-f1dbead03fc3\",\"clientId\":\"bc064b79-8b4f-45f4-88ae-b771b3f9b09e\"},\"fizuckyf\":{\"principalId\":\"a9f58721-949a-4641-ba81-dd3219bb3361\",\"clientId\":\"5eae2532-43d7-4815-b11b-faf9031cae80\"}},\"principalId\":\"rfidfvzwdz\",\"tenantId\":\"tymw\"},\"properties\":{\"provisioningState\":\"Updating\",\"steps\":[{\"name\":\"fthwxmnteiwa\",\"branches\":[{\"name\":\"vkmijcmmxdcuf\",\"actions\":[]},{\"name\":\"fsrpymzidnse\",\"actions\":[]},{\"name\":\"cxtbzsg\",\"actions\":[]},{\"name\":\"yc\",\"actions\":[]}]},{\"name\":\"sne\",\"branches\":[{\"name\":\"dwzjeiach\",\"actions\":[]},{\"name\":\"oosflnr\",\"actions\":[]},{\"name\":\"sfqpteehz\",\"actions\":[]},{\"name\":\"vypyqrimzinpv\",\"actions\":[]}]},{\"name\":\"wjdk\",\"branches\":[{\"name\":\"soodqxhcrmnoh\",\"actions\":[]},{\"name\":\"t\",\"actions\":[]},{\"name\":\"kwh\",\"actions\":[]},{\"name\":\"soifiyipjxsqw\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"rjb\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"mocpc\":\"datacjxvsnbyxqab\",\"c\":\"datashurzafbljjgpbto\",\"idtqajzyu\":\"datamkljavb\",\"jkrlkhbzhfepg\":\"datapku\"}}]},\"location\":\"gqexzlocxs\",\"tags\":{\"j\":\"ierhhbcsglummaj\",\"jionpimexgstxgc\":\"odxobnbdxkqpxok\"},\"id\":\"odgmaajrmvdjwz\",\"name\":\"lovmclwhijcoe\",\"type\":\"ctbzaq\"},{\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"fkgukdkexxppof\":{\"principalId\":\"73c6842a-4ce6-4276-a088-bbd4ffc9151b\",\"clientId\":\"59ba3843-3d81-4aa7-84a0-8767620db3ac\"},\"x\":{\"principalId\":\"c42fd434-765f-4f95-8480-fcb4e7fefb72\",\"clientId\":\"2ded50ac-ffd3-48fc-a71a-59a86940060b\"},\"pg\":{\"principalId\":\"c52f9d33-7f20-4ae2-a258-ff6945c7afba\",\"clientId\":\"9ab61bea-4229-4ba4-a0c4-23ceb66c02fc\"}},\"principalId\":\"toc\",\"tenantId\":\"xhvpmoue\"},\"properties\":{\"provisioningState\":\"Failed\",\"steps\":[{\"name\":\"xibqeojnx\",\"branches\":[{\"name\":\"zvddntwndeicbtwn\",\"actions\":[]}]},{\"name\":\"zao\",\"branches\":[{\"name\":\"uhrhcffcyddgl\",\"actions\":[]},{\"name\":\"jthjqkwpyei\",\"actions\":[]},{\"name\":\"xmqci\",\"actions\":[]},{\"name\":\"q\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"khixuigdtopbo\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"w\":\"datahm\",\"a\":\"dataa\"}}]},\"location\":\"hrzayvvtpgvdf\",\"tags\":{\"efgugnxk\":\"tkftutqxlngx\",\"hjybigehoqfbo\":\"xdqmidtthzrvqdra\",\"zlcuiywgqywgndrv\":\"skanyk\",\"ocpecfvmmco\":\"nhzgpphrcgyn\"},\"id\":\"fsxlzevgbmqjqa\",\"name\":\"c\",\"type\":\"pmivkwlzu\"},{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"bacfionlebxetq\":{\"principalId\":\"4fbd05f7-80cf-4c3d-bf0f-9eb454da4ca5\",\"clientId\":\"316b8493-82f0-4011-9efa-c118f420cd16\"},\"xdpnqbqq\":{\"principalId\":\"73fc0ce4-c7ba-4215-893d-e6e7d7ab685f\",\"clientId\":\"6e6ba8ce-3da5-4d4c-9850-7242e872ce4f\"},\"jfeallnwsub\":{\"principalId\":\"cbfa5e8e-e711-44f5-b881-4e8c2a65ba32\",\"clientId\":\"3569f45c-d910-4755-b823-f8862d17432c\"},\"jampmngnzscxaqw\":{\"principalId\":\"7d945f06-cdc5-4076-9c82-3ef3b6463cb4\",\"clientId\":\"09e5bf68-1f27-444a-bc0c-053c6ef7f367\"}},\"principalId\":\"chcbonqvpkvlrxnj\",\"tenantId\":\"seiphe\"},\"properties\":{\"provisioningState\":\"Creating\",\"steps\":[{\"name\":\"keyyi\",\"branches\":[{\"name\":\"jbdlwtgrhpdjpju\",\"actions\":[]}]},{\"name\":\"asxazjpqyegualhb\",\"branches\":[{\"name\":\"hejjz\",\"actions\":[]},{\"name\":\"v\",\"actions\":[]},{\"name\":\"udgwdslfho\",\"actions\":[]}]},{\"name\":\"wmc\",\"branches\":[{\"name\":\"pwlbjnpg\",\"actions\":[]},{\"name\":\"cftadeh\",\"actions\":[]},{\"name\":\"nltyfsoppusuesnz\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"ej\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"ndnvo\":\"datarxzdmohctbqvudwx\",\"lazjdyggdtjixhbk\":\"datagujjugwdkcglh\",\"fwhybcibvy\":\"dataofqweykhmenevfye\",\"ynnaam\":\"datadcsi\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"ectehf\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"hezrkgq\":\"datajeyp\"}}]},\"location\":\"c\",\"tags\":{\"jpkcattpng\":\"fovgmkqsleyyvxy\",\"czsqpjhvm\":\"cr\"},\"id\":\"ajvnysounqe\",\"name\":\"a\",\"type\":\"oaeupfhyhltrpmo\"},{\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"okth\":{\"principalId\":\"3fb5098a-2666-4598-8453-0c5afcdda8b7\",\"clientId\":\"4807f25b-29f9-44a4-bd61-e5f622fb01b4\"},\"uaodsfcpk\":{\"principalId\":\"658efceb-7d9d-4bd0-988b-fc779abd01f4\",\"clientId\":\"6fb50596-8811-4c6e-a0b7-b49556a3a7d9\"},\"dpuozmyz\":{\"principalId\":\"d9165f61-b80d-43d3-9bab-3d3dcde8d89a\",\"clientId\":\"445dc8e7-6013-4af4-9fde-43cd6280218c\"}},\"principalId\":\"agfuaxbezyiu\",\"tenantId\":\"ktwh\"},\"properties\":{\"provisioningState\":\"Creating\",\"steps\":[{\"name\":\"zywqsmbsu\",\"branches\":[{\"name\":\"xim\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"yocf\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"kiiuxhqyudxor\":\"dataymddys\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"qn\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"llr\":\"datazvyifqrvkdvj\",\"xxbczwtr\":\"datavvdfwatkpnpul\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"wiqzbqjvsovmyo\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"obpxjmflbvvn\":\"datapkwlhz\",\"ciwwzjuqkhr\":\"datahrk\",\"oskg\":\"dataajiwkuo\",\"vxieduugidyj\":\"datasauuimj\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"rfbyaosvexcso\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"eggzfb\":\"datahocohslkev\",\"ithlvmezyvshxm\":\"datahfmvfaxkffe\",\"gigr\":\"datasbbzo\"}}]},\"location\":\"wburvjxxjnspydpt\",\"tags\":{\"udwtiukbl\":\"nkoukn\",\"o\":\"ngkpocipazy\",\"ntypmrbpizcdrqj\":\"gukgjnpiucgygevq\"},\"id\":\"dpydn\",\"name\":\"yhxdeoejzicwi\",\"type\":\"sjttgzfbish\"}],\"nextLink\":\"khaj\"}") - .toObject(ExperimentListResult.class); + ExperimentListResult model = BinaryData.fromString( + "{\"value\":[{\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"a\":{\"principalId\":\"255ed4c6-34ae-4c9b-a3f5-c479d3905fe3\",\"clientId\":\"149bf398-a7e2-4742-b0d3-79870042685b\"},\"fizuckyf\":{\"principalId\":\"d2cb8d1f-ac96-45cd-9a7b-324d79a7af90\",\"clientId\":\"0304c61b-354c-4833-be16-114eadb9bff5\"}},\"principalId\":\"rfidfvzwdz\",\"tenantId\":\"tymw\"},\"properties\":{\"provisioningState\":\"Updating\",\"steps\":[{\"name\":\"fthwxmnteiwa\",\"branches\":[{\"name\":\"vkmijcmmxdcuf\",\"actions\":[]},{\"name\":\"fsrpymzidnse\",\"actions\":[]},{\"name\":\"cxtbzsg\",\"actions\":[]},{\"name\":\"yc\",\"actions\":[]}]},{\"name\":\"sne\",\"branches\":[{\"name\":\"dwzjeiach\",\"actions\":[]},{\"name\":\"oosflnr\",\"actions\":[]},{\"name\":\"sfqpteehz\",\"actions\":[]},{\"name\":\"vypyqrimzinpv\",\"actions\":[]}]},{\"name\":\"wjdk\",\"branches\":[{\"name\":\"soodqxhcrmnoh\",\"actions\":[]},{\"name\":\"t\",\"actions\":[]},{\"name\":\"kwh\",\"actions\":[]},{\"name\":\"soifiyipjxsqw\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"rjb\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"mocpc\":\"datacjxvsnbyxqab\",\"c\":\"datashurzafbljjgpbto\",\"idtqajzyu\":\"datamkljavb\",\"jkrlkhbzhfepg\":\"datapku\"}}]},\"location\":\"gqexzlocxs\",\"tags\":{\"j\":\"ierhhbcsglummaj\",\"jionpimexgstxgc\":\"odxobnbdxkqpxok\"},\"id\":\"odgmaajrmvdjwz\",\"name\":\"lovmclwhijcoe\",\"type\":\"ctbzaq\"},{\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"fkgukdkexxppof\":{\"principalId\":\"59e13f26-36e1-4cbc-a8ba-0b141b28818d\",\"clientId\":\"628bbccf-25bc-45c3-b1e3-8af954a8f5a6\"},\"x\":{\"principalId\":\"5916b84d-cba8-488e-a8c7-42ef55e6d785\",\"clientId\":\"1fc26ffd-d13b-40f9-be22-45a429a4cae3\"},\"pg\":{\"principalId\":\"caf2753f-940f-4586-978d-1e94d28fd415\",\"clientId\":\"a9c34bb9-854e-48be-a3b6-863dd74dc2a5\"}},\"principalId\":\"toc\",\"tenantId\":\"xhvpmoue\"},\"properties\":{\"provisioningState\":\"Failed\",\"steps\":[{\"name\":\"xibqeojnx\",\"branches\":[{\"name\":\"zvddntwndeicbtwn\",\"actions\":[]}]},{\"name\":\"zao\",\"branches\":[{\"name\":\"uhrhcffcyddgl\",\"actions\":[]},{\"name\":\"jthjqkwpyei\",\"actions\":[]},{\"name\":\"xmqci\",\"actions\":[]},{\"name\":\"q\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"khixuigdtopbo\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"w\":\"datahm\",\"a\":\"dataa\"}}]},\"location\":\"hrzayvvtpgvdf\",\"tags\":{\"efgugnxk\":\"tkftutqxlngx\",\"hjybigehoqfbo\":\"xdqmidtthzrvqdra\",\"zlcuiywgqywgndrv\":\"skanyk\",\"ocpecfvmmco\":\"nhzgpphrcgyn\"},\"id\":\"fsxlzevgbmqjqa\",\"name\":\"c\",\"type\":\"pmivkwlzu\"},{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"bacfionlebxetq\":{\"principalId\":\"7204d12f-5595-4a88-b5db-9d9ab62fc0b9\",\"clientId\":\"2f311a43-9660-4aa3-a9fb-d68e86572abd\"},\"xdpnqbqq\":{\"principalId\":\"54c91147-345a-4eef-8bbc-d8bbe6cd851d\",\"clientId\":\"27b9ee2d-21d3-4cb5-8213-3f515f3c4753\"},\"jfeallnwsub\":{\"principalId\":\"29d4915a-f7f4-4cca-8bfc-0599d98b75b3\",\"clientId\":\"bb083cf2-faa4-4e3f-bdcc-c6d19f24c6d7\"},\"jampmngnzscxaqw\":{\"principalId\":\"a07187c6-2083-4892-b8ff-9a573449a2a3\",\"clientId\":\"a2efa42d-9caa-4e0d-a837-3512dae0695e\"}},\"principalId\":\"chcbonqvpkvlrxnj\",\"tenantId\":\"seiphe\"},\"properties\":{\"provisioningState\":\"Creating\",\"steps\":[{\"name\":\"keyyi\",\"branches\":[{\"name\":\"jbdlwtgrhpdjpju\",\"actions\":[]}]},{\"name\":\"asxazjpqyegualhb\",\"branches\":[{\"name\":\"hejjz\",\"actions\":[]},{\"name\":\"v\",\"actions\":[]},{\"name\":\"udgwdslfho\",\"actions\":[]}]},{\"name\":\"wmc\",\"branches\":[{\"name\":\"pwlbjnpg\",\"actions\":[]},{\"name\":\"cftadeh\",\"actions\":[]},{\"name\":\"nltyfsoppusuesnz\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"ej\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"ndnvo\":\"datarxzdmohctbqvudwx\",\"lazjdyggdtjixhbk\":\"datagujjugwdkcglh\",\"fwhybcibvy\":\"dataofqweykhmenevfye\",\"ynnaam\":\"datadcsi\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"ectehf\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"hezrkgq\":\"datajeyp\"}}]},\"location\":\"c\",\"tags\":{\"jpkcattpng\":\"fovgmkqsleyyvxy\",\"czsqpjhvm\":\"cr\"},\"id\":\"ajvnysounqe\",\"name\":\"a\",\"type\":\"oaeupfhyhltrpmo\"},{\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"okth\":{\"principalId\":\"862b509f-e184-48e4-af87-86e9bfa46293\",\"clientId\":\"6687bec8-fcdb-421b-9ca8-75b8bec619c5\"},\"uaodsfcpk\":{\"principalId\":\"7227b047-d517-408e-a6f6-cfbfa1b4312f\",\"clientId\":\"7d3fd070-8fbf-4bdc-b01e-3fd2e27429b6\"},\"dpuozmyz\":{\"principalId\":\"533c94a5-73fd-4e78-9a83-bc7d98547436\",\"clientId\":\"9733cd6b-18a5-4bb6-ad2e-6adcfd916aa8\"}},\"principalId\":\"agfuaxbezyiu\",\"tenantId\":\"ktwh\"},\"properties\":{\"provisioningState\":\"Creating\",\"steps\":[{\"name\":\"zywqsmbsu\",\"branches\":[{\"name\":\"xim\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"yocf\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"kiiuxhqyudxor\":\"dataymddys\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"qn\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"llr\":\"datazvyifqrvkdvj\",\"xxbczwtr\":\"datavvdfwatkpnpul\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"wiqzbqjvsovmyo\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"obpxjmflbvvn\":\"datapkwlhz\",\"ciwwzjuqkhr\":\"datahrk\",\"oskg\":\"dataajiwkuo\",\"vxieduugidyj\":\"datasauuimj\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"rfbyaosvexcso\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"eggzfb\":\"datahocohslkev\",\"ithlvmezyvshxm\":\"datahfmvfaxkffe\",\"gigr\":\"datasbbzo\"}}]},\"location\":\"wburvjxxjnspydpt\",\"tags\":{\"udwtiukbl\":\"nkoukn\",\"o\":\"ngkpocipazy\",\"ntypmrbpizcdrqj\":\"gukgjnpiucgygevq\"},\"id\":\"dpydn\",\"name\":\"yhxdeoejzicwi\",\"type\":\"sjttgzfbish\"}],\"nextLink\":\"khaj\"}") + .toObject(ExperimentListResult.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentPropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentPropertiesTests.java index e5ac2ab611fb..7568078d455a 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentPropertiesTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentPropertiesTests.java @@ -19,11 +19,9 @@ public final class ExperimentPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExperimentProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Creating\",\"steps\":[{\"name\":\"mg\",\"branches\":[{\"name\":\"nkjzkdeslpvlop\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"yighxpk\"}]},{\"name\":\"wzbaiue\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"a\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"m\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"yqupedeojnabckh\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"mtxpsiebtfh\"}]},{\"name\":\"pesapskrdqmhjj\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"tldwkyzxuutk\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"cwscwsvlx\"}]}]},{\"name\":\"togt\",\"branches\":[{\"name\":\"upqsx\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"micykvceoveilo\"}]},{\"name\":\"notyfjfcnjbkcn\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"hbttkphyw\"}]},{\"name\":\"nv\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"oqnermclfpl\"}]}]},{\"name\":\"hoxus\",\"branches\":[{\"name\":\"pabgyeps\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"tazqugxywpmueefj\"}]},{\"name\":\"wfqkquj\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"suyonobglaocq\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"tcc\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"g\"}]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"dxyt\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"fudwpznt\":\"datarxv\",\"hckfrlhrx\":\"datahdzhlrqj\",\"ca\":\"databkyvp\",\"b\":\"datauzbpzkafku\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"rnwb\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"srtslhspkdeem\":\"dataseyvj\",\"ahvljuaha\":\"dataofmxagkvtmelmqkr\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"uhcdhm\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"pvfadmwsrcr\":\"dataaex\",\"fmisg\":\"datavxpvgomz\"}}]}") - .toObject(ExperimentProperties.class); + ExperimentProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Creating\",\"steps\":[{\"name\":\"mg\",\"branches\":[{\"name\":\"nkjzkdeslpvlop\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"yighxpk\"}]},{\"name\":\"wzbaiue\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"a\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"m\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"yqupedeojnabckh\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"mtxpsiebtfh\"}]},{\"name\":\"pesapskrdqmhjj\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"tldwkyzxuutk\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"cwscwsvlx\"}]}]},{\"name\":\"togt\",\"branches\":[{\"name\":\"upqsx\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"micykvceoveilo\"}]},{\"name\":\"notyfjfcnjbkcn\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"hbttkphyw\"}]},{\"name\":\"nv\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"oqnermclfpl\"}]}]},{\"name\":\"hoxus\",\"branches\":[{\"name\":\"pabgyeps\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"tazqugxywpmueefj\"}]},{\"name\":\"wfqkquj\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"suyonobglaocq\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"tcc\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"g\"}]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"dxyt\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"fudwpznt\":\"datarxv\",\"hckfrlhrx\":\"datahdzhlrqj\",\"ca\":\"databkyvp\",\"b\":\"datauzbpzkafku\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"rnwb\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"srtslhspkdeem\":\"dataseyvj\",\"ahvljuaha\":\"dataofmxagkvtmelmqkr\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"uhcdhm\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"pvfadmwsrcr\":\"dataaex\",\"fmisg\":\"datavxpvgomz\"}}]}") + .toObject(ExperimentProperties.class); Assertions.assertEquals("mg", model.steps().get(0).name()); Assertions.assertEquals("nkjzkdeslpvlop", model.steps().get(0).branches().get(0).name()); Assertions.assertEquals("yighxpk", model.steps().get(0).branches().get(0).actions().get(0).name()); @@ -32,90 +30,42 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExperimentProperties model = - new ExperimentProperties() - .withSteps( - Arrays - .asList( - new ChaosExperimentStep() - .withName("mg") - .withBranches( - Arrays - .asList( - new ChaosExperimentBranch() - .withName("nkjzkdeslpvlop") - .withActions( - Arrays.asList(new ChaosExperimentAction().withName("yighxpk"))), - new ChaosExperimentBranch() - .withName("wzbaiue") - .withActions( - Arrays - .asList( - new ChaosExperimentAction().withName("a"), - new ChaosExperimentAction().withName("m"), - new ChaosExperimentAction().withName("yqupedeojnabckh"), - new ChaosExperimentAction().withName("mtxpsiebtfh"))), - new ChaosExperimentBranch() - .withName("pesapskrdqmhjj") - .withActions( - Arrays - .asList( - new ChaosExperimentAction().withName("tldwkyzxuutk"), - new ChaosExperimentAction().withName("cwscwsvlx"))))), - new ChaosExperimentStep() - .withName("togt") - .withBranches( - Arrays - .asList( - new ChaosExperimentBranch() - .withName("upqsx") - .withActions( - Arrays - .asList( - new ChaosExperimentAction().withName("micykvceoveilo"))), - new ChaosExperimentBranch() - .withName("notyfjfcnjbkcn") - .withActions( - Arrays.asList(new ChaosExperimentAction().withName("hbttkphyw"))), - new ChaosExperimentBranch() - .withName("nv") - .withActions( - Arrays - .asList(new ChaosExperimentAction().withName("oqnermclfpl"))))), - new ChaosExperimentStep() - .withName("hoxus") - .withBranches( - Arrays - .asList( - new ChaosExperimentBranch() - .withName("pabgyeps") - .withActions( - Arrays - .asList( - new ChaosExperimentAction().withName("tazqugxywpmueefj"))), - new ChaosExperimentBranch() - .withName("wfqkquj") - .withActions( - Arrays - .asList( - new ChaosExperimentAction().withName("suyonobglaocq"), - new ChaosExperimentAction().withName("tcc"), - new ChaosExperimentAction().withName("g"))))))) - .withSelectors( - Arrays - .asList( - new ChaosTargetSelector() - .withId("dxyt") - .withFilter(new ChaosTargetFilter()) - .withAdditionalProperties(mapOf("type", "ChaosTargetSelector")), - new ChaosTargetSelector() - .withId("rnwb") - .withFilter(new ChaosTargetFilter()) - .withAdditionalProperties(mapOf("type", "ChaosTargetSelector")), - new ChaosTargetSelector() - .withId("uhcdhm") - .withFilter(new ChaosTargetFilter()) - .withAdditionalProperties(mapOf("type", "ChaosTargetSelector")))); + ExperimentProperties model = new ExperimentProperties() + .withSteps(Arrays.asList( + new ChaosExperimentStep().withName("mg") + .withBranches(Arrays.asList( + new ChaosExperimentBranch().withName("nkjzkdeslpvlop") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("yighxpk"))), + new ChaosExperimentBranch().withName("wzbaiue") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("a"), + new ChaosExperimentAction().withName("m"), + new ChaosExperimentAction().withName("yqupedeojnabckh"), + new ChaosExperimentAction().withName("mtxpsiebtfh"))), + new ChaosExperimentBranch().withName("pesapskrdqmhjj") + .withActions( + Arrays.asList(new ChaosExperimentAction().withName("tldwkyzxuutk"), + new ChaosExperimentAction().withName("cwscwsvlx"))))), + new ChaosExperimentStep().withName("togt") + .withBranches(Arrays.asList( + new ChaosExperimentBranch().withName("upqsx").withActions( + Arrays.asList(new ChaosExperimentAction().withName("micykvceoveilo"))), + new ChaosExperimentBranch().withName("notyfjfcnjbkcn") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("hbttkphyw"))), + new ChaosExperimentBranch().withName("nv") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("oqnermclfpl"))))), + new ChaosExperimentStep().withName("hoxus").withBranches(Arrays.asList( + new ChaosExperimentBranch().withName("pabgyeps") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("tazqugxywpmueefj"))), + new ChaosExperimentBranch().withName("wfqkquj") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("suyonobglaocq"), + new ChaosExperimentAction().withName("tcc"), new ChaosExperimentAction().withName("g"))))))) + .withSelectors(Arrays.asList( + new ChaosTargetSelector().withId("dxyt").withFilter(new ChaosTargetFilter()) + .withAdditionalProperties(mapOf("type", "ChaosTargetSelector")), + new ChaosTargetSelector().withId("rnwb").withFilter(new ChaosTargetFilter()) + .withAdditionalProperties(mapOf("type", "ChaosTargetSelector")), + new ChaosTargetSelector().withId("uhcdhm").withFilter(new ChaosTargetFilter()) + .withAdditionalProperties(mapOf("type", "ChaosTargetSelector")))); model = BinaryData.fromObject(model).toObject(ExperimentProperties.class); Assertions.assertEquals("mg", model.steps().get(0).name()); Assertions.assertEquals("nkjzkdeslpvlop", model.steps().get(0).branches().get(0).name()); diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentUpdateTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentUpdateTests.java index 624a4bbfa455..b900d67b16d4 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentUpdateTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentUpdateTests.java @@ -16,33 +16,24 @@ public final class ExperimentUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExperimentUpdate model = - BinaryData - .fromString( - "{\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"veual\":{\"principalId\":\"722f6d5d-a4be-49ef-859d-8e0961238354\",\"clientId\":\"a4541266-741f-439c-981a-c1cf2b17ae98\"},\"mkh\":{\"principalId\":\"54b509c6-afca-41df-a2ea-819d552cfcf1\",\"clientId\":\"9a36844d-8db6-4d0e-b5f9-c495c195c8a6\"},\"bbcswsrtjri\":{\"principalId\":\"804d3b9b-f5ae-4616-9331-d242e48040b4\",\"clientId\":\"63b3ce36-c7db-4e64-bd93-42681aab08ca\"},\"bpbewtghfgb\":{\"principalId\":\"a21c1186-61a2-47c5-b1c6-e74d4d4d9ccf\",\"clientId\":\"19babc93-1b64-4e6c-8513-919d7f32cae6\"}},\"principalId\":\"gw\",\"tenantId\":\"vlvqhjkbegi\"}}") - .toObject(ExperimentUpdate.class); + ExperimentUpdate model = BinaryData.fromString( + "{\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"veual\":{\"principalId\":\"2ab296ac-e81e-4690-b2e9-e8ca33e2c7f3\",\"clientId\":\"e2c93b86-0c6b-4a76-b205-8abd8405e73c\"},\"mkh\":{\"principalId\":\"a488b418-a1eb-433c-a43f-5fae44a0b576\",\"clientId\":\"6b698d05-0238-4471-9218-dbbad59580b9\"},\"bbcswsrtjri\":{\"principalId\":\"8116ceee-1e63-4d79-ad88-a3b1cf189c9d\",\"clientId\":\"7893fbc9-a3b8-4f3d-9909-b5051e6de38e\"},\"bpbewtghfgb\":{\"principalId\":\"d1b6d058-d12a-45b2-b1f0-0a6e04a0d8ff\",\"clientId\":\"2cb9b1c9-46cf-4f32-b1c0-888374c5f9e6\"}},\"principalId\":\"gw\",\"tenantId\":\"vlvqhjkbegi\"},\"tags\":{\"aloayqcgwrtzju\":\"mxiebw\",\"txon\":\"gwyzm\",\"rknftguvriuhprwm\":\"mtsavjcbpwxqp\",\"bexrmcq\":\"yvxqtayriwwroy\"}}") + .toObject(ExperimentUpdate.class); Assertions.assertEquals(ResourceIdentityType.NONE, model.identity().type()); + Assertions.assertEquals("mxiebw", model.tags().get("aloayqcgwrtzju")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExperimentUpdate model = - new ExperimentUpdate() - .withIdentity( - new ResourceIdentity() - .withType(ResourceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf( - "veual", - new UserAssignedIdentity(), - "mkh", - new UserAssignedIdentity(), - "bbcswsrtjri", - new UserAssignedIdentity(), - "bpbewtghfgb", - new UserAssignedIdentity()))); + ExperimentUpdate model = new ExperimentUpdate() + .withIdentity(new ResourceIdentity().withType(ResourceIdentityType.NONE).withUserAssignedIdentities( + mapOf("veual", new UserAssignedIdentity(), "mkh", new UserAssignedIdentity(), "bbcswsrtjri", + new UserAssignedIdentity(), "bpbewtghfgb", new UserAssignedIdentity()))) + .withTags(mapOf("aloayqcgwrtzju", "mxiebw", "txon", "gwyzm", "rknftguvriuhprwm", "mtsavjcbpwxqp", "bexrmcq", + "yvxqtayriwwroy")); model = BinaryData.fromObject(model).toObject(ExperimentUpdate.class); Assertions.assertEquals(ResourceIdentityType.NONE, model.identity().type()); + Assertions.assertEquals("mxiebw", model.tags().get("aloayqcgwrtzju")); } // Use "Map.of" if available diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsCreateOrUpdateMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsCreateOrUpdateMockTests.java index c47606a7fe3a..afcf5ef2888b 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsCreateOrUpdateMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsCreateOrUpdateMockTests.java @@ -40,102 +40,49 @@ public void testCreateOrUpdate() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"thjoxoism\":{\"principalId\":\"e83eb8bb-c87a-4a10-8644-8e10e6424e65\",\"clientId\":\"a82cee1b-b08f-4952-bdb9-ca138978dcfb\"}},\"principalId\":\"sbpimlq\",\"tenantId\":\"jxkcgxxlxsff\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"steps\":[{\"name\":\"zqzdw\",\"branches\":[{\"name\":\"w\",\"actions\":[]},{\"name\":\"youpfgfbkj\",\"actions\":[]}]},{\"name\":\"bdyhgkfminsgowz\",\"branches\":[{\"name\":\"tsttktlahbq\",\"actions\":[]},{\"name\":\"ctxtgzukxi\",\"actions\":[]},{\"name\":\"mmqtgqqqxhr\",\"actions\":[]},{\"name\":\"xrxc\",\"actions\":[]}]},{\"name\":\"juisavokqdzf\",\"branches\":[{\"name\":\"zivj\",\"actions\":[]},{\"name\":\"frqttbajlkatnw\",\"actions\":[]},{\"name\":\"yiopi\",\"actions\":[]},{\"name\":\"kqqfk\",\"actions\":[]}]},{\"name\":\"vscx\",\"branches\":[{\"name\":\"mligov\",\"actions\":[]},{\"name\":\"brxk\",\"actions\":[]},{\"name\":\"mloazuru\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"bgo\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"ordilmywwtkgkxny\":\"dataeoybfhjxakvvjgs\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"dabg\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"uwhcjyxccybv\":\"datatjuewbcihx\"}}]},\"location\":\"ayakkudzpx\",\"tags\":{\"tcyohpfkyrk\":\"plmag\",\"nwqjnoba\":\"bdgiogsjk\",\"egfnmntfpmvmemfn\":\"yhddvia\"},\"id\":\"zdwvvbalxl\",\"name\":\"lchpodbzevwrdn\",\"type\":\"fukuvsjcswsmystu\"}"; + String responseStr + = "{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ev\":{\"principalId\":\"6900a581-a089-4451-b294-0dccce9a7181\",\"clientId\":\"c0aab7de-0ad5-4a09-ad58-31e9defd8dd4\"},\"b\":{\"principalId\":\"25a877c7-39ff-46be-8058-0c1f8c6955e9\",\"clientId\":\"2986140d-b1b7-4329-a3f5-cb5f12d81712\"}},\"principalId\":\"rilbywdx\",\"tenantId\":\"icc\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"steps\":[{\"name\":\"scjfnyns\",\"branches\":[{\"name\":\"ujiz\",\"actions\":[]},{\"name\":\"voqyt\",\"actions\":[]}]},{\"name\":\"byowbblgyavutp\",\"branches\":[{\"name\":\"joxoism\",\"actions\":[]},{\"name\":\"ksbpimlqoljx\",\"actions\":[]}]},{\"name\":\"cgxxlxs\",\"branches\":[{\"name\":\"gcvizqzdwlvwlyou\",\"actions\":[]},{\"name\":\"fgfb\",\"actions\":[]}]},{\"name\":\"jub\",\"branches\":[{\"name\":\"hgkfmin\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"owzfttsttkt\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"gqqqxh\":\"dataqactxtgzukxitmmq\",\"rxcpjuisavo\":\"datan\",\"ajlkatnw\":\"dataqdzfvazivjlfrqtt\"}}]},\"location\":\"yiopi\",\"tags\":{\"ovibrxkp\":\"qfkuvscxkdmli\",\"bteoybf\":\"loazuruocbgoo\"},\"id\":\"jxakv\",\"name\":\"jgslordilmyww\",\"type\":\"kgkxn\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - Experiment response = - manager - .experiments() - .define("mvvhmxtdrjfuta") - .withRegion("s") - .withExistingResourceGroup("gohbuffkmrq") - .withSteps( - Arrays - .asList( - new ChaosExperimentStep() - .withName("kwdlenrdsutujba") - .withBranches( - Arrays - .asList( - new ChaosExperimentBranch() - .withName("juohminyflnorw") - .withActions(Arrays.asList()), - new ChaosExperimentBranch() - .withName("duvwpklvxwmygd") - .withActions(Arrays.asList()), - new ChaosExperimentBranch() - .withName("pgpqchiszepnnb") - .withActions(Arrays.asList()))), - new ChaosExperimentStep() - .withName("crxgibb") - .withBranches( - Arrays - .asList( - new ChaosExperimentBranch() - .withName("xconfozauors") - .withActions(Arrays.asList()), - new ChaosExperimentBranch() - .withName("kokwbqplhlvnu") - .withActions(Arrays.asList()), - new ChaosExperimentBranch().withName("epzl").withActions(Arrays.asList()))), - new ChaosExperimentStep() - .withName("phwzsoldweyuqdu") - .withBranches( - Arrays - .asList( - new ChaosExperimentBranch().withName("mnnrwr").withActions(Arrays.asList()), - new ChaosExperimentBranch().withName("i").withActions(Arrays.asList()))))) - .withSelectors( - Arrays - .asList( - new ChaosTargetSelector() - .withId("ktalywjhhgdnhxms") - .withFilter(new ChaosTargetFilter()) - .withAdditionalProperties(mapOf("type", "ChaosTargetSelector")))) - .withTags(mapOf("p", "otcubi", "izsh", "ipwoqonmacjek", "gmblrri", "vcimpev")) - .withIdentity( - new ResourceIdentity() - .withType(ResourceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "zcjznmwcpmgua", - new UserAssignedIdentity(), - "aufactkahzovajjz", - new UserAssignedIdentity()))) - .create(); + Experiment response = manager.experiments().define("yjkqabqgzslesjcb").withRegion("axconfozauo") + .withExistingResourceGroup("aryeu") + .withSteps(Arrays.asList(new ChaosExperimentStep().withName("ebjvewzcjzn").withBranches( + Arrays.asList(new ChaosExperimentBranch().withName("cpmguaadraufact").withActions(Arrays.asList()), + new ChaosExperimentBranch().withName("ahzovajjziuxxp").withActions(Arrays.asList()), + new ChaosExperimentBranch().withName("hneekul").withActions(Arrays.asList()), + new ChaosExperimentBranch().withName("gs").withActions(Arrays.asList()))))) + .withSelectors(Arrays.asList( + new ChaosTargetSelector().withId("ubkwdle").withFilter(new ChaosTargetFilter()) + .withAdditionalProperties(mapOf("type", "ChaosTargetSelector")), + new ChaosTargetSelector().withId("ygdxpgpqchis").withFilter(new ChaosTargetFilter()) + .withAdditionalProperties(mapOf("type", "ChaosTargetSelector")))) + .withTags(mapOf("epzl", "kokwbqplhlvnu", "vmnnrw", "phwzsoldweyuqdu", "wjhhgdnhxmsivf", "biorktal", + "zaofjchvcyy", "miloxggdufiqndie")) + .withIdentity( + new ResourceIdentity().withType(ResourceIdentityType.USER_ASSIGNED).withUserAssignedIdentities( + mapOf("w", new UserAssignedIdentity(), "vbquwr", new UserAssignedIdentity()))) + .create(); - Assertions.assertEquals("ayakkudzpx", response.location()); - Assertions.assertEquals("plmag", response.tags().get("tcyohpfkyrk")); - Assertions.assertEquals(ResourceIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("zqzdw", response.steps().get(0).name()); - Assertions.assertEquals("w", response.steps().get(0).branches().get(0).name()); - Assertions.assertEquals("bgo", response.selectors().get(0).id()); + Assertions.assertEquals("yiopi", response.location()); + Assertions.assertEquals("qfkuvscxkdmli", response.tags().get("ovibrxkp")); + Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("scjfnyns", response.steps().get(0).name()); + Assertions.assertEquals("ujiz", response.steps().get(0).branches().get(0).name()); + Assertions.assertEquals("owzfttsttkt", response.selectors().get(0).id()); } // Use "Map.of" if available diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsExecutionDetailsWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsExecutionDetailsWithResponseMockTests.java index 88bd45ed00e0..64bb13a10cd3 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsExecutionDetailsWithResponseMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsExecutionDetailsWithResponseMockTests.java @@ -29,40 +29,27 @@ public void testExecutionDetailsWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"type\":\"eclze\",\"id\":\"bcvhzlhpl\",\"name\":\"qkdlw\",\"properties\":{\"failureReason\":\"bum\",\"lastActionAt\":\"2021-01-09T13:22:40Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"fsmlmbtxhwgfw\",\"stepId\":\"tawc\",\"status\":\"zbrhubskhudyg\",\"branches\":[{},{},{}]},{\"stepName\":\"kqfqjbvl\",\"stepId\":\"rfmluiqtq\",\"status\":\"avyvnqqyba\",\"branches\":[{},{},{},{}]},{\"stepName\":\"ayjkqa\",\"stepId\":\"gzslesjcbhernnti\",\"status\":\"djc\",\"branches\":[{},{},{}]}]},\"status\":\"wr\",\"startedAt\":\"2021-03-14T01:37:10Z\",\"stoppedAt\":\"2021-08-03T09:19:04Z\"}}"; + String responseStr + = "{\"type\":\"qkdlw\",\"id\":\"fbumlkx\",\"name\":\"qjfsmlmbtxhw\",\"properties\":{\"failureReason\":\"srtawcoezbr\",\"lastActionAt\":\"2021-02-21T07:03:26Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"dyg\",\"stepId\":\"okkqfqjbvleo\",\"status\":\"ml\",\"branches\":[{},{},{}]}]},\"status\":\"qzfavyv\",\"startedAt\":\"2021-03-05T04:35Z\",\"stoppedAt\":\"2021-05-23T06:21:06Z\"}}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + ExperimentExecutionDetails response = manager.experiments() + .executionDetailsWithResponse("stgktst", "dxeclzedqbcvh", "lhpl", com.azure.core.util.Context.NONE) + .getValue(); - ExperimentExecutionDetails response = - manager - .experiments() - .executionDetailsWithResponse( - "wrck", "yklyhpluodpvruud", "gzibthostgktstv", com.azure.core.util.Context.NONE) - .getValue(); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetByResourceGroupWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetByResourceGroupWithResponseMockTests.java index aff8965c5c4d..213b95e71cae 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetByResourceGroupWithResponseMockTests.java @@ -31,46 +31,32 @@ public void testGetByResourceGroupWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"ssxkkgthr\":{\"principalId\":\"27e8664d-1a55-442e-bd7a-eca97866fd5c\",\"clientId\":\"a2befb8a-4066-4897-a8ee-13fc8280fb3c\"},\"xjb\":{\"principalId\":\"7b4d97a8-974b-40f3-a098-31ee065cdd01\",\"clientId\":\"1058d915-f56e-4840-8e9e-27b22db6cf3a\"},\"xvcxgfrpdsofbshr\":{\"principalId\":\"7cd92f3c-757b-4ffc-9146-2a180e9ab0ba\",\"clientId\":\"c3f02a99-3408-4c2c-bbcd-72323665917a\"}},\"principalId\":\"vbuswd\",\"tenantId\":\"yybyc\"},\"properties\":{\"provisioningState\":\"Canceled\",\"steps\":[{\"name\":\"jsrtk\",\"branches\":[{\"name\":\"wnopqgikyzirtx\",\"actions\":[]},{\"name\":\"yuxzejntpsewgi\",\"actions\":[]},{\"name\":\"ilqu\",\"actions\":[]},{\"name\":\"rydxtqm\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"ox\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"avgrvkffovjz\":\"dataufhyaomtbgh\",\"gjmfxumvfcl\":\"datapjbi\",\"wxnb\":\"datayo\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"fezzxscyhwzdg\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"yujviylwdshfssn\":\"databzbomvzzbtdcqvpn\",\"rymsgaojfmw\":\"databgye\",\"hirctymoxoftpipi\":\"datacotmr\",\"lihhyuspskasdvlm\":\"datayczuhxacpq\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"wdgzxulucv\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"ytxifqjzgxmrh\":\"datasreuzvxurisjnh\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"blwpcesutrgj\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"pnfqntcyp\":\"datautpwoqhihejqgw\",\"rcizjxvyd\":\"dataxjvfoimwksl\",\"t\":\"dataceacvlhvygdy\"}}]},\"location\":\"mrtwna\",\"tags\":{\"ojgcyzt\":\"lbiw\"},\"id\":\"fmznba\",\"name\":\"qphchqnrnrpxehuw\",\"type\":\"ykqgaifmvik\"}"; + String responseStr + = "{\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"opqgikyzirtxdyux\":{\"principalId\":\"ed9e294c-ba78-4a01-9758-19761ba750b0\",\"clientId\":\"a2543718-8588-4dfb-8eaf-4fea9e1ab6b7\"},\"ntps\":{\"principalId\":\"a1f707cd-b841-41f1-bc3c-af8593d08837\",\"clientId\":\"6f1bac67-d21a-4434-a85e-68a7413d937d\"},\"ioilqukrydxtq\":{\"principalId\":\"a97a125d-157d-4bae-a88a-69b9f437a6fc\",\"clientId\":\"1d2845f8-8e7b-4f78-a4d7-47a82dc40e67\"},\"ox\":{\"principalId\":\"c0b79486-4535-400a-af65-889b887410a8\",\"clientId\":\"2ed7a83d-db34-4f38-9790-6877bd60d579\"}},\"principalId\":\"ggufhyaomtb\",\"tenantId\":\"havgrvk\"},\"properties\":{\"provisioningState\":\"Creating\",\"steps\":[{\"name\":\"jzhpjbibgjmfx\",\"branches\":[{\"name\":\"vfcluyovwxnbkfe\",\"actions\":[]}]},{\"name\":\"zxscyhwzdgirujb\",\"branches\":[{\"name\":\"omvzzbtd\",\"actions\":[]},{\"name\":\"qvpn\",\"actions\":[]},{\"name\":\"yujviylwdshfssn\",\"actions\":[]}]},{\"name\":\"bgye\",\"branches\":[{\"name\":\"ymsgaojfmwnc\",\"actions\":[]},{\"name\":\"tmr\",\"actions\":[]},{\"name\":\"hirctymoxoftpipi\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"czuhxacpqjlihh\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"ucvpamrs\":\"dataskasdvlmfwdgzxu\",\"risjnhnytxifqjz\":\"dataeuzvx\",\"lw\":\"dataxmrhu\",\"woqhihe\":\"datacesutrgjupauut\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"qg\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"xjvfoimwksl\":\"datafqntcyp\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"rcizjxvyd\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"gdyftumrtwna\":\"datacvlhv\",\"wkojgcyztsfmzn\":\"datajslb\"}}]},\"location\":\"aeqphchqnr\",\"tags\":{\"huwrykqgaifm\":\"x\",\"jdz\":\"iklbydvkhb\",\"srhnjivo\":\"xcv\"},\"id\":\"v\",\"name\":\"novqfzge\",\"type\":\"jdftuljltd\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Experiment response = - manager - .experiments() - .getByResourceGroupWithResponse("tw", "sgogczhonnxk", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("mrtwna", response.location()); - Assertions.assertEquals("lbiw", response.tags().get("ojgcyzt")); - Assertions.assertEquals(ResourceIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("jsrtk", response.steps().get(0).name()); - Assertions.assertEquals("wnopqgikyzirtx", response.steps().get(0).branches().get(0).name()); - Assertions.assertEquals("ox", response.selectors().get(0).id()); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + Experiment response = manager.experiments() + .getByResourceGroupWithResponse("z", "ybycnunvj", com.azure.core.util.Context.NONE).getValue(); + + Assertions.assertEquals("aeqphchqnr", response.location()); + Assertions.assertEquals("x", response.tags().get("huwrykqgaifm")); + Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); + Assertions.assertEquals("jzhpjbibgjmfx", response.steps().get(0).name()); + Assertions.assertEquals("vfcluyovwxnbkfe", response.steps().get(0).branches().get(0).name()); + Assertions.assertEquals("czuhxacpqjlihh", response.selectors().get(0).id()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetExecutionWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetExecutionWithResponseMockTests.java index 24a1640fbfff..e65f713632da 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetExecutionWithResponseMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsGetExecutionWithResponseMockTests.java @@ -29,39 +29,27 @@ public void testGetExecutionWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"type\":\"wcfzqljyxgt\",\"id\":\"heyd\",\"name\":\"dshmkxmaehvbbx\",\"properties\":{\"status\":\"pltfnhtba\",\"startedAt\":\"2021-07-30T22:05:34Z\",\"stoppedAt\":\"2021-11-06T21:21:21Z\"}}"; + String responseStr + = "{\"type\":\"ripltf\",\"id\":\"tbaxk\",\"name\":\"ywrckp\",\"properties\":{\"status\":\"yhpluodpvruudlgz\",\"startedAt\":\"2021-07-04T20:01:35Z\",\"stoppedAt\":\"2021-04-27T04:41:25Z\"}}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + ExperimentExecution response = manager.experiments() + .getExecutionWithResponse("zqljyxgtczh", "ydbsd", "hmkxmaehvbb", com.azure.core.util.Context.NONE) + .getValue(); - ExperimentExecution response = - manager - .experiments() - .getExecutionWithResponse("w", "qioknssxmojm", "vpkjpr", com.azure.core.util.Context.NONE) - .getValue(); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListAllExecutionsMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListAllExecutionsMockTests.java index 97adc679f475..07808338511b 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListAllExecutionsMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListAllExecutionsMockTests.java @@ -30,36 +30,26 @@ public void testListAllExecutions() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"type\":\"rhnj\",\"id\":\"olvtnovqfzge\",\"name\":\"dftuljltduce\",\"properties\":{\"status\":\"mczuo\",\"startedAt\":\"2021-10-02T15:37:14Z\",\"stoppedAt\":\"2021-01-27T20:06:14Z\"}}]}"; + String responseStr + = "{\"value\":[{\"type\":\"jw\",\"id\":\"wqiok\",\"name\":\"sx\",\"properties\":{\"status\":\"msvpkjpr\",\"startedAt\":\"2021-06-29T04:33:46Z\",\"stoppedAt\":\"2021-06-26T08:15:06Z\"}}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response + = manager.experiments().listAllExecutions("ceamtm", "zuo", com.azure.core.util.Context.NONE); - PagedIterable response = - manager.experiments().listAllExecutions("bydvkhbejdz", "xcv", com.azure.core.util.Context.NONE); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListByResourceGroupMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListByResourceGroupMockTests.java index ea1b65d06e75..7ebe66262142 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListByResourceGroupMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListByResourceGroupMockTests.java @@ -32,45 +32,32 @@ public void testListByResourceGroup() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"azpxdtnkdmkqjjl\":{\"principalId\":\"d3811f85-895d-4f46-8859-2b0865e18fa5\",\"clientId\":\"8d0cdc82-fea6-4658-9bca-584d67b7dfd3\"},\"nvrk\":{\"principalId\":\"ec49a718-d51c-4e71-9106-7f7fed1cc9a0\",\"clientId\":\"a5740e1d-13d0-40cf-8b7c-7a74babb059c\"},\"uaibrebqaaysj\":{\"principalId\":\"f3d93ac3-ea28-4d91-984a-26ab3c46ecc7\",\"clientId\":\"5cf08346-017d-4041-be9d-7d2d19f2286f\"},\"qtnqtt\":{\"principalId\":\"38ad80f7-babd-43ac-bfec-5774032a538f\",\"clientId\":\"1acda986-2887-48ef-a438-2307d03e4195\"}},\"principalId\":\"lwfffi\",\"tenantId\":\"pjpqqmtedltmmji\"},\"properties\":{\"provisioningState\":\"Updating\",\"steps\":[{\"name\":\"zphv\",\"branches\":[{\"name\":\"uyqncygupkvipmd\",\"actions\":[]},{\"name\":\"cwxqu\",\"actions\":[]},{\"name\":\"evzhfsto\",\"actions\":[]}]},{\"name\":\"xhojuj\",\"branches\":[{\"name\":\"pelmcuvhixbjxyf\",\"actions\":[]},{\"name\":\"n\",\"actions\":[]}]},{\"name\":\"lrcoolsttpki\",\"branches\":[{\"name\":\"kbnujr\",\"actions\":[]},{\"name\":\"wvtylbfpncurdo\",\"actions\":[]}]},{\"name\":\"wiithtywub\",\"branches\":[{\"name\":\"bihwqknfdnt\",\"actions\":[]},{\"name\":\"jchrdgoihxumw\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"ond\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"tsbwtovvtgse\":\"dataudfdlwgg\"}}]},\"location\":\"nqfiufxqknpi\",\"tags\":{\"dmqnrojlpij\":\"epttwqmsniff\",\"xfrdd\":\"k\",\"atiz\":\"c\"},\"id\":\"ronasxift\",\"name\":\"zq\",\"type\":\"zh\"}]}"; + String responseStr + = "{\"value\":[{\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"qmt\":{\"principalId\":\"09cc1a83-7967-4a00-9444-c8273185c704\",\"clientId\":\"7dbf2abf-1c99-4e0d-a363-474476929b40\"},\"tmmjihyeozph\":{\"principalId\":\"80362830-f6b2-45e6-b2e9-67f951c7e6a6\",\"clientId\":\"ed3d11fa-d978-4743-a66f-061725d1cf92\"}},\"principalId\":\"auyqncygupkv\",\"tenantId\":\"mdscwxqupev\"},\"properties\":{\"provisioningState\":\"Deleting\",\"steps\":[{\"name\":\"totxhojujb\",\"branches\":[{\"name\":\"elmcuvhixbjxyfw\",\"actions\":[]},{\"name\":\"yl\",\"actions\":[]},{\"name\":\"coolsttpkiwkkb\",\"actions\":[]},{\"name\":\"ujrywvtyl\",\"actions\":[]}]},{\"name\":\"fpncurdo\",\"branches\":[{\"name\":\"iithtywu\",\"actions\":[]},{\"name\":\"xcbihw\",\"actions\":[]},{\"name\":\"knfd\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"wjchrdg\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"luudfdlwggytsb\":\"dataumwctondz\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"tov\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"ufxqknpirgnepttw\":\"dataeinqf\",\"mqnrojlpijnkr\":\"datamsniffc\",\"zronasxift\":\"datafrddhcrati\"}}]},\"location\":\"zq\",\"tags\":{\"wesgogczh\":\"f\",\"lgnyhmo\":\"nnxk\",\"h\":\"sxkkg\"},\"id\":\"rghxjb\",\"name\":\"hqxvcxgfrpdsofbs\",\"type\":\"rnsvbuswd\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .experiments() - .listByResourceGroup("njwmwkpnbsazejj", true, "kagfhsxtt", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("nqfiufxqknpi", response.iterator().next().location()); - Assertions.assertEquals("epttwqmsniff", response.iterator().next().tags().get("dmqnrojlpij")); - Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("zphv", response.iterator().next().steps().get(0).name()); - Assertions.assertEquals("uyqncygupkvipmd", response.iterator().next().steps().get(0).branches().get(0).name()); - Assertions.assertEquals("ond", response.iterator().next().selectors().get(0).id()); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response + = manager.experiments().listByResourceGroup("ixqtn", false, "tezlwff", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("zq", response.iterator().next().location()); + Assertions.assertEquals("f", response.iterator().next().tags().get("wesgogczh")); + Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); + Assertions.assertEquals("totxhojujb", response.iterator().next().steps().get(0).name()); + Assertions.assertEquals("elmcuvhixbjxyfw", response.iterator().next().steps().get(0).branches().get(0).name()); + Assertions.assertEquals("wjchrdg", response.iterator().next().selectors().get(0).id()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListMockTests.java index 2ff75593f1cf..1b203f8577b9 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentsListMockTests.java @@ -32,43 +32,32 @@ public void testList() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"qwkyhkobop\":{\"principalId\":\"9afaec88-e2cb-4e51-8957-3ac88c1a8455\",\"clientId\":\"57e284ba-2b78-4605-9676-7005b0d63933\"},\"dkow\":{\"principalId\":\"4f41ab29-13a3-4ed0-bc0f-ef5f6f9a59f3\",\"clientId\":\"b83fdc62-696d-4f02-9fa4-53ac6555da27\"}},\"principalId\":\"bqpc\",\"tenantId\":\"kbwcc\"},\"properties\":{\"provisioningState\":\"Deleting\",\"steps\":[{\"name\":\"cdwxlpq\",\"branches\":[{\"name\":\"ftnkhtj\",\"actions\":[]},{\"name\":\"y\",\"actions\":[]},{\"name\":\"ngwfqatm\",\"actions\":[]}]},{\"name\":\"dhtmdvypgikd\",\"branches\":[{\"name\":\"zywkb\",\"actions\":[]},{\"name\":\"rryuzhlhkjo\",\"actions\":[]},{\"name\":\"rvqqaatj\",\"actions\":[]}]},{\"name\":\"nrvgoupmfiibfgg\",\"branches\":[{\"name\":\"ool\",\"actions\":[]},{\"name\":\"rwxkvtkkgl\",\"actions\":[]},{\"name\":\"qwjygvja\",\"actions\":[]},{\"name\":\"vblm\",\"actions\":[]}]},{\"name\":\"vkzuhbxvvyhgso\",\"branches\":[{\"name\":\"yrqufegxuvwz\",\"actions\":[]},{\"name\":\"bnhlmc\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"p\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"jejveg\":\"datatvgbmhrixkwmy\",\"eaxhcexdrrvqahqk\":\"datahbpnaixexccbd\",\"hyjsvfycx\":\"datahtpwij\",\"t\":\"databfvoowvrv\"}}]},\"location\":\"jqppyostronzmy\",\"tags\":{\"xkmcwaekrrjre\":\"ipn\",\"jglikkxwslolb\":\"fxtsgum\"},\"id\":\"pvuzlmv\",\"name\":\"elfk\",\"type\":\"gplcrpwjxeznoigb\"}]}"; + String responseStr + = "{\"value\":[{\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ixkwmyijejveg\":{\"principalId\":\"cc1b7169-3ea9-4e3e-8e9c-9da325fbd6d6\",\"clientId\":\"283a5759-690d-4a2f-81b0-cf54f7f0038c\"},\"pna\":{\"principalId\":\"19de67e8-5fb5-4422-bcf4-f04b0ff13c34\",\"clientId\":\"f470ab26-71a1-4133-8067-4882dab06c7e\"},\"xccbdreaxhcex\":{\"principalId\":\"8f92162f-760d-47a9-9ab6-ffa73bfe34f0\",\"clientId\":\"f3d81987-4331-499d-9ad6-a7ab24671ed0\"},\"vqahqkghtpwi\":{\"principalId\":\"7c4bf370-3cff-4a7e-bfb7-df7ec7a5b8b9\",\"clientId\":\"58a5a2a5-a4c4-4336-a6d0-df2207854d28\"}},\"principalId\":\"hyjsvfycx\",\"tenantId\":\"fvoow\"},\"properties\":{\"provisioningState\":\"Creating\",\"steps\":[{\"name\":\"t\",\"branches\":[{\"name\":\"qp\",\"actions\":[]},{\"name\":\"y\",\"actions\":[]},{\"name\":\"s\",\"actions\":[]},{\"name\":\"ronzmyhgfip\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"xkmcwaekrrjre\",\"filter\":{\"type\":\"ChaosTargetFilter\"},\"\":{\"lbqpvuzlmvfelf\":\"datasgumhjglikkxwsl\",\"crpw\":\"datatgp\"}}]},\"location\":\"xeznoi\",\"tags\":{\"qkagfhsxt\":\"njwmwkpnbsazejj\",\"dm\":\"augzxnfaazpxdtn\"},\"id\":\"qjjlwuen\",\"name\":\"rkpyouaibrebqaay\",\"type\":\"j\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = - manager.experiments().list(false, "elvezrypq", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.experiments().list(false, "nhlmctlpdng", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jqppyostronzmy", response.iterator().next().location()); - Assertions.assertEquals("ipn", response.iterator().next().tags().get("xkmcwaekrrjre")); + Assertions.assertEquals("xeznoi", response.iterator().next().location()); + Assertions.assertEquals("njwmwkpnbsazejj", response.iterator().next().tags().get("qkagfhsxt")); Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("cdwxlpq", response.iterator().next().steps().get(0).name()); - Assertions.assertEquals("ftnkhtj", response.iterator().next().steps().get(0).branches().get(0).name()); - Assertions.assertEquals("p", response.iterator().next().selectors().get(0).id()); + Assertions.assertEquals("t", response.iterator().next().steps().get(0).name()); + Assertions.assertEquals("qp", response.iterator().next().steps().get(0).branches().get(0).name()); + Assertions.assertEquals("xkmcwaekrrjre", response.iterator().next().selectors().get(0).id()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationDisplayTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationDisplayTests.java index 5223d22a1ff9..75d0dc13da38 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationDisplayTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationDisplayTests.java @@ -10,11 +10,10 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"d\",\"resource\":\"ygdvwv\",\"operation\":\"iohgwxrtfud\",\"description\":\"pxgy\"}") - .toObject(OperationDisplay.class); + OperationDisplay model = BinaryData + .fromString( + "{\"provider\":\"k\",\"resource\":\"umiekkezzi\",\"operation\":\"ly\",\"description\":\"hdgqggeb\"}") + .toObject(OperationDisplay.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationInnerTests.java index f913ee8cc5a9..266bd595cc87 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationInnerTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationInnerTests.java @@ -11,11 +11,9 @@ public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"gxk\",\"isDataAction\":false,\"display\":{\"provider\":\"melwuipiccjz\",\"resource\":\"ivgvvcna\",\"operation\":\"hyrnxxmu\",\"description\":\"dndrdvstkwqqtche\"},\"origin\":\"user\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); + OperationInner model = BinaryData.fromString( + "{\"name\":\"bfatklddxbjhwu\",\"isDataAction\":false,\"display\":{\"provider\":\"jos\",\"resource\":\"youlp\",\"operation\":\"v\",\"description\":\"glrvimjwosytxi\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") + .toObject(OperationInner.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationListResultTests.java index 0b2bfd880ad9..11837150b953 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationListResultTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationListResultTests.java @@ -10,11 +10,9 @@ public final class OperationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"d\",\"isDataAction\":false,\"display\":{\"provider\":\"ocogj\",\"resource\":\"dtbnnha\",\"operation\":\"ocrkvcikh\",\"description\":\"p\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"queziky\"}") - .toObject(OperationListResult.class); + OperationListResult model = BinaryData.fromString( + "{\"value\":[{\"name\":\"z\",\"isDataAction\":true,\"display\":{\"provider\":\"c\",\"resource\":\"y\",\"operation\":\"yrnxxmueedn\",\"description\":\"dvstkw\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"alm\",\"isDataAction\":true,\"display\":{\"provider\":\"aygdvwvgpioh\",\"resource\":\"xrtfudxep\",\"operation\":\"yqagvrvm\",\"description\":\"k\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"dblx\",\"isDataAction\":true,\"display\":{\"provider\":\"njhf\",\"resource\":\"wmszkk\",\"operation\":\"qreyfkzi\",\"description\":\"jawneaiv\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"pcirelsfeaen\"}") + .toObject(OperationListResult.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationStatusInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationStatusInnerTests.java index fffe94a447c5..848054746acd 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationStatusInnerTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationStatusInnerTests.java @@ -11,32 +11,25 @@ public final class OperationStatusInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationStatusInner model = - BinaryData - .fromString( - "{\"id\":\"tsmypyynpcdp\",\"name\":\"nzgmwznmabik\",\"startTime\":\"orgjhxbldt\",\"endTime\":\"wrlkdmtn\",\"status\":\"ok\"}") - .toObject(OperationStatusInner.class); - Assertions.assertEquals("tsmypyynpcdp", model.id()); - Assertions.assertEquals("nzgmwznmabik", model.name()); - Assertions.assertEquals("orgjhxbldt", model.startTime()); - Assertions.assertEquals("wrlkdmtn", model.endTime()); - Assertions.assertEquals("ok", model.status()); + OperationStatusInner model = BinaryData.fromString( + "{\"id\":\"ocrkvcikh\",\"name\":\"p\",\"startTime\":\"qgxqquezikyw\",\"endTime\":\"xkalla\",\"status\":\"elwuipi\"}") + .toObject(OperationStatusInner.class); + Assertions.assertEquals("ocrkvcikh", model.id()); + Assertions.assertEquals("p", model.name()); + Assertions.assertEquals("qgxqquezikyw", model.startTime()); + Assertions.assertEquals("xkalla", model.endTime()); + Assertions.assertEquals("elwuipi", model.status()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OperationStatusInner model = - new OperationStatusInner() - .withId("tsmypyynpcdp") - .withName("nzgmwznmabik") - .withStartTime("orgjhxbldt") - .withEndTime("wrlkdmtn") - .withStatus("ok"); + OperationStatusInner model = new OperationStatusInner().withId("ocrkvcikh").withName("p") + .withStartTime("qgxqquezikyw").withEndTime("xkalla").withStatus("elwuipi"); model = BinaryData.fromObject(model).toObject(OperationStatusInner.class); - Assertions.assertEquals("tsmypyynpcdp", model.id()); - Assertions.assertEquals("nzgmwznmabik", model.name()); - Assertions.assertEquals("orgjhxbldt", model.startTime()); - Assertions.assertEquals("wrlkdmtn", model.endTime()); - Assertions.assertEquals("ok", model.status()); + Assertions.assertEquals("ocrkvcikh", model.id()); + Assertions.assertEquals("p", model.name()); + Assertions.assertEquals("qgxqquezikyw", model.startTime()); + Assertions.assertEquals("xkalla", model.endTime()); + Assertions.assertEquals("elwuipi", model.status()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationStatusesGetWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationStatusesGetWithResponseMockTests.java index 1ae947bc5fc4..5a108f0be9d4 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationStatusesGetWithResponseMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/OperationStatusesGetWithResponseMockTests.java @@ -30,45 +30,31 @@ public void testGetWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"id\":\"idfcxsspuunnoxyh\",\"name\":\"g\",\"startTime\":\"drihpfhoqcaaewda\",\"endTime\":\"djvlpj\",\"status\":\"kzbrmsgeivsiy\"}"; + String responseStr + = "{\"id\":\"xccybvpa\",\"name\":\"kkudzp\",\"startTime\":\"wjplma\",\"endTime\":\"tcyohpfkyrk\",\"status\":\"dg\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OperationStatus response = - manager - .operationStatuses() - .getWithResponse("uqypfcvle", "chpqbmfpjba", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("idfcxsspuunnoxyh", response.id()); - Assertions.assertEquals("g", response.name()); - Assertions.assertEquals("drihpfhoqcaaewda", response.startTime()); - Assertions.assertEquals("djvlpj", response.endTime()); - Assertions.assertEquals("kzbrmsgeivsiy", response.status()); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + OperationStatus response = manager.operationStatuses() + .getWithResponse("edabgyvudtjue", "bcihxuuwhc", com.azure.core.util.Context.NONE).getValue(); + + Assertions.assertEquals("xccybvpa", response.id()); + Assertions.assertEquals("kkudzp", response.name()); + Assertions.assertEquals("wjplma", response.startTime()); + Assertions.assertEquals("tcyohpfkyrk", response.endTime()); + Assertions.assertEquals("dg", response.status()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ResourceIdentityTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ResourceIdentityTests.java index 403c5b8d79c2..9a55512823f9 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ResourceIdentityTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ResourceIdentityTests.java @@ -15,27 +15,17 @@ public final class ResourceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ResourceIdentity model = - BinaryData - .fromString( - "{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"zabglcuhxwt\":{\"principalId\":\"636e32c1-82cf-4032-bd14-59f4ad3d0032\",\"clientId\":\"3ee8071b-e657-4e3d-831a-4027e711a01e\"},\"qik\":{\"principalId\":\"ab6859fb-fab8-4827-96a8-801d4dda4ca9\",\"clientId\":\"f450bb8c-9e9e-431f-958e-f49dfe1d5a5f\"},\"ovplw\":{\"principalId\":\"28a08b74-30ee-4366-891c-399d804b0e21\",\"clientId\":\"2613cf04-8f03-4160-978d-493ebae52a11\"}},\"principalId\":\"hvgyuguosvmk\",\"tenantId\":\"sxqu\"}") - .toObject(ResourceIdentity.class); + ResourceIdentity model = BinaryData.fromString( + "{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"zabglcuhxwt\":{\"principalId\":\"b6530509-94c7-4e0d-95ac-1e4e78448f71\",\"clientId\":\"c48be21d-ce83-40e4-a49c-ae0060c973e9\"},\"qik\":{\"principalId\":\"64799503-0174-4da8-9b23-9124b8c6506d\",\"clientId\":\"23a7338f-5f5b-4819-9023-acec91c1bd3f\"},\"ovplw\":{\"principalId\":\"6826292f-a310-47eb-8590-89dd0506f502\",\"clientId\":\"3146ab84-69f6-46e1-af4c-2125972011a4\"}},\"principalId\":\"hvgyuguosvmk\",\"tenantId\":\"sxqu\"}") + .toObject(ResourceIdentity.class); Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceIdentity model = - new ResourceIdentity() - .withType(ResourceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "zabglcuhxwt", - new UserAssignedIdentity(), - "qik", - new UserAssignedIdentity(), - "ovplw", - new UserAssignedIdentity())); + ResourceIdentity model = new ResourceIdentity().withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("zabglcuhxwt", new UserAssignedIdentity(), "qik", + new UserAssignedIdentity(), "ovplw", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ResourceIdentity.class); Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.type()); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/StepStatusTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/StepStatusTests.java index aa65a797c4ae..1b9539c39281 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/StepStatusTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/StepStatusTests.java @@ -10,11 +10,9 @@ public final class StepStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - StepStatus model = - BinaryData - .fromString( - "{\"stepName\":\"efuzmuvpbttd\",\"stepId\":\"orppxebmnzbtb\",\"status\":\"pglkf\",\"branches\":[{\"branchName\":\"neuelfphsdyhtoz\",\"branchId\":\"kd\",\"status\":\"wq\",\"actions\":[{\"actionName\":\"zx\",\"actionId\":\"vithh\",\"status\":\"o\",\"startTime\":\"2021-11-01T18:47:46Z\",\"endTime\":\"2021-03-28T21:26:02Z\",\"targets\":[{},{},{}]}]},{\"branchName\":\"ohfwds\",\"branchId\":\"ka\",\"status\":\"utiiswacf\",\"actions\":[{\"actionName\":\"zzewkfvhqcrai\",\"actionId\":\"pnppfuf\",\"status\":\"wdmhdlxyjrxs\",\"startTime\":\"2021-10-27T14:22:38Z\",\"endTime\":\"2020-12-27T20:37:24Z\",\"targets\":[{}]},{\"actionName\":\"wqapnedgfbcvk\",\"actionId\":\"q\",\"status\":\"keqdcvdrhvoods\",\"startTime\":\"2021-11-02T01:53:07Z\",\"endTime\":\"2021-03-29T00:37:52Z\",\"targets\":[{},{},{}]},{\"actionName\":\"pcjwv\",\"actionId\":\"dldwmgxc\",\"status\":\"slpmutwuo\",\"startTime\":\"2021-07-03T15:36:28Z\",\"endTime\":\"2021-08-11T07:57:19Z\",\"targets\":[{}]},{\"actionName\":\"niyqslui\",\"actionId\":\"dggkzzlvmbmpa\",\"status\":\"odfvuefywsbp\",\"startTime\":\"2021-09-23T19:46:07Z\",\"endTime\":\"2021-11-18T13:44:32Z\",\"targets\":[{},{},{},{}]}]},{\"branchName\":\"ouyftaakc\",\"branchId\":\"iyzvqtmnub\",\"status\":\"kpzksmondjmq\",\"actions\":[{\"actionName\":\"pomgkopkwhojvp\",\"actionId\":\"qgxy\",\"status\":\"ocmbqfqvmkcxoza\",\"startTime\":\"2021-08-25T20:55:15Z\",\"endTime\":\"2021-06-19T06:02:18Z\",\"targets\":[{},{}]},{\"actionName\":\"glyatddckcbcuej\",\"actionId\":\"xgc\",\"status\":\"ibrhosxsdqr\",\"startTime\":\"2021-07-06T01:32:33Z\",\"endTime\":\"2021-06-02T05:04:16Z\",\"targets\":[{},{},{}]},{\"actionName\":\"rq\",\"actionId\":\"bahwfl\",\"status\":\"zdtmhrkwofy\",\"startTime\":\"2021-02-28T16:21:21Z\",\"endTime\":\"2021-09-15T04:25:08Z\",\"targets\":[{},{},{}]},{\"actionName\":\"expbtg\",\"actionId\":\"bwoenwashrt\",\"status\":\"kcnqxwbpo\",\"startTime\":\"2021-09-01T09:08:06Z\",\"endTime\":\"2021-07-21T21:11:01Z\",\"targets\":[{}]}]}]}") - .toObject(StepStatus.class); + StepStatus model = BinaryData.fromString( + "{\"stepName\":\"luicpdggkzzlvmbm\",\"stepId\":\"xmodf\",\"status\":\"efyw\",\"branches\":[{\"branchName\":\"vmwy\",\"branchId\":\"fouyf\",\"status\":\"akcp\",\"actions\":[{\"actionName\":\"vqtmnub\",\"actionId\":\"kpzksmondjmq\",\"status\":\"vypomgkopkwho\",\"startTime\":\"2021-08-09T17:57:45Z\",\"endTime\":\"2021-12-07T09:07:14Z\",\"targets\":[{},{},{},{}]},{\"actionName\":\"ysmocmbqfqvmkcxo\",\"actionId\":\"pvhelxprg\",\"status\":\"atddc\",\"startTime\":\"2021-09-13T16:27:08Z\",\"endTime\":\"2021-12-04T18:39:42Z\",\"targets\":[{},{},{},{}]}]},{\"branchName\":\"jxgciqibrh\",\"branchId\":\"xsdqrhzoymibmrqy\",\"status\":\"ahwfluszdtmhrk\",\"actions\":[{\"actionName\":\"yvoqa\",\"actionId\":\"iexpbtgiwbwo\",\"status\":\"washr\",\"startTime\":\"2021-08-01T13:56:15Z\",\"endTime\":\"2021-10-17T07:53:24Z\",\"targets\":[{},{},{}]},{\"actionName\":\"wbpokulpiujwaasi\",\"actionId\":\"i\",\"status\":\"byuqerpqlp\",\"startTime\":\"2021-10-05T15:21:02Z\",\"endTime\":\"2020-12-29T00:03:32Z\",\"targets\":[{},{}]}]},{\"branchName\":\"bdbutauvf\",\"branchId\":\"kuwhh\",\"status\":\"ykojoxafnndlpic\",\"actions\":[{\"actionName\":\"mkcdyhbpkkpwdre\",\"actionId\":\"ovvqfovljxywsu\",\"status\":\"yrs\",\"startTime\":\"2021-03-16T15:34:55Z\",\"endTime\":\"2021-05-20T04:26:58Z\",\"targets\":[{},{},{}]}]}]}") + .toObject(StepStatus.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetInnerTests.java index 2434a88591a6..5b2a5d7669ef 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetInnerTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetInnerTests.java @@ -13,23 +13,18 @@ public final class TargetInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TargetInner model = - BinaryData - .fromString( - "{\"location\":\"xrbuukzclew\",\"properties\":{\"pofncck\":\"datamlwpazt\",\"qa\":\"datayfzqwhxxbu\",\"lxorjaltolmncws\":\"datazfeqztppri\"},\"id\":\"bqwcsdbnwdcf\",\"name\":\"ucqdpfuvglsb\",\"type\":\"jcanvxbvtvudut\"}") - .toObject(TargetInner.class); - Assertions.assertEquals("xrbuukzclew", model.location()); + TargetInner model = BinaryData.fromString( + "{\"location\":\"knnqvsaznq\",\"properties\":{\"mkycgra\":\"dataorudsgsa\"},\"id\":\"wjue\",\"name\":\"aeburuvdmo\",\"type\":\"s\"}") + .toObject(TargetInner.class); + Assertions.assertEquals("knnqvsaznq", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TargetInner model = - new TargetInner() - .withLocation("xrbuukzclew") - .withProperties( - mapOf("pofncck", "datamlwpazt", "qa", "datayfzqwhxxbu", "lxorjaltolmncws", "datazfeqztppri")); + TargetInner model + = new TargetInner().withLocation("knnqvsaznq").withProperties(mapOf("mkycgra", "dataorudsgsa")); model = BinaryData.fromObject(model).toObject(TargetInner.class); - Assertions.assertEquals("xrbuukzclew", model.location()); + Assertions.assertEquals("knnqvsaznq", model.location()); } // Use "Map.of" if available diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetListResultTests.java index bd6e3ec46e3b..503cdf783064 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetListResultTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetListResultTests.java @@ -10,11 +10,9 @@ public final class TargetListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TargetListResult model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"dgssofwqmzqal\",\"properties\":{\"byxbaaabjy\":\"datamnjijpxacqqudf\",\"zrtuzq\":\"dataayffim\"},\"id\":\"gsexne\",\"name\":\"fdnw\",\"type\":\"wmewzsyy\"},{\"location\":\"zsoibjudpfrxtr\",\"properties\":{\"ubpaxhe\":\"datazvaytdwkqbr\"},\"id\":\"iilivpdtiirqtd\",\"name\":\"oaxoruzfgsqu\",\"type\":\"fxrxxle\"},{\"location\":\"amxjezwlw\",\"properties\":{\"ooaojkniodkooebw\":\"dataxuqlcvydypat\",\"infwjlfltkacjve\":\"dataujhemmsbvdkcrodt\",\"ggkfpagaowpul\":\"datakdlfoa\",\"sjervti\":\"dataqblylsyxkqj\"},\"id\":\"gxsds\",\"name\":\"uem\",\"type\":\"sbzkf\"}],\"nextLink\":\"eyvpnqicvinvkj\"}") - .toObject(TargetListResult.class); + TargetListResult model = BinaryData.fromString( + "{\"value\":[{\"location\":\"nuj\",\"properties\":{\"wj\":\"datammsbvdkcrodtjin\",\"f\":\"datafltkacjv\",\"gaowpulpqblylsyx\":\"datadlfoakggkfp\"},\"id\":\"qjnsjervtia\",\"name\":\"xsdszuempsb\",\"type\":\"kfzbeyvpnqicvi\"},{\"location\":\"jjxd\",\"properties\":{\"paztzpofncck\":\"databuukzclewyhml\",\"qa\":\"datayfzqwhxxbu\",\"lxorjaltolmncws\":\"datazfeqztppri\",\"ucqdpfuvglsb\":\"databqwcsdbnwdcf\"},\"id\":\"jcanvxbvtvudut\",\"name\":\"cormr\",\"type\":\"xqtvcofu\"}],\"nextLink\":\"lvkgju\"}") + .toObject(TargetListResult.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetReferenceTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetReferenceTests.java index 7db09e563b4f..d233e4c6b509 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetReferenceTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetReferenceTests.java @@ -12,17 +12,17 @@ public final class TargetReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TargetReference model = - BinaryData.fromString("{\"type\":\"ChaosTarget\",\"id\":\"i\"}").toObject(TargetReference.class); + TargetReference model = BinaryData.fromString("{\"type\":\"ChaosTarget\",\"id\":\"gsfraoyzkoow\"}") + .toObject(TargetReference.class); Assertions.assertEquals(TargetReferenceType.CHAOS_TARGET, model.type()); - Assertions.assertEquals("i", model.id()); + Assertions.assertEquals("gsfraoyzkoow", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TargetReference model = new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("i"); + TargetReference model = new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("gsfraoyzkoow"); model = BinaryData.fromObject(model).toObject(TargetReference.class); Assertions.assertEquals(TargetReferenceType.CHAOS_TARGET, model.type()); - Assertions.assertEquals("i", model.id()); + Assertions.assertEquals("gsfraoyzkoow", model.id()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypeInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypeInnerTests.java index 1a5844d27577..585b05d7d375 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypeInnerTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypeInnerTests.java @@ -11,18 +11,16 @@ public final class TargetTypeInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TargetTypeInner model = - BinaryData - .fromString( - "{\"location\":\"cktqumiekkezzi\",\"properties\":{\"displayName\":\"ly\",\"description\":\"hdgqggeb\",\"propertiesSchema\":\"nyga\",\"resourceTypes\":[\"db\"]},\"id\":\"fatpxllrxcyjmoa\",\"name\":\"su\",\"type\":\"arm\"}") - .toObject(TargetTypeInner.class); - Assertions.assertEquals("cktqumiekkezzi", model.location()); + TargetTypeInner model = BinaryData.fromString( + "{\"location\":\"fimrzrtuzqogse\",\"properties\":{\"displayName\":\"evfdnwnwm\",\"description\":\"zsyyceuzso\",\"propertiesSchema\":\"judpfrxt\",\"resourceTypes\":[\"zvaytdwkqbr\"]},\"id\":\"ubpaxhe\",\"name\":\"iilivpdtiirqtd\",\"type\":\"oaxoruzfgsqu\"}") + .toObject(TargetTypeInner.class); + Assertions.assertEquals("fimrzrtuzqogse", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TargetTypeInner model = new TargetTypeInner().withLocation("cktqumiekkezzi"); + TargetTypeInner model = new TargetTypeInner().withLocation("fimrzrtuzqogse"); model = BinaryData.fromObject(model).toObject(TargetTypeInner.class); - Assertions.assertEquals("cktqumiekkezzi", model.location()); + Assertions.assertEquals("fimrzrtuzqogse", model.location()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypeListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypeListResultTests.java index 6330c9b78de7..dc526578822a 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypeListResultTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypeListResultTests.java @@ -10,11 +10,9 @@ public final class TargetTypeListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TargetTypeListResult model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"vmnpkukghimdblx\",\"properties\":{\"displayName\":\"imfnjhfjx\",\"description\":\"szkkfoqre\",\"propertiesSchema\":\"kzikfjawneaivxwc\",\"resourceTypes\":[\"pcirelsfeaen\",\"abfatkl\",\"dxbjhwuaanozj\"]},\"id\":\"sphyoulpjrvxa\",\"name\":\"l\",\"type\":\"vimjwos\"}],\"nextLink\":\"xitc\"}") - .toObject(TargetTypeListResult.class); + TargetTypeListResult model = BinaryData.fromString( + "{\"value\":[{\"location\":\"aeqidbqfatpxll\",\"properties\":{\"displayName\":\"cyjmoadsuvarmy\",\"description\":\"mjsjqb\",\"propertiesSchema\":\"hyxxrwlycoduhpk\",\"resourceTypes\":[\"ymareqnajxqugj\",\"ky\"]},\"id\":\"ubeddg\",\"name\":\"sofwqmzqalkrmnji\",\"type\":\"pxacqqudfn\"}],\"nextLink\":\"xbaaabjyv\"}") + .toObject(TargetTypeListResult.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypePropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypePropertiesTests.java index 8257131ab7c3..7b5100b2d932 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypePropertiesTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypePropertiesTests.java @@ -10,11 +10,9 @@ public final class TargetTypePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TargetTypeProperties model = - BinaryData - .fromString( - "{\"displayName\":\"dmjsjqb\",\"description\":\"hyxxrwlycoduhpk\",\"propertiesSchema\":\"gymare\",\"resourceTypes\":[\"jxqugjhky\"]}") - .toObject(TargetTypeProperties.class); + TargetTypeProperties model = BinaryData.fromString( + "{\"displayName\":\"xrxxlep\",\"description\":\"amxjezwlw\",\"propertiesSchema\":\"xuqlcvydypat\",\"resourceTypes\":[\"aojkniodk\"]}") + .toObject(TargetTypeProperties.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypesGetWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypesGetWithResponseMockTests.java index 993012ec0523..82f08b9242a2 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypesGetWithResponseMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypesGetWithResponseMockTests.java @@ -30,41 +30,27 @@ public void testGetWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"location\":\"vu\",\"properties\":{\"displayName\":\"ztcktyh\",\"description\":\"qedcgzulwm\",\"propertiesSchema\":\"qzz\",\"resourceTypes\":[\"vpglydz\",\"krvq\",\"ev\"]},\"id\":\"oepry\",\"name\":\"t\",\"type\":\"wytpzdmovz\"}"; + String responseStr + = "{\"location\":\"ddrihpf\",\"properties\":{\"displayName\":\"qcaaewdaomdjvl\",\"description\":\"x\",\"propertiesSchema\":\"zb\",\"resourceTypes\":[\"geivsiykzkdncj\",\"xonbzoggculapz\"]},\"id\":\"y\",\"name\":\"pgogtqxepny\",\"type\":\"b\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - TargetType response = - manager - .targetTypes() - .getWithResponse("zapeewchpx", "ktwkuziyc", com.azure.core.util.Context.NONE) - .getValue(); + TargetType response = manager.targetTypes() + .getWithResponse("qbmfpjbabwidf", "xsspuunnoxyhk", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("vu", response.location()); + Assertions.assertEquals("ddrihpf", response.location()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypesListMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypesListMockTests.java index 7a8bee51a707..d66b166f6e6e 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypesListMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetTypesListMockTests.java @@ -31,38 +31,27 @@ public void testList() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"location\":\"pgogtqxepny\",\"properties\":{\"displayName\":\"fuajly\",\"description\":\"lvofqzhvfcibyfmo\",\"propertiesSchema\":\"xrkjpvdw\",\"resourceTypes\":[\"wiivwzjbhyzsx\",\"rkambt\",\"negvmnvuqe\",\"vldspa\"]},\"id\":\"tjb\",\"name\":\"kdmflvestmjlx\",\"type\":\"ril\"}]}"; + String responseStr + = "{\"value\":[{\"location\":\"aiy\",\"properties\":{\"displayName\":\"d\",\"description\":\"acegfnmntf\",\"propertiesSchema\":\"vm\",\"resourceTypes\":[\"nczdwvv\",\"alxlllchp\",\"db\"]},\"id\":\"evwrdnhfuk\",\"name\":\"vsjcswsmystuluqy\",\"type\":\"fcvlerch\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = - manager.targetTypes().list("kdncj", "xonbzoggculapz", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.targetTypes().list("gsj", "mnwqj", com.azure.core.util.Context.NONE); - Assertions.assertEquals("pgogtqxepny", response.iterator().next().location()); + Assertions.assertEquals("aiy", response.iterator().next().location()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsCreateOrUpdateWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsCreateOrUpdateWithResponseMockTests.java index 169963a3008f..c8002eaa7d36 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsCreateOrUpdateWithResponseMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsCreateOrUpdateWithResponseMockTests.java @@ -33,60 +33,32 @@ public void testCreateOrUpdateWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"location\":\"qwogfnzjvus\",\"properties\":{\"ozuxylfsbtkadpys\":\"datald\",\"tgkbugrjqctojc\":\"datawn\",\"cuplcplcwkhih\":\"dataisofieypefojyqd\"},\"id\":\"hlhzdsqtzbsrgno\",\"name\":\"cjhfgmvecactxmw\",\"type\":\"teyowclu\"}"; + String responseStr + = "{\"location\":\"ocxvdfffwafqr\",\"properties\":{\"unzo\":\"datadaspavehhrvk\",\"cxgkmoyxcdyui\":\"dataud\",\"aeoisrvh\":\"datahmfdnbzydvfvfcj\"},\"id\":\"gorf\",\"name\":\"ukiscvwmzhw\",\"type\":\"lefaxvxilcbtgn\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - Target response = - manager - .targets() - .createOrUpdateWithResponse( - "spave", - "hrv", - "bunzozudh", - "xg", - "moy", - new TargetInner() - .withLocation("yuibhm") - .withProperties( - mapOf( - "aeoisrvh", - "datanbzydvfvfcj", - "ukiscvwmzhw", - "datagorf", - "nzeyqxtjj", - "datalefaxvxilcbtgn", - "vodggxdbee", - "datazqlqhyc")), - com.azure.core.util.Context.NONE) - .getValue(); + Target response = manager.targets() + .createOrUpdateWithResponse("vluwmncsttij", "y", "vpo", "krsgsgb", "huzqgn", + new TargetInner().withLocation("kynscliqhzv") + .withProperties(mapOf("mtk", "datank", "ppnvdxz", "databo", "hlfkqojpy", "datahihfrbbcevqagtlt")), + com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals("qwogfnzjvus", response.location()); + Assertions.assertEquals("ocxvdfffwafqr", response.location()); } // Use "Map.of" if available diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsDeleteWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsDeleteWithResponseMockTests.java index 576442790580..498dbd959852 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsDeleteWithResponseMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsDeleteWithResponseMockTests.java @@ -32,33 +32,21 @@ public void testDeleteWithResponse() throws Exception { Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.targets().deleteWithResponse("auzzptjazysd", "hezwwvaiq", "uvvfonkp", "hqyikvy", "auy", + com.azure.core.util.Context.NONE); - manager - .targets() - .deleteWithResponse( - "vgtrdcnifmzzs", "ymbrnysuxmpraf", "g", "khocxvdfffwaf", "roud", com.azure.core.util.Context.NONE); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsGetWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsGetWithResponseMockTests.java index 23e33ab2ad43..492cd5efbe7b 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsGetWithResponseMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsGetWithResponseMockTests.java @@ -30,41 +30,27 @@ public void testGetWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"location\":\"uwmncs\",\"properties\":{\"bvpoekrsgsgbdhu\":\"dataijf\",\"hzvhxnkomtkubo\":\"dataqgnjdgkynscli\"},\"id\":\"ppnvdxz\",\"name\":\"hihfrbbcevqagtlt\",\"type\":\"hlfkqojpy\"}"; + String responseStr + = "{\"location\":\"mldgxobfirc\",\"properties\":{\"ayzri\":\"datapkc\"},\"id\":\"khyawfvjlboxqv\",\"name\":\"jlmxhomdynhd\",\"type\":\"digumbnr\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - Target response = - manager - .targets() - .getWithResponse("ysdzhez", "wva", "qyuvvfonkp", "hqyikvy", "auy", com.azure.core.util.Context.NONE) - .getValue(); + Target response = manager.targets().getWithResponse("vtoepryutnw", "tpzdmovzvfvaawzq", "dflgzuri", + "laecxndticok", "vzm", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("uwmncs", response.location()); + Assertions.assertEquals("mldgxobfirc", response.location()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsListMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsListMockTests.java index a67d7d5a0410..4e4c05305c87 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsListMockTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/TargetsListMockTests.java @@ -31,40 +31,27 @@ public void testList() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"location\":\"clnpkci\",\"properties\":{\"wf\":\"datazriykhy\",\"xqvkjlmxhomdyn\":\"datajlb\"},\"id\":\"dwdigumb\",\"name\":\"raauzzpt\",\"type\":\"a\"}]}"; + String responseStr + = "{\"value\":[{\"location\":\"ambtrnegvm\",\"properties\":{\"dspastjbkkdmfl\":\"datauqeqv\",\"jlxr\":\"dataest\",\"wk\":\"datailozapeewchpxlk\",\"yhjtqedcgzu\":\"dataziycslevufuztck\"},\"id\":\"wmmrq\",\"name\":\"zrrjvpgly\",\"type\":\"zgkrvqe\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - ChaosManager manager = - ChaosManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + ChaosManager manager = ChaosManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = - manager - .targets() - .list("fvaawzqa", "f", "gzuriglaecxndt", "cokpv", "mlqtmldgxob", com.azure.core.util.Context.NONE); + PagedIterable response = manager.targets().list("uajlyj", "lvofqzhvfcibyfmo", "uxrkjp", "dwxf", + "wiivwzjbhyzsx", com.azure.core.util.Context.NONE); - Assertions.assertEquals("clnpkci", response.iterator().next().location()); + Assertions.assertEquals("ambtrnegvm", response.iterator().next().location()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/UserAssignedIdentityTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/UserAssignedIdentityTests.java index 830b9fc5e197..b1fe4b0049d7 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/UserAssignedIdentityTests.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/UserAssignedIdentityTests.java @@ -10,11 +10,9 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UserAssignedIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"15998785-2c8d-4c6e-b801-9dfeb5ab338f\",\"clientId\":\"978c9dd2-fcdd-466e-9c2e-6a409875c785\"}") - .toObject(UserAssignedIdentity.class); + UserAssignedIdentity model = BinaryData.fromString( + "{\"principalId\":\"928a78b2-4f92-47c1-a5ee-1b78249ce92d\",\"clientId\":\"ff7e318d-8f6e-4d3f-b755-1092969d4109\"}") + .toObject(UserAssignedIdentity.class); } @org.junit.jupiter.api.Test